Skip to content
Snippets Groups Projects
Commit 39e0cd68 authored by Yannick Tivisse's avatar Yannick Tivisse
Browse files

[IMP] sale: take income account from the category if not set on the deposit product

parent c5ba3bb9
No related branches found
No related tags found
No related merge requests found
......@@ -95,7 +95,8 @@ class sale_configuration(osv.TransientModel):
def get_default_deposit_values(self, cr, uid, fields, context=None):
deposit_product_template = self.pool['ir.model.data'].xmlid_to_object(cr, uid, 'sale.advance_product_1', context=context)
return {
'deposit_property_account_income_id': deposit_product_template.product_variant_ids.property_account_income_id.id,
'deposit_property_account_income_id': deposit_product_template.product_variant_ids.property_account_income_id.id \
or deposit_product_template.product_variant_ids.categ_id.property_account_income_categ_id.id,
'deposit_taxes_ids': deposit_product_template.product_variant_ids.taxes_id.ids
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment