-
-
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
[11.0][WIP] stock_operating_unit #132
[11.0][WIP] stock_operating_unit #132
Conversation
Thank you for the PR! It seems the commit history is missing somehow. Don't worry, that happens sometimes. You can fix it without closing the Pull Request, doing something like this: First, save your changes before doing anything (just copy the folder in another place) and then:
Then, you just need to put the changes back (just copy the folder you saved before) and:
That should do the thing 😃 |
Done. |
It seems this PR has not been updated. Did the "git push" succeed? |
Hum, my branch is operating unit not 11.0-stock_operating_unit, this is a branch. I do push for repo and I give ok. I verified that this branch was active. I can try again, but at home I have a bad internet connection, it will take a while. Edit: When I do second command 'git format-patch ...', directory stock_operation_unit is created again. |
@meigallodixital the branch you used to create the PR is 11.0-stock_operating_unit. Yes, the git format-patch command is copying the module from v10 and the history. Then you put your changes over it. Thus, your changes are on top and previous commits from previous Odoo versions remain and all history is kept. I know at first it's a bit tricky but don't worry we will hep you. |
* 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
I edited your branch 11.0-stock_operating_unit to repair the history. Now, the history is fine. You can now reset --hard to meigallodixital/11.0-stock_operating_unit and keep working. |
Thank you very much. The reset should not be against "origin/11.0-stock_operating_unit"? Apart from the issue of permissions we have not detected any more problems. The problem here is the dependence of this module with #114 |
@meigallodixital it depends on the name of your remote. Origin could be OCA or could be your fork it depends how you did the clone. Do Yes it depends on account_operating_unit, that's why it's red. Moreover there are conflicts on the other PR. That one needs to be fixed. |
I synchronized my repository with oca using the github web interface. That created a pr and merge commit. I think the problem could come from that. My remotes are:
And my branchs are:
The push command of yesterday we did against that branch. I usually use checkout + rebase. I do not have much experience with github, then i decide use 'standard way' that it proposed. I come from bitbucket and slowly we are migrating to gitlab. :P |
All right, that's fine, origin is your fork so you can reset hard to "origin/11.0-stock_operating_unit". |
I detect that the first warehouse (warehouse ID = 1) created in the odoo installation is assigned to the operation unit OU1 (operation unit ID= 1) when operation_unit_of_stock is registered:
If I set operating_unit_id field in the table stock_warehose to NULL, then it works as expected. The record in the database that does not appear (1) and one that appears (9) in the operating_unit table are identical:
Then it does not make sense that one shows up and one does not, because they are equal ... |
<odoo noupdate="1"> | ||
<record id="ir_rule_stock_warehouse_allowed_operating_units" model="ir.rule"> | ||
<field name="model_id" ref="stock.model_stock_warehouse"/> | ||
<field name="domain_force">['|',('operating_unit_id','=',False),('operating_unit_id','in',[g.id for g in user.operating_unit_ids])]</field> |
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.
@meigallodixital you should be able to see a warehouse if the user has access to the operating unit of the warehouse or the warehouse is not assigned to an operating unit.
In your case if the warehouse is not assigned to any operating unit you should be able to see it. I think the access rule is correct.
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.
Yes, as I said, the code and the xml file of permissions seem good. The records in the database are the same, but I don't see the store that creates the installation when the company is created. The following that are created works ok.
It only occurs to me that the permissions of another module are affecting ...
Note: I did not answer before because github did not notify me of this review ...
<odoo noupdate="1"> | ||
|
||
<record id="stock.warehouse0" model="stock.warehouse"> | ||
<field name="operating_unit_id" ref="operating_unit.main_operating_unit"/> |
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.
Here is assigning "Your Company" warehouse to the Main OU. The other warehouses remain without any OU.
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.
Yes. The warehouse (not the store ...) that is assigned to the Main Organizational Unit is the only one that is not shown. But I do not see any error in code or difference in the database, as I said before.
That's why I think some permission from another module may be overwriting me that permission rule.
To clarify. I do not have to select the Warehouse even in the user permissions. I do not think the problem is in these rules that we are commenting, since they read permissions from that configuration. And there, the Warehosue with Main OU does not appear to select.
I attach screenshots:
Operating Units: https://snag.gy/QJtxbs.jpg
Warehouses: https://snag.gy/WAJSCv.jpg
Main OU: https://snag.gy/9Wzplq.jpg
Assign OUs to user screen: https://snag.gy/ohNA5a.jpg
When the PR for the account_operating_unit fixes the git conflicts I'll include here that PR in oca_dependencies so we all can test on the same environment and we are on the same page. |
<field name="model">stock.warehouse</field> | ||
<field name="inherit_id" ref="stock.view_warehouse"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='company_id']" position="after"> |
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.
@meigallodixital IMHO remove xpath
and Directly use <field name="Field Name" position="after">
everywhere.
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.
Ok, I try to revise that. Thanks.
Hi @meigallodixital, are you still working on this? |
We are considering migrating to version 12.0 now. I have been testing it in January. We notice that it seems that the development is slightly more agile in this version. Version 11.0 took a lot more time to migrate many modules than what is taking 12.0. We do not want this to be seen as a complaint, but here I am only myself for development and implementation (we are the final user) so it is a purely logistical and time issue. I think I can review and test the code to close this module ASAP |
I have migrated this module to version 12.0, there is an open PR #151. I have asked you because I have the code already migrated (there are few changes to do) but after that I have verified that you already had an open PR. If you are busy I can open a PR if you want, of course 😄 |
|
Of course, no problem. I'm obviously very busy with 12.0 migration :) |
Perfect, thanks for the quick answer |
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
Initial proposal