From: Ludovic CHEVALIER Date: Mon, 18 May 2020 15:08:52 +0000 (+0200) Subject: [PYTHON][VIEW][DATA] +default note for Coup de Pouce receipts X-Git-Url: http://git.cyclocoop.org/?p=burette%2Fcoup_de_pouce_velo.git;a=commitdiff_plain;h=c6d315a5c03ecf2e24d99907a005b1c0eb41e653 [PYTHON][VIEW][DATA] +default note for Coup de Pouce receipts --- diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..f6b0d96 --- /dev/null +++ b/__init__.py @@ -0,0 +1,4 @@ +# Copyright 2020 L'Heureux Cyclage +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +import point_of_sale diff --git a/__openerp__.py b/__openerp__.py new file mode 100644 index 0000000..eb16b6d --- /dev/null +++ b/__openerp__.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 L'Heureux Cyclage +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + + +{ + 'name': 'Coup de Pouce Vélo', + 'version': '0.1', + 'category': 'Association', + 'complexity': "normal", + 'description': """ +This module adds features to OpenERP POS module for french bikecoops for "Coup de Pouce Vélo" +============================================================================================= + + - Warn when editing pos order, and attach partner hasn't mobile phone; + - Add a checkbox on pos order form to identify cpv pos orders; + - (Fill in notes field on pos orders with default value when pos order is a cpv one. + """, + 'author': 'L\'Heureux Cyclage', + 'website': 'http://www.heureux-cyclage.org', + 'depends': [ + 'bikecoop_l10n_fr', + ], + 'init_xml': [ + ], + 'update_xml': [ + 'view/point_of_sale.xml', + 'data/ir_values.xml', + ], + 'installable': True, + 'auto_install': False, + 'images': [], +} diff --git a/data/ir_values.xml b/data/ir_values.xml new file mode 100644 index 0000000..f004672 --- /dev/null +++ b/data/ir_values.xml @@ -0,0 +1,12 @@ + + + + + note + default + is_cpv=true + pos.order + "Entretien vélo dans le cadre du «Coup de pouce Vélo - Autoréparation»" + + + diff --git a/point_of_sale.py b/point_of_sale.py new file mode 100644 index 0000000..426469e --- /dev/null +++ b/point_of_sale.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 L'Heureux Cyclage +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from openerp.osv import osv +from openerp.osv import orm +from openerp.osv import fields + +class pos_order(orm.Model): + _inherit = 'pos.order' + + _columns = { + 'is_cpv': fields.boolean('"Coup de Pouce Velo"?', change_default=True), + } diff --git a/view/point_of_sale.xml b/view/point_of_sale.xml new file mode 100644 index 0000000..14978a6 --- /dev/null +++ b/view/point_of_sale.xml @@ -0,0 +1,16 @@ + + + + + pos.order.form + pos.order + + + + + + + + + +