help="This field will fill the packing origin and the name of its moves"),
'group_id': fields.many2one('procurement.group', 'Procurement Group'),
'action': fields.selection(selection=lambda s, cr, uid, context=None: s._get_action(cr, uid, context=context),
- string='Action', required=True)
+ string='Action', required=True),
}
return self.pool.get('procurement.rule').search(cr, uid, domain, context=context)
def _find_suitable_rule(self, cr, uid, procurement, context=None):
- res = super(procurement_order, self)._find_suitable_rule(cr, uid, procurement, context=context)
+ rule_id = super(procurement_order, self)._find_suitable_rule(cr, uid, procurement, context=context)
if not res:
- res = self._search_suitable_rule(cr, uid, procurement, [('action', '=', 'move'), ('location_id', '=', procurement.location_id.id)], context=context)
- res = res and res[0] or False
- return res
+ rule_id = self._search_suitable_rule(cr, uid, procurement, [('action', '=', 'move'), ('location_id', '=', procurement.location_id.id)], context=context)
+ rule_id = rule_id and rule_id[0] or False
+ return rule_id
def _run_move_create(self, cr, uid, procurement, context=None):
return {
_inherit = "product.template"
_columns = {
'type': fields.selection([('product', 'Stockable Product'), ('consu', 'Consumable'), ('service', 'Service')], 'Product Type', required=True, help="Consumable: Will not imply stock management for this product. \nStockable product: Will imply stock management for this product."),
- 'supply_method': fields.selection([('produce', 'Manufacture'), ('buy', 'Buy')], 'Supply Method', required=True, help="Manufacture: When procuring the product, a manufacturing order or a task will be generated, depending on the product type. \nBuy: When procuring the product, a purchase order will be generated."),
+ 'supply_method': fields.selection([('produce', 'Manufacture'), ('buy', 'Buy'), ('wait', 'None')], 'Supply Method', required=True, help="Manufacture: When procuring the product, a manufacturing order or a task will be generated, depending on the product type. \nBuy: When procuring the product, a purchase order will be generated."),
}
_defaults = {
'supply_method': 'buy',