Skip to content

Commit

Permalink
[IMP] sale_order_product_assortment: Add security group to only show …
Browse files Browse the repository at this point in the history
…assortments to managers

TT51064
  • Loading branch information
sergio-teruel committed Sep 30, 2024
1 parent 4c04819 commit b2b7918
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 3 deletions.
7 changes: 5 additions & 2 deletions sale_order_product_assortment/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "Sale Order Product Assortment",
"summary": "Module that allows to use the assortments on sale orders",
"version": "15.0.2.0.0",
"version": "15.0.3.0.0",
"development_status": "Beta",
"category": "Sales",
"website": "https://github.com/OCA/sale-workflow",
Expand All @@ -13,5 +13,8 @@
"license": "AGPL-3",
"installable": True,
"depends": ["sale", "product_assortment", "base_view_inheritance_extension"],
"data": ["views/sale_order_view.xml"],
"data": [
"security/sale_order_product_assortment_security.xml",
"views/sale_order_view.xml",
],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version='1.0' encoding='utf-8' ?>
<odoo>
<record id="sales_team.group_sale_manager" model="res.groups">
<field
name="implied_ids"
eval="[(4, ref('product_assortment.group_product_assortment_manager'))]"
/>
</record>
</odoo>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
openupgrade.load_data(
env.cr,
"sale_order_product_assortment",
"migrations/15.0.3.0.0/noupdate_changes.xml",
)
1 change: 1 addition & 0 deletions sale_order_product_assortment/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class SaleOrder(models.Model):
comodel_name="product.product",
string="Allowed Products",
compute="_compute_product_assortment_ids",
compute_sudo=True,
)
has_allowed_products = fields.Boolean(compute="_compute_product_assortment_ids")

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record id="sales_team.group_sale_manager" model="res.groups">
<field
name="implied_ids"
eval="[(4, ref('product_assortment.group_product_assortment_manager'))]"
/>
</record>
</odoo>
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand Down

0 comments on commit b2b7918

Please sign in to comment.