[MERGE] branch merged with lp:~openerp-dev/openobject-addons/trunk-dev-addons3

bzr revid: mtr@mtr-20110204085111-0f0tlr3id2zsfu4b
This commit is contained in:
mtr
2011-02-04 14:21:11 +05:30
3 changed files with 7 additions and 6 deletions
+4 -5
View File
@@ -301,11 +301,10 @@ class account_account(osv.osv):
for fn in field_names:
sums.setdefault(current.id, {})[fn] = accounts.get(current.id, {}).get(fn, 0.0)
for child in current.child_id:
if sums.get(child.id, False):
if child.company_id.currency_id.id == current.company_id.currency_id.id:
sums[current.id][fn] += sums[child.id][fn]
else:
sums[current.id][fn] += currency_obj.compute(cr, uid, child.company_id.currency_id.id, current.company_id.currency_id.id, sums[child.id][fn], context=context)
if child.company_id.currency_id.id == current.company_id.currency_id.id:
sums[current.id][fn] += sums[child.id][fn]
else:
sums[current.id][fn] += currency_obj.compute(cr, uid, child.company_id.currency_id.id, current.company_id.currency_id.id, sums[child.id][fn], context=context)
res = {}
null_result = dict((fn, 0.0) for fn in field_names)
for id in ids:
+2
View File
@@ -70,6 +70,7 @@ class pos_order(osv.osv):
return super(pos_order, self).unlink(cr, uid, ids, context=context)
def onchange_partner_pricelist(self, cr, uid, ids, part=False, context=None):
""" Changed price list on_change of partner_id"""
if not part:
return {'value': {}}
@@ -647,6 +648,7 @@ class pos_order(osv.osv):
'reference': order.name,
'partner_id': order.partner_id.id,
'comment': order.note or '',
'currency_id': order.partner_id.property_product_pricelist.currency_id.id, # considering partner's sale pricelist's currency
}
inv.update(inv_ref.onchange_partner_id(cr, uid, [], 'out_invoice', order.partner_id.id)['value'])
if not inv.get('account_id', None):
+1 -1
View File
@@ -88,7 +88,7 @@
</group>
<group colspan="4">
<field name="sale_journal" domain="[('type','=','sale')]" widget="selection" invisible="1"/>
<field name="pricelist_id" domain="[('type','=','sale')]" widget="selection" invisible="1"/>
<field name="pricelist_id" domain="[('type','=','sale')]" widget="selection" invisible="0"/>
</group>
</page>
<page string="Notes" >