Commit Graph

22 Commits

Author SHA1 Message Date
Víctor Martínez
41f75f1f00 [FIX] account_payment_purchase: Leave the partner_bank_id field empty in purchase invoice process
Example use case:
- Create a Supplier and set a bank account.
- Creating a purchase order with a Supplier Bank Account
- The payment method of the payment method must have the Bank Account Required box unchecked.
- Confirm the purchase order and create the invoice with the "Create Bill" button.
- The invoice must have the bank account empty.

TT46502
2024-06-28 17:04:00 +02:00
Pedro M. Baeza
e4d4c113e6 [FIX] account_payment_purchase: Don't propagate empty payment mode
Steps to reproduce the problem:

- Have a partner without payment mode.
- Create a PO with such partner.
- No payment mode is filled.
- Now fill the payment mode in the partner.
- Create the invoice for the PO.

Current behavior:

The invoice has empty payment mode.

Expected behavior:

The invoice has the partner payment mode. Someone may think that having
no payment mode in the PO may prevail over the partner's payment mode,
or even their flows may consist in empyting the payment mode in the PO
for not binding it with anything yet, but that strategy has more holes
than the one implemented here, as the flow presented proves.

You can then use another one like having an extra payment mode
"Undetermined" or similar for doing such classification as a more
resilient strategy.

It includes a regression test that fails before the change and now is
correct.

TT38608
2024-06-13 10:40:11 -05:00
GuillemCForgeFlow
2271360f46 [FIX]account_payment_purchase: return result from onchange and get properties with correct company 2024-01-04 10:15:57 +01:00
Alexis de Lattre
4c3e829097 account_payment_purchase: replace api.onchange by computed field on purchase.order
Add check_company=True on the 2 fields of purchase.order
2023-11-06 22:43:36 +01:00
David Ramia
3094e7e25c [MIG] account_payment_purchase: Migration to 16.0 2023-06-01 11:26:57 +02:00
Cramosh
30511f9d0e [FIX] account_payment_purchase: solved error get payment mode and bank id close #899 2023-06-01 11:26:57 +02:00
Koen Loodts
ce5da9d7ef [MIG] account_payment_purchase: Migration to 15.0 2023-06-01 11:26:57 +02:00
Jordi Ballester
77a51dc034 [account_payment_purchase][fix] Only warn for non-blank payment mode or bank PO
- Only issue a warning message if the PO had a non-blank payment mode or bank.
2023-06-01 11:26:56 +02:00
Carlos Roca
ab2736c56a [MIG] account_payment_purchase: Migration to v14 2023-06-01 11:26:56 +02:00
Andrea
c450a8a8e2 Split account_payment_purchase (add account_payment_purchase_stock) 2023-06-01 11:26:55 +02:00
mreficent
b48955c943 [MIG] account_payment_purchase: Migration to 13.0 2023-06-01 11:26:55 +02:00
mreficent
9a66745752 [IMP] account_payment_purchase: black, isort 2023-06-01 11:26:55 +02:00
cubells
850663b898 account_payment_purchase: Migration to 11.0 2023-06-01 11:26:55 +02:00
Abranes
ec61427e4e account_payment_purchase: Migration to 10.0 2023-06-01 11:26:54 +02:00
cubells
090dc8440d account_payment_purchase module 2023-06-01 11:26:54 +02:00
jesusVMayor
59f1c30f9e account_payment_purchase: set correctly payment mode in purchases created from procurement. 2023-06-01 11:26:54 +02:00
Alexis de Lattre
b3c160823b Remove module account_payment_purchase 2023-06-01 11:26:54 +02:00
Pedro M. Baeza
f5bcc2c4e2 account_payment_*: Ensure work with dropshipping dual invoice
When invoicing from dropshipping, the same picking serves for both
invoicing sale and purchase orders. The OCA module
stock_dropshipping_dual_invoice makes that this happens, but
as the picking is the same, it contains both the sale and the
purchase reference, making that the resulting invoices don't have
the correct payment mode. This is harmless for the rest of
operations, as the dictionary query is provided with the proper
default value. On v9, dropshipping dual invoice has been merged
into core, so this patch for sure will be welcome in that version
(if the used method is the same).
2023-06-01 11:26:53 +02:00
Pedro M. Baeza
6939b277fd account_payment_purchase: Propagate payment_mode on MTO/drop shipping 2023-06-01 11:26:53 +02:00
Pedro M. Baeza
88d729051b Use sale_ok and purchase_ok instead of tweaking payment type 2023-06-01 11:26:52 +02:00
Pedro M. Baeza
5b62e5310e account_payment_sale_stock: Split for removing stock dependency on sale [DEL] Remove old translations templates [IMP] More reorder on folder structure 2023-06-01 11:26:52 +02:00
Pedro M. Baeza
6b1d85a90f Migration and enhancement of all modules involved in SEPA 2023-06-01 11:26:52 +02:00