Get Company_Id To Custom Odoo 13 Module

Im trying to use the cscart odoo bridge to connect my odoo instance to my cscart store. In retrospect a very poor decision. Anyways the installation fails when i try to install the original package with this error when installing the multi channel bridge on odoo13 I get the following error
Error:
Odoo Server Error
Traceback (most recent call last):
File "/opt/odoo13/odoo/odoo/addons/base/models/ir_ui_view.py", line 394, in _check_xml
self.postprocess_and_fields(view.model, view_doc, view.id)
File "/opt/odoo13/odoo/odoo/addons/base/models/ir_ui_view.py", line 1007, in postprocess_and_fields
self.raise_view_error("\n".join(msg_lines), view_id)
File "/opt/odoo13/odoo/odoo/addons/base/models/ir_ui_view.py", line 614, in raise_view_error
raise ValueError(message)
ValueError: Field 'company_id' used in attributes must be present in view but is missing:
- 'company_id' in domain="[('company_id', 'in', [company_id, False])]"
- 'company_id' in domain="[('company_id', 'in', [company_id, False])]"
Error context:
View `product.pricelist.item.tree`
[view_id: 1925, xml_id: n/a, model: product.pricelist.item, parent_id: n/a]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo13/odoo/odoo/tools/convert.py", line 712, in parse
self._tag_root(de)
File "/opt/odoo13/odoo/odoo/tools/convert.py", line 674, in _tag_root
f(rec)
File "/opt/odoo13/odoo/odoo/tools/convert.py", line 674, in _tag_root
f(rec)
File "/opt/odoo13/odoo/odoo/tools/convert.py", line 577, in _tag_record
record = model._load_records([data], self.mode == 'update')
File "/opt/odoo13/odoo/odoo/models.py", line 4168, in _load_records
records = self._load_records_create([data['values'] for data in to_create])
File "/opt/odoo13/odoo/odoo/models.py", line 4082, in _load_records_create
return self.create(values)
File "", line 2, in create
File "/opt/odoo13/odoo/odoo/api.py", line 336, in _model_create_multi
return create(self, arg)
File "/opt/odoo13/odoo/odoo/addons/base/models/ir_ui_view.py", line 475, in create
return super(View, self).create(vals_list)
File "", line 2, in create
File "/opt/odoo13/odoo/odoo/api.py", line 336, in _model_create_multi
return create(self, arg)
File "/opt/odoo13/odoo/odoo/models.py", line 3843, in create
fields[0].determine_inverse(batch_recs)
File "/opt/odoo13/odoo/odoo/fields.py", line 1155, in determine_inverse
getattr(records, self.inverse)()
File "/opt/odoo13/odoo/odoo/addons/base/models/ir_ui_view.py", line 299, in _inverse_arch
view.write(data)
File "/opt/odoo13/odoo/addons/website_theme_install/models/theme_models.py", line 226, in write
res = super(IrUiView, other_views).write(vals)
File "/opt/odoo13/odoo/addons/website/models/ir_ui_view.py", line 51, in write
return super(View, self).write(vals)
File "/opt/odoo13/odoo/odoo/addons/base/models/ir_ui_view.py", line 493, in write
res = super(View, self).write(self._compute_defaults(vals))
File "/opt/odoo13/odoo/odoo/models.py", line 3632, in write
real_recs._validate_fields(vals, inverse_fields)
File "/opt/odoo13/odoo/odoo/models.py", line 1206, in _validate_fields
check(self)
File "/opt/odoo13/odoo/odoo/addons/base/models/ir_ui_view.py", line 396, in _check_xml
raise ValidationError("%s\n\n%s" % (_("Error while validating view"), tools.ustr(e)))
odoo.exceptions.ValidationError: ('Error while validating view\n\nField \'company_id\' used in attributes must be present in view but is missing:\n - \'company_id\' in domain="[(\'company_id\', \'in\', [company_id, False])]"\n - \'company_id\' in domain="[(\'company_id\', \'in\', [company_id, False])]"\n\nError context:\nView `product.pricelist.item.tree`\n[view_id: 1925, xml_id: n/a, model: product.pricelist.item, parent_id: n/a]', None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo13/odoo/odoo/http.py", line 624, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo13/odoo/odoo/http.py", line 310, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/opt/odoo13/odoo/odoo/tools/pycompat.py", line 14, in reraise
raise value
File "/opt/odoo13/odoo/odoo/http.py", line 669, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo13/odoo/odoo/http.py", line 350, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo13/odoo/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo13/odoo/odoo/http.py", line 339, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo13/odoo/odoo/http.py", line 915, in __call__
return self.method(*args, **kw)
File "/opt/odoo13/odoo/odoo/http.py", line 515, in response_wrap
response = f(*args, **kw)
File "/opt/odoo13/odoo/addons/web/controllers/main.py", line 1331, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/opt/odoo13/odoo/addons/web/controllers/main.py", line 1319, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo13/odoo/odoo/api.py", line 387, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/opt/odoo13/odoo/odoo/api.py", line 374, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "", line 2, in button_immediate_install
File "/opt/odoo13/odoo/odoo/addons/base/models/ir_module.py", line 72, in check_and_log
return method(self, *args, **kwargs)
File "/opt/odoo13/odoo/odoo/addons/base/models/ir_module.py", line 463, in button_immediate_install
return self._button_immediate_function(type(self).button_install)
File "/opt/odoo13/odoo/odoo/addons/base/models/ir_module.py", line 573, in _button_immediate_function
modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/opt/odoo13/odoo/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/opt/odoo13/odoo/odoo/modules/loading.py", line 423, in load_modules
loaded_modules, update_module, models_to_check)
File "/opt/odoo13/odoo/odoo/modules/loading.py", line 315, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/opt/odoo13/odoo/odoo/modules/loading.py", line 225, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package, report=report)
File "/opt/odoo13/odoo/odoo/modules/loading.py", line 68, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)
File "/opt/odoo13/odoo/odoo/tools/convert.py", line 736, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/opt/odoo13/odoo/odoo/tools/convert.py", line 803, in convert_xml_import
obj.parse(doc.getroot())
File "/opt/odoo13/odoo/odoo/tools/convert.py", line 721, in parse
exc_info[2]
File "/opt/odoo13/odoo/odoo/tools/pycompat.py", line 13, in reraise
raise value.with_traceback(tb)
File "/opt/odoo13/odoo/odoo/tools/convert.py", line 712, in parse
self._tag_root(de)
File "/opt/odoo13/odoo/odoo/tools/convert.py", line 674, in _tag_root
f(rec)
File "/opt/odoo13/odoo/odoo/tools/convert.py", line 674, in _tag_root
f(rec)
File "/opt/odoo13/odoo/odoo/tools/convert.py", line 577, in _tag_record
record = model._load_records([data], self.mode == 'update')
File "/opt/odoo13/odoo/odoo/models.py", line 4168, in _load_records
records = self._load_records_create([data['values'] for data in to_create])
File "/opt/odoo13/odoo/odoo/models.py", line 4082, in _load_records_create
return self.create(values)
File "", line 2, in create
File "/opt/odoo13/odoo/odoo/api.py", line 336, in _model_create_multi
return create(self, arg)
File "/opt/odoo13/odoo/odoo/addons/base/models/ir_ui_view.py", line 475, in create
return super(View, self).create(vals_list)
File "", line 2, in create
File "/opt/odoo13/odoo/odoo/api.py", line 336, in _model_create_multi
return create(self, arg)
File "/opt/odoo13/odoo/odoo/models.py", line 3843, in create
fields[0].determine_inverse(batch_recs)
File "/opt/odoo13/odoo/odoo/fields.py", line 1155, in determine_inverse
getattr(records, self.inverse)()
File "/opt/odoo13/odoo/odoo/addons/base/models/ir_ui_view.py", line 299, in _inverse_arch
view.write(data)
File "/opt/odoo13/odoo/addons/website_theme_install/models/theme_models.py", line 226, in write
res = super(IrUiView, other_views).write(vals)
File "/opt/odoo13/odoo/addons/website/models/ir_ui_view.py", line 51, in write
return super(View, self).write(vals)
File "/opt/odoo13/odoo/odoo/addons/base/models/ir_ui_view.py", line 493, in write
res = super(View, self).write(self._compute_defaults(vals))
File "/opt/odoo13/odoo/odoo/models.py", line 3632, in write
real_recs._validate_fields(vals, inverse_fields)
File "/opt/odoo13/odoo/odoo/models.py", line 1206, in _validate_fields
check(self)
File "/opt/odoo13/odoo/odoo/addons/base/models/ir_ui_view.py", line 396, in _check_xml
raise ValidationError("%s\n\n%s" % (_("Error while validating view"), tools.ustr(e)))
odoo.tools.convert.ParseError: "Error while validating view
Field 'company_id' used in attributes must be present in view but is missing:
- 'company_id' in domain="[('company_id', 'in', [company_id, False])]"
- 'company_id' in domain="[('company_id', 'in', [company_id, False])]"
Error context:
View `product.pricelist.item.tree`
[view_id: 1925, xml_id: n/a, model: product.pricelist.item, parent_id: n/a]
None" while parsing /opt/odoo13/odoo-custom-addons/odoo_multi_channel_sale/views/core/product_pricelist.xml:5, near
product.pricelist.item.search
product.pricelist.item
product.pricelist.item.tree
product.pricelist.item
tree
Pricelists Item
ir.actions.act_window
product.pricelist.item
tree,form
{'search_default_filter_by_pricelist_id':1}
after tinkering a bit I think i narrowed down the error to the fact that the product.pricelist.item file is missing a field called company_id. I added this field to the extension as follows
product.pricelist.item.search
product.pricelist.item
string ="Pricelist"
name ="filter_by_pricelist_id"
context="{'group_by':'pricelist_id'}"
/>
icon ="terp-check"
name ="pricelist_id"
string ="Pricelist"
domain ="[]"
help ="Pricelist"
context="{'group_by':'pricelist_id'}"
/>
product.pricelist.item.tree
product.pricelist.item
tree
<--------------- ADDED THIS LINE
Pricelists Item
ir.actions.act_window
product.pricelist.item
tree,form
{'search_default_filter_by_pricelist_id':1}
id ="menu_product_pricelist_item_main"
name ="Pricelists Items"
parent ="sale.product_menu_catalog"
action ="product_pricelist_item_action"
groups ="product.group_sale_pricelist"
sequence="4"
/>
after adding the line to the file , the addon install as expected however the company_id isnt actually supplied to the field and thus many errors occur while attempted to use said addon. How can I get the value of the company_id into my xml file so that I can use this extension as launch day is also fast approaching. I have also contacted their support but no luck yet. willing to share access to the test instance as well if it helps. Thanks

add company_id field to view. temp solution. you can sure, webkul's bug is not only this. they have really really bad addon. we develop own connector.

Thanks for your time and help.

add company_id field to view. temp solution. you can sure, webkul's bug is not only this. they have really really bad addon. we develop own connector.

I have a similar feeling after testing webkul. teosu, I've written you a private message and I would be greatful If you could share your thoughts regarding how to properly integrate odoo with cs-cart. I would be glad to pay to someone who has a ready and working solution or financially contribute in custom development.

Thanks in advance for your reply!