Commit Graph

270 Commits

Author SHA1 Message Date
OCA-git-bot
f63ab8cc3e [BOT] post-merge updates 2023-12-11 20:55:11 +00:00
oca-ci
9d26d78f57 [UPD] Update account_payment_sale.pot 2023-12-11 20:52:35 +00:00
OCA-git-bot
dbc6b621f0 Merge PR #1186 into 17.0
Signed-off-by pedrobaeza
2023-12-11 20:50:31 +00:00
David Ramia
6d4af78f71 [MIG] account_payment_sale: Migration to 17.0 2023-11-26 20:28:23 +01:00
David Ramia
32e09ecb89 [IMP] account_payment_sale: pre-commit auto fixes 2023-11-26 20:28:23 +01:00
Alexis de Lattre
902041e766 account_payment_sale: remove unneeded code
Remove inherit of sale.advance.payment.inv: no need to inherit
_prepare_invoice_values() because it calls _prepare_invoice() from the
sale.order object
2023-11-26 20:28:23 +01:00
Alexis de Lattre
b1862a3605 account_payment_sale: payment_mode_id in sale.report 2023-11-26 20:28:23 +01:00
SodexisTeam
e10c26b62b [MIG] account_payment_sale: Migration to 16.0 2023-11-26 20:28:23 +01:00
manu
d4b2eadf17 [MIG]account_payment_sale: Migration to 15.0 2023-11-26 20:28:23 +01:00
Pedro M. Baeza
bdc37eae7f [FIX] account_payment_sale: Adapt tests to 18489012
The expected one is to not have partner bank set, as we don't want the
invoice is printed with such bank account forced.
2023-11-26 20:28:23 +01:00
Alexis de Lattre
74a758c9bd [MIG] account_payment_sale to 14.0 2023-11-26 20:28:23 +01:00
Carlos Dauden
6f96f10519 [FIX] account_payment_sale: Compatibility with account_banking_sepa_direct_debit
Steps to reproduce the problem:

- Set a payment mode with fixed journal and set the journal with bank account A.
- Create a sales order and put bank account B.
- Create invoice.
- Bank account in invoice is A instead of B.
2023-11-26 20:28:23 +01:00
OCA-git-bot
532a4c739e pre-commit update 2023-11-26 20:28:23 +01:00
Raf Ven
cf54f65fcf [MIG] account_payment_sale: Migration to 13.0 2023-11-26 20:28:23 +01:00
Raf Ven
653530ddf5 [IMP] account_payment_sale: black, isort 2023-11-26 20:28:23 +01:00
Laurent Mignon (ACSONE)
3e1f286ca0 [FIX] account_payment_sale: Propagate payment_mode to invoices created from a call to sale.action_invoice_create
Into the normal process of the invoice creation from a sale order by odoo, the onchange_partner is called. In some case, this call will reset the specific payment_mode and/or partner_bank_id set on the sale_order.
To fix this issue, we must override the _finalize_invoices method, take a snapshot of these values before the call to super and restore these values if these are changed.
fixes #536
2023-11-26 20:28:23 +01:00
Pedro M. Baeza
2f63cca7d2 [MIG] account_payment_sale: Adapt tests to v12 2023-11-26 20:28:23 +01:00
Mourad
50b6f50192 [MIG] account_payment_sale: migrate to 12.0 2023-11-26 20:28:22 +01:00
mpanarin
3c6f8722af [IMP] account_payment_sale: Add tests to increase coverage 2023-11-26 20:28:22 +01:00
Artem Kostyuk
6b07a2b6f0 [MIG] account_payment_sale: Migrate to 11.0 2023-11-26 20:28:22 +01:00
cubells
eec832ab3b [IMP] account_payment_sale: add payment mode to sale report 2023-11-26 20:28:22 +01:00
Alexis de Lattre
055dd400ad Port almost all modules to v10 (#305)
Port almost all modules to v10

* Update to EPC Rulebook v9.2 that start to apply on 2016-11-20 (bug #300)
2023-11-26 20:28:22 +01:00
Alexis de Lattre
165ef1b9bf [MIG] account_payment_sale: Migration to v9 2023-11-26 20:28:22 +01:00
Pedro M. Baeza
9d08371f66 [MIG] account_payment_sale: Migration to 8.0
* Migration and enhancement of all modules involved in SEPA
* Remove duplicated files
* Check if payment mode is set in the propagation
* Clean files
* account_payment_sale_stock: Split for removing stock dependency on sale
* Remove old translations templates
* Reorder on folder structure
* Translation template files
* Translations to spanish
* Use sale_ok and purchase_ok instead of tweaking payment type
* Add sale_ok and purchase_ok filters in partner/sale/purchase form views
* Use widget=selection for payment_mode_id fields
* Update demo data
2023-11-26 20:28:22 +01:00
Alexis de Lattre
bf2b6b1112 Add 4 new modules to handle payment type and bank accounts:
- account_payment_partner
- account_payment_sale
- account_payment_sale_stock
- account_payment_purchase

Filter the selection of invoices per payment type.
Add active field on payment.mode and payment.mode.type.
Add menu entry for Payment Types.
2023-11-26 20:28:22 +01:00
OCA-git-bot
35c4c673e3 [BOT] post-merge updates 2023-11-25 09:12:04 +00:00
oca-ci
cdef86f179 [UPD] Update account_payment_partner.pot 2023-11-25 09:09:47 +00:00
OCA-git-bot
eefc33831c Merge PR #1183 into 17.0
Signed-off-by pedrobaeza
2023-11-25 09:07:36 +00:00
Miquel Alzanillas
4d1c73bd14 [MIG] account_payment_partner: Migration to 17.0 2023-11-25 08:46:06 +01:00
OCA-git-bot
cd066c3f73 [BOT] post-merge updates 2023-11-24 19:42:49 +00:00
oca-ci
0474e3804e [UPD] Update account_payment_mode.pot 2023-11-24 19:40:48 +00:00
OCA-git-bot
1d8969ca7f Merge PR #1182 into 17.0
Signed-off-by pedrobaeza
2023-11-24 19:38:58 +00:00
Miquel Alzanillas
7e0324aa9c [MIG] account_payment_mode: Migration to 17.0 2023-11-24 20:35:53 +01:00
Miquel Alzanillas
4d46d09a4b [IMP] account_payment_partner: pre-commit auto fixes 2023-11-22 22:20:03 +01:00
OCA-git-bot
6034b7348e [BOT] post-merge updates 2023-11-22 22:13:18 +01:00
OCA-git-bot
deb95562c6 [UPD] README.rst 2023-11-22 22:13:18 +01:00
Luis J. Salvatierra
132374d104 [FIX] account_payment_partner: fetchPreloadedData bug using selection widget 2023-11-22 22:13:18 +01:00
Rémi
21d4734f87 Translated using Weblate (French)
Currently translated at 100.0% (37 of 37 strings)

Translation: bank-payment-16.0/bank-payment-16.0-account_payment_partner
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-16-0/bank-payment-16-0-account_payment_partner/fr/
2023-11-22 22:13:18 +01:00
OCA-git-bot
a28a727bc8 account_payment_partner 16.0.1.2.1 2023-11-22 22:13:18 +01:00
Akim Juillerat
f79dca5010 account_payment_partner: Fix computation of partner_bank_id
The computation of partner_bank_id has not been migrated properly
since the move from account.invoice to account.move.

Before, we had an onchange on partner_id that did the following:
  - If no partner or no company, remove payment mode
    - If type = in_invoice, remove partner_bank_id as well
  - If partner and company,
    - If type = in_invoice, set payment mode from partner
      - if payment mode's payment method has bank account required,
        set the partner_bank_id to the commercial partner's bank
      - else set partner_bank_id to False
    - If type = out_invoice, set payment mode from partner and
      do not assign partner_bank_id

We also had an onchange on payment_mode_id that did the following:
  - If payment mode and its payment_type=outbound and its payment method
    has bank account required, set partner_bank_id to False
  - If no payment mode, set partner_bank_id to False

Now that partner_bank_id is a computed field, we shouldn't set its value
to False if the move is not a vendor bill or doesn't have a payment mode.

The computation of partner_bank_id must instead reflect the conditions we
used to have, that is:
  - If we don't have a payment_mode, set value to False
  - If we have a payment mode
    - If type=in_invoice and payment mode's payment method has not bank
      account required, set partner_bank_id to False (as setting the bank account
      from the partner is done in the call to super)
    - If type=out_invoice
      - if payment mode's payment method has bank account required
        - set partner_bank_id to the bank account linked to the fixed journal
          of payment mode if defined
        - do not set anything if that isn't the case since setting the bank account
          from the company is done in the call to super)
      - if payment mode's payment method does not have bank account required,
        set partner_bank_id to False

Closes: #1091
2023-11-22 22:13:18 +01:00
OCA-git-bot
a094cd0108 account_payment_partner 16.0.1.2.0 2023-11-22 22:13:18 +01:00
Rodrigo
32e6c6e125 [FIX] account_payment_partner: bad application of attributes on the field partner_bank_id, this commit fixes showing the same field twice in customer invoices. 2023-11-22 22:13:18 +01:00
gelo joga Rodríguez
5fe0e38208 Translated using Weblate (Spanish)
Currently translated at 100.0% (37 of 37 strings)

Translation: bank-payment-16.0/bank-payment-16.0-account_payment_partner
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-16-0/bank-payment-16-0-account_payment_partner/es/
2023-11-22 22:13:18 +01:00
OCA-git-bot
60eda6f545 account_payment_partner 16.0.1.1.1 2023-11-22 22:13:18 +01:00
Danny W. Adair
409e64d44c Add pre_init_hook to add computed columns
Add columns to avoid Memory error on an existing Odoo instance
with lots of data.

The payment_mode_id fields are introduced by this module and computed only
from each other or the also newly introduced supplier_payment_mode_id and
customer_payment_mode_id on res.partner, so they can stay NULL, nothing
to compute.
2023-11-22 22:13:18 +01:00
Weblate
c9a5f92ecb Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: bank-payment-16.0/bank-payment-16.0-account_payment_partner
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-16-0/bank-payment-16-0-account_payment_partner/
2023-11-22 22:13:18 +01:00
OCA-git-bot
b9991a6fec account_payment_partner 16.0.1.1.0 2023-11-22 22:13:18 +01:00
oca-ci
6fdfe8b085 [UPD] Update account_payment_partner.pot 2023-11-22 22:13:18 +01:00
Pedro M. Baeza
5e47c9dfb1 [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-11-22 22:13:18 +01:00
Pedro M. Baeza
9f5b540b53 [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-11-22 22:13:18 +01:00