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

[10.0] Improve handling of refunds #526

Closed
wants to merge 2 commits into from

Conversation

alexis-via
Copy link
Contributor

Ability to sort payment lines by maturity date

@pedrobaeza
Copy link
Member

@carlosdauden can you please review this as an alternative to #469?

Copy link
Contributor

@carlosdauden carlosdauden left a comment

Choose a reason for hiding this comment

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

Code review

Ability to sort payment lines by maturity date
account_banking_mandate: add statusbar_visible="draft,valid,expired"
account_payment_order: add edit="0" create="0" on tree view of bank.payment.line
account_payment_order: option post_move on account.payment.mode visible
only when generate_move is on.
@chrisdec
Copy link

Hello @alexis-via, I made some functional tests but it seems it only works for supplier refunds and not for customer refunds. That's right?

In V8, It was possible to add customer refunds to payment order. Do you know a way to do this in V10?

Thanks,

@jbaudoux
Copy link

@alexis-via @chrisdec I tested the customer refunds and it seems to work with 2 remarks:

Copy link

@jbaudoux jbaudoux left a comment

Choose a reason for hiding this comment

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

If payment lines are not grouped, you cannot include refunds. It will be blocked at file generation as you cannot have negative payment lines.

# ('reconcile_partial_id', '=', False), # TODO uncomment
]
domain += [('account_id.internal_type', '=', 'payable')]
if not self.refund:

Choose a reason for hiding this comment

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

Suggested change
if not self.refund:
if not self.refund or not self.order_id.payment_mode_id.group_lines:

('account_id.internal_type', '=', 'receivable'),
]
domain += [('account_id.internal_type', '=', 'receivable')]
if not self.refund:

Choose a reason for hiding this comment

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

Suggested change
if not self.refund:
if not self.refund or not self.order_id.payment_mode_id.group_lines:

@github-actions
Copy link

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.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jan 30, 2022
@github-actions github-actions bot closed this Mar 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants