[WIP] stock: packaging
bzr revid: qdp-launchpad@openerp.com-20130628073506-qt68p8jqojgf70wh
This commit is contained in:
parent
6fefb16378
commit
f8495823ef
|
@ -3813,6 +3813,10 @@ class stock_package(osv.osv):
|
|||
# 'picking_id': fields.related('pack_operation_id', 'picking_id', type='many2one', relation="stock.picking", string='Related Picking'),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'name': lambda self, cr, uid, context: self.pool.get('ir.sequence').get(cr, uid, 'stock.quant.package') or _('Unknown Pack')
|
||||
}
|
||||
|
||||
def _check_location(self, cr, uid, ids, context=None):
|
||||
'''Simply check that all quants in a package are stored in the same location'''
|
||||
for pack in self.browse(cr, uid, ids, context=context):
|
||||
|
|
|
@ -65,6 +65,7 @@
|
|||
<field name="company_id" eval="False"/>
|
||||
</record>
|
||||
|
||||
<!-- stock/lot.tracking sequence and sequence type should be removed, mmh? -->
|
||||
<record id="sequence_type_tracking" model="ir.sequence.type">
|
||||
<field name="name">Packs</field>
|
||||
<field name="code">stock.lot.tracking</field>
|
||||
|
@ -79,5 +80,19 @@
|
|||
<field name="number_increment">1</field>
|
||||
<field name="company_id" eval="False"/>
|
||||
</record>
|
||||
|
||||
<!-- Sequences for stock.quant.package -->
|
||||
<record id="seq_type_quant_package" model="ir.sequence.type">
|
||||
<field name="name">Packages</field>
|
||||
<field name="code">stock.quant.package</field>
|
||||
</record>
|
||||
|
||||
<record id="seq_quant_package" model="ir.sequence">
|
||||
<field name="name">Packages</field>
|
||||
<field name="code">stock.quant.package</field>
|
||||
<field name="prefix">PACK</field>
|
||||
<field name="padding">7</field>
|
||||
<field name="company_id" eval="False"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
Loading…
Reference in New Issue