c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #19942
[Bug 740858] Re: product/product.py doubt: is normal to see the same field twice in _defaults?
** Changed in: openobject-addons
Status: Confirmed => In Progress
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/740858
Title:
product/product.py doubt: is normal to see the same field twice in
_defaults?
Status in OpenERP Modules (addons):
In Progress
Bug description:
the 'type' field of product_template class appears twice in _defaults. is that normal?
thanks!
http://bazaar.launchpad.net/~openerp/openobject-
addons/6.0/view/3775/product/product.py#L311
294
_defaults = {
295
'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'product.template', context=c),
***296* **
'type': lambda *a: 'product',
297
'list_price': lambda *a: 1,
298
'cost_method': lambda *a: 'standard',
299
'supply_method': lambda *a: 'buy',
300
'standard_price': lambda *a: 1,
301
'sale_ok': lambda *a: 1,
302
'sale_delay': lambda *a: 7,
303
'produce_delay': lambda *a: 1,
304
'purchase_ok': lambda *a: 1,
305
'procure_method': lambda *a: 'make_to_stock',
306
'uom_id': _get_uom_id,
307
'uom_po_id': _get_uom_id,
308
'uos_coeff' : lambda *a: 1.0,
309
'mes_type' : lambda *a: 'fixed',
310
'categ_id' : _default_category,
***311* **
'type' : lambda *a: 'consu',
312
}
References