-
-
Notifications
You must be signed in to change notification settings - Fork 535
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
[ADD][14.0]account_payment_order_validation_move_line #1192
[ADD][14.0]account_payment_order_validation_move_line #1192
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd change the module name.
Maybe something like account_payment_order_select_for_payment to be consistent as it is kind of a glue module between account_invoice_select_for_payment
and account_payment_order
Also, there is a missing part in the module. Once the payment order is validated (I guess at the step the reconciliation is done), the paid invoices should be unflaggued (the selected_for_payment should be set to False on the invoices, once the payment is done.
account_payment_order_validation_move_line/models/account_payment_mode.py
Outdated
Show resolved
Hide resolved
account_payment_order_validation_move_line/readme/CONTRIBUTORS.rst
Outdated
Show resolved
Hide resolved
account_payment_order_validation_move_line/readme/DESCRIPTION.rst
Outdated
Show resolved
Hide resolved
account_payment_order_validation_move_line/views/account_payment_mode.xml
Outdated
Show resolved
Hide resolved
account_payment_order_validation_move_line/wizard/account_payment_line_create.py
Outdated
Show resolved
Hide resolved
account_payment_order_validation_move_line/wizard/account_payment_line_create.py
Outdated
Show resolved
Hide resolved
res = super(AccountPaymentLineCreate, self)._prepare_move_line_domain() | ||
|
||
if self.select_for_payment_move_line: | ||
res += [("move_id.selected_for_payment", "=", True)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if the condition should be more complicated, because, this selected_for_payment is only meant to be set on invoices, not in regular accounting entry. But this payment order can accept accounting entry that are not invoices, depending on the filter invoice
.
So I guess the domain as it is now is ok in case invoice
field is True, but if not, we'd have to have a domain like
['|', '&', ('move_type', 'in', ("in_invoice", "out_invoice", "in_refund", "out_refund")), ("move_id.selected_for_payment", "=", True), ('move_type', '=', 'entry')]
So I would check
if self.invoice and self.select_for_payment_move_line
then add the domain [("move_id.selected_for_payment", "=", True)]
elif self.select_for_payment_move_line
then add the more complex domain to accept regular accounting entries
ba65157
to
bf4dff7
Compare
59866c9
to
3ea17a7
Compare
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
@florian-dacosta
@alexis-via
for check.
Same than account_payment_order_currency, it should be great if we can talk about it tmw.