Corrected the copy behaviour of accounts and set condition for charts of accounts
bzr revid: jvo@tinyerp.com-20080903141555-8sibwjd4x4v46qug
This commit is contained in:
parent
a8ee852c8b
commit
c2561bd0c7
|
@ -356,9 +356,9 @@ class account_account(osv.osv):
|
||||||
child_ids=self.copy(cr, uid, child.id, default, context=context,done_list=done_list)
|
child_ids=self.copy(cr, uid, child.id, default, context=context,done_list=done_list)
|
||||||
if child_ids:
|
if child_ids:
|
||||||
new_child_ids.append(child_ids)
|
new_child_ids.append(child_ids)
|
||||||
default['child_id'] = [(6, 0, new_child_ids)]
|
default['child_parent_ids'] = [(6, 0, new_child_ids)]
|
||||||
else:
|
else:
|
||||||
default['child_id'] = False
|
default['child_parent_ids'] = False
|
||||||
return super(account_account, self).copy(cr, uid, id, default, context=context)
|
return super(account_account, self).copy(cr, uid, id, default, context=context)
|
||||||
|
|
||||||
def write(self, cr, uid, ids, vals, context=None):
|
def write(self, cr, uid, ids, vals, context=None):
|
||||||
|
@ -1899,7 +1899,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
||||||
#recording the new tax code to do the mapping
|
#recording the new tax code to do the mapping
|
||||||
tax_code_template_ref[tax_code_template.id] = new_tax_code
|
tax_code_template_ref[tax_code_template.id] = new_tax_code
|
||||||
|
|
||||||
#create all the tax
|
#create all the tax
|
||||||
for tax in obj_multi.chart_template_id.tax_template_ids:
|
for tax in obj_multi.chart_template_id.tax_template_ids:
|
||||||
#create it
|
#create it
|
||||||
vals_tax = {
|
vals_tax = {
|
||||||
|
|
|
@ -169,7 +169,7 @@
|
||||||
<field name="res_model">account.account</field>
|
<field name="res_model">account.account</field>
|
||||||
<field name="view_type">tree</field>
|
<field name="view_type">tree</field>
|
||||||
<field name="view_id" ref="view_account_tree"/>
|
<field name="view_id" ref="view_account_tree"/>
|
||||||
<field name="domain">[('code','=','0')]</field>
|
<field name="domain">[('parent_id','=',False)]</field>
|
||||||
</record>
|
</record>
|
||||||
<menuitem action="action_account_tree" id="menu_action_account_tree" parent="account.account_account_menu"/>
|
<menuitem action="action_account_tree" id="menu_action_account_tree" parent="account.account_account_menu"/>
|
||||||
|
|
||||||
|
|
|
@ -422,7 +422,7 @@ class product_product(osv.osv):
|
||||||
'price_margin': fields.float('Variant Price Margin', digits=(16, int(config['price_accuracy']))),
|
'price_margin': fields.float('Variant Price Margin', digits=(16, int(config['price_accuracy']))),
|
||||||
}
|
}
|
||||||
|
|
||||||
def onchange_uom(self, cursor, user, ids, uom_id,uom_po_id):
|
def onchange_uom(self, cursor, user, ids, uom_id,uom_po_id):
|
||||||
if uom_id and uom_po_id:
|
if uom_id and uom_po_id:
|
||||||
uom_obj=self.pool.get('product.uom')
|
uom_obj=self.pool.get('product.uom')
|
||||||
uom=uom_obj.browse(cursor,user,[uom_id])[0]
|
uom=uom_obj.browse(cursor,user,[uom_id])[0]
|
||||||
|
|
Loading…
Reference in New Issue