[IMP] event_sale: better usability (as per our usability expert review) + better naming of files
bzr revid: qdp-launchpad@openerp.com-20120228105906-ubqfrhma81wdd44n
This commit is contained in:
parent
88c3ebf82a
commit
591fe52a37
|
@ -18,4 +18,5 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
import sale_order
|
||||
|
||||
import event_sale
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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):
|
|
@ -7,9 +7,11 @@
|
|||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="product.product_normal_form_view" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="purchase_ok" position="after">
|
||||
<field name="event_ok" on_change="onchange_event_ok(event_ok, context)"/>
|
||||
</field>
|
||||
<field name='supply_method' position='after'>
|
||||
<field name="event_ok" attrs="{'invisible': [('type', '!=', 'service')]}"/>
|
||||
<field name="event_type_id" attrs="{'invisible': [('event_ok', '=', False)]}"/>
|
||||
<field name="event_type_id" attrs="{'readonly': [('event_ok', '=', False)], 'required': [('event_ok', '=', True)]}"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
Loading…
Reference in New Issue