Community mailing list archives

Re: Can't upgrade built-in modules after insttalling my custom module

Hieu Nguyen
- 12/02/2015 06:09:18
Dear Houssine,

Yes, I did. Otherwise my module doesn't work and extend the `product.template` in the first place, does it?

Here is my

# -*- coding: utf-8 -*-
from controllers import controllers
from .models import custom_product_template

My module structure:


On 02/12/2015 17:36, Houssine BAKKALI wrote:
<blockquote cite="" type="cite">
did you put the py file extending the product.template model with doc_filename in your file?

2015-12-02 11:07 GMT+01:00 Hieu Nguyen <>:
Dear Odoo Community,

After installing my custom module which extends some built-in models (such as `product.template`) by adding some custom fields,
I can NOT upgrade built-in modules such as `sale` neither by the web interface or by the `-u` parameter.

Here is the log when I tried to upgrade `sale` module (
`doc_filename` is my custom field which was added to `product.template` model):

015-12-02 09:50:06,669 7088 ERROR kkm-odoo-9.0 werkzeug: Error on request:
Traceback (most recent call last):
  File "/home/hieu/odoo_9.0/env/lib/python2.7/site-packages/werkzeug/", line 177, in run_wsgi
  File "/home/hieu/odoo_9.0/env/lib/python2.7/site-packages/werkzeug/", line 165, in execute
    application_iter = app(environ, start_response)
  File "/home/hieu/odoo_9.0/odoo/openerp/service/", line 245, in app
    return, s)
  File "/home/hieu/odoo_9.0/odoo/openerp/service/", line 184, in application
    return application_unproxied(environ, start_response)
  File "/home/hieu/odoo_9.0/odoo/openerp/service/", line 170, in application_unproxied
    result = handler(environ, start_response)
  File "/home/hieu/odoo_9.0/odoo/openerp/", line 1416, in __call__
    return self.dispatch(environ, start_response)
  File "/home/hieu/odoo_9.0/odoo/openerp/", line 1390, in __call__
    return, start_wrapped)
  File "/home/hieu/odoo_9.0/env/lib/python2.7/site-packages/werkzeug/", line 588, in __call__
    return, start_response)
  File "/home/hieu/odoo_9.0/odoo/openerp/", line 1565, in dispatch
    ir_http = request.registry['ir.http']
  File "/home/hieu/odoo_9.0/odoo/openerp/", line 354, in registry
    return openerp.modules.registry.RegistryManager.get(self.db) if self.db else None
  File "/home/hieu/odoo_9.0/odoo/openerp/modules/", line 354, in get
  File "/home/hieu/odoo_9.0/odoo/openerp/modules/", line 385, in new
    openerp.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/home/hieu/odoo_9.0/odoo/openerp/modules/", line 333, in load_modules
    force, status, report, loaded_modules, update_module)
  File "/home/hieu/odoo_9.0/odoo/openerp/modules/", line 237, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/home/hieu/odoo_9.0/odoo/openerp/modules/", line 156, in load_module_graph
    _load_data(cr, module_name, idref, mode, kind='data')
  File "/home/hieu/odoo_9.0/odoo/openerp/modules/", line 98, in _load_data
    tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
  File "/home/hieu/odoo_9.0/odoo/openerp/tools/", line 852, in convert_file
    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
  File "/home/hieu/odoo_9.0/odoo/openerp/tools/", line 939, in convert_xml_import
    obj.parse(doc.getroot(), mode=mode)
  File "/home/hieu/odoo_9.0/odoo/openerp/tools/", line 802, in parse
    self.parse(rec, mode)
  File "/home/hieu/odoo_9.0/odoo/openerp/tools/", line 805, in parse
    self._tags[rec.tag](, rec, de, mode=mode)
  File "/home/hieu/odoo_9.0/odoo/openerp/tools/", line 709, in _tag_record
    id = self.pool['']._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/hieu/odoo_9.0/odoo/openerp/", line 232, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/hieu/odoo_9.0/odoo/openerp/addons/base/ir/", line 1080, in _update
    model_obj.write(cr, uid, [res_id], values, context=context)
  File "/home/hieu/odoo_9.0/odoo/openerp/", line 232, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/hieu/odoo_9.0/odoo/openerp/addons/base/ir/", line 374, in write
  File "/home/hieu/odoo_9.0/odoo/openerp/", line 232, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/hieu/odoo_9.0/odoo/openerp/", line 354, in old_api
    result = method(recs, *args, **kwargs)
  File "/home/hieu/odoo_9.0/odoo/openerp/", line 3817, in write
  File "/home/hieu/odoo_9.0/odoo/openerp/", line 230, in wrapper
    return new_api(self, *args, **kwargs)
  File "/home/hieu/odoo_9.0/odoo/openerp/", line 547, in new_api
    result = method(self._model, cr, uid, self.ids, *args, **kwargs)
  File "/home/hieu/odoo_9.0/odoo/openerp/", line 3997, in _write
  File "/home/hieu/odoo_9.0/odoo/openerp/", line 230, in wrapper
    return new_api(self, *args, **kwargs)
  File "/home/hieu/odoo_9.0/odoo/openerp/", line 1272, in _validate_fields
    raise ValidationError('\n'.join(errors))
ParseError: "Invalid view definition

Error details:
Field `doc_filename` does not exist

Error context:
View ``
[view_id: 874, xml_id: sale.product_template_form_view_sale_order_button, model: product.template, parent_id: 442]
None" while parsing /home/hieu/odoo_9.0/odoo/addons/sale/sale_view.xml:525, near
<record model="ir.ui.view" id="product_template_form_view_sale_order_button">
            <field name="name"></field>
            <field name="model">product.template</field>
            <field name="inherit_id" ref="product.product_template_only_form_view"/>
            <field name="groups_id" eval="[(4, ref('base.group_sale_salesman'))]"/>
            <field name="arch" type="xml">
                <div name="button_box" position="inside">
                    <button class="oe_stat_button" name="action_view_sales" type="object" icon="fa-usd" groups="base.group_no_one">
                        <field string="Sales" name="sales_count" widget="statinfo"/>


Post to:

Post to: