Wed, 27 Jun 2012 20:04:55 +0200 Cédric Krier <[email protected]>: > On 27/06/12 19:36 +0200, Udo Spallek wrote: > > Mon, 25 Jun 2012 13:10:16 +0200 > > Cédric Krier <[email protected]>: > > > On 25/06/12 11:16 +0200, Udo Spallek wrote: > > > Also we don't want to have to add every new location created to > > > the configuration. > > What is the problem with this? > It doesn't scale if you have thousand of locations. For me there is no need to put all existing or new locations to the configuration.
> > For me stock.lot.type model looks very restrictive and hard to
> > extend.
> I don't see why. For now it follow the same concept as the location.
> After that it is still possible to extend it by overriding
> Product.lot_is_required
It would be much more flexible when stock.lot.type is a table,
which stores lines of lot types to apply:
class LotType(ModelSQL, ModelView):
"Stock Lot Type"
_name = 'stock.lot.type'
_description = __doc__
location_type = fields.Many2One('stock.location.type',
'Location Type', states={
'required': True,
})
LotType()
class StockLocationType(ModelSQL, ModelView):
"Stock Location Type"
_name = 'stock.location.type'
_description = __doc__
name = fields.Char('Name', required=True, translate=True)
code = fields.Char('Code', required=True)
StockLocationType()
This kind of lot type has only a selection of a stock location type.
This would make the model much more flexible, because it is possible to
extend it with other criteria then the location type. E.g. one can add
another many2one to stock location.
Cheers
Udo
--
_____________________________
virtual things
Preisler & Spallek GbR
München - Aachen
Windeckstr. 77
81375 München
Tel: +49 (89) 710 481 55
Fax: +49 (89) 710 481 56
[email protected]
http://www.virtual-things.biz
signature.asc
Description: PGP signature
