Files
odoo_source/addons/repair
MerlinGuillaume 1918b61bc0 [FIX] repair: apply fiscal position account mapping
When creating an invoice from a repair order, the account mapping of the
fiscal position doesn't apply even though the tax one does

Steps to reproduce:
1. Install Repair and Accounting
2. Go to Accounting > Configuration > Invoicing > Fiscal Positions and
   create a new fiscal position with:
   - Name: 'FP test'
   - Tax Mapping from 'Tax 15.00%' to a new tax 'Tax 10.00%'
   - Account Mapping from '400000 Product Sales' to '450000 Other
     Income'
3. Go to Sales > Products and create a new product 'Product A' with:
   - Product Type: 'Consumable'
   - Customer Taxes: 'Tax 15.00%'
   - Income Account: '400000 Product Sales'
4. Create another product 'Product B' with same values except type which
   is 'Service'
5. Go to Repairs and create a new repair order with:
   - Any Product to Repair
   - Any Customer (once set, edit the customer's fiscal position to 'FP
     test')
   - Invoice Method: 'Before Repair'
   - Parts: add a line of type 'Add' with product 'Product A'
   - Operations: add a line with product 'Product A'
6. Confirm the order, create an invoice and open it: the account mapping
   of the fiscal position didn't apply (it should be '450000 Other
   Income')

Solution:
Apply the fiscal position mapping on the income account of the product

opw-2902056

closes odoo/odoo#96038

X-original-commit: 02975a8a7b1803167a5ba8365cfbf29f80f84b2e
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2022-07-14 18:04:01 +02:00
..
…
2022-07-07 13:30:24 +02:00