~unifield-team/unifield-wm/us-826

« back to all changes in this revision

Viewing changes to procurement_cycle/procurement.py

  • Committer: Quentin THEURET
  • Date: 2011-04-04 15:52:40 UTC
  • mto: (72.1.1 unifield-wm)
  • mto: This revision was merged to the branch mainline in revision 78.
  • Revision ID: quentin@tempo-quentin-20110404155240-bboo8seam8amdtna
UF-73: [ADD] Added product_consumption module to compute the monthly consumption of a product

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
        'order_coverage': fields.integer(string='Order coverage'),
55
55
        'safety_stock_time': fields.integer(string='Safety stock in time'),
56
56
        'safety_stock': fields.integer(string='Safety stock (quantity'),
57
 
        'past_consumption': fields.boolean(string='Past monthly consumtion'),
58
 
        'reviewed_consumption': fields.boolean(string='Reviewed monthly consumtion'),
59
 
        'manual_consumption': fields.boolean(string='Manual monthly consumtion'),
 
57
        'past_consumption': fields.boolean(string='Past monthly consumption'),
 
58
        'reviewed_consumption': fields.boolean(string='Reviewed monthly consumption'),
 
59
        'manual_consumption': fields.boolean(string='Manual monthly consumption'),
60
60
        'next_date': fields.related('frequence_id', 'next_date', string='Next scheduled date', readonly=True, type='date',
61
61
                                    store={'stock.warehouse.order.cycle': (lambda self, cr, uid, ids, context={}: ids, ['frequence_id'], 20),
62
62
                                           'stock.frequence': (_get_frequence_change, None, 20)}),
67
67
        'active': lambda *a: 1,
68
68
        'name': lambda x,y,z,c: x.pool.get('ir.sequence').get(y,z,'stock.order.cycle') or '',
69
69
        'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.warehouse.order.cycle', context=c)
 
70
        'order_coverage': lambda *a: 3,
70
71
    }
71
72
    
72
73
    def choose_change_frequence(self, cr, uid, ids, context={}):