← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~initos.com/sale-wkfl/7.0-add-sale_exception_warning into lp:sale-wkfl

 

Katja Matthes has proposed merging lp:~initos.com/sale-wkfl/7.0-add-sale_exception_warning into lp:sale-wkfl.

Requested reviews:
  Sale Core Editors (sale-core-editors)

For more details, see:
https://code.launchpad.net/~initos.com/sale-wkfl/7.0-add-sale_exception_warning/+merge/218365

Add module sale_exception_warning.
This module adds a sale exception rule based on module warning.
Customers with blocking messages are not allowd to buy products.
-- 
https://code.launchpad.net/~initos.com/sale-wkfl/7.0-add-sale_exception_warning/+merge/218365
Your team Sale Core Editors is requested to review the proposed merge of lp:~initos.com/sale-wkfl/7.0-add-sale_exception_warning into lp:sale-wkfl.
=== added directory 'sale_exception_warning'
=== added file 'sale_exception_warning/__init__.py'
--- sale_exception_warning/__init__.py	1970-01-01 00:00:00 +0000
+++ sale_exception_warning/__init__.py	2014-05-06 08:49:53 +0000
@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.com>).
+#    Copyright (C) 2014 initOS GmbH & Co. KG (<http://www.initos.com>).
+#    Author Katja Matthes <katja.matthes at initos.com>
+#
+#    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/>.
+#
+##############################################################################
+

=== added file 'sale_exception_warning/__openerp__.py'
--- sale_exception_warning/__openerp__.py	1970-01-01 00:00:00 +0000
+++ sale_exception_warning/__openerp__.py	2014-05-06 08:49:53 +0000
@@ -0,0 +1,50 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.com>).
+#    Copyright (C) 2014 initOS GmbH & Co. KG (<http://www.initos.com>).
+#    Author Katja Matthes <katja.matthes at initos.com>
+#
+#    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' : 'Sale Exception Warning',
+    'version' : '0.1',
+    'author' : 'initOS GmbH & Co. KG',
+    'category' : '',
+    'description' : """Add a sale exception rule for customer with a blocking message.
+    """,
+    'website': 'http://www.initos.com',
+	'license': 'AGPL-3',
+    'images' : [],
+    'depends' : ['sale_exceptions', 'warning'],
+    'data': [
+		'sale_exception.xml',
+    ],
+    'js': [
+    ],
+    'qweb' : [
+    ],
+    'css':[
+    ],
+    'demo': [
+    ],
+    'test': [
+    ],
+	'active': False,
+    'installable': True,
+    'auto_install': False,
+}

=== added file 'sale_exception_warning/sale_exception.xml'
--- sale_exception_warning/sale_exception.xml	1970-01-01 00:00:00 +0000
+++ sale_exception_warning/sale_exception.xml	2014-05-06 08:49:53 +0000
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data noupdate="0">
+
+        <record id="excep_user_is_blocked" model="sale.exception">
+            <field name="name">Blocking Message for Customer</field>
+            <field name="description">There's a blocking message for the customer. Sell no products to him.
+Needs module 'warning'.</field>
+            <field name="sequence">40</field>
+            <field name="model">sale.order</field>
+            <field name="code">if order.partner_id.sale_warn == 'block':
+    failed = True</field>
+            <field name="active" eval="True"/>
+        </record>
+
+    </data>
+</openerp>
\ No newline at end of file


Follow ups