-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] Addon: sale_margin_product_cost_security
- Loading branch information
Showing
6 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
========================== | ||
Sale Product Cost Security | ||
========================== | ||
|
||
KMEE | ||
|
||
Purpose | ||
======= | ||
|
||
This module extends the functionality of the product_cost_security module to the purchase_price field of the sale_margin module. | ||
|
||
When the user does not belong to the group product_cost_group, he cannot see the "Cost" field in the Sale Order Line view. | ||
|
||
Configuration | ||
============= | ||
|
||
To configure this module, you need to: | ||
|
||
#. Go to ... | ||
|
||
Usage | ||
===== | ||
|
||
To use this module you need to: | ||
|
||
#. Go to product form view logged with this user and you will see the | ||
standard_price field. | ||
|
||
#. Go to sale order line form view logged with this user and you will see the | ||
purchase_price field. | ||
|
||
How to test | ||
=========== | ||
|
||
... |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright 2024 KMEE | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
"name": "Sale Product Cost Security", | ||
"summary": """KMEE""", | ||
"version": "14.0.1.0.0", | ||
"license": "AGPL-3", | ||
"author": "KMEE", | ||
"website": "https://github.com/KMEE/kmee-odoo-addons", | ||
"depends": ["sale_margin", "product_cost_security"], | ||
"data": [ | ||
"views/sale_order_line_views.xml", | ||
], | ||
"demo": [], | ||
} |
16 changes: 16 additions & 0 deletions
16
sale_margin_product_cost_security/views/sale_order_line_views.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!-- Copyright 2024 KMEE | ||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> | ||
<odoo> | ||
<record id="sale_margin_sale_order_line" model="ir.ui.view"> | ||
<field name="model">sale.order</field> | ||
<field name="inherit_id" ref="sale_margin.sale_margin_sale_order_line" /> | ||
<field name="arch" type="xml"> | ||
<field name="purchase_price" position="attributes"> | ||
<attribute | ||
name="groups" | ||
>product_cost_security.group_product_cost</attribute> | ||
</field> | ||
</field> | ||
</record> | ||
</odoo> |
1 change: 1 addition & 0 deletions
1
setup/sale_margin_product_cost_security/odoo/addons/sale_margin_product_cost_security
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../sale_margin_product_cost_security |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import setuptools | ||
|
||
setuptools.setup( | ||
setup_requires=['setuptools-odoo'], | ||
odoo_addon=True, | ||
) |