[MERGE] lp:726296

bzr revid: qdp-launchpad@openerp.com-20110317163409-tbaj55rtc7vlr6st
This commit is contained in:
Quentin (OpenERP) 2011-03-17 17:34:09 +01:00
commit 804ebb3026
4 changed files with 9 additions and 8 deletions

View File

@ -191,7 +191,7 @@ class account_voucher(osv.osv):
domain=[('type','=','dr')], context={'default_type':'dr'}, readonly=True, states={'draft':[('readonly',False)]}),
'period_id': fields.many2one('account.period', 'Period', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'narration':fields.text('Notes', readonly=True, states={'draft':[('readonly',False)]}),
'currency_id':fields.many2one('res.currency', 'Currency', readonly=True, states={'draft':[('readonly',False)]}),
'currency_id':fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}),
# 'currency_id': fields.related('journal_id','currency', type='many2one', relation='res.currency', string='Currency', store=True, readonly=True, states={'draft':[('readonly',False)]}),
'company_id': fields.many2one('res.company', 'Company', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'state':fields.selection(
@ -977,7 +977,8 @@ class account_bank_statement_line(osv.osv):
def _check_amount(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
if obj.voucher_id:
if not (abs(obj.amount) == obj.voucher_id.amount):
diff = abs(obj.amount) - obj.voucher_id.amount
if not self.pool.get('res.currency').is_zero(cr, uid, obj.voucher_id.currency_id, diff):
return False
return True

View File

@ -69,7 +69,7 @@
<group col="2" colspan="1" >
<separator string="Other Information" colspan="2"/>
<field name="number"/>
<field name="currency_id" invisible="True"/>
<field name="currency_id"/>
</group>
<group col="4" colspan="1" attrs="{'invisible':[('type','in',['payment', 'receipt', False])]}">
<separator string="Total" colspan="4"/>

View File

@ -135,7 +135,7 @@
</group>
<group col="2" colspan="1">
<separator string="Other Information" colspan="2"/>
<field name="currency_id" invisible="True"/>
<field name="currency_id"/>
<field name="number"/>
</group>
</page>
@ -214,7 +214,7 @@
</group>
<separator string="Other Information" colspan="2"/>
<group col="4" colspan="1">
<field name="currency_id" invisible="True"/>
<field name="currency_id"/>
<field name="number"/>
</group>
</group>
@ -355,7 +355,7 @@
</group>
<separator string="Other Information" colspan="2"/>
<group col="4" colspan="1">
<field name="currency_id" invisible="True"/>
<field name="currency_id"/>
<field name="number"/>
</group>
</group>

View File

@ -102,7 +102,7 @@
<field name="number"/>
<field name="name" colspan="4"/>
<field name="type" invisible="True"/>
<field name="currency_id" invisible="True" nolabel="1"/>
<field name="currency_id"/>
</group>
<notebook colspan="4">
<page string="Sales Information">
@ -230,7 +230,7 @@
<field name="reference" select="1"/>
<field name="account_id" domain="[('type','=','other')]" invisible="True"/>
<field name="type" invisible="True"/>
<field name="currency_id" invisible="True" nolabel="1"/>
<field name="currency_id"/>
</group>
<notebook colspan="4">
<page string="Bill Information">