[IMP] group_id on orderpoint + copy of orderpoint/package should not copy procurements/quants child packages
bzr revid: jco@openerp.com-20140407141458-xg1jbl2ctnfzs5eh
This commit is contained in:
parent
511d5b6cc4
commit
6a50b1663b
|
@ -341,6 +341,7 @@ class procurement_order(osv.osv):
|
|||
'origin': orderpoint.name,
|
||||
'warehouse_id': orderpoint.warehouse_id.id,
|
||||
'orderpoint_id': orderpoint.id,
|
||||
'group_id': orderpoint.group_id.id,
|
||||
}
|
||||
|
||||
def _product_virtual_get(self, cr, uid, order_point):
|
||||
|
|
|
@ -813,7 +813,7 @@ class stock_picking(osv.osv):
|
|||
_defaults = {
|
||||
'name': lambda self, cr, uid, context: '/',
|
||||
'state': 'draft',
|
||||
'move_type': 'one',
|
||||
'move_type': 'direct',
|
||||
'priority': '1', # normal
|
||||
'date': fields.datetime.now,
|
||||
'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.picking', context=c),
|
||||
|
@ -834,6 +834,7 @@ class stock_picking(osv.osv):
|
|||
default['backorder_id'] = False
|
||||
default['pack_operation_ids'] = []
|
||||
default['date_done'] = False
|
||||
|
||||
return super(stock_picking, self).copy(cr, uid, id, default, context)
|
||||
|
||||
|
||||
|
@ -3610,6 +3611,8 @@ class stock_package(osv.osv):
|
|||
default = {}
|
||||
if not default.get('name'):
|
||||
default['name'] = self.pool.get('ir.sequence').get(cr, uid, 'stock.quant.package') or _('Unknown Pack')
|
||||
default['quant_ids'] = []
|
||||
default['children_ids'] = []
|
||||
return super(stock_package, self).copy(cr, uid, id, default, context=context)
|
||||
|
||||
def copy_pack(self, cr, uid, id, default_pack_values=None, default=None, context=None):
|
||||
|
@ -3917,7 +3920,8 @@ class stock_warehouse_orderpoint(osv.osv):
|
|||
'qty_multiple': fields.integer('Qty Multiple', required=True,
|
||||
help="The procurement quantity will be rounded up to this multiple."),
|
||||
'procurement_ids': fields.one2many('procurement.order', 'orderpoint_id', 'Created Procurements'),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True)
|
||||
'group_id': fields.many2one('procurement.group', 'Procurement Group', help="Moves created through this orderpoint will be put in this procurement group. If none is given, the moves generated by procurement rules will be grouped into one big picking. "),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True),
|
||||
}
|
||||
_defaults = {
|
||||
'active': lambda *a: 1,
|
||||
|
@ -3973,6 +3977,8 @@ class stock_warehouse_orderpoint(osv.osv):
|
|||
default = {}
|
||||
default.update({
|
||||
'name': self.pool.get('ir.sequence').get(cr, uid, 'stock.orderpoint') or '',
|
||||
'procurement_ids': [],
|
||||
'group_id': False
|
||||
})
|
||||
return super(stock_warehouse_orderpoint, self).copy(cr, uid, id, default, context=context)
|
||||
|
||||
|
|
|
@ -1576,6 +1576,7 @@
|
|||
<field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection" groups="stock.group_locations"/>
|
||||
<field name="product_uom" groups="product.group_uom"/>
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
<field name="group_id" groups="stock.group_adv_location"/>
|
||||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||
</group>
|
||||
</group>
|
||||
|
|
Loading…
Reference in New Issue