Skip to content

Commit 34beeae

Browse files
committedDec 9, 2013
[FIX] font: correct call to font_scan, add book to displayed mode
bzr revid: [email protected]
1 parent 4bc2fa3 commit 34beeae

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎addons/base_setup/res_config.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ def _change_header(self, header,font):
6868

6969
def set_base_defaults(self, cr, uid, ids, context=None):
7070
ir_model_data = self.pool.get('ir.model.data')
71-
wizard = self.browse(cr, uid, ids)[0]
71+
wizard = self.browse(cr, uid, ids, context)[0]
7272
if wizard.font:
7373
user = self.pool.get('res.users').browse(cr, uid, uid, context)
74-
font_name = wizard.font.name
74+
font_name = wizard.font.family
7575
user.company_id.write({'font': wizard.font.id,'rml_header': self._change_header(user.company_id.rml_header,font_name), 'rml_header2': self._change_header(user.company_id.rml_header2, font_name), 'rml_header3': self._change_header(user.company_id.rml_header3, font_name)})
7676
return {}
7777

7878
def act_discover_fonts(self, cr, uid, ids, context=None):
79-
return self.pool.get("res.font").font_scan(cr, uid, context)
79+
return self.pool.get("res.font").font_scan(cr, uid, context=context)
8080

8181
# Preferences wizard for Sales & CRM.
8282
# It is defined here because it is inherited independently in modules sale, crm,

‎addons/base_setup/res_config_view.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
<label for="font" />
9595
<div>
9696
<div>
97-
<field name="font" class="oe_inline" domain="[('mode', 'in', ('normal', 'regular', 'all'))]" />
97+
<field name="font" class="oe_inline" domain="[('mode', 'in', ('normal', 'regular', 'all', 'book'))]" />
9898
<button string="(reload fonts)" name="act_discover_fonts" type="object" class="oe_link"/>
9999
</div>
100100
</div>

0 commit comments

Comments
 (0)
Please sign in to comment.