diff --git a/addons/point_of_sale/point_of_sale_demo.xml b/addons/point_of_sale/point_of_sale_demo.xml index 3b3839503b0..ef555ed8ae1 100644 --- a/addons/point_of_sale/point_of_sale_demo.xml +++ b/addons/point_of_sale/point_of_sale_demo.xml @@ -595,7 +595,7 @@ - + diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml index e4e48926a94..cea58b1b1cb 100644 --- a/addons/product/product_view.xml +++ b/addons/product/product_view.xml @@ -83,7 +83,7 @@
-
- - - - - -
diff --git a/addons/sale/sale_data.xml b/addons/sale/sale_data.xml index 44a2f3a5afb..6464507a083 100644 --- a/addons/sale/sale_data.xml +++ b/addons/sale/sale_data.xml @@ -74,20 +74,5 @@ team_id - - - Deposit - - service - 150.0 - order - 100.0 - - - - - - - diff --git a/addons/sale/sale_demo.xml b/addons/sale/sale_demo.xml index aa52d24a1a4..a4889496e1c 100644 --- a/addons/sale/sale_demo.xml +++ b/addons/sale/sale_demo.xml @@ -313,6 +313,21 @@ Thanks!
comment + + + + + Deposit + + service + 150.0 + order + 100.0 + + + + + diff --git a/addons/sale/tests/test_sale_to_invoice.py b/addons/sale/tests/test_sale_to_invoice.py index c35abf296be..342a490c68c 100644 --- a/addons/sale/tests/test_sale_to_invoice.py +++ b/addons/sale/tests/test_sale_to_invoice.py @@ -29,7 +29,7 @@ class TestSale(TestMail): account_recv_id = account_obj.create({'code': 'X1012', 'name': 'Sales - Test Reicv Account', 'user_type_id': user_type_id, 'reconcile': True}) # Add account to product - product_template_id = self.env.ref('sale.advance_product_1') + product_template_id = self.env.ref('sale.advance_product_0').product_tmpl_id product_template_id.write({'property_account_income_id': account_rev_id}) # Create Sale Journal diff --git a/addons/sale/wizard/sale_make_invoice_advance.py b/addons/sale/wizard/sale_make_invoice_advance.py index 1b74f054b11..f90a2b44664 100644 --- a/addons/sale/wizard/sale_make_invoice_advance.py +++ b/addons/sale/wizard/sale_make_invoice_advance.py @@ -26,8 +26,7 @@ class SaleAdvancePaymentInv(models.TransientModel): @api.model def _get_advance_product(self): try: - deposit_product_template = self.env['ir.model.data'].xmlid_to_object('sale.advance_product_1', raise_if_not_found=True) - return deposit_product_template.product_variant_ids.ids[0] + return self.env['ir.model.data'].xmlid_to_res_id('sale.advance_product_0', raise_if_not_found=True) except ValueError: return False @@ -40,17 +39,6 @@ class SaleAdvancePaymentInv(models.TransientModel): product_id = fields.Many2one('product.product', string='Deposit Product', domain=[('type', '=', 'service')], default=_get_advance_product) count = fields.Integer(default=_count, string='# of Orders') amount = fields.Float('Deposit Amount', digits=dp.get_precision('Account'), help="The amount to be invoiced in advance, taxes excluded.") - deposit_property_account_income_id = fields.Many2one( - related="product_id.property_account_income_id", - relation="account.account", - string="Income Account", - domain=[('deprecated', '=', False)], - help="This account will be used for invoices instead of the default one to value sales for the deposit.") - deposit_taxes_ids = fields.Many2many( - related="product_id.taxes_id", - string='Customer Taxes', - domain=[('type_tax_use', '=', 'sale')]) - @api.onchange('advance_payment_method') def onchange_advance_payment_method(self): diff --git a/addons/sale/wizard/sale_make_invoice_advance.xml b/addons/sale/wizard/sale_make_invoice_advance.xml index c8eb0f66906..e4d70cd8fb6 100644 --- a/addons/sale/wizard/sale_make_invoice_advance.xml +++ b/addons/sale/wizard/sale_make_invoice_advance.xml @@ -16,9 +16,7 @@ attrs="{'invisible': [('count','>',1)]}"/> - - + attrs="{'invisible': [('advance_payment_method','not in', ('fixed','percentage'))]}"/>