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
12.0 mig sale order line date #703
Conversation
[FIX] Update readme to latest template
Travis is red due to absence of branch 12 in odoo repo |
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.
Small Change
This module cannot be tested on runbot as |
@tafaRU not sure what you mean. |
@tafaRU nvm, will fix in v12 |
@tafaRU @nikul-serpentcs updated |
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 LGTM
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.
IMO you should remove the related on sale.order.line
to allow the field to be set manually on each line.
result = super(SaleOrder, self).onchange_requested_date() | ||
if not result: | ||
result = {} | ||
result = super()._onchange_commitment_date() or {} | ||
if not self: |
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.
Is this possible ? 🤔
def onchange_requested_date(self): | ||
# requested_date was renamed to commitment_date | ||
@api.onchange('commitment_date') | ||
def _onchange_commitment_date(self): |
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.
Is this onchange really needed since the field on sale.order.line
is now related to the one on sale.order
?
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.
groups
are also missing on the view
Co-Authored-By: mpanarin <31699470+mpanarin@users.noreply.github.com>
Co-Authored-By: mpanarin <31699470+mpanarin@users.noreply.github.com>
Co-Authored-By: mpanarin <31699470+mpanarin@users.noreply.github.com>
Co-Authored-By: mpanarin <31699470+mpanarin@users.noreply.github.com>
Co-Authored-By: mpanarin <31699470+mpanarin@users.noreply.github.com>
@mpanarin Just opened a PR on your branch to restore former behaviour : mpanarin#2 |
Restore sale.order.line commitment_date as unrelated to sale.order
to please flake8
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, the suggestion should fix travis issue.
|
||
@api.multi | ||
def write(self, vals): | ||
# Force commitment date only if all the lines |
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.
# Force commitment date only if all the lines | |
# Force commitment date only if all the lines |
I cannot install sale_stock on runbot 😱
I reproduced also on local, but still trying to find out the reason. |
@mpanarin are you going to finish this? |
@lreficent sorry, but I don't have the time right now. Feel free to resubmit new pr with updates, or open a pr to my fork and I will accept it. |
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.
Dear @mpanarin , it looks like this PR is no working and you are not going to continue. What do you think about closing it and continue in #875 ?
Functionally tested: doesn't work, when trying to add a sale order line:
Error:
Odoo Server Error
Traceback (most recent call last):
File "/.repo_requirements/odoo/odoo/http.py", line 656, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/.repo_requirements/odoo/odoo/http.py", line 314, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/.repo_requirements/odoo/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/.repo_requirements/odoo/odoo/http.py", line 698, in dispatch
result = self._call_function(**self.params)
File "/.repo_requirements/odoo/odoo/http.py", line 346, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/.repo_requirements/odoo/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/.repo_requirements/odoo/odoo/http.py", line 339, in checked_call
result = self.endpoint(*a, **kw)
File "/.repo_requirements/odoo/odoo/http.py", line 941, in call
return self.method(*args, **kw)
File "/.repo_requirements/odoo/odoo/http.py", line 519, in response_wrap
response = f(*args, **kw)
File "/home/odoo/OCB-12.0/addons/web/controllers/main.py", line 962, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/home/odoo/OCB-12.0/addons/web/controllers/main.py", line 954, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/.repo_requirements/odoo/odoo/api.py", line 745, in call_kw
return _call_kw_model(method, model, args, kwargs)
File "/.repo_requirements/odoo/odoo/api.py", line 718, in _call_kw_model
result = method(recs, *args, **kwargs)
File "/.repo_requirements/odoo/odoo/models.py", line 1376, in load_views
for [v_id, v_type] in views
File "/.repo_requirements/odoo/odoo/models.py", line 1376, in
for [v_id, v_type] in views
File "/home/odoo/OCB-12.0/addons/mail/models/mail_thread.py", line 410, in fields_view_get
res = super(MailThread, self).fields_view_get(view_id=view_id, view_type=view_type, toolbar=toolbar, submenu=submenu)
File "/.repo_requirements/odoo/odoo/models.py", line 1462, in fields_view_get
xarch, xfields = View.postprocess_and_fields(self._name, etree.fromstring(result['arch']), view_id)
File "/.repo_requirements/odoo/odoo/addons/base/models/ir_ui_view.py", line 1106, in postprocess_and_fields
self.raise_view_error(message, view_id)
File "/.repo_requirements/odoo/odoo/addons/base/models/ir_ui_view.py", line 548, in raise_view_error
raise ValueError(message)
ValueError: Field property_valuation
does not exist
Error context:
View n/a
[view_id: n/a, xml_id: n/a, model: n/a, parent_id: n/a]
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module adds requested date to a sales order lines and propagate it to | ||
stock moves and procurements. |
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.
So this module must depends in stock
"license": "AGPL-3", | ||
# sale_order_dates became part of the sale module in 12.0 | ||
"depends": [ | ||
"sale_management", |
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.
this module should depends in stock and it doesn't
In v11 depenede in sale_order_dates
https://github.com/OCA/sale-workflow/blob/11.0/sale_order_line_date/__manifest__.py#L19
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.
V11 depends on sale_order_dates, but the commitment_date field on sale.order was moved to base sale module in V12. So no need for another dependency.
The method _prepare_procurement_values is used by sale_stock, and there needs to be a dependency or else the sale_stock values will overwrite the values from this module.
Hello everyone there! What is the state of the migration? I need the module working in version 12. Can I contribute in the PR? Thanks in advance. |
Hi @BT-jmolina, seems that it has been abandoned, so you can help by taking over an opening a new Pull Request finishing the job. I'll be glad to review! |
Superseded by #984. |
Migration of the sale_order_line_date as well as adding the setup directory