Skip to content

Commit

Permalink
[FIX]price_security_replenishment_cost: new module
Browse files Browse the repository at this point in the history
  • Loading branch information
jok-adhoc committed May 9, 2023
1 parent 22c145c commit 5deedfc
Show file tree
Hide file tree
Showing 8 changed files with 262 additions and 0 deletions.
59 changes: 59 additions & 0 deletions price_security_replenishment_cost/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
.. |company| replace:: ADHOC SA

.. |company_logo| image:: https://raw.githubusercontent.com/ingadhoc/maintainer-tools/master/resources/adhoc-logo.png
:alt: ADHOC SA
:target: https://www.adhoc.com.ar

.. |icon| image:: https://raw.githubusercontent.com/ingadhoc/maintainer-tools/master/resources/adhoc-icon.png

.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: https://www.gnu.org/licenses/agpl
:alt: License: AGPL-3

======================================
Price Security with Replenishment Cost
======================================

This module is an integration of Price Security with Product Replenishment Cost.

Installation
============

To install this module, you need to:

#. Just install this module.


Configuration
=============

Usage
=====

Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/ingadhoc/product/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smashing it by providing a detailed and welcomed feedback.

Credits
=======

Images
------

* |company| |icon|

Contributors
------------

Maintainer
----------

|company_logo|

This module is maintained by the |company|.

To contribute to this module, please visit https://www.adhoc.com.ar.
4 changes: 4 additions & 0 deletions price_security_replenishment_cost/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
##############################################################################
# For copyright and license notices, see __manifest__.py file in module root
# directory
##############################################################################
36 changes: 36 additions & 0 deletions price_security_replenishment_cost/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
##############################################################################
#
# Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar)
# All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Price Security with replenishment cost',
'version': '13.0.1.0.0',
'category': 'Sales Management',
'author': 'ADHOC SA',
'website': 'http://www.adhoc.com.ar/',
'license': 'AGPL-3',
'depends': [
'price_security',
'product_replenishment_cost',
],
'data': [
'views/product_template_views.xml',
],
'installable': True,
'auto_install': True,
}
32 changes: 32 additions & 0 deletions price_security_replenishment_cost/views/product_template_views.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<odoo>

<record id="view_product_only_view_sale_price_form" model="ir.ui.view">
<field name="name">View Only sale price template form</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="price_security.view_product_only_view_sale_price_form"/>
<field name="groups_id" eval="[(6, 0, [ref('price_security.group_restrict_prices')])]"/>
<field name="arch" type="xml">

<!-- we hide costing -->
<group name="costing" position="attributes">
<attribute name="invisible">1</attribute>
</group>

</field>
</record>

<record id="view_product_only_view_form" model="ir.ui.view">
<field name="name">View Only: sale and cost template form</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="price_security.view_product_only_view_form"/>
<field name="groups_id" eval="[(6, 0, [ref('price_security.group_only_view')])]"/>
<field name="arch" type="xml">

<group name="costing" position="attributes">
<attribute name="invisible">0</attribute>
</group>

</field>
</record>

</odoo>
59 changes: 59 additions & 0 deletions price_security_sale_margin/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
.. |company| replace:: ADHOC SA

.. |company_logo| image:: https://raw.githubusercontent.com/ingadhoc/maintainer-tools/master/resources/adhoc-logo.png
:alt: ADHOC SA
:target: https://www.adhoc.com.ar

.. |icon| image:: https://raw.githubusercontent.com/ingadhoc/maintainer-tools/master/resources/adhoc-icon.png

.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: https://www.gnu.org/licenses/agpl
:alt: License: AGPL-3

==================================================
Price Security with Sale Margin
==================================================

This module is an integration of Price Security with Sale Margin.

Installation
============

To install this module, you need to:

#. Just install this module.


Configuration
=============

Usage
=====

Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/ingadhoc/product/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smashing it by providing a detailed and welcomed feedback.

Credits
=======

Images
------

* |company| |icon|

Contributors
------------

Maintainer
----------

|company_logo|

This module is maintained by the |company|.

To contribute to this module, please visit https://www.adhoc.com.ar.
4 changes: 4 additions & 0 deletions price_security_sale_margin/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
##############################################################################
# For copyright and license notices, see __manifest__.py file in module root
# directory
##############################################################################
36 changes: 36 additions & 0 deletions price_security_sale_margin/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
##############################################################################
#
# Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar)
# All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Price Security with sale margin',
'version': '13.0.1.0.0',
'category': 'Sales Management',
'author': 'ADHOC SA',
'website': 'http://www.adhoc.com.ar/',
'license': 'AGPL-3',
'depends': [
'price_security',
'sale_margin',
],
'data': [
'views/sale_margin_views.xml',
],
'installable': True,
'auto_install': True,
}
32 changes: 32 additions & 0 deletions price_security_sale_margin/views/sale_margin_views.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<odoo>

<record id="sale_margin_sale_order_line_form_only_view_sale_price_form" model="ir.ui.view">
<field name="name">sale.order.line.tree.margin.view.form</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale_margin.sale_margin_sale_order_line_form"/>
<field name="groups_id" eval="[(6, 0, [ref('price_security.group_restrict_prices')])]"/>
<field name="arch" type="xml">

<!-- we hide costing -->
<field name="purchase_price" position="attributes">
<attribute name="invisible">1</attribute>
</field>

</field>
</record>

<record id="sale_margin_sale_order_line_form_only_view_form" model="ir.ui.view">
<field name="name">sale.order.line.tree.margin.view.form</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale_margin_sale_order_line_form_only_view_sale_price_form"/>
<field name="groups_id" eval="[(6, 0, [ref('price_security.group_only_view')])]"/>
<field name="arch" type="xml">

<field name="purchase_price" position="attributes">
<attribute name="invisible">0</attribute>
</field>

</field>
</record>

</odoo>

0 comments on commit 5deedfc

Please sign in to comment.