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

[IMP] improve selection of invoices to pay #5

Conversation

sbidoul
Copy link
Member

@sbidoul sbidoul commented Jan 14, 2015

This fixes OCA#93.

  • filter invoices that are already in draft and open payment orders.
  • use residual amount to care for partial reconciliations and align with official 8.0

sbidoul and others added 5 commits December 14, 2014 14:51
Since the field is required and payment modes may exist when
account_banking_payment_export is installed, a default value
is necessary to let Odoo set the required database constraint.
…method on account_banking_payment_export addons
[IMP] sepa: make it easier to extend structured communication types
@@ -45,9 +46,33 @@ def default_get(self, field_list):
def extend_payment_order_domain(self, payment_order, domain):
if payment_order.payment_order_type == 'payment':
domain += [('account_id.type', 'in', ('payable', 'receivable')),
('amount_to_pay', '>', 0)]
('credit', '>', 0)]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amount_to_pay still exists in account_payment. I think we should use that amount to take into account also possible refunds.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pedrobaeza can you point me where? On my local copy of the 8.0 branch I can't find amount_to_pay anywhere in the code. I may have missed something.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, it was in 7.0 (https://github.com/odoo/odoo/blob/7.0/addons/account_payment/account_move_line.py#L29), but it has been removed in 8.0.

Are you taken into account currencies and so on?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be ok wrt currencies. See amount_residual_currency below.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not using then amount_residual_currency?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For several reasons:

  1. amount_residual_currency is not searchable
  2. it is done this way in the official module
  3. it would not be better than credit > 0 for the purpose of searching lines to pay

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I'm still not sure about this serving for refunds, but I need to investigate. In direct debit we will need something similar (remove amount_to_receive). Doesn't it?

pedrobaeza and others added 6 commits January 19, 2015 12:09
Replace tabs by spaces in mandate views
account_banking_mandate/views/account_banking_mandate_view.xml: convert from dos to unix format
Use widget=selection for payment_mode_id fields
Update demo data
account_payment_partner : remove unused file + cleanup code
@adrienpeiffer
Copy link

Rebased

@sbidoul
Copy link
Member Author

sbidoul commented Jan 20, 2015

f6c8cd7 provides an elegant solution for OCA#101

👍

@pedrobaeza
Copy link

👍

[IMP] set default value for payment.mode.type
…export-ape

[IMP] set complete domain before calling extend_payment_order_domain met...
@adrienpeiffer
Copy link

Thanks @sbidoul @lmignon

…yment-sbi

8.0 migration of account_banking_payment
pedrobaeza and others added 2 commits January 21, 2015 10:11
[Usability] mandates: search by reference, add group_by, add seq type in tree view
…r_fix

[FIX] account_banking_pain_base: Set a general rule for the initiating party identifier
sbidoul and others added 3 commits January 22, 2015 18:06
…idget

8.0 use sale_ok and purchase_ok filters in partner/sale/purchase form views
This fixes OCA#93.

- filter invoices that are already in draft and open payment orders.
- use residual amount to care for partial reconciliations and align with official 8.0
…nciled then write new values on this partial reconcile
@sbidoul sbidoul closed this Feb 13, 2015
sbidoul pushed a commit that referenced this pull request Jun 27, 2016
[FIX] better filtering of move lines already included in open payment order
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants