Yardım

0

Error when installing carrier module | Fedex | V14

Avatar
Yeison X

Hello
I am trying to install the carrier modules but it shows the following error:


Error:
Odoo Server Error

Traceback (most recent call last):
  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/home/odoo/src/odoo/odoo/http.py", line 682, in dispatch
    result = self._call_function(**self.params)
  File "/home/odoo/src/odoo/odoo/http.py", line 358, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/odoo/src/odoo/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/odoo/src/odoo/odoo/http.py", line 346, in checked_call
    result = self.endpoint(*a, **kw)
  File "/home/odoo/src/odoo/odoo/http.py", line 911, in __call__
    return self.method(*args, **kw)
  File "/home/odoo/src/odoo/odoo/http.py", line 530, in response_wrap
    response = f(*args, **kw)
  File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 1363, in call_button
    action = self._call_kw(model, method, args, kwargs)
  File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 1351, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/home/odoo/src/odoo/odoo/api.py", line 396, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/home/odoo/src/odoo/odoo/api.py", line 383, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "<decorator-gen-72>", line 2, in button_immediate_install
  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_module.py", line 73, in check_and_log
    return method(self, *args, **kwargs)
  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_module.py", line 474, in button_immediate_install
    return self._button_immediate_function(type(self).button_install)
  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_module.py", line 592, in _button_immediate_function
    modules.registry.Registry.new(self._cr.dbname, update_module=True)
  File "/home/odoo/src/odoo/odoo/modules/registry.py", line 89, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/home/odoo/src/odoo/odoo/modules/loading.py", line 453, in load_modules
    processed_modules += load_marked_modules(cr, graph,
  File "/home/odoo/src/odoo/odoo/modules/loading.py", line 346, in load_marked_modules
    loaded, processed = load_module_graph(
  File "/home/odoo/src/odoo/odoo/modules/loading.py", line 221, in load_module_graph
    load_data(cr, idref, mode, kind='data', package=package)
  File "/home/odoo/src/odoo/odoo/modules/loading.py", line 69, in load_data
    tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
  File "/home/odoo/src/odoo/odoo/tools/convert.py", line 733, in convert_file
    convert_xml_import(cr, module, fp, idref, mode, noupdate)
  File "/home/odoo/src/odoo/odoo/tools/convert.py", line 799, in convert_xml_import
    obj.parse(doc.getroot())
  File "/home/odoo/src/odoo/odoo/tools/convert.py", line 719, in parse
    self._tag_root(de)
  File "/home/odoo/src/odoo/odoo/tools/convert.py", line 681, in _tag_root
    raise ParseError('while parsing %s:%s, near\n%s' % (
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/odoo/src/odoo/odoo/http.py", line 638, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/odoo/src/odoo/odoo/http.py", line 314, in _handle_exception
    raise exception.with_traceback(None) from new_cause
odoo.tools.convert.ParseError: while parsing /home/odoo/src/odoo/addons/delivery/views/product_template_view.xml:4, near
<record model="ir.ui.view" id="product_template_hs_code">
    <field name="name">product.template.form.hs_code</field>
    <field name="model">product.template</field>
    <field name="inherit_id" ref="product.product_template_form_view"/>
    <field name="arch" type="xml">
           <xpath expr="//group[@name='group_lots_and_weight']" position="inside">
            <field name="hs_code"/>
        </xpath>
    </field>
</record>


I made customizations in the product.template view as explained in this tutorial:

https://www.youtube.com/watch?v=WZFfaKrw0N8

Currently the product.template.common.form view looks like this:

<?xml version="1.0"?>
<form string="Product">
<header>
<button string="Configure Variants" type="action" name="139" attrs="{'invisible': ['|', ('attribute_line_ids', '&lt;=', 0), ('is_product_variant', '=', True)]}" groups="product.group_product_variant"/>
</header>
<sheet>
<field name="product_variant_count" invisible="1"/>
<field name="is_product_variant" invisible="1"/>
<field name="attribute_line_ids" invisible="1"/>
<div class="oe_button_box" name="button_box"/>
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<field name="id" invisible="True"/>
<field name="image_1920" widget="image" class="oe_avatar" options="{'preview_image': 'image_128'}"/>
<div class="oe_title">
<label class="oe_edit_only" for="name" string="Product Name"/>
<h1><field name="name" placeholder="Product Name"/></h1>
<div name="options" groups="base.group_user">
<div>
<field name="sale_ok"/>
<label for="sale_ok"/>
</div>
<div>
<field name="purchase_ok"/>
<label for="purchase_ok"/>
</div>
</div>
</div>
<notebook>
<page string="General Information" name="general_information">
<group>
<group name="group_general">
<field name="active" invisible="1"/>
<field name="type"/>
<field name="categ_id" string="Product Category" domain="[('x_studio_titulo','=', 'No')]"/>
</group>
<group name="group_standard_price">
<label for="list_price"/>
<div name="pricing">
<field name="list_price" class="oe_inline" widget="monetary" options="{'currency_field': 'currency_id', 'field_digits': True}"/>
<button name="open_pricelist_rules" icon="fa-arrow-right" type="object" groups="product.group_product_pricelist" class="oe_inline">
<field name="pricelist_item_count" attrs="{'invisible': [('pricelist_item_count', '=', 0)]}"/>
<span attrs="{'invisible': [('pricelist_item_count', '=', 1)]}">
Extra Prices
</span>
<span attrs="{'invisible': [('pricelist_item_count', '!=', 1)]}">
Extra Price
</span>
</button>
</div>
<label for="standard_price" groups="base.group_user" attrs="{'invisible': [('product_variant_count', '&gt;', 1), ('is_product_variant', '=', False)]}"/>
<div name="standard_price_uom" groups="base.group_user" attrs="{'invisible': [('product_variant_count', '&gt;', 1), ('is_product_variant', '=', False)]}" class="o_row">
<field name="standard_price" widget="monetary" options="{'currency_field': 'cost_currency_id', 'field_digits': True}"/>
<span groups="uom.group_uom" class="oe_read_only">per
<field name="uom_name"/>
</span>
</div>
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
<field name="uom_id" groups="uom.group_uom" options="{'no_create': True}"/>
<field name="uom_po_id" groups="uom.group_uom" options="{'no_create': True}"/>
<field name="currency_id" invisible="1"/>
<field name="cost_currency_id" invisible="1"/>
<field name="product_variant_id" invisible="1"/>
</group>
</group>
<group string="Internal Notes">
<field name="description" nolabel="1" placeholder="This note is only for internal purposes."/>
</group>
</page>
<page string="Sales" attrs="{'invisible':[('sale_ok','=',False)]}" name="sales" invisible="1">
<group name="sale">
</group>
<group string="Sales Description" name="description">
<field name="description_sale" nolabel="1" placeholder="This note is added to sales orders and invoices."/>
</group>
</page>
<page string="Purchase" name="purchase" attrs="{'invisible': [('purchase_ok','=',False)]}" invisible="1">
<group name="purchase">
<group string="Vendor Bills" name="bill"/>
</group>
</page>
<page string="Inventory" name="inventory" groups="product.group_stock_packaging" attrs="{'invisible':[('type', '=', 'service')]}">
<group name="inventory">
<group name="group_lots_and_weight" string="Logistics" attrs="{'invisible': [('type', 'not in', ['product', 'consu'])]}">
<label for="weight" attrs="{'invisible':[('product_variant_count', '&gt;', 1), ('is_product_variant', '=', False)]}"/>
<div class="o_row" name="weight" attrs="{'invisible':[('product_variant_count', '&gt;', 1), ('is_product_variant', '=', False)]}">
<field name="weight"/>
<span><field name="weight_uom_name"/></span>
</div>
<label for="volume" attrs="{'invisible':[('product_variant_count', '&gt;', 1), ('is_product_variant', '=', False)]}"/>
<div class="o_row" name="volume" attrs="{'invisible':[('product_variant_count', '&gt;', 1), ('is_product_variant', '=', False)]}">
<field name="volume" string="Volume"/>
<span><field name="volume_uom_name"/></span>
</div>
</group>
</group>
<group name="packaging" string="Packaging" colspan="4" attrs="{'invisible':['|', ('type', 'not in', ['product', 'consu']), ('product_variant_count', '&gt;', 1), ('is_product_variant', '=', False)]}" groups="product.group_stock_packaging">
<field name="packaging_ids" nolabel="1" context="{'tree_view_ref':'product.product_packaging_tree_view2', 'form_view_ref':'product.product_packaging_form_view2'}"/>
</group>
</page>

<page string="Custom Page" name="Custom Page">
<group string="Group" name="Group Name">
<field name="x_custom_field"/>
</group>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
</form>



Avatar
Vazgeç
1 Cevap
0
Avatar
Yeison X
En iyi cevap

The error was caused by Odoo Studio customization. So, I restored the default view, install the modules and then I made again the customizations with Odoo Studio.

Avatar
Vazgeç