summaryrefslogtreecommitdiff
path: root/doc/_extensions/autojsdoc/parser
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2019-05-10 09:56:18 +0000
committerNicolas Martinelli <nim@odoo.com>2019-05-14 08:19:20 +0000
commit4927d4c5acc7df5b1f7f711c1d39fd8538cd1a18 (patch)
treeffb6afc476640524d069e13601791d4e4f4f29e0 /doc/_extensions/autojsdoc/parser
parente526b6bba471072f7a234e9fc60ee38821374c33 (diff)
[FIX] purchase_stock: change PU with discount on invoice
- Create a product P Costing Method: FIFO Inventory Valuation: Perpetual (automated) Price Difference Account set - Create a PO with P, set a price of 110 (no tax). - Receive the product 2 journal items are generated: | Account | Debit| Credit| |-------------------------|--------|--------| | Stock Valuation | 110.0| 0.0| | Stock Interim (Received)| 0.0| 110.0| - Create the corresponding invoice - Change the: Unit Price: 100 Discount: 10 - Validate the invoice (for a total of 90.0) 3 journal items are generated: | Account | Debit| Credit| |-------------------------|--------|--------| | Account Payable | 0.0| 100.0| | Difference Account | 0.0| 20.0| | Stock Interim (Received)| 120.0| 0.0| This is not correct: the Stock Interim (Received) should have a debit of 110.0, and the Account Payable credit should be 90.0. This comes from the fact that the difference is subtracted from `line['price_unit']`, which doesn't contain the discount. We can use `price_val_dif` to update the price. Moreover, the `price_unit` seems ultimately useless, since it is not used in: https://github.com/odoo/odoo/blob/e11bacfe512a3170f44d6d43646af914a9cf3b73/addons/account/models/product.py#L63 We still update it for consistency. Fixes #32911 Fixes #33201 opw-1974002
Diffstat (limited to 'doc/_extensions/autojsdoc/parser')
0 files changed, 0 insertions, 0 deletions