X-Git-Url: http://git.cyclocoop.org/?p=burette%2Flhc.git;a=blobdiff_plain;f=lhc.py;h=fc2c4dc1d8ec28b3a51d5af4bbf2b1b4c6a1ac10;hp=420ce976d06bd233f0815037024a06ec18bf3b75;hb=ce2487d8abfc5161fcadafa887725144aefd0c69;hpb=c001634a75207746b21dec9bd77a92c055e68898 diff --git a/lhc.py b/lhc.py index 420ce97..fc2c4dc 100644 --- a/lhc.py +++ b/lhc.py @@ -31,7 +31,12 @@ class res_partner(orm.Model): _inherit = 'res.partner' _columns = { - 'usual_contact': fields.boolean('Usual contact', help='This contact is a usual contact for L\'Heureux Cyclage employees. This field can be used to discriminated contacts for differents usages.'), + 'usual_contact': fields.boolean( + 'Usual contact', + help="""This contact is a usual contact for L\'Heureux Cyclage + employees. This field can be used to discriminated contacts for + differents usages.""" + ), 'kit_sent': fields.boolean('Welcome kit sent'), } @@ -44,7 +49,13 @@ class product_template(orm.Model): _inherit = 'product.template' _columns = { - 'standard_price': fields.float('Cost', digits_compute=dp.get_precision('Product Price'), help="Cost price of the product used for standard stock valuation in accounting and used as a base price on purchase orders.", groups="base.group_user,lhc.group_volunteer"), + 'standard_price': fields.float( + 'Cost', + digits_compute=dp.get_precision('Product Price'), + help="""Cost price of the product used for standard stock valuation + in accounting and used as a base price on purchase orders.", + groups="base.group_user,lhc.group_volunteer""" + ), } @@ -65,6 +76,18 @@ class res_users(orm.Model): return {'value': v} +class event_event(orm.Model): + _inherit = 'event.event' + + _columns = { + 'duration': fields.float( + 'Duration', + digits_compute=dp.get_precision('Product Unit of Measure'), + help='Duration in hours' + ), + } + + class event_registration(orm.Model): _inherit = 'event.registration' @@ -86,6 +109,20 @@ class event_registration(orm.Model): ('pole_emploi', 'Pole Emploi')], 'Main funding', help='Main funding origin'), 'fundings_others': fields.char('Others fundings origins', size=128), + 'sale_order_ids': fields.many2many( + 'sale.order', + 'event_registration_sale_order_rel', + 'event_registration_id', + 'sale_order_id', + 'Related sale order(s)' + ), + 'invoice_ids': fields.many2many( + 'account.invoice', + 'event_registration_invoice_id_rel', + 'event_registration_id', + 'invoice_id', + 'Related invoice(s)' + ), } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: