Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

16 payment order improve and cleanup rebased #7

Open
wants to merge 137 commits into
base: 16-payment_order-improve_and_cleanup
Choose a base branch
from

Conversation

Kev-Roche
Copy link
Member

Rebased on 16.0 of OCA
cc @alexis-via @syera94

luc-demeyer and others added 30 commits November 6, 2023 10:12
Fix _compute_partner_bank_id on account.move.line.
The bank account number of then invoice was not selected when a supplier has
multiple bank account numbers and there is no payment mode set on the
vendor bill. This PR corrects this issue.
… group

If not, you get an access error when accessing the invoice if you
don't have such permission:

```
You are not allowed to access 'Payment Lines' (account.payment.line) records.

This operation is allowed for the following groups:
      - Extra Rights/Accounting / Payments

Contact your administrator to request access if necessary
```

TT45952
Signed-off-by pedrobaeza
…nt_order_order_communication_direct() method.

Related to: OCA#1178
Signed-off-by pedrobaeza
Signed-off-by pedrobaeza
Currently translated at 64.5% (31 of 48 strings)

Translation: bank-payment-16.0/bank-payment-16.0-account_payment_mode
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-16-0/bank-payment-16-0-account_payment_mode/it/
Currently translated at 30.2% (53 of 175 strings)

Translation: bank-payment-16.0/bank-payment-16.0-account_banking_pain_base
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-16-0/bank-payment-16-0-account_banking_pain_base/it/
Currently translated at 30.8% (54 of 175 strings)

Translation: bank-payment-16.0/bank-payment-16.0-account_banking_pain_base
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-16-0/bank-payment-16-0-account_banking_pain_base/it/
Signed-off-by HaraldPanten
Currently translated at 76.6% (79 of 103 strings)

Translation: bank-payment-16.0/bank-payment-16.0-account_banking_mandate
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-16-0/bank-payment-16-0-account_banking_mandate/it/
Signed-off-by pedrobaeza
Signed-off-by pedrobaeza
Use the account.move company to search for the right partner mandate
Signed-off-by pedrobaeza
Currently translated at 64.5% (31 of 48 strings)

Translation: bank-payment-16.0/bank-payment-16.0-account_payment_mode
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-16-0/bank-payment-16-0-account_payment_mode/it/
Currently translated at 30.8% (54 of 175 strings)

Translation: bank-payment-16.0/bank-payment-16.0-account_banking_pain_base
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-16-0/bank-payment-16-0-account_banking_pain_base/it/
Since v14, the tool for changing the target transfer account is to
create new payment methods, and put a method line in the journal with
such account.

Thus, there will be "fake" payment methods with no export handler
with the only goal of having a different target account.

Raising an error on such methods when finishing the payment order, forcing
to add custom code for returning (False, False), is too much, so better
to simply return that by default and don't block in these cases.

TT47723
Signed-off-by pedrobaeza
OCA-git-bot and others added 28 commits April 24, 2024 06:51
Signed-off-by pedrobaeza
Signed-off-by pedrobaeza
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: bank-payment-16.0/bank-payment-16.0-account_payment_order
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-16-0/bank-payment-16-0-account_payment_order/
Signed-off-by dreispt
Currently translated at 100.0% (4 of 4 strings)

Translation: bank-payment-16.0/bank-payment-16.0-account_payment_sale
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-16-0/bank-payment-16-0-account_payment_sale/it/
Currently translated at 76.6% (79 of 103 strings)

Translation: bank-payment-16.0/bank-payment-16.0-account_banking_mandate
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-16-0/bank-payment-16-0-account_banking_mandate/it/
Currently translated at 100.0% (3 of 3 strings)

Translation: bank-payment-16.0/bank-payment-16.0-account_banking_mandate_contact
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-16-0/bank-payment-16-0-account_banking_mandate_contact/it/
Currently translated at 100.0% (5 of 5 strings)

Translation: bank-payment-16.0/bank-payment-16.0-account_banking_mandate_sale
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-16-0/bank-payment-16-0-account_banking_mandate_sale/it/
Currently translated at 100.0% (8 of 8 strings)

Translation: bank-payment-16.0/bank-payment-16.0-account_payment_purchase
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-16-0/bank-payment-16-0-account_payment_purchase/it/
Currently translated at 100.0% (11 of 11 strings)

Translation: bank-payment-16.0/bank-payment-16.0-account_payment_method_fs_storage
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-16-0/bank-payment-16-0-account_payment_method_fs_storage/it/
Signed-off-by HaraldPanten
NEW FEATURES
- activate 'in_payment' payment_state on invoices... at last !
- payment order numbering: add ability to have a sequence specific to a particular payment mode (optional)
- add show account number policy "first_last" to show N first and N last characters of bank account number

SMALL IMPROVEMENTS
- account.payment.method: rename field "payment_order_only" to "payment_order_ok" for naming consistency with the field of account.payment.mode. Auto-set "payment_order_ok" of payment mode from the equivalent field of payment method. Migration scripts provided for account.payment.method and the data of SEPA credit transfer and SEPA direct debit.
- payment order attachment: add M2O payment_file_id that points to the payment file. No more need for a simplified attachment form view.
- keep the spaces in the scrambled bank account number, so that the user easily understands that it is a "scrambled" bank account number
- add field acc_number_scrambled on res.partner.bank for easy and direct use of scrambled account number

SIMPLIFICATION / CODE CLEANUP
- remove field partner_bank_id on account.move.line
- move code for scrambled account number from qweb report to res.partner.bank class
- remove boolean field show_bank_account_from_journal from account.payment.mode: we now consider that this option is always true i.e. when account_payment_partner is installed, Odoo takes the bank accounts to display on the customer invoice from the payment mode (if the payment mode is empty, it displays all the bank accounts of the company). As a consequence, hide partner_bank_id on customer invoice form view.
- remove fields inbound_payment_order_only and outbound_payment_order_only from account.journal : these 2 fields were not used!
- add check_company=True where it was missing and remove code of constraint that checks company consistency
- re-organise form view of payment order to equilibrate between left column and right column

TECHNICAL:
- replace @api.onchange by computed readonly=False store=True fields
- remove (or reduce) the use of demo data in tests
- speed-up tests by using tracking_disable=True
- Replace (6, 0, []) and (0, 0, {}) by Command.set() and Command.create()
- add sql unicity constraint on payment order number per company
Harmonize values for reference_type on account.move and communication_type on account.payment.line:
2 possible values : free and structured (migration script provided)
Simplify code for reference.
@Kev-Roche Kev-Roche force-pushed the 16-payment_order-improve_and_cleanup_rebased branch from e7a8675 to c495144 Compare May 7, 2024 11:41
@alexis-via alexis-via force-pushed the 16-payment_order-improve_and_cleanup branch from 49e57c7 to 5f1e105 Compare August 22, 2024 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.