Commit Graph

21 Commits

Author SHA1 Message Date
Pedro M. Baeza
9ab139fdbc [IMP] account_payment_partner: Make payment mode editable on entry
Complement of 998f8df6aa254266c015fab144ba290e1a386cf0

Extend the editability to the journal entry (account.move), taking
as criteria if there's no reconciliation made, which is the definitory
one.

It includes test for this new feature, both the mode propagation and
the editability check.

TT39850
2023-01-23 08:49:31 +01:00
Pedro M. Baeza
ab9c5ff7e8 [IMP] account_payment_partner: Make payment mode editable on journal item
This field was editable in previous version before invoice > move
refactoring, and it's logic to allow to change payment mode once the
invoice has been posted without the need of resetting it to draft.

Thus, the field has been changed to computed writable field, taking care
of the consequences at model level (compute) and view level (add the
field in views + proper attrs).

This commits adds tracking=True to the payment mode field as well to be
aware when and who the payment mode is changed in the invoice, no matter
if directly changed in draft, or through the change on the journal item.

TT39850
2023-01-23 08:45:17 +01:00
David Ramia
f3ec4a2a6f [FIX] account_payment_partner: Fix tests
Add company permissions to the admin user to be able to create the demo data
2022-07-06 20:19:16 +02:00
Marçal Isern
9145ca7a11 [MIG] account_payment_partner: Migration to 15.0 2022-01-10 13:07:25 +01:00
Marçal Isern
aa805b80ad [IMP] account_payment_partner: black, isort, prettier 2021-12-28 15:40:12 +01:00
Víctor Martínez
028f37d66c [FIX] account_payment_partner: Set the correct value of payment_mode_id
instead of False

TT31904
2021-12-28 15:40:12 +01:00
Carlos Dauden
785b23f48d [FIX] account_payment_partner: _compute_invoice_partner_bank isn't executed
- When value is set from SO _prepare_invoice method
- When partner_id changes

TT30875
2021-12-28 15:40:12 +01:00
Víctor Martínez
3cb4f5651e [IMP] account_payment_partner: Add refund_payment_mode_id to set in reverse moves (Adapt to 14.0) 2021-12-28 15:40:12 +01:00
Víctor Martínez
cb1293b965 [IMP] account_payment_partner: Add refund_payment_mode_id to assign any payment mode to set auto-compute in reverse moves (in_refund and out_refund) 2021-12-28 15:40:12 +01:00
João Marques
dce72a9ba0 [FIX] account_payment_partner: Fix tests
After fcaa54939e, we need to specify the invoice date for vendor bills to be able to post them
2021-12-28 15:40:12 +01:00
Víctor Martínez
021619d951 [FIX] account_payment_partner: Set correct journals in tests to prevent error 2021-12-28 15:40:12 +01:00
Alexis de Lattre
c886b16142 account_payment_partner: FIX form view of account.move
Replace python constraint by check_company=True on payment_mode_id of account.move
2021-12-28 15:40:12 +01:00
Marçal Isern
369c3434c4 [MIG] account_payment_partner: Migration to 14.0 2021-12-28 15:40:12 +01:00
mreficent
a794bf2bb9 [MIG] account_payment_purchase: Migration to 13.0 2021-12-28 15:40:12 +01:00
Raf Ven
4135c3f4da [MIG] account_payment_partner: Migration to 13.0 2021-12-28 15:40:12 +01:00
Raf Ven
ee787a80a7 [IMP] account_payment_partner: black, isort 2021-12-28 15:40:12 +01:00
Raf Ven
6d6c7be00f [FIX] test_invoice_refund
The test checks on empty bank account but with Odoo commit d5688e6ca0 (diff-f3712147f4b25231caa371bd83265dbe) the company bank account gets defaulted when not specified
2021-12-28 15:40:12 +01:00
Pedro M. Baeza
420c728554 [MIG] account_payment_partner: Fix tests for new version 2021-12-28 15:40:12 +01:00
Pedro M. Baeza
217673e242 [MIG] account_payment_partner: Adapt tests + code to latest version 2021-12-28 15:40:12 +01:00
cubells
1df716b56f [IMP] account_payment_partner: Add several tests 2021-12-28 15:40:12 +01:00
Jordi Ballester
c93ea9fc34 add tests and small fixes 2021-12-28 15:40:12 +01:00