classRepairVendor(models.Model): _inherit = "res.partner" is_repair_vendor = fields.Boolean(string="Is Repair Vendor", default=False)
The error am getting is :-
RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/tools/convert.py", line 680, in _tag_root
f(rec)
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/tools/convert.py", line 583, in _tag_record
record = model._load_records([data], self.mode == 'update')
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/models.py", line 4417, in _load_records
records = self._load_records_create([data['values'] for data in to_create])
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/models.py", line 4338, in _load_records_create
return self.create(values)
File "", line 2, in create
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/api.py", line 413, in _model_create_multi
return create(self, arg)
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/addons/base/models/ir_ui_view.py", line 539, in create
result = super(View, self.with_context(ir_ui_view_partial_validation=True)).create(vals_list)
File "", line 2, in create
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/api.py", line 413, in _model_create_multi
return create(self, arg)
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/addons/base/models/ir_fields.py", line 613, in create
recs = super().create(vals_list)
File "", line 2, in create
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/api.py", line 413, in _model_create_multi
return create(self, arg)
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/models.py", line 4070, in create
records = self._create(data_list)
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/models.py", line 4235, in _create
records._validate_fields(name for data in data_list for name in data['stored'])
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/models.py", line 1367, in _validate_fields
check(self)
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/addons/base/models/ir_ui_view.py", line 460, in _check_xml
raise err.with_traceback(e.__traceback__) from None
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/addons/base/models/ir_ui_view.py", line 434, in _check_xml
view._validate_view(combined_arch, view.model)
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/addons/base/models/ir_ui_view.py", line 1292, in _validate_view
validator(node, name_manager, node_info)
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/addons/base/models/ir_ui_view.py", line 1401, in _validate_tag_field
self._raise_view_error(msg, node)
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/addons/base/models/ir_ui_view.py", line 739, in _raise_view_error
raise err from from_exception
odoo.exceptions.ValidationError: Error while validating view near:
A partner with the same Tax ID already exists (
Field "is_repair_vendor" does not exist in model "res.partner"
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/http.py", line 687, in dispatch
result = self._call_function(**self.params)
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/http.py", line 359, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/http.py", line 348, in checked_call
result = self.endpoint(*a, **kw)
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/http.py", line 916, in __call__
return self.method(*args, **kw)
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/http.py", line 535, in response_wrap
response = f(*args, **kw)
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/addons/web/controllers/main.py", line 1351, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/addons/web/controllers/main.py", line 1339, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/api.py", line 464, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/api.py", line 451, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "", line 2, in button_immediate_upgrade
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/addons/base/models/ir_module.py", line 74, in check_and_log
return method(self, *args, **kwargs)
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/addons/base/models/ir_module.py", line 662, in button_immediate_upgrade
return self._button_immediate_function(type(self).button_upgrade)
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/addons/base/models/ir_module.py", line 600, in _button_immediate_function
registry = modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/modules/registry.py", line 87, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/modules/loading.py", line 470, in load_modules
processed_modules += load_marked_modules(cr, graph,
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/modules/loading.py", line 363, in load_marked_modules
loaded, processed = load_module_graph(
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/modules/loading.py", line 222, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package)
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/modules/loading.py", line 69, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/tools/convert.py", line 745, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate)
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/tools/convert.py", line 811, in convert_xml_import
obj.parse(doc.getroot())
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/tools/convert.py", line 731, in parse
self._tag_root(de)
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/tools/convert.py", line 680, in _tag_root
f(rec)
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/tools/convert.py", line 691, in _tag_root
raise ParseError(msg) from None # Restart with "--log-handler odoo.tools.convert:DEBUG" for complete traceback
Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/http.py", line 643, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/odoo/odoo/http.py", line 301, in _handle_exception
raise exception.with_traceback(None) from new_cause
odoo.tools.convert.ParseError: while parsing /home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/custome_addon/asset-management/views/repairvendor_form_views.xml:6
Error while validating view near:
A partner with the same Tax ID already exists (
Field "is_repair_vendor" does not exist in model "res.partner"
View error context:
{'file': '/home/ashutosh/Desktop/Reckonsys/Asset-management/asset-management/custome_addon/asset-management/views/repairvendor_form_views.xml',
'line': 3,
'name': 'view.res.partner.inherited',
'view': ir.ui.view(1038,),
'view.model': 'res.partner',
'view.parent': ir.ui.view(128,),
'xmlid': 'repairvendor_inherited_view'}
Can you please tell me the answer/solution for this
This is the xml file :____
<odoo>
<data>
<!-- Form view Repair Vendor -->
<record id="repairvendor_inherited_view" model="ir.ui.view">
<field name="name">repairvendor.view.form.inherit</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='company_type']" position="after">
<field name="is_repair_vendor"/>
</xpath>
</field>
</record>
</data>
</odoo>