Purchase Deposit Company Amount
purchase_deposit_company_amount · OCA/purchase-workflow
-
Security25/25No findings
-
Activity25/25Last human commit 1 month ago
-
Required by5/250 modules depend on it
-
Maturity5/25In 1 Odoo series since 16.0
Heuristic over the facts below, not an audit · How it's computed
Migration considerations
account_move_view_form— Migrating to 17.0: `attrs=`/`states=` are rejected in views: convert them to Python expressions in `invisible`/`readonly`/`required`, keeping the original AND/OR logic. migration-view-attrs-states · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
Description
This module books a foreign-currency purchase deposit at the company-currency amount actually paid and carries that figure through to the final bill, so the deposit account clears to zero and the exchange-rate difference lands in the inventory cost of the goods instead of being stranded on the balance sheet.
In detail:
- Adds a Company Currency Amount field to the deposit line of a deposit bill, which forces the line's balance to the amount entered instead of converting the foreign currency amount at the exchange rate.
- Carries the company currency value of a posted deposit bill over to the deposit offset line of the final bill, so the deposit account closes out at the amount that was actually paid.
- Books the resulting exchange rate difference into the product lines, and reflects it in the stock valuation of the received goods.
The field is only available on the deposit line of a deposit bill raised in a foreign currency, and the column is hidden everywhere else. Everything on the final bill is derived from it, and a deposit nobody entered an amount for keeps the standard rate conversion throughout.
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 1
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
account_move_view_form |
account.move.view.form.company.amount | account.move | form | Inherits account.view_move_form |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 3
-
allow_company_amountBooleancompute='_compute_allow_company_amount'help="Technical field: the company-currency amount may be entered by hand on this bill's deposit line." -
is_depositBooleancompute='_compute_is_deposit'help='Technical field: this bill was raised by the Register Deposit wizard, i.e. it books a deposit rather than netting one off. It is the only kind of bill on which the company-currency amount can be entered by hand.'string='Is a Deposit Bill'
-
action_post(self)
-
company_amountMonetarycurrency_field='company_currency_id'help="Company-currency value you actually paid for this line. When set, the line's balance is forced to this amount instead of the standard amount_currency / exchange_rate conversion, while the foreign-currency amount stays untouched. Enter it unsigned -- the debit/credit direction follows the line's foreign-currency amount. Leave it empty to keep the standard conversion. Only available on the deposit line of a deposit bill raised in a foreign currency; every other line follows from it automatically."string='Company Currency Amount'
No public methods.
-
company_currency_idMany2one → res.currencyreadonly=Truerelated='company_id.currency_id'string='Company Currency' args: 'res.currency' -
deposit_company_amountMonetarycompute='_compute_deposit_company_amount'currency_field='company_currency_id'help='Company-currency value actually booked by the posted deposit vendor bill(s) for this deposit line, and zero unless one of them carries a hand-entered Company Currency Amount. The final vendor bill pins its deposit-offset line to this value so the deposit account closes out at the amount that was really paid, whatever the exchange rate has done since.'string='Deposit Company-Currency Amount'
No public methods.