Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
13 changes: 13 additions & 0 deletions purchase_security_groups/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "Purchase Security Groups",
"summary": """
Custom security groups for Purchase document workflows
""",
"author": "José López, OPTIC",
"website": "https://optic.gob.do",
"version": "14.0.0.0.1",
"depends": ["purchase"],
"data": [
"security/res_groups.xml",
],
}
12 changes: 12 additions & 0 deletions purchase_security_groups/security/res_groups.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>

<record id="button_confirm_group" model="res.groups">
<field name="name">Can confirm Purchase Order</field>
</record>

<record id="action_create_invoice_group" model="res.groups">
<field name="name">Can create Invoice from Purchase Order</field>
</record>

</odoo>
18 changes: 18 additions & 0 deletions purchase_security_groups/views/purchase_views.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>

<record id="purchase_order_form_inherited" model="ir.ui.view">
<field name="name">purchase.order.form.inherited</field>
<field name="model">purchase.order</field>
<field name="inherit_id" ref="purchase.purchase_order_form"/>
<field name="arch" type="xml">
<button name="button_confirm" position="attributes">
<attribute name="groups">purchase_security_groups.button_confirm_group</attribute>
</button>
<button name="action_create_invoice" position="attributes">
<attribute name="groups">purchase_security_groups.action_create_invoice_group</attribute>
</button>
</field>
</record>

</odoo>
Empty file.
13 changes: 13 additions & 0 deletions stock_security_groups/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "Stock Security Groups",
"summary": """
Custom security groups for Stock document workflows
""",
"author": "José López, OPTIC",
"website": "https://optic.gob.do",
"version": "14.0.0.0.1",
"depends": ["stock"],
"data": [
"security/res_groups.xml",
],
}
8 changes: 8 additions & 0 deletions stock_security_groups/security/res_groups.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>

<record id="button_confirm_group" model="res.groups">
<field name="name">Can confirm Purchase Order</field>
</record>

</odoo>
15 changes: 15 additions & 0 deletions stock_security_groups/views/stock_views.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>

<record id="view_picking_form_inherited" model="ir.ui.view">
<field name="name">view.picking.form.inherited</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_form"/>
<field name="arch" type="xml">
<button name="button_validate" position="attributes">
<attribute name="groups">stock_security_groups.button_confirm_group</attribute>
</button>
</field>
</record>

</odoo>