[FIX]: Fix general issue.
Unknown field state in domain [["state","in",["done"]]] for period form "Could not get field with name payment_rate_currency_id "Could not get field with name algorithm bzr revid: atp@tinyerp.com-20120716071455-r30romahsfg1zvxr
This commit is contained in:
parent
a74fbb4de7
commit
b3ea75636d
|
@ -37,6 +37,7 @@
|
|||
<field name="date_start"/>
|
||||
<field name="date_stop"/>
|
||||
<field name="special"/>
|
||||
<field name="state"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
@ -67,6 +67,7 @@
|
|||
</group>
|
||||
<group>
|
||||
<field name="currency_id"/>
|
||||
<field name="payment_rate_currency_id" invisible="1"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<field name="reference"/>
|
||||
<field name="name"/>
|
||||
|
|
|
@ -11,8 +11,9 @@
|
|||
<field name="arch" type="xml">
|
||||
<field name="payment_term" position="after">
|
||||
<group col="4" colspan="2">
|
||||
<!-- "algorithm" not a field in any account related module.so pass it as False argument in generate_bbacomm() function. -->
|
||||
<field name="reference_type" nolabel="1" size="0" attrs="{'readonly':[('state','!=','draft')]}"
|
||||
on_change="generate_bbacomm(type,reference_type,algorithm,partner_id,reference)" colspan="1"/>
|
||||
on_change="generate_bbacomm(type,reference_type,partner_id,reference)" colspan="1"/>
|
||||
<field name="reference" nolabel="1" colspan="3" attrs="{'readonly':[('state','!=','draft')]}"/>
|
||||
</group>
|
||||
</field>
|
||||
|
|
|
@ -78,15 +78,15 @@ class account_invoice(osv.osv):
|
|||
algorithm = self.pool.get('res.partner').browse(cr, uid, partner_id).out_inv_comm_algorithm
|
||||
if not algorithm:
|
||||
algorithm = 'random'
|
||||
reference = self.generate_bbacomm(cr, uid, ids, type, reference_type, algorithm, partner_id, '')['value']['reference']
|
||||
reference = self.generate_bbacomm(cr, uid, ids, type, reference_type, partner_id, '', algorithm)['value']['reference']
|
||||
res_update = {
|
||||
'reference_type': reference_type or 'none',
|
||||
'reference': reference,
|
||||
}
|
||||
result['value'].update(res_update)
|
||||
return result
|
||||
|
||||
def generate_bbacomm(self, cr, uid, ids, type, reference_type, algorithm, partner_id, reference):
|
||||
#algorithm is not defined as field in any account related modules.so pass it as false argument.
|
||||
def generate_bbacomm(self, cr, uid, ids, type, reference_type, partner_id, reference, algorithm=False):
|
||||
partner_obj = self.pool.get('res.partner')
|
||||
reference = reference or ''
|
||||
if (type == 'out_invoice'):
|
||||
|
|
Loading…
Reference in New Issue