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

[17.0] delivery_date_sale_order_line #321

Open
FgarcesYmant opened this issue Jul 19, 2024 · 2 comments
Open

[17.0] delivery_date_sale_order_line #321

FgarcesYmant opened this issue Jul 19, 2024 · 2 comments

Comments

@FgarcesYmant
Copy link

Hello I was testing this module, I've correctly installed it on an enterprise edition on V17, on SH. It works for sale, as it creates differente picking and expeditions grouping by dates.

But, it doesn't let the purchases app work, it always has an error when confirming the purchase. As I can understand the module creates a function on the delivery_slip for sales which is not compatible on purchases. This is the error:

RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/http.py", line 1764, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/home/odoo/src/odoo/odoo/service/model.py", line 133, in retrying
result = func()
File "/home/odoo/src/odoo/odoo/http.py", line 1791, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/home/odoo/src/odoo/odoo/http.py", line 1995, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_http.py", line 222, in _dispatch
result = endpoint(**request.params)
File "/home/odoo/src/odoo/odoo/http.py", line 741, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/home/odoo/src/odoo/addons/web/controllers/dataset.py", line 28, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/home/odoo/src/odoo/addons/web/controllers/dataset.py", line 20, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/odoo/src/odoo/odoo/api.py", line 468, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/home/odoo/src/odoo/odoo/api.py", line 453, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/home/odoo/src/odoo/addons/purchase/models/purchase_order.py", line 495, in button_confirm
order.button_approve()
File "/home/odoo/src/odoo/addons/purchase_stock/models/purchase_order.py", line 114, in button_approve
self._create_picking()
File "/home/odoo/src/odoo/addons/purchase_stock/models/purchase_order.py", line 250, in _create_picking
moves = moves.filtered(lambda x: x.state not in ('done', 'cancel'))._action_confirm()
File "/home/odoo/src/enterprise/quality_mrp/models/stock_move.py", line 13, in _action_confirm
moves = super(StockMove, self)._action_confirm(merge=merge, merge_into=merge_into)
File "/home/odoo/src/enterprise/quality_control/models/stock_move.py", line 13, in _action_confirm
moves = super(StockMove, self)._action_confirm(merge=merge, merge_into=merge_into)
File "/home/odoo/src/odoo/addons/mrp/models/stock_move.py", line 435, in _action_confirm
return super(StockMove, moves)._action_confirm(merge=merge, merge_into=merge_into)
File "/home/odoo/src/odoo/addons/stock/models/stock_move.py", line 1377, in _action_confirm
new_push_moves = self._push_apply()
File "/home/odoo/src/odoo/addons/stock/models/stock_move.py", line 956, in _push_apply
new_move = rule._run_push(move)
File "/home/odoo/src/odoo/addons/stock/models/stock_rule.py", line 206, in _run_push
new_move = move.sudo().copy(new_move_vals)
File "/home/odoo/src/odoo/odoo/models.py", line 5555, in copy
record_copy = self.create(vals)
File "", line 2, in create
File "/home/odoo/src/odoo/odoo/api.py", line 414, in _model_create_multi
return create(self, [arg])
File "/home/odoo/src/odoo/addons/mrp/models/stock_move.py", line 363, in create
return super().create(vals_list)
File "", line 2, in create
File "/home/odoo/src/odoo/odoo/api.py", line 415, in _model_create_multi
return create(self, arg)
File "/home/odoo/src/odoo/addons/stock/models/stock_move.py", line 621, in create
return super().create(vals_list)
File "", line 2, in create
File "/home/odoo/src/odoo/odoo/api.py", line 415, in _model_create_multi
return create(self, arg)
File "/home/odoo/src/odoo/odoo/models.py", line 4610, in create
records = self._create(data_list)
File "/home/odoo/src/odoo/odoo/models.py", line 4872, in _create
records._validate_fields(name for data in data_list for name in data['stored'])
File "/home/odoo/src/odoo/odoo/models.py", line 1456, in _validate_fields
check(self)
File "/home/odoo/src/user/delivery_date_sale_order_line/models/stock_move.py", line 66, in _date_validation
if move.delivery_datetime.date() < date.today():
AttributeError: 'bool' object has no attribute 'date'

The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
RPC_ERROR
at makeErrorFromResponse (https://ymantodoo-plasticos-ferrando-01-pruebas1-14099417.dev.odoo.com/web/assets/c03592b/web.assets_web.min.js:2884:163)
at XMLHttpRequest. (https://ymantodoo-plasticos-ferrando-01-pruebas1-14099417.dev.odoo.com/web/assets/c03592b/web.assets_web.min.js:2888:13)

@CybroOdoo
Copy link
Owner

Hi @FgarcesYmant ,
We checked the issue from our side. We can't reproduce the issue in our end. If possible please share more details like whether you are using any other custom modules.

@FgarcesYmant
Copy link
Author

FgarcesYmant commented Jul 29, 2024 via email

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

No branches or pull requests

2 participants