From 591fe52a3701b5658dc620b324a454281dce3a00 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Tue, 28 Feb 2012 11:59:06 +0100 Subject: [PATCH] [IMP] event_sale: better usability (as per our usability expert review) + better naming of files bzr revid: qdp-launchpad@openerp.com-20120228105906-ubqfrhma81wdd44n --- addons/event_sale/__init__.py | 3 ++- addons/event_sale/__openerp__.py | 4 ++-- addons/event_sale/{sale_order.py => event_sale.py} | 8 ++++++-- .../{sale_order_view.xml => event_sale_view.xml} | 6 ++++-- 4 files changed, 14 insertions(+), 7 deletions(-) rename addons/event_sale/{sale_order.py => event_sale.py} (91%) rename addons/event_sale/{sale_order_view.xml => event_sale_view.xml} (80%) diff --git a/addons/event_sale/__init__.py b/addons/event_sale/__init__.py index dcb2255d9cd..726d2d5c09d 100644 --- a/addons/event_sale/__init__.py +++ b/addons/event_sale/__init__.py @@ -18,4 +18,5 @@ # along with this program. If not, see . # ############################################################################## -import sale_order + +import event_sale diff --git a/addons/event_sale/__openerp__.py b/addons/event_sale/__openerp__.py index 8cfefeff796..1a72403b84b 100644 --- a/addons/event_sale/__openerp__.py +++ b/addons/event_sale/__openerp__.py @@ -31,12 +31,12 @@ Creating registration with sale orders. This module allows you to automatize and connect your registration creation with your main sale flow and, therefore, to enable the invoicing feature of registrations. -It defines a new kind of products that offers you the possibility to choose an event category associated with it. When you encode a sale order for that product, you will be able to choose an existing event of that category and when you confirm your sale order it will automatically create a registration for this event. +It defines a new kind of service products that offers you the possibility to choose an event category associated with it. When you encode a sale order for that product, you will be able to choose an existing event of that category and when you confirm your sale order it will automatically create a registration for this event. """, 'author': 'OpenERP SA', 'depends': ['event','sale','sale_crm'], 'update_xml': [ - 'sale_order_view.xml', + 'event_sale_view.xml', ], 'test':['test/confirm.yml'], 'installable': True, diff --git a/addons/event_sale/sale_order.py b/addons/event_sale/event_sale.py similarity index 91% rename from addons/event_sale/sale_order.py rename to addons/event_sale/event_sale.py index f2874edeb3e..8abe4a471ec 100644 --- a/addons/event_sale/sale_order.py +++ b/addons/event_sale/event_sale.py @@ -25,9 +25,13 @@ from tools.translate import _ class product(osv.osv): _inherit = 'product.product' _columns = { - 'event_ok': fields.boolean('Event', help='Match a product with an event'), - 'event_type_id': fields.many2one('event.type', 'Type of Event'), + 'event_ok': fields.boolean('Event Subscription', help='Determine if a product needs to create automatically an event registration at the confirmation of a sale order line.'), + 'event_type_id': fields.many2one('event.type', 'Type of Event', help='Filter the list of event on this category only, in the sale order lines'), } + + def onchange_event_ok(self, cr, uid, ids, event_ok, context=None): + return {'value': {'type': event_ok and 'service' or False}} + product() class sale_order_line(osv.osv): diff --git a/addons/event_sale/sale_order_view.xml b/addons/event_sale/event_sale_view.xml similarity index 80% rename from addons/event_sale/sale_order_view.xml rename to addons/event_sale/event_sale_view.xml index fc7e0ddb6c5..d58be605bfe 100644 --- a/addons/event_sale/sale_order_view.xml +++ b/addons/event_sale/event_sale_view.xml @@ -7,9 +7,11 @@ form + + + - - +