[FIX] font: correct call to font_scan, add book to displayed mode
bzr revid: mat@openerp.com-20131209132132-61qg1zsybh6zcxim
This commit is contained in:
@@ -68,15 +68,15 @@ class base_config_settings(osv.osv_memory):
|
||||
|
||||
def set_base_defaults(self, cr, uid, ids, context=None):
|
||||
ir_model_data = self.pool.get('ir.model.data')
|
||||
wizard = self.browse(cr, uid, ids)[0]
|
||||
wizard = self.browse(cr, uid, ids, context)[0]
|
||||
if wizard.font:
|
||||
user = self.pool.get('res.users').browse(cr, uid, uid, context)
|
||||
font_name = wizard.font.name
|
||||
font_name = wizard.font.family
|
||||
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)})
|
||||
return {}
|
||||
|
||||
def act_discover_fonts(self, cr, uid, ids, context=None):
|
||||
return self.pool.get("res.font").font_scan(cr, uid, context)
|
||||
return self.pool.get("res.font").font_scan(cr, uid, context=context)
|
||||
|
||||
# Preferences wizard for Sales & CRM.
|
||||
# It is defined here because it is inherited independently in modules sale, crm,
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
<label for="font" />
|
||||
<div>
|
||||
<div>
|
||||
<field name="font" class="oe_inline" domain="[('mode', 'in', ('normal', 'regular', 'all'))]" />
|
||||
<field name="font" class="oe_inline" domain="[('mode', 'in', ('normal', 'regular', 'all', 'book'))]" />
|
||||
<button string="(reload fonts)" name="act_discover_fonts" type="object" class="oe_link"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user