Skip to content

Commit

Permalink
[REL] Migration sale_exception_price_security to 11.0
Browse files Browse the repository at this point in the history
* [FIX] Update Manifest and Readme
* [FIX] change the .py file name
* [FIX] separe into 2 files the content in data
  • Loading branch information
nicomacr committed Aug 7, 2018
1 parent 66b7a1d commit 550c256
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 37 deletions.
45 changes: 24 additions & 21 deletions sale_exception_price_security/README.rst
@@ -1,22 +1,37 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
.. |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

===========================================
Sale Exception - Price Security Integration
===========================================

This module replaces the exceptions raised by price_security module for exceptions of the "Sale Exception" module. This gives better usability if you use Sale Exception module.
For more information on how to use please refer to "price_security" and "sale_exception" modules.
This module replaces the exceptions raised by price_security module for exceptions of the "Sale Exception" module.

* This gives better usability if you use Sale Exception module.
* For more information on how to use please refer to "price_security" and "sale_exception" modules.

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

To install this module, you need to:

#. Just install this module.
#. Only need to install the module

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

To configure this module, you need to:

#. Nothing to configure

Usage
=====
Expand All @@ -25,18 +40,9 @@ To use this module, you need to:

#. When you confirm sale order, validate that discount you set to each line of products are in the limit established in the user.


.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.adhoc.com.ar/

.. repo_id is available in https://github.com/OCA/maintainer-tools/blob/master/tools/repos_with_ids.txt
.. branch is "8.0" for example
Known issues / Roadmap
======================

* ...
:target: http://runbot.adhoc.com.ar/

Bug Tracker
===========
Expand All @@ -52,19 +58,16 @@ Credits
Images
------

* ADHOC SA: `Icon <http://fotos.subefotos.com/83fed853c1e15a8023b86b2b22d6145bo.png>`_.
* |company| |icon|

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


Maintainer
----------

.. image:: http://fotos.subefotos.com/83fed853c1e15a8023b86b2b22d6145bo.png
:alt: Odoo Community Association
:target: https://www.adhoc.com.ar
|company_logo|

This module is maintained by the ADHOC SA.
This module is maintained by the |company|.

To contribute to this module, please visit https://www.adhoc.com.ar.
Empty file modified sale_exception_price_security/__init__.py 100755 → 100644
Empty file.
9 changes: 5 additions & 4 deletions sale_exception_price_security/__manifest__.py
Expand Up @@ -19,19 +19,20 @@
##############################################################################
{
'name': 'Sale Exception - Price Security Integration',
'version': '9.0.1.0.0',
'version': '11.0.1.0.0',
'author': 'ADHOC SA',
'website': 'www.adhoc.com.ar',
'license': 'AGPL-3',
'depends': [
'sale_exception',
'sale_exception_print',
'price_security',
],
'data': [
'data/data.xml',
'data/exception_rule_data.xml',
'security/sale_exception_price_security_security.xml',
],
'demo': [
],
'installable': False,
'installable': True,
'auto_install': True,
}
@@ -1,20 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">

<record id="discount_restriction" model="sale.exception">
<odoo noupdate="1">
<record id="discount_restriction" model="exception.rule">
<field name="name">Discount Restriction</field>
<field name="description">You can not give any discount greater than pricelist discounts or the applied discount is out of allowed range</field>
<field name="sequence">10</field>
<field name="model">sale.order.line</field>
<field name="rule_group">sale</field>
<field name="code">if not object.check_discount_ok():
failed = True</field>
<field name="block_print" eval="True"/>
<field name="active" eval="True"/>
</record>

<record id="price_security.group_restrict_prices" model="res.groups">
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>

</data>
</odoo>
2 changes: 1 addition & 1 deletion sale_exception_price_security/models/__init__.py 100755 → 100644
Expand Up @@ -2,4 +2,4 @@
# For copyright and license notices, see __manifest__.py file in module root
# directory
##############################################################################
from . import sale
from . import sale_order_line
Expand Up @@ -8,7 +8,6 @@
class SaleOrderLine(models.Model):
_inherit = "sale.order.line"

@api.one
def check_discount(self):
# disable price_security constraint
return True
Expand Down
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="price_security.group_restrict_prices" model="res.groups">
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>
</odoo>

0 comments on commit 550c256

Please sign in to comment.