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
+
+
+
-
-
+