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
=== 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 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.com>).
6# Copyright (C) 2014 initOS GmbH & Co. KG (<http://www.initos.com>).
7# Author Katja Matthes <katja.matthes at initos.com>
8#
9# This program is free software: you can redistribute it and/or modify
10# it under the terms of the GNU Affero General Public License as
11# published by the Free Software Foundation, either version 3 of the
12# License, or (at your option) any later version.
13#
14# This program is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17# GNU Affero General Public License for more details.
18#
19# You should have received a copy of the GNU Affero General Public License
20# along with this program. If not, see <http://www.gnu.org/licenses/>.
21#
22##############################################################################
23
024
=== 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 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.com>).
6# Copyright (C) 2014 initOS GmbH & Co. KG (<http://www.initos.com>).
7# Author Katja Matthes <katja.matthes at initos.com>
8#
9# This program is free software: you can redistribute it and/or modify
10# it under the terms of the GNU Affero General Public License as
11# published by the Free Software Foundation, either version 3 of the
12# License, or (at your option) any later version.
13#
14# This program is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17# GNU Affero General Public License for more details.
18#
19# You should have received a copy of the GNU Affero General Public License
20# along with this program. If not, see <http://www.gnu.org/licenses/>.
21#
22##############################################################################
23{
24 'name' : 'Sale Exception Warning',
25 'version' : '0.1',
26 'author' : 'initOS GmbH & Co. KG',
27 'category' : '',
28 'description' : """Add a sale exception rule for customer with a blocking message.
29 """,
30 'website': 'http://www.initos.com',
31 'license': 'AGPL-3',
32 'images' : [],
33 'depends' : ['sale_exceptions', 'warning'],
34 'data': [
35 'sale_exception.xml',
36 ],
37 'js': [
38 ],
39 'qweb' : [
40 ],
41 'css':[
42 ],
43 'demo': [
44 ],
45 'test': [
46 ],
47 'active': False,
48 'installable': True,
49 'auto_install': False,
50}
051
=== 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 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data noupdate="0">
4
5 <record id="excep_user_is_blocked" model="sale.exception">
6 <field name="name">Blocking Message for Customer</field>
7 <field name="description">There's a blocking message for the customer. Sell no products to him.
8Needs module 'warning'.</field>
9 <field name="sequence">40</field>
10 <field name="model">sale.order</field>
11 <field name="code">if order.partner_id.sale_warn == 'block':
12 failed = True</field>
13 <field name="active" eval="True"/>
14 </record>
15
16 </data>
17</openerp>
0\ No newline at end of file18\ No newline at end of file

Subscribers

People subscribed via source and target branches