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

[3625][ADD] product_group_product_manager #351

Merged
merged 5 commits into from
Oct 27, 2023

Conversation

AungKoKoLin1997
Copy link
Contributor

Copy link
Member

@yostashiro yostashiro left a 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

@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 11.0-add-account_invoice_validation_adj branch from 6212888 to 22bee9e Compare September 1, 2023 02:07
@AungKoKoLin1997 AungKoKoLin1997 changed the title [3625][ADD] account_invoice_validation_adj [3625][ADD] product_group_manage_product Sep 1, 2023
Comment on lines 7 to 24
<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>
Copy link
Member

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?

Comment on lines 2 to 3
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
Copy link
Member

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?

Suggested change
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",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"license": "LGPL-3",
"license": "AGPL-3",

Copy link
Member

@yostashiro yostashiro left a 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 &amp; Deletion</field>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<field name="name">Product Creation, Editing &amp; Deletion</field>
<field name="name">Product Manager</field>

@AungKoKoLin1997
Copy link
Contributor Author

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?

Yes. product_group_product_manager is better module name and can easily know this module is added new group group_product_manager.

@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 11.0-add-account_invoice_validation_adj branch from 3d42b95 to 1d7293b Compare September 7, 2023 08:12
Copy link
Member

@yostashiro yostashiro left a 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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

@yostashiro yostashiro changed the title [3625][ADD] product_group_manage_product [3625][ADD] product_group_product_manager Sep 7, 2023
@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 11.0-add-account_invoice_validation_adj branch from 1d7293b to 7dd3e9c Compare September 7, 2023 08:27
Copy link
Contributor

@kanda999 kanda999 left a 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?

Copy link
Contributor

@kanda999 kanda999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function, code review

@kanda999 kanda999 merged commit f3c6d09 into 11.0 Oct 27, 2023
0 of 2 checks passed
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

Successfully merging this pull request may close these issues.

3 participants