Commit Graph

41 Commits

Author SHA1 Message Date
Luc De Meyer
8faf8edf05 [IMP] account_payment_order: update payment reference on open payment order
This commits adds the possibility to update the payment reference on a
payment transaction before generating XML file.
2024-06-09 22:10:17 +02:00
David Ramia
1f9fb94511 [MIG] account_payment_order: Migration to 17.0 2024-02-28 20:59:50 +01:00
Pedro M. Baeza
dc03f1070c [FIX] account_payment_order: Restrict payment lines button to payment 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
2024-02-26 22:06:46 +01:00
Luc De Meyer
a39adcf3e5 [IMP] account_payment_order: add payment lines smart button on invoice 2024-02-26 22:06:46 +01:00
Alexis de Lattre
9285446226 Add warning when payment order is not SEPA
The field 'sepa' on account.payment.order is only display for SEPA
payment methods.
If the option "show warning if not SEPA" is enabled on the payment
method, a warning banner is now displayed on payment orders with a SEPA
payment method which are not SEPA.
2024-02-26 22:06:46 +01:00
Víctor Martínez
faba2734a9 [IMP] account_payment_order: Add payment_ref field to account.payment tree and form views
Co-authored-by: luc-demeyer

TT45153
2024-02-26 22:06:45 +01:00
Víctor Martínez
a2dd94fdd4 [FIX] account_payment_order: Add extra form view only to avoid open move lines in edit mode
TT45211
2024-02-26 22:06:45 +01:00
Yadier A. De Quesada
da438f025b [FIX] account_payment_order Allow to download file in edit mode 2024-02-26 22:06:45 +01:00
Nikul-OSI
1601945a83 [FIX] Fixed Payment Transaction view 2024-02-26 22:06:45 +01:00
Wolfgang Pichler
c255abb1b3 [MIG] account_payment_order: Migration to 16.0 2024-02-26 22:06:45 +01:00
Pedro M. Baeza
342d898c8b [REF+IMP] account_payment_order: Use native payments
The previous approach creates manually the journal entries and does all
the hard work, plus not being 100% compatible with the bank statement
reconciliation widget (requiring a patch on OCB to see blue lines).

That decision made sense on the moment it was done (v9), where the
native payment model (account.payment) was very limited, and wasn't able
to store all the needed information for the bank transaction.

Now that the limitations are gone, we can get rid off this extra model,
and generate instead `account.payment` records, using both the native
model + methods to perform the same operations.

This serves also to workaround the problem found in #966.

All the code, views and tests of main module have been adapted to this
new approach in this commit. Later commits will adapt the rest of the
modules of the suite, and add migration scripts to transit from the
previous approach to this new one.

TT39832
2024-02-26 22:06:44 +01:00
manu
9fe1a59e79 [IMP]account_payment_order: Add activities to account.payment.order model 2024-02-26 22:06:44 +01:00
Miquel Raïch
2011692951 [IMP] account_payment_order: don't requiere reference_type anymore 2024-02-26 22:06:44 +01:00
Alexis de Lattre
d066ad5b2b account_payment_order: communication required in form view 2024-02-26 22:06:44 +01:00
Marçal Isern
70f7c9dfed [MIG] account_payment_order: Migration to 15.0 2024-02-26 22:06:44 +01:00
Alexis de Lattre
22ab93155e [IMP] account_payment_order: computation of sepa + remove done state + UI adjustments
- Improve computation of sepa on account.payment.order: check IBAN is in SEPA zone
  Update move line generation to get transfer account from bank journal
  Update payment mode configuration accordingly (3 fields removed)
  Several improvements in payment order tree and form view
- Remove done state (migration script provided)
- Don't set reference_type field on account.move required=True, because it
  causes a lot of problems in other modules that don't depend on this one.
  Setting it as required in the view is enough.
- add optional="hide" on payment mode in invoice tree view
- FIX crash when communication=null on payment line
- payment_mode_id readonly when state != draft
2024-02-26 22:06:44 +01:00
João Marques
5d9b6f501e [FIX] account_payment_order: Change security group category + Make post move field invisible in payment modes + fix account move views
- Change security group category
  Before this change, the group was creating a new section in each user's settings called "Other" with a field called "Other Extra Rights" that could select "Accounting / Payments" as an option
  This places it in the correct location
  TT29182
- Make post move field invisible in payment modes
  When the generate_moves option is not selected, the post_move option should not be available
  TT29182
- fix account move views
  Current spec was causing weird display in account move view, both for customer invoices and vendor bills
  Changing the placement and adding back the label fixes the issue
  TT29027
2024-02-26 22:06:43 +01:00
Carlos Roca
f4de0562bc [MIG] account_payment_order: Migration to v14 2024-02-26 22:06:43 +01:00
Jesús Alan Ramos Rodríguez
0fade4d4ab [MIG] account_payment_order: Migration to 14.0 2024-02-26 22:06:43 +01:00
Luc De Meyer
ff7531069b [IMP] account_payment_order: move payment order menus 2024-02-26 22:06:43 +01:00
Alexis de Lattre
3e9be511f0 Fix state condition on invoice view 2024-02-26 22:06:43 +01:00
Valentin Vinagre Urteaga
68924e3bf5 [FIX] account_payment_order: set partner_bank_id + order generation from invoice tree + attachment file name
- fix set partner_bank_id in account move lines
  Case: The bank account isn't set properly in the payment order lines, because the bank account is only got from account.move.line or the first bank account in the partner_id, but never from the invoice (account.move).
  Solution: With this fix, the bank account will be get from account.move when matching the criteria.
-  fix payment orders from invoice tree view
  Case: User can't add invoices to payment/debit orders from the tree view but it's still possible to add them one by one from the form view.
  Solution: Remove binding_views="form": by default are "tree & form". With this fix, users can add payment/debit orders from the invoice tree view
- fix the attachment file name & dowload.
  Case: After the configuration of a debit order and generating the .xml file, user can't download it from the next step screen using the download link.
  Solution: This fix makes the .xml file downloadable from the .xml file name as it was in older versions
2024-02-26 22:06:42 +01:00
Stefan Rijnhart
ccefbe898e [FIX] Set priority on alternate view 2024-02-26 22:06:42 +01:00
Raf Ven
91d53e6d08 [MIG] account_payment_order: Migration to 13.0 2024-02-26 22:06:42 +01:00
Raf Ven
c0ab186d6a [IMP] account_payment_order: black, isort 2024-02-26 22:06:42 +01:00
Pedro M. Baeza
17fe7e035b [FIX] account_payment_order: Restore colors in payment order tree view 2024-02-26 22:06:42 +01:00
Thomas Binsfeld
f210639941 [REF+IMP] account_payment_order: invoice addition + move generation + restrict payment modes selection on orders
- allow add to order from invoice if order exists
- payment line creation from move line
  Benefits of the batch creation of Odoo 12.0
  The method returns the created payment lines
- split generate_move method
- only payment order option on payment methods
  New option on payment methods: payment order only (unchecked by default) allowing to enforce the use of payment orders for some payment methods
2024-02-26 22:06:41 +01:00
Pedro M. Baeza
98a19d7334 [FIX] account_payment_order: Fix journal domain
Steps to reproduce
------------------

* Create a payment mode with "Link to Bank Account" = "Variable".
* Select several journals.
* Create a payment order with that payment mode.
* Save.
* Go to other menu and come back to payment order.
* Try to select a journal: the list is empty.

Fixes #544
2024-02-26 22:06:41 +01:00
Pedro M. Baeza
995a09e137 [MIG] account_payment_order: Finish migration to v12
* Removed deprecated YAML tests.
* Removed document dependency, as now there's no attachment dropdown.
* Switched deprecated `compute` method of res.currency.
* Restored missing field `reference_type` in invoices.
* Fixed call to `message_post`.
* Added missing description in model.
2024-02-26 22:06:41 +01:00
Enric Tobella
3db09f1ae4 [FIX] default_partner_id added on partner_bank if it is created. 2024-02-26 22:06:41 +01:00
Alexis de Lattre
ccaf009c82 Several small usability improvements
- when manually encoding a payment line, get company currency as default currency
- Search on payment order numbers
- Direct search on bank journal name in payment orders
- remove widget="selection" on account.payement.mode : this object is rarely modified, so widget='selection' is not a time saver, but we miss the HTML link, which can be pretty convenient to check the configuration.
2024-02-26 22:06:41 +01:00
Pedro M. Baeza
9477101e7b [FIX] account_payment_order: Correct domain definition on account.payment.line view 2024-02-26 22:06:40 +01:00
Jordi Ballester
6c1eb20bbf When the user looks for open payables or receivables, in the
context of payment orders, she should ocus on the amount that
is due to be paid. In this method we are forcing to display both
the amount due in company and in the invoice currency.

We then hide the fields debit and credit, because they add no value.
2024-02-26 22:06:40 +01:00
etobella
47e7e895f6 [MIG] account_payment_order 2024-02-26 22:06:40 +01:00
gilles
d863ee9524 [ADD] description field for payment order 2024-02-26 22:06:40 +01:00
mdietrichc2c
132e9916c7 [IMP] account_payment_order: Don't allow deletion of an uploaded payment order + allow to cancel an uploaded payment order 2024-02-26 22:06:40 +01:00
Alexis de Lattre
ca8343ea8a [FIX+IMP] account_payment_order:
* FIX: Bug #353 crash when selecting a payment mode that has a variable link to a bank account
* FIX: Add 'post_move' option on account.payment.mode with default True, to keep the previous behavior
* IMP: Explicit error when bank account is missing on bank journal
* IMP: Add field default_date_prefered on payment mode.
2024-02-26 22:06:40 +01:00
mdietrichc2c
e47a56615e Fix 2 issues on form view for payment order 2024-02-26 22:06:40 +01:00
Alexis de Lattre
7444be2bd5 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)
2024-02-26 22:06:40 +01:00
Alexis de Lattre
ec57ebd3ed [FIX] account_payment_order: 4 things:
* Fix crash when selecting a customer that has a direct debit payment mode but no mandate
* Hide many fields when payment_order_ok is False on a payment_mode
* Fix payment line communication when the move line is not linked to an invoice (problem found when porting donation_debit_debit to v9)
* For the communication field, if self.move_id.ref is False, fallback on self.move_id.name
2024-02-26 22:06:40 +01:00
Alexis de Lattre
57042c58ff Start to port bank-payment to v9 (with a lot of improvements) during the Sorrento Code sprint 2016
Improvements include:
- full re-organisation of modules and big re-organisation of the code
- simplification of the code related to the fact that support for direct debit is now in t
he base module, not added by an optional module account_direct_debit (module was removed)
- new design of the wizard to select move lines to pay
- support for non-SEPA file transfer-
- support for German direct debit SEPA files (fixes bug #129)
- remove workflow of payment.order
- add wizard of selection of move lines to pay
2024-02-26 22:06:39 +01:00