[FIX] stock_planning: add a many2one corresponding to a one2many.
authorVo Minh Thu <vmt@openerp.com>
Mon, 29 Aug 2011 12:16:44 +0000 (14:16 +0200)
committerVo Minh Thu <vmt@openerp.com>
Mon, 29 Aug 2011 12:16:44 +0000 (14:16 +0200)
Perhaps it should be replaced by a many2many to keep the table schema clean.

bzr revid: vmt@openerp.com-20110829121644-2uwuy9p5328z3pml

addons/stock_planning/stock_planning.py

index 7e93422..35337b2 100644 (file)
@@ -41,7 +41,8 @@ class stock_period(osv.osv):
         'name': fields.char('Period Name', size=64, required=True),
         'date_start': fields.datetime('Start Date', required=True),
         'date_stop': fields.datetime('End Date', required=True),
-        'state': fields.selection([('draft','Draft'), ('open','Open'),('close','Close')], 'State')
+        'state': fields.selection([('draft','Draft'), ('open','Open'),('close','Close')], 'State'),
+        'planning_id': fields.many2one('stock.period.createlines', 'Stock Period Planning'),
     }
     _defaults = {
         'state': 'draft'