Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Odoo 9 : How to Enable Inter-Company?

By
Rizky Prihanto
on 10/30/15, 3:10 PM 3,696 views

Recently I was enabling the "Multi Company" mode on Odoo 9 (cloned from 9.0 branch). And I already create three companies in the Settings.

But, when I activated the "Inter Company" from Settings while at the same time I ran logging in console, I found this error messages (see below).

I don't know what dependencies needed to successfully enable that nice-to-explore features.

Any clue? Thanks.


2015-10-30 19:01:39,288 5763 INFO mmgroup openerp.modules.module: module inter_company_rules: creating or updating database tables
2015-10-30 19:01:39,758 5763 INFO mmgroup openerp.modules.loading: loading inter_company_rules/views/inter_company_so_po_view.xml
2015-10-30 19:01:39,780 5763 INFO mmgroup openerp.addons.base.ir.ir_ui_view: View inheritance may not use attribute 'string' as a selector.
Error context:
View `res.company.form.inherit`
[view_id: 664, xml_id: n/a, model: res.company, parent_id: 110]
2015-10-30 19:01:39,783 5763 ERROR mmgroup openerp.http: Exception during JSON request handling.
Traceback (most recent call last):
File "/opt/odoo/openerp/http.py", line 599, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/openerp/http.py", line 636, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/openerp/http.py", line 315, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/openerp/service/model.py", line 118, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/openerp/http.py", line 308, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo/openerp/http.py", line 887, in __call__
return self.method(*args, **kw)
File "/opt/odoo/openerp/http.py", line 465, in response_wrap
response = f(*args, **kw)
File "/opt/odoo/addons/web/controllers/main.py", line 975, in call_button
action = self._call_kw(model, method, args, {})
File "/opt/odoo/addons/web/controllers/main.py", line 963, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
File "/opt/odoo/openerp/api.py", line 232, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/openerp/addons/base/res/res_config.py", line 605, in execute
action = self._install_modules(cr, uid, to_install, context=context)
File "/opt/odoo/openerp/addons/base/res/res_config.py", line 39, in _install_modules
result = ir_module.button_immediate_install(cr, uid, to_install_ids, context=context)
File "/opt/odoo/openerp/api.py", line 232, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/openerp/addons/base/module/module.py", line 459, in button_immediate_install
return self._button_immediate_function(cr, uid, ids, self.button_install, context=context)
File "/opt/odoo/openerp/api.py", line 232, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/openerp/addons/base/module/module.py", line 533, in _button_immediate_function
registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)
File "/opt/odoo/openerp/modules/registry.py", line 385, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "/opt/odoo/openerp/modules/loading.py", line 337, in load_modules
loaded_modules, update_module)
File "/opt/odoo/openerp/modules/loading.py", 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 "/opt/odoo/openerp/modules/loading.py", line 156, in load_module_graph
_load_data(cr, module_name, idref, mode, kind='data')
File "/opt/odoo/openerp/modules/loading.py", line 98, in _load_data
tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
File "/opt/odoo/openerp/tools/convert.py", line 852, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/opt/odoo/openerp/tools/convert.py", line 939, in convert_xml_import
obj.parse(doc.getroot(), mode=mode)
File "/opt/odoo/openerp/tools/convert.py", line 802, in parse
self.parse(rec, mode)
File "/opt/odoo/openerp/tools/convert.py", line 805, in parse
self._tags[rec.tag](self.cr, rec, de, mode=mode)
File "/opt/odoo/openerp/tools/convert.py", line 709, in _tag_record
id = self.pool['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 "/opt/odoo/openerp/api.py", line 232, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/openerp/addons/base/ir/ir_model.py", line 1107, in _update
res_id = model_obj.create(cr, uid, values, context=context)
File "/opt/odoo/openerp/api.py", line 232, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/openerp/addons/base/ir/ir_ui_view.py", line 351, in create
context=context)
File "/opt/odoo/openerp/api.py", line 232, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/openerp/api.py", line 327, in old_api
result = method(recs, *args, **kwargs)
File "/opt/odoo/openerp/models.py", line 4125, in create
record = self.browse(self._create(old_vals))
File "/opt/odoo/openerp/api.py", line 230, in wrapper
return new_api(self, *args, **kwargs)
File "/opt/odoo/openerp/api.py", line 463, in new_api
result = method(self._model, cr, uid, *args, **kwargs)
File "/opt/odoo/openerp/models.py", line 4316, in _create
recs._validate_fields(vals)
File "/opt/odoo/openerp/api.py", line 230, in wrapper
return new_api(self, *args, **kwargs)
File "/opt/odoo/openerp/models.py", line 1267, in _validate_fields
raise ValidationError('\n'.join(errors))
ParseError: "Invalid view definition
Error details:
View inheritance may not use attribute 'string' as a selector.
Error context:
View `res.company.form.inherit`
[view_id: 664, xml_id: n/a, model: res.company, parent_id: 110]
None" while parsing /opt/odoo/.local/share/Odoo/addons/9.0/inter_company_rules/views/inter_company_so_po_view.xml:5, near
<record model="ir.ui.view" id="view_company_inter_change_inherit_form">
<field name="name">res.company.form.inherit</field>
<field name="inherit_id" ref="base.view_company_form"/>
<field name="model">res.company</field>
<field name="arch" type="xml">
<xpath expr="//notebook/page[@string='Configuration']" position="inside">
<group string="Inter-Company Rules">
<field name="so_from_po" attrs="{'invisible': [('auto_generate_invoices', '=', True)]}"/>
<field name="po_from_so" attrs="{'invisible': [('auto_generate_invoices', '=', True)]}"/>
<field name="warehouse_id" attrs="{'required': [('po_from_so', '=', True)], 'invisible': [('po_from_so', '=', False)]}" domain="[('company_id', '=', active_id)]"/>
<field name="auto_validation" attrs="{'invisible': [('auto_generate_invoices', '=', True)]}"/>
<field name="auto_generate_invoices" attrs="{'invisible': ['|', ('so_from_po', '=', True), ('po_from_so', '=', True)]}"/>
<field name="intercompany_user_id" colspan="2" attrs="{'required': ['|','|',('so_from_po', '=', True), ('po_from_so', '=', True), ('auto_generate_invoices', '=', True)]}"/>
</group>
</xpath>
</field>
</record>
2015-10-30 19:01:39,787 5763 INFO mmgroup werkzeug: 127.0.0.1 - - [30/Oct/2015 19:01:39] "POST /web/dataset/call_button HTTP/1.0" 200 -


0

Ray Carnes

--Ray Carnes--
15687
| 9 7 9
Greater Los Angeles, United States
--Ray Carnes--

Senior Odoo Analyst

OpenERP 6.1, 7.0 and Odoo 8.0, 9.0 (Since 2012)

Completed Functional and Technical Training.

Major Skills:

  • Needs Discovery and Requirements Analysis;

  • Function and Technical Specifications;

  • Project Planning;

  • Prototyping and Proof of concepts;

  • Data migration;

  • Configuration & Customization (UI and modules);

  • Integration - data, business logic and service levels;

  • Training and Knowledge transfer;

  • Go Live support;

  • Help desk;

  • Version Migration.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

Ray Carnes
On 10/30/15, 3:29 PM

You need to update your version of 9.0.  

The repository for Odoo 9.0 Enterprise (inter_company_so_po_view.xml) shows:

<xpath expr="//notebook" position="inside">

The code looks like it hasn't changed since August 28th.  When did you get your version of 9.0?


Your version has this (causing the problem):

<xpath expr="//notebook/page[@string='Configuration']" position="inside">

I was git pull-ing the 9.0 branch just an hour ago, from https://github.com/odoo/odoo And I tried your suggestion above, and yeah... now the "Inter Company Module" was successfully loaded. Thanks so much.

Rizky Prihanto
on 10/30/15, 3:37 PM
0
DIDIER LACOMBE
On 2/21/16, 12:31 PM

Hello


have you really been successful with inter-co V9 ??


Thanks for answering


Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 10/30/15, 3:10 PM
Seen: 3696 times
Last updated: 2/21/16, 12:31 PM