-
-
Notifications
You must be signed in to change notification settings - Fork 235
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
[13.0][MIG] stock_operating_unit #231
[13.0][MIG] stock_operating_unit #231
Conversation
I had the following error. Steps to reproduce
Error:
Odoo Server Error
Traceback (most recent call last):
File "/home/odoo/instance/odoo/odoo/http.py", line 619, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/odoo/instance/odoo/odoo/http.py", line 309, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/home/odoo/instance/odoo/odoo/tools/pycompat.py", line 14, in reraise
raise value
File "/home/odoo/instance/odoo/odoo/http.py", line 664, in dispatch
result = self._call_function(**self.params)
File "/home/odoo/instance/odoo/odoo/http.py", line 345, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/odoo/instance/odoo/odoo/service/model.py", line 93, in wrapper
return f(dbname, *args, **kwargs)
File "/home/odoo/instance/odoo/odoo/http.py", line 338, in checked_call
result = self.endpoint(*a, **kw)
File "/home/odoo/instance/odoo/odoo/http.py", line 910, in __call__
return self.method(*args, **kw)
File "/home/odoo/instance/odoo/odoo/http.py", line 510, in response_wrap
response = f(*args, **kw)
File "/home/odoo/instance/odoo/addons/web/controllers/main.py", line 1320, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/home/odoo/instance/odoo/addons/web/controllers/main.py", line 1312, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/odoo/instance/odoo/odoo/api.py", line 395, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/home/odoo/instance/odoo/odoo/api.py", line 382, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/home/odoo/instance/odoo/addons/stock/models/stock_inventory.py", line 107, in action_validate
self._action_done()
File "/home/odoo/instance/odoo/addons/stock/models/stock_inventory.py", line 118, in _action_done
self.post_inventory()
File "/home/odoo/instance/odoo/addons/stock_account/models/stock_inventory.py", line 43, in post_inventory
super(StockInventory, other_inventories).post_inventory()
File "/home/odoo/instance/odoo/addons/stock/models/stock_inventory.py", line 125, in post_inventory
self.mapped('move_ids').filtered(lambda move: move.state != 'done')._action_done()
File "/home/odoo/instance/extra_addons/operating-unit/stock_account_operating_unit/model/stock_move.py", line 119, in _action_done
"stock_move_id": self.id,
File "/home/odoo/instance/odoo/odoo/fields.py", line 3524, in __get__
raise ValueError("Expected singleton: %s" % record)
ValueError: Expected singleton: stock.move(5, 6, 7) |
7d526e5
to
ea3051b
Compare
Hello @alan196, I finally tried to replicate this error but I couldn't. I haven't installed the module I did the following in an empty database:
No errors occurred. |
@BT-nstuder Please update your pr for fix conflict files. |
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.
Some comments.
@BT-nstuder you need to rebase to fix the conflicting files. |
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.
Reviewed.
* Replace <openerp> and <data> elements by <odoo> * Remove spaces in strings introduced because of \ * Remove exclamation points in error messages * Remove most of the \ where it can be replaced by parenthesis
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.
@AaronHForgeFlow done. Should I squash the new commits into d050dfc? |
@BT-nstuder Thanks. No, keep them separately, better for traceability. |
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 Functional test.
Just one thing. The setup folder is created automatically by a bot. I don't think that change regarding setup folder should be here.
@AaronHForgeFlow The setup folder was created automatically when running |
@BT-nstuder Yes you are correct, never mind. I was confused thinking about version 12.0. Sorry. |
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
@BT-nstuder codecov/project and codecov/patch still be red. I think test script is not cover. |
Process:
@ALL Should users see reports of other OU? |
@ps-tubtim I think not, they should not see that data in the report. We should include access rules for stock.move.line. Also inherit the reports to filter OU information accordingly. |
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.
Functional Review 👍
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.
👍
/ocabot merge nobump |
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at 39ebc92. Thanks a lot for contributing to OCA. ❤️ |
Proposed changes
I've migrated the module
stock_operating_unit
and it's functionalities from Odoo12.0
to13.0
. I've checked if the all unit tests are still running.Types of changes
Checklist
Further comments
This module depends on theaccount_operating_unit
module. That means that there should be a migration of it to13.0
. Because there is already a PR for a migration I've added the changes of the PR to my local environment to test my migration.This PR depends on the current migration PR #229.