From 6d604090a51159999f76b1ce17c2404b25fd6d84 Mon Sep 17 00:00:00 2001 From: "Lucas L. Soto" Date: Tue, 5 Nov 2019 00:37:41 -0300 Subject: [PATCH] [REL] sale_exception_partner_state: first release on 12.0 (#283) --- sale_exception_partner_state/README.rst | 4 ++-- sale_exception_partner_state/__manifest__.py | 2 +- sale_exception_partner_state/data/exception_rule_data.xml | 2 -- sale_exception_partner_state/wizards/res_config_settings.py | 6 ++++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sale_exception_partner_state/README.rst b/sale_exception_partner_state/README.rst index 46a340342..4dc747a09 100644 --- a/sale_exception_partner_state/README.rst +++ b/sale_exception_partner_state/README.rst @@ -14,7 +14,7 @@ Sale Exception - Partner State Integration ========================================== -Integrate partner_state and sale_exceptions, it adds the option to restrict sale orders confirmation for not approved partners globaly or depending a certain amount +Integrate partner_state and sale_exceptions. It adds the option to restrict sale orders confirmation for not approved partners globaly or depending a certain amount. Installation ============ @@ -29,7 +29,7 @@ Configuration To configure this module, you need to: -#. In Company/Configuration you set to restring sales. +#. Go to Sales / Configuration / Settings / Quotations & Orders and set "Restrict sales?" as per your needs. Usage diff --git a/sale_exception_partner_state/__manifest__.py b/sale_exception_partner_state/__manifest__.py index c31635f2c..c3e0bf576 100644 --- a/sale_exception_partner_state/__manifest__.py +++ b/sale_exception_partner_state/__manifest__.py @@ -33,6 +33,6 @@ ], 'demo': [ ], - 'installable': False, + 'installable': True, 'auto_install': True, } diff --git a/sale_exception_partner_state/data/exception_rule_data.xml b/sale_exception_partner_state/data/exception_rule_data.xml index 5acb3ee23..cf9656765 100644 --- a/sale_exception_partner_state/data/exception_rule_data.xml +++ b/sale_exception_partner_state/data/exception_rule_data.xml @@ -6,7 +6,6 @@ You can not sell to an Unapproved Partner on this company 10 sale.order - sale if not object.check_unapproved_partner_ok(): failed = True @@ -17,7 +16,6 @@ You can not sell to an Unapproved Partner this amount on this company 10 sale.order - sale if not object.check_unapproved_partner_amount_ok(): failed = True diff --git a/sale_exception_partner_state/wizards/res_config_settings.py b/sale_exception_partner_state/wizards/res_config_settings.py index 9f68d1709..f9f2895a5 100644 --- a/sale_exception_partner_state/wizards/res_config_settings.py +++ b/sale_exception_partner_state/wizards/res_config_settings.py @@ -10,8 +10,10 @@ class ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' restrict_sales = fields.Selection( - related='company_id.restrict_sales' + related='company_id.restrict_sales', + readonly=False, ) restrict_sales_amount = fields.Float( - related='company_id.restrict_sales_amount' + related='company_id.restrict_sales_amount', + readonly=False, )