simplification of payments objects and refactoring of the code
* registering payment(s) from the list of invoice now generate a single payment per invoice selected
* no more abstract object for payments/payment wizard as the logic is now really simple:
- group_invoices option is now removed and we never try to group payments based on the currency/customer of whatsoever (see above),
- the payment amount is the full residual amount of invoice and users cannot change it anymore
* partner_bank_account_id not required as soon as visible (depends on the payment method)
* refactoring to name tags and allow easier inheritance via xpath
part of task #1918423
Make some invoices
Make a payment
Reconcile it with the invoices through the reconciliation widget
Print the payment receipt and the checks
Before this commit, neither the payment receipt nor the checks contained
the invoices
This was because the prints relied on only the field invoice_ids
filled specifically when registering a payment on an invoice
After this commit, the prints mention the invoices
OPW 1947002
closesodoo/odoo#32365
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Steps to reproduce the bug:
- Activate multi currencies on your user
- Let's consider currency A and currency B and currency A is the one set on your company
- Create a customer invoice I with currency B
- Go on the tree view of customer invoices and select I
- Click on "Action" and select "Generate an invoice"
- On the wizard, clear the currency B
Bug: A traceback was raised because the function amount_to_text requires a currency.
opw:1958888
closesodoo/odoo#32202
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
- Improve warning message when user tries to create credit note
- Hide 'Active' column in Taxes/Currencies and added default 'Active' filter in Taxes
- Removed 'save this page...' under 'Account Follow-up Levels','Budget Management',
'Asset Management','Deferred Revenues Management' section in Accounting Settings
- Fixed margin between Cash Rounding checkbox and it's link in Accounting Settings
- Renamed action menu 'Confirm Payments' to 'Post Payments' for payments to make it
consistent with it's form view
- Hide payment acquirers config for non-adviser users and also restric editing access
rights for non advisior and employee user (only data read access rights on payment acquirers)
- Renamed Journal type from 'Sale' to 'Sales' and journals 'POS Sale Journal, Stock Journal,
Cash Basis Tax Journal to Point of Sale Journal, Inventory Valuation Journal and Cash Basis
Taxes Journal respectively
- Renamed the stat button 'Entries' to 'Items' for account assets form view
- Improved description and name of account_voucher module
- Improved Menu typo, Purchase Receipts to Purchases Receipts
- account_check_printing, hr_expense_check: made field storing check numbers character
instead of integer, integer field for check numbers shows check numbers as amount
(i.e., with thousand separator) on UI, which is wrong, hence replaced it with character
type field and a constraint to allow only numbers to be stored in it.
TaskID: 40157
Co-authored-by: Ravi Gohil <rgo@odoo.com>
closesodoo/odoo#21982
52a8ed3c0c made related fields readonly by default. 3f4f77fd9d
attempted to identify all fields that needed readonly=False but missed
this one.
closesodoo/odoo#28343
This commit adapts the business code to changes introduced by
the parent commit in order to keep the same behaviour as before.
All readonly=False fields will have to be checked afterwards to confirm
that the business case requires write access to the source field.
odoo/enterprise@6c853253bf removed some
code from enterprise that was moved to community in
32db86e3a0. The make_stub_line function
was part of this, but in the process it was renamed to
_check_make_stub_line. Some calls to the non-existing make_stub_line
still existed.
- Create a bill for partner A of an amount X
- Create a bill for partner B of an amount Y
- Validate both bills
- Select both and register a payment by check.
Two payments are created with the same amount in words: X + Y.
In this specific case, we recompute the amount in words automatically.
note: this commit reintroduce the fix c52b18e65 which was lost after
changes in 10.0 (line was removed then brought back with 416d07f0b).
opw-805842
closes#24569
In the wizard for payment several invoices with one payment, there was a
error when making the previous fix: 29c6c06de7.
The patch still worked because of a particularity of readonly and
related on account.payment but the check_amount_in_words would possibly
not be set when it should have.
opw-1839720
closes#24476
When you pay multiple invoice with one payment, you need the write
permission on account.journal, this had been solved when registering a
payment for one invoice in 91ca84644
In this commit, the same logic is applied on account.register.payments
opw-1835888
opw-1834343
closes#24369
When we make a payment, we need the write access on account.journal
because check_manual_sequencing on account.payment is a related field
of account.journal and was used to decide on numbering the check or not.
With this change, the write access is not required.
opw-1834343
opw-1835888
closes#24281
Example failing before this commit:
- amount = 11.01
- decimal = 11.01 % 1 = 0.009999999999999787
- 0.009999999999999787 < 0.01
Use correct float_is_zero method to test if there is decimal or not
Closes#18306
Purpose
=======
Avoid issues in checks numbering.
Specification
=============
When the manual numbering of the checks is ticked on the bank journal, assign and display number to the check only when the payment is confirmed, not when the check is still in draft.
* localized checks layout of US and CA introduced in enterprise
* account settings now install account_check_printing instead of the US checks layout
Wsa PR #18791. Was task 33298
- Create a bill for partner A of an amount X
- Create a bill for partner B of an amount Y
- Validate both bills
- Select both and register a payment by check.
Two payments are created with the same amount in words: X + Y.
In this specific case, we recompute the amount in words automatically.
opw-805842
Purpose
=======
When generating `Cash` bank journal on CoA import, it doesn't makes sense to have the `Check` payment method enabled by default
Specification
=============
When system automatically creates journals of bank and cash type when CoA is being installed,
1) type = "Bank"
- Manual -> Checked
- Check --> Checked
2) type = "Cash"
- Manual -> Checked
- Check --> Unchecked
This patch allow to select several invoices/refunds or bills/bill refunds and launch the contextual action to register a payment for all of them.
Where, before, the system allowed that only if there was a single partner, it will now create and post a payment for each of them.
Was PR #https://github.com/odoo/odoo/pull/15228
Was task: 24014
Use case fixed: create a draft supplier payment, tick it in list view and launch the action 'print check'. Then, on the pop up window cancel the operation => the state was badly set to 'sent'.