Merge lp:~initos.com/sale-wkfl/7.0-add-sale_exception_warning into lp:~sale-core-editors/sale-wkfl/7.0

Proposed by Katja Matthes
Status: Needs review
Proposed branch: lp:~initos.com/sale-wkfl/7.0-add-sale_exception_warning
Merge into: lp:~sale-core-editors/sale-wkfl/7.0
Diff against target: 106 lines (+90/-0)
3 files modified
sale_exception_warning/__init__.py (+23/-0)
sale_exception_warning/__openerp__.py (+50/-0)
sale_exception_warning/sale_exception.xml (+17/-0)
To merge this branch: bzr merge lp:~initos.com/sale-wkfl/7.0-add-sale_exception_warning
Reviewer Review Type Date Requested Status
Pedro Manuel Baeza Needs Resubmitting
Markus Schneider (community) Approve
Review via email: mp+218365@code.launchpad.net

Description of the change

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.

To post a comment you must log in.
Revision history for this message
Markus Schneider (markus-schneider) wrote :

Just a easy module for simple rule

review: Approve
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

This project is now hosted on https://github.com/OCA/sale-workflow. Please move your proposal there. This guide may help you https://github.com/OCA/maintainers-tools/wiki/How-to-move-a-Merge-Proposal-to-GitHub

review: Needs Resubmitting

Unmerged revisions

46. By Katja Matthes

new sale exception: blocking message for customer

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'sale_exception_warning'
2=== added file 'sale_exception_warning/__init__.py'
3--- sale_exception_warning/__init__.py 1970-01-01 00:00:00 +0000
4+++ sale_exception_warning/__init__.py 2014-05-06 08:49:53 +0000
5@@ -0,0 +1,23 @@
6+# -*- coding: utf-8 -*-
7+##############################################################################
8+#
9+# OpenERP, Open Source Management Solution
10+# Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.com>).
11+# Copyright (C) 2014 initOS GmbH & Co. KG (<http://www.initos.com>).
12+# Author Katja Matthes <katja.matthes at initos.com>
13+#
14+# This program is free software: you can redistribute it and/or modify
15+# it under the terms of the GNU Affero General Public License as
16+# published by the Free Software Foundation, either version 3 of the
17+# License, or (at your option) any later version.
18+#
19+# This program is distributed in the hope that it will be useful,
20+# but WITHOUT ANY WARRANTY; without even the implied warranty of
21+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22+# GNU Affero General Public License for more details.
23+#
24+# You should have received a copy of the GNU Affero General Public License
25+# along with this program. If not, see <http://www.gnu.org/licenses/>.
26+#
27+##############################################################################
28+
29
30=== added file 'sale_exception_warning/__openerp__.py'
31--- sale_exception_warning/__openerp__.py 1970-01-01 00:00:00 +0000
32+++ sale_exception_warning/__openerp__.py 2014-05-06 08:49:53 +0000
33@@ -0,0 +1,50 @@
34+# -*- coding: utf-8 -*-
35+##############################################################################
36+#
37+# OpenERP, Open Source Management Solution
38+# Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.com>).
39+# Copyright (C) 2014 initOS GmbH & Co. KG (<http://www.initos.com>).
40+# Author Katja Matthes <katja.matthes at initos.com>
41+#
42+# This program is free software: you can redistribute it and/or modify
43+# it under the terms of the GNU Affero General Public License as
44+# published by the Free Software Foundation, either version 3 of the
45+# License, or (at your option) any later version.
46+#
47+# This program is distributed in the hope that it will be useful,
48+# but WITHOUT ANY WARRANTY; without even the implied warranty of
49+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
50+# GNU Affero General Public License for more details.
51+#
52+# You should have received a copy of the GNU Affero General Public License
53+# along with this program. If not, see <http://www.gnu.org/licenses/>.
54+#
55+##############################################################################
56+{
57+ 'name' : 'Sale Exception Warning',
58+ 'version' : '0.1',
59+ 'author' : 'initOS GmbH & Co. KG',
60+ 'category' : '',
61+ 'description' : """Add a sale exception rule for customer with a blocking message.
62+ """,
63+ 'website': 'http://www.initos.com',
64+ 'license': 'AGPL-3',
65+ 'images' : [],
66+ 'depends' : ['sale_exceptions', 'warning'],
67+ 'data': [
68+ 'sale_exception.xml',
69+ ],
70+ 'js': [
71+ ],
72+ 'qweb' : [
73+ ],
74+ 'css':[
75+ ],
76+ 'demo': [
77+ ],
78+ 'test': [
79+ ],
80+ 'active': False,
81+ 'installable': True,
82+ 'auto_install': False,
83+}
84
85=== added file 'sale_exception_warning/sale_exception.xml'
86--- sale_exception_warning/sale_exception.xml 1970-01-01 00:00:00 +0000
87+++ sale_exception_warning/sale_exception.xml 2014-05-06 08:49:53 +0000
88@@ -0,0 +1,17 @@
89+<?xml version="1.0" encoding="utf-8"?>
90+<openerp>
91+ <data noupdate="0">
92+
93+ <record id="excep_user_is_blocked" model="sale.exception">
94+ <field name="name">Blocking Message for Customer</field>
95+ <field name="description">There's a blocking message for the customer. Sell no products to him.
96+Needs module 'warning'.</field>
97+ <field name="sequence">40</field>
98+ <field name="model">sale.order</field>
99+ <field name="code">if order.partner_id.sale_warn == 'block':
100+ failed = True</field>
101+ <field name="active" eval="True"/>
102+ </record>
103+
104+ </data>
105+</openerp>
106\ No newline at end of file

Subscribers

People subscribed via source and target branches