-
-
Notifications
You must be signed in to change notification settings - Fork 689
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][mig] account_invoice_merge #238
[10.0][mig] account_invoice_merge #238
Conversation
81c19d4
to
dc4b273
Compare
'partner_bank_id': invoice.partner_bank_id.id, | ||
} | ||
|
||
@api.multi | ||
def do_merge(self, keep_references=True, date_invoice=False): | ||
def do_merge(self, keep_references=True, date_invoice=False, | ||
remove_empty_invoice_lines=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.
Where this new option is used
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.
That feature was added by @alexis-via
A fact is that it's by default 'True' so the corresponding part of code is always executed. But my guess is that it is added as an option for more customization possibilities in other modules.
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.
Just one question. Otherwise 👍 (Code review and functional testing)
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.
tested functionality 👍
I think tests for this module are very needed. |
@mreficent can you add unit tests to this one? |
fc7530f
to
7b83526
Compare
Thank you @mreficent! This is ready to merge, right? cc @pedrobaeza @jbeficent |
Can you make a bit more asserts on the tests (like checking the number of lines in the resulting invoice, check that 2 invoices with different partner are not merged...)? If it's too much, I understand, and as a first test version can serve. |
@lreficent This is not ready for merge... |
@pedrobaeza We'll try to improve a bit. 👍 @sergio-teruel well, all test are green, there are no conflicts, runbot is working... I don't see the problem to review it. Anyway, it was for sure rebased yesterday since @mreficent squashed the commits (for what you need to do a rebase). |
@lreficent This module not works well. When I merge a two invoices from one sale the sale line qty_invoiced field is set to zero, so i can invoice this sale order. |
@chienandalu Can test?? |
@lreficent ¿Can you include this modification?: |
|
a96deaf
to
0f4d0a5
Compare
@sergio-teruel Ok, we will work in this issue. |
@mreficent perfect... thanks!! 😄 |
'product_id', 'account_id', 'account_analytic_id', | ||
'uom_id' | ||
] | ||
for field in ['analytics_id']: |
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.
The 'analytics_id' field was added by account_analytic_plans
base module. But this base module was removed in v9. So this field is not anymore in versions 9.0 and 10.0
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.
LGTM! Please, review and then I will squash.
@lreficent @sergio-teruel @pedrobaeza
LGTM 👍 |
@lreficent Can we add the context key "is_merge" whan cancel the old invoices?? |
Move variable to argument of method Update version number to 9.0 Update to recent OCA standards
4e5896c
to
9cc6a1c
Compare
Hi @mreficent last commit 9cc6a1c introduce a travis error. Do you know why? |
It's not from last commit. It's from #254 and their tests. |
@luismontalba could you please review #238 (comment) thanks! |
@mreficent I think the tests are failing because of your additions in this PR. Just run Travis again on 10.0 branch, and if it's green, then your module is breaking correct inheritance and it's reflected in any of the modules tests. |
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.
Functionally tested in runbot 👍
But travis should be fixed
@pedrobaeza The account_invoice_refund_link tests are not failing by this branch. The Travis on 10.0 branch is failing already. https://travis-ci.org/OCA/account-invoicing/builds/234196352 |
triggering a rebuild |
] | ||
for field in ['analytics_id']: |
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.
Why do you replace 'analytics_id' instead of adding the new field in this list ?
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.
The 'analytics_id' field was added by account_analytic_plans
base module. But this base module was removed in v9.
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.
Thanks for the explanation @mreficent
@mreficent is it make sense to squash your last commits ? |
d167354
to
3265d99
Compare
3265d99
to
6d1baae
Compare
6d1baae
to
e356799
Compare
Task done in this migration: