[MERGE] [FIX] res_font: requires server commit 5011

Mainly fix reports
Adapt API to new res_font methods
See server commit message for more information

bzr revid: mat@openerp.com-20131209171551-fgiv790hcvjnp1ly
This commit is contained in:
Martin Trigaux 2013-12-09 18:15:51 +01:00
commit 06831d67c4
7 changed files with 21 additions and 21 deletions

View File

@ -68,7 +68,7 @@ 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
@ -76,7 +76,7 @@ class base_config_settings(osv.osv_memory):
return {}
def act_discover_fonts(self, cr, uid, ids, context=None):
return self.pool.get("res.font").discover_fonts(cr, uid, ids, 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,

View File

@ -94,7 +94,7 @@
<label for="font" />
<div>
<div>
<field name="font" class="oe_inline"/>
<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>

View File

@ -5,9 +5,9 @@
<!--logo-->
<fill color="black"/>
<stroke color="black"/>
<setFont name="DejaVu Sans" size="8"/>
<setFont name="DejaVuSans" size="8"/>
<drawString x="1.3cm" y="19.5cm"><xsl:value-of select="//report/header/date"/></drawString>
<setFont name="DejaVu Sans Bold" size="10"/>
<setFont name="DejaVuSans-Bold" size="10"/>
<drawString x="13.8cm" y="19.5cm"><xsl:value-of select="//report/header/company"/></drawString>
<stroke color="#000000"/>
<lines>1.3cm 19.3cm 28.5cm 19.3cm</lines>
@ -17,9 +17,9 @@
<!--logo-->
<fill color="black"/>
<stroke color="black"/>
<setFont name="DejaVu Sans" size="8"/>
<setFont name="DejaVuSans" size="8"/>
<drawString x="1.3cm" y="19.5cm"><xsl:value-of select="//report/header/date"/></drawString>
<setFont name="DejaVu Sans Bold" size="10"/>
<setFont name="DejaVuSans-Bold" size="10"/>
<drawString x="27.8cm" y="19.5cm"><xsl:value-of select="//report/header/company"/></drawString>
<stroke color="#000000"/>
<lines>1.3cm 19.3cm 28.5cm 19.3cm</lines>

View File

@ -5,9 +5,9 @@
<!--logo-->
<fill color="black"/>
<stroke color="black"/>
<setFont name="DejaVu Sans" size="8"/>
<setFont name="DejaVuSans" size="8"/>
<drawString x="1.3cm" y="19.5cm"><xsl:value-of select="//report/header/date"/></drawString>
<setFont name="DejaVu Sans Bold" size="10"/>
<setFont name="DejaVuSans-Bold" size="10"/>
<drawString x="13.8cm" y="19.5cm"><xsl:value-of select="//report/header/company"/></drawString>
<stroke color="#000000"/>
<lines>1.3cm 19.3cm 28.5cm 19.3cm</lines>
@ -17,9 +17,9 @@
<!--logo-->
<fill color="black"/>
<stroke color="black"/>
<setFont name="DejaVu Sans" size="8"/>
<setFont name="DejaVuSans" size="8"/>
<drawString x="1.3cm" y="19.5cm"><xsl:value-of select="//report/header/date"/></drawString>
<setFont name="DejaVu Sans Bold" size="10"/>
<setFont name="DejaVuSans-Bold" size="10"/>
<drawString x="27.8cm" y="19.5cm"><xsl:value-of select="//report/header/company"/></drawString>
<stroke color="#000000"/>
<lines>1.3cm 19.3cm 28.5cm 19.3cm</lines>

View File

@ -5,9 +5,9 @@
<!--logo-->
<fill color="black"/>
<stroke color="black"/>
<setFont name="DejaVu Sans" size="8"/>
<setFont name="DejaVuSans" size="8"/>
<drawString x="1.3cm" y="19.5cm"><xsl:value-of select="//report/header/date"/></drawString>
<setFont name="DejaVu Sans Bold" size="10"/>
<setFont name="DejaVuSans-Bold" size="10"/>
<drawString x="13.8cm" y="19.5cm"><xsl:value-of select="//report/header/company"/></drawString>
<stroke color="#000000"/>
<lines>1.3cm 19.3cm 28.5cm 19.3cm</lines>
@ -17,9 +17,9 @@
<!--logo-->
<fill color="black"/>
<stroke color="black"/>
<setFont name="DejaVu Sans" size="8"/>
<setFont name="DejaVuSans" size="8"/>
<drawString x="1.3cm" y="19.5cm"><xsl:value-of select="//report/header/date"/></drawString>
<setFont name="DejaVu Sans Bold" size="10"/>
<setFont name="DejaVuSans-Bold" size="10"/>
<drawString x="27.8cm" y="19.5cm"><xsl:value-of select="//report/header/company"/></drawString>
<stroke color="#000000"/>
<lines>1.3cm 19.3cm 28.5cm 19.3cm</lines>

View File

@ -15,9 +15,9 @@
<!--logo-->
<fill color="black"/>
<stroke color="black"/>
<setFont name="DejaVu Sans" size="8"/>
<setFont name="DejaVuSans" size="8"/>
<drawString x="1.3cm" y="28.3cm"><xsl:value-of select="//date"/></drawString>
<setFont name="DejaVu Sans Bold" size="10"/>
<setFont name="DejaVuSans-Bold" size="10"/>
<drawString x="9.8cm" y="28.3cm"><xsl:value-of select="//company"/></drawString>
<stroke color="#000000"/>
<lines>1.3cm 28.1cm 20cm 28.1cm</lines>
@ -29,9 +29,9 @@
<!--logo-->
<fill color="black"/>
<stroke color="black"/>
<setFont name="DejaVu Sans" size="8"/>
<setFont name="DejaVuSans" size="8"/>
<drawString x="1.3cm" y="28.3cm"><xsl:value-of select="//date"/></drawString>
<setFont name="DejaVu Sans Bold" size="10"/>
<setFont name="DejaVuSans-Bold" size="10"/>
<drawString x="9.8cm" y="28.3cm"><xsl:value-of select="//company"/></drawString>
<stroke color="#000000"/>
<lines>1.3cm 28.1cm 20cm 28.1cm</lines>

View File

@ -43,9 +43,9 @@ class survey_analysis(report_rml):
<pageGraphics>
<fill color="black"/>
<stroke color="black"/>
<setFont name="DejaVu Sans" size="8"/>
<setFont name="DejaVuSans" size="8"/>
<drawString x="1.3cm" y="28.3cm"> """+to_xml(rml_obj.formatLang(time.strftime("%Y-%m-%d %H:%M:%S"),date_time=True))+"""</drawString>
<setFont name="DejaVu Sans Bold" size="10"/>
<setFont name="DejaVuSans-Bold" size="10"/>
<drawString x="9.8cm" y="28.3cm">"""+ to_xml(company.name) +"""</drawString>
<stroke color="#000000"/>
<lines>1.3cm 28.1cm 20cm 28.1cm</lines>