now its possible to have the dynamic currency on the product label

* add new field called company_id this will be appear on the form in extended view only

lp bug: https://launchpad.net/bugs/309565 fixed

bzr revid: mga@tinyerp.com-20081219131235-4ixr7lkboozsuofe
This commit is contained in:
Mantavya Gajjar
2008-12-19 18:42:35 +05:30
parent 045b32b7b0
commit aee47aa5e2
4 changed files with 8 additions and 2 deletions
+5 -1
View File
@@ -271,8 +271,9 @@ class product_template(osv.osv):
'loc_rack': fields.char('Rack', size=16),
'loc_row': fields.char('Row', size=16),
'loc_case': fields.char('Case', size=16),
'company_id': fields.many2one('res.company', 'Company'),
}
def _get_uom_id(self, cr, uid, *args):
cr.execute('select id from product_uom order by id limit 1')
res = cr.fetchone()
@@ -284,6 +285,9 @@ class product_template(osv.osv):
return False
_defaults = {
'company_id': lambda self, cr, uid, context: \
self.pool.get('res.users').browse(cr, uid, uid,
context=context).company_id.id,
'type': lambda *a: 'product',
'list_price': lambda *a: 1,
'cost_method': lambda *a: 'standard',
+1
View File
@@ -101,6 +101,7 @@
<group colspan="2" col="2" name="misc">
<separator string="Miscelleanous" colspan="2"/>
<field name="active" select="2"/>
<field name="company_id" select="2" groups="base.group_extended"/>
</group>
</page>
+1
View File
@@ -6,5 +6,6 @@
<variant type="field" name="variants"/>
<price type="field" name="list_price"/>
<ean13 type="field" name="ean13"/>
<currency type="field" name="company_id.currency_id.name"/>
</lot-line>
</lots>
+1 -1
View File
@@ -66,7 +66,7 @@
<td>
<para style="nospace"><xsl:value-of select="code"/></para>
</td><td>
<para style="nospace" t="1"><xsl:value-of select="price"/> EUR</para>
<para style="nospace" t="1"><xsl:value-of select="price"/> <xsl:value-of select="currency"/></para>
</td>
</tr><tr>
<td>