-
Notifications
You must be signed in to change notification settings - Fork 12
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
[3625][ADD] product_group_product_manager #351
Conversation
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.
Please split the module into two:
- product_group_manage_product
- account_security_adj
6212888
to
22bee9e
Compare
<record id="rule_product_template_create_edit_delete" model="ir.rule"> | ||
<field name="name">Product Template Create/Edit/Delete Rule</field> | ||
<field name="model_id" ref="product.model_product_template"/> | ||
<field name="groups" eval="[(4, ref('product_group_manage_product.group_manage_product'))]"/> | ||
<field name="perm_read" eval="True"/> | ||
<field name="perm_write" eval="True"/> | ||
<field name="perm_create" eval="True"/> | ||
<field name="perm_unlink" eval="True"/> | ||
</record> | ||
<record id="rule_product_create_edit_delete" model="ir.rule"> | ||
<field name="name">Product Create/Edit/Delete Rule</field> | ||
<field name="model_id" ref="product.model_product_product"/> | ||
<field name="groups" eval="[(4, ref('product_group_manage_product.group_manage_product'))]"/> | ||
<field name="perm_read" eval="True"/> | ||
<field name="perm_write" eval="True"/> | ||
<field name="perm_create" eval="True"/> | ||
<field name="perm_unlink" eval="True"/> | ||
</record> |
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.
Why do we need these record rules?
access_product_template,access_product_template,product.model_product_template,group_manage_product,1,1,1,0 | ||
access_product_product,access_product_product,product.model_product_product,group_manage_product,1,1,1,0 |
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.
Any reason why perm_unlink
should be false?
access_product_template,access_product_template,product.model_product_template,group_manage_product,1,1,1,0 | |
access_product_product,access_product_product,product.model_product_product,group_manage_product,1,1,1,0 | |
access_product_template_manage_product,product.template.manage.product,product.model_product_template,group_manage_product,1,1,1,1 | |
access_product_product_manage_product,product.product.manage.product,product.model_product_product,group_manage_product,1,1,1,1 |
"author": "Quartile Limited", | ||
"website": "https://www.quartile.co", | ||
"category": "Product", | ||
"license": "LGPL-3", |
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.
"license": "LGPL-3", | |
"license": "AGPL-3", |
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.
I've come to think product_group_product_manager
might be a better choice for the module name (upon changing the technical name of the module). What do you think?
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo> | ||
<record id="group_manage_product" model="res.groups"> | ||
<field name="name">Product Creation, Editing & Deletion</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.
<field name="name">Product Creation, Editing & Deletion</field> | |
<field name="name">Product Manager</field> |
Yes. |
3d42b95
to
1d7293b
Compare
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. Thanks Lin!
@@ -0,0 +1 @@ | |||
This module adds a new group (group_manage_product) with permissions for creating, editing, and deleting products. |
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 adds a new group (group_manage_product) with permissions for creating, editing, and deleting products. | |
This module adds a new group (group_product_manager) with permissions for creating, editing, and deleting products. |
1d7293b
to
7dd3e9c
Compare
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.
@AungKoKoLin1997
I have found that if product manager don't have access to the product.price.history model, they get an error when they try to create a new product from sale.order.line or purchase.order.line.
So can product_manager please allow read write update delete of product.price.history?
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.
Function, code review
3625