Code review comment for lp:~camptocamp/ocb-addons/7.0-fix-lp-1210195-RDE

Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

This fix breaks the database creation from scratch.

2013-09-26 07:53:54,261 8361 INFO openerp_prod_doremi openerp.modules.loading: module procurement: loading stock_orderpoint.xml
2013-09-26 07:53:54,321 8361 ERROR openerp_prod_doremi openerp.tools.convert: Parse error in /home/afayolle/work/customers/doremi/openerp_buildout_prod/parts/addons/procurement/stock_orderpoint.xml:7:
<record id="stock_warehouse_orderpoint_0" model="stock.warehouse.orderpoint">
            <field name="product_max_qty">25.0</field>
            <field name="product_min_qty">5.0</field>
            <field model="product.uom" name="product_uom" ref="product.product_uom_dozen"/>
            <field model="stock.warehouse" name="warehouse_id" search="[]"/>
            <field model="product.product" name="product_id" ref="product.product_product_36"/>
            <field name="location_id" ref="stock.stock_location_stock"/>
        </record>
Traceback (most recent call last):
  File "/home/afayolle/work/customers/doremi/openerp_buildout_prod/parts/server/openerp/tools/convert.py", line 847, in parse
    self._tags[rec.tag](self.cr, rec, n)
  File "/home/afayolle/work/customers/doremi/openerp_buildout_prod/parts/server/openerp/tools/convert.py", line 814, in _tag_record
    id = self.pool.get('ir.model.data')._update(cr, self.uid, rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context )
  File "/home/afayolle/work/customers/doremi/openerp_buildout_prod/parts/server/openerp/addons/base/ir/ir_model.py", line 963, in _update
    res_id = model_obj.create(cr, uid, values, context=context)
  File "/home/afayolle/work/customers/doremi/openerp_buildout_prod/parts/server/openerp/osv/orm.py", line 4318, in create
    vals = self._add_missing_default_values(cr, user, vals, context)
  File "/home/afayolle/work/customers/doremi/openerp_buildout_prod/parts/server/openerp/osv/orm.py", line 2487, in _add_missing_default_values
    defaults = self.default_get(cr, uid, missing_defaults, context)
  File "/home/afayolle/work/customers/doremi/openerp_buildout_prod/parts/addons/procurement/procurement.py", line 554, in default_get
    warehouse = self.pool.get('stock.warehouse').browse(cr, uid, res['warehouse_id'], context)
KeyError: 'warehouse_id'

review: Needs Fixing (code review, test)

« Back to merge proposal