init
[burette/cyclofficine_ivry.git] / cyclofficine_ivry.py
1 # -*- coding: utf-8 -*-
2
3 from openerp.osv import osv
4 from openerp.osv import fields
5 import netsvc
6
7
8 class Partner(osv.osv):
9 _inherit = 'res.partner'
10 _order = 'member_ident'
11 _columns = {
12 'member_ident': fields.integer('Member identifier'),
13 }
14
15 Partner()
16
17 class account_invoice(osv.osv):
18 _inherit = 'account.invoice'
19 def draft2open(self, cr, uid, ids):
20 print ("DEV: [account_invoice] [draft2open]: %s" % str([uid, ids]))
21 wf_service = netsvc.LocalService("workflow")
22 wf_service.trg_validate(uid, 'account.invoice', ids[0], 'invoice_open', cr)
23 return ids
24
25 account_invoice()