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

wrong field name in _refund_cleanup_lines patch method #147

Closed
adamwojt opened this issue Oct 30, 2019 · 4 comments
Closed

wrong field name in _refund_cleanup_lines patch method #147

adamwojt opened this issue Oct 30, 2019 · 4 comments
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Milestone

Comments

@adamwojt
Copy link

adamwojt commented Oct 30, 2019

There is mistake here that causes that invoice_line_tax_ids are not appended resulting in incorrect tax for refund invoice.

invoice_line_tax_id should be invoice_line_tax_ids

Odoo 10.0 account.invoice.line

@pedrobaeza
Copy link
Member

Can you please do the PR? https://odoo-community.org/page/Contribute

@pedrobaeza pedrobaeza added this to the 10.0 milestone Oct 30, 2019
@adamwojt
Copy link
Author

Hey @pedrobaeza . Sure we will, we are reworking this method at the moment.

We have better approach for patching this using index to update values from super and not copy/pasting original Odoo method as there are problems with current approach for example:

We are also thinking that tax_line_ids should be dropped for refund invoice since we noticed problem when refund is made for less lines than original invoice - taxes are wrong (calculated for all lines of original invoice). All this can be easily achieved in this patch method.

If dropped, new tax_line_ids will be recalculated anyway with _onchange_invoice_line_ids

@pedrobaeza
Copy link
Member

OK, great. The code for this module can be very ugly, so any improvement is welcome. NOTE: I'm not a user of this module nor proper reviewer for it, but general community manager for this kind of kick-off.

adamwojt pushed a commit to versada/rma that referenced this issue Oct 31, 2019
- _refund_cleanup_lines now uses index to add claim values, there is no need
to C/P Odoo's code to acheive this
- _refund_cleanup_lines now returns empty list for account.invoice.tax calls to it,
this is needed because origin tax lines are sum-up of all taxes and in case of claim
not all invoice lines are refunded. This also fixes wrong field name, see OCA#147
adamwojt pushed a commit to versada/rma that referenced this issue Nov 4, 2019
- _refund_cleanup_lines now uses sorted recordset to add claim values, there is no need
to C/P Odoo's code to acheive this
- _refund_cleanup_lines now returns empty list for account.invoice.tax calls to it,
this is needed because origin tax lines are sum-up of all taxes and in case of claim
not all invoice lines are refunded.
- This also fixes wrong field name, see OCA#147
adamwojt pushed a commit to versada/rma that referenced this issue Nov 15, 2019
- _refund_cleanup_lines now uses sorted recordset to add claim values, there is no need
to C/P Odoo's code to acheive this
- _refund_cleanup_lines now returns empty list for account.invoice.tax calls to it,
this is needed because origin tax lines are sum-up of all taxes and in case of claim
not all invoice lines are refunded.
- This also fixes wrong field name, see OCA#147
adamwojt pushed a commit to versada/rma that referenced this issue Nov 17, 2019
- _refund_cleanup_lines now uses sorted recordset to add claim values, there is no need
to C/P Odoo's code to acheive this
- _refund_cleanup_lines now returns empty list for account.invoice.tax calls to it,
this is needed because origin tax lines are sum-up of all taxes and in case of claim
not all invoice lines are refunded.
- This also fixes wrong field name, see OCA#147
adamwojt pushed a commit to versada/rma that referenced this issue Nov 18, 2019
- _refund_cleanup_lines now uses sorted recordset to add claim values, there is no need
to C/P Odoo's code to acheive this
- _refund_cleanup_lines now returns empty list for account.invoice.tax calls to it,
this is needed because origin tax lines are sum-up of all taxes and in case of claim
not all invoice lines are refunded.
- This also fixes wrong field name, see OCA#147
adamwojt pushed a commit to versada/rma that referenced this issue Nov 18, 2019
- _refund_cleanup_lines now uses sorted recordset to add claim values, there is no need
to C/P Odoo's code to acheive this
- _refund_cleanup_lines now returns empty list for account.invoice.tax calls to it,
this is needed because origin tax lines are sum-up of all taxes and in case of claim
not all invoice lines are refunded.
- This also fixes wrong field name, see OCA#147
adamwojt pushed a commit to versada/rma that referenced this issue Nov 18, 2019
- _refund_cleanup_lines now uses sorted recordset to add claim values, there is no need
to C/P Odoo's code to acheive this
- _refund_cleanup_lines now returns empty list for account.invoice.tax calls to it,
this is needed because origin tax lines are sum-up of all taxes and in case of claim
not all invoice lines are refunded.
- This also fixes wrong field name, see OCA#147
adamwojt pushed a commit to versada/rma that referenced this issue Nov 19, 2019
- _refund_cleanup_lines now uses sorted recordset to add claim values, there is no need
to C/P Odoo's code to acheive this
- _refund_cleanup_lines now returns empty list for account.invoice.tax calls to it,
this is needed because origin tax lines are sum-up of all taxes and in case of claim
not all invoice lines are refunded.
- This also fixes wrong field name, see OCA#147
@github-actions
Copy link

There hasn't been any activity on this issue in the past 6 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 issue 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 Apr 10, 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

No branches or pull requests

2 participants