-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[16.0][MIG] sale_start_end_dates #2327
Conversation
3c1488f
to
f3bb874
Compare
/ocabot migration sale_start_end_dates |
@vancouver29 Thanks for this. Could you follow migration guide in order to have two commits (one for pre-commit, one for migration). https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-16.0 |
@@ -96,7 +96,7 @@ def _inverse_number_of_days(self): | |||
number_of_days=line.number_of_days, | |||
) | |||
line.number_of_days = 1 | |||
if line.start_date: | |||
if line.start_date and not line.end_date: |
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.
Shouldn't the end date converted into computed field readonly False ?
@@ -160,12 +160,12 @@ def start_end_dates_product_id_change(self): | |||
if self.product_id.must_have_dates: | |||
if self.order_id.default_start_date: | |||
self.start_date = self.order_id.default_start_date | |||
else: | |||
self.start_date = False | |||
# else: |
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.
Please remove unused code
@vancouver29 Could you also convert your PR title to human readable one ? Like '[16.0][MIG] sale_start_end_dates'. Thanks |
Replace openerp by odoo in import declarations
Currently translated at 100,0% (16 of 16 strings) Translation: sale-workflow-10.0/sale-workflow-10.0-sale_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-10-0/sale-workflow-10-0-sale_start_end_dates/nl_NL/
Currently translated at 26.7% (4 of 15 strings) Translation: sale-workflow-12.0/sale-workflow-12.0-sale_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_start_end_dates/pt/
f3bb874
to
556ac39
Compare
@rousseldenis FYI |
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.
Code review
|
||
def test_prepare_invoice_line(self): | ||
invoice_line_vals = self.so.order_line._prepare_invoice_line() | ||
self.assertEqual(invoice_line_vals["product_id"], self.product_id.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.
we can add two more lines here to check start_date
and end_date
on invoice line
self.assertEqual(invoice_line_vals["start_date"], self.so.order_line[0].start_date)
self.assertEqual(invoice_line_vals["end_date"], self.so.order_line[0].end_date)
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.
@chandni299 i added these lines
556ac39
to
4842535
Compare
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.
Looks Good 👍
Hi, looks good to me. |
Maybe, can you rebase your branch with main branch? |
I improved this PR by converting onchange to compute methods, cf this other PR #2577 |
@vancouver29 Do you mind if we switch to #2577 ? |
The module has been merged in v16, we can now close this PR |
No description provided.