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

[16.0][MIG] sale_start_end_dates #2577

Merged
merged 34 commits into from
Aug 7, 2023

Conversation

alexis-via
Copy link
Contributor

Superseeds migration PR #2327 I converted onchange to compute methods.

Alexis de Lattre and others added 30 commits June 20, 2023 10:29
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/
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
Convert readme to new subdir format
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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/
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/
Improve and update some strings
Update FR translation
@alexis-via alexis-via force-pushed the 16.0-mig-sale_start_end_dates-improve branch from d45fa60 to b8ee3b0 Compare June 20, 2023 11:17
@alexis-via
Copy link
Contributor Author

Tests are green!

@rousseldenis
Copy link
Contributor

/ocabot migration sale_start_end_dates

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Jun 21, 2023
@OCA-git-bot
Copy link
Contributor

The migration issue (#2215) has not been updated to reference the current pull request because a previous pull request (#2327) is not closed.
Perhaps you should check that there is no duplicate work.
CC @vancouver29

Copy link
Contributor

@rousseldenis rousseldenis 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. Indeed, this is better

Copy link
Contributor

@dsolanki-initos dsolanki-initos left a comment

Choose a reason for hiding this comment

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

Functional review LGTM.

Copy link
Contributor

@DorianMAG DorianMAG left a comment

Choose a reason for hiding this comment

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

Thx for this work.
Tested on runboat.
LGTM

@agent-z28
Copy link
Contributor

agent-z28 commented Jul 16, 2023

@alexis-via

  1. I found this:

File "/opt/odoo/auto/addons/sale_start_end_dates/models/sale_order.py", line 184, in _compute_end_date
elif line.end_date and line.start_date and line.start_date > self.end_date:
File "/opt/odoo/custom/src/odoo/odoo/fields.py", line 1157, in get
self.recompute(record)
File "/opt/odoo/custom/src/odoo/odoo/fields.py", line 1365, in recompute
apply_except_missing(self.compute_value, recs)
File "/opt/odoo/custom/src/odoo/odoo/fields.py", line 1338, in apply_except_missing
func(records)
File "/opt/odoo/custom/src/odoo/odoo/fields.py", line 1387, in compute_value
records._compute_field_value(self)
File "/opt/odoo/custom/src/odoo/odoo/models.py", line 4208, in _compute_field_value
fields.determine(field.compute, self)
File "/opt/odoo/custom/src/odoo/odoo/fields.py", line 97, in determine
return needle(*args)
File "/opt/odoo/auto/addons/sale_start_end_dates/models/sale_order.py", line 169, in _compute_start_date
elif line.end_date and line.start_date and line.start_date > self.end_date:
File "/opt/odoo/custom/src/odoo/odoo/fields.py", line 1153, in get
record.ensure_one()
File "/opt/odoo/custom/src/odoo/odoo/models.py", line 5137, in ensure_one
raise ValueError("Expected singleton: %s" % self)
alueError: Expected singleton: sale.order.line(45, 46, 47, 48)

2 ) I think it would be nice to have an option, to update all lines with a new default_date

Imagine you work with a long sales template which will be pulled as default. So the whole order lines are there.
Now you have to set it in each line manually!

Maybe onchange just fill out all empty values for order.lines that require it!?

@DorianMAG
Copy link
Contributor

Hi @agent-z28, @alexis-via
I tried to reproduce the problem,
but I did not find.
Do you have any details on this.
Does this require a fix?

@agent-z28
Copy link
Contributor

agent-z28 commented Jul 24, 2023

Hi @agent-z28, @alexis-via I tried to reproduce the problem, but I did not find. Do you have any details on this. Does this require a fix?

Hi i provided a fix here:

https://github.com/akretion/sale-workflow/pull/29/files#diff-9aa1071ea0fb2a2becdd07b45fcd2f44dd74b8f762e497498c06f298e7a81d33R184

akretion#29

its self instead of line ...

Copy link
Member

@rafaelbn rafaelbn left a comment

Choose a reason for hiding this comment

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

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-2577-by-rafaelbn-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 15b659a into OCA:16.0 Aug 7, 2023
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 25d4208. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.