Skip to Content
Menu
This question has been flagged

After I setup multi companies I had "journal errors" when I switched companies, so I uninstalled the "invoice (accounting) module" on Odoo13 community version. When I try to reinstall "Invoice module" I get the error below. How can I resolve this?

Error:

Odoo Server Error


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 527, in _tag_record

    raise Exception("Cannot update missing record %r" % xid)

Exception: Cannot update missing record 'base.default_user'


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 1326, in call_button

    action = self._call_kw(model, method, args, kwargs)

  File "/opt/odoo13/odoo/addons/web/controllers/main.py", line 1314, 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 "<decorator-gen-60>", 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 527, in _tag_record

    raise Exception("Cannot update missing record %r" % xid)

odoo.tools.convert.ParseError: "Cannot update missing record 'base.default_user'" while parsing /opt/odoo13/odoo/addons/account/security/account_security.xml:2, near

<odoo>

<data noupdate="0">


    <record model="ir.module.category" id="base.module_category_accounting_accounting">

        <field name="description">Helps you handle your accounting needs, if you are not an accountant, we suggest you to install only the Invoicing.</field>

        <field name="sequence">7</field>

    </record>


    <record id="group_account_invoice" model="res.groups">

        <field name="name">Billing</field>

        <field name="category_id" ref="base.module_category_accounting_accounting"/>

        <field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>

    </record>


    <record id="group_show_line_subtotals_tax_excluded" model="res.groups">

        <field name="name">Tax display B2B</field>

        <field name="comment">Show line subtotals without taxes (B2B)</field>

        <field name="category_id" ref="base.module_category_hidden"/>

    </record>


    <record id="group_show_line_subtotals_tax_included" model="res.groups">

        <field name="name">Tax display B2C</field>

        <field name="comment">Show line subtotals with taxes included (B2C)</field>

        <field name="category_id" ref="base.module_category_hidden"/>

    </record>


    <record id="group_account_user" model="res.groups">

        <field name="name">Show Full Accounting Features</field>

        <field name="category_id" ref="base.module_category_hidden"/>

    </record>


    <record id="group_account_manager" model="res.groups">

        <field name="name">Billing Administrator</field>

        <field name="category_id" ref="base.module_category_accounting_accounting"/>

        <field name="implied_ids" eval="[(4, ref('group_account_invoice'))]"/>

    </record>


    <record id="base.user_admin" model="res.users">

        <field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/>

    </record>


    <record id="base.group_system" model="res.groups">

        <field name="implied_ids" eval="[(4, ref('account.group_account_manager'))]"/>

    </record>


    <record id="group_warning_account" model="res.groups">

        <field name="name">A warning can be set on a partner (Account)</field>

        <field name="category_id" ref="base.module_category_hidden"/>

    </record>


    <record id="group_cash_rounding" model="res.groups">

        <field name="name">Allow the cash rounding management</field>

        <field name="category_id" ref="base.module_category_hidden"/>

    </record>


    <record id="group_fiscal_year" model="res.groups">

        <field name="name">Allow to define fiscal years of more or less than a year</field>

        <field name="category_id" ref="base.module_category_hidden"/>

    </record>



    <record id="account_analytic_line_rule_billing_user" model="ir.rule">

        <field name="name">account.analytic.line.billing.user</field>

        <field name="model_id" ref="analytic.model_account_analytic_line"/>

        <field name="domain_force">[(1, '=', 1)]</field>

        <field name="groups" eval="[(4, ref('account.group_account_invoice'))]"/>

        <field name="perm_create" eval="1"/>

        <field name="perm_write" eval="1"/>

        <field name="perm_unlink" eval="1"/>

        <field name="perm_read" eval="1"/>

    </record>


</data>



<data noupdate="1">

    <record id="base.group_public" model="res.groups">

        <field name="implied_ids" eval="[(4, ref('account.group_show_line_subtotals_tax_excluded'))]"/>

    </record>

    <record id="base.group_portal" model="res.groups">

        <field name="implied_ids" eval="[(4, ref('account.group_show_line_subtotals_tax_excluded'))]"/>

    </record>

    <record id="base.group_user" model="res.groups">

        <field name="implied_ids" eval="[(4, ref('account.group_show_line_subtotals_tax_excluded'))]"/>

    </record>


    <record id="base.default_user" model="res.users">

        <field name="groups_id" eval="[(4,ref('account.group_account_manager'))]"/>

    </record>


    <record id="account_move_comp_rule" model="ir.rule">

        <field name="name">Account Entry</field>

        <field name="model_id" ref="model_account_move"/>

        <field name="global" eval="True"/>

        <field name="domain_force">['|',('company_id','=',False),('company_id', 'in', company_ids)]</field>

    </record>


    <record id="account_move_line_comp_rule" model="ir.rule">

        <field name="name">Entry lines</field>

        <field name="model_id" ref="model_account_move_line"/>

        <field name="global" eval="True"/>

        <field name="domain_force">['|',('company_id','=',False),('company_id', 'in', company_ids)]</field>

    </record>


    <record id="journal_group_comp_rule" model="ir.rule">

        <field name="name">Journal Group multi-company</field>

        <field name="model_id" ref="model_account_journal_group"/>

        <field name="global" eval="True"/>

        <field name="domain_force">['|',('company_id','=',False),('company_id', 'in', company_ids)]</field>

    </record>


    <record id="journal_comp_rule" model="ir.rule">

        <field name="name">Journal multi-company</field>

        <field name="model_id" ref="model_account_journal"/>

        <field name="global" eval="True"/>

        <field name="domain_force">['|',('company_id','=',False),('company_id', 'in', company_ids)]</field>

    </record>


    <record id="account_comp_rule" model="ir.rule">

        <field name="name">Account multi-company</field>

        <field name="model_id" ref="model_account_account"/>

        <field name="global" eval="True"/>

        <field name="domain_force">['|',('company_id','=',False),('company_id', 'in', company_ids)]</field>

    </record>


    <record id="account_root_comp_rule" model="ir.rule">

        <field name="name">Account Root multi-company</field>

        <field name="model_id" ref="model_account_root"/>

        <field name="global" eval="True"/>

        <field name="domain_force">['|',('company_id','=',False),('company_id', 'in', company_ids)]</field>

    </record>


    <record id="tax_comp_rule" model="ir.rule">

        <field name="name">Tax multi-company</field>

        <field name="model_id" ref="model_account_tax"/>

        <field name="global" eval="True"/>

        <field name="domain_force">['|',('company_id','=',False),('company_id', 'in', company_ids)]</field>

    </record>


    <record id="invoice_analysis_comp_rule" model="ir.rule">

        <field name="name">Invoice Analysis multi-company</field>

        <field name="model_id" ref="model_account_invoice_report"/>

        <field name="global" eval="True"/>

        <field name="domain_force">['|',('company_id','=',False),('company_id', 'in', company_ids)]</field>

    </record>


    <record id="account_fiscal_position_comp_rule" model="ir.rule">

        <field name="name">Account fiscal Mapping company rule</field>

        <field name="model_id" ref="model_account_fiscal_position"/>

        <field name="global" eval="True"/>

        <field name="domain_force">['|',('company_id','=',False),('company_id', 'in', company_ids)]</field>

    </record>


    <record model="ir.rule" id="account_bank_statement_comp_rule">

        <field name="name">Account bank statement company rule</field>

        <field name="model_id" ref="model_account_bank_statement"/>

        <field name="global" eval="True"/>

        <field name="domain_force">['|',('company_id','=',False),('company_id', 'in', company_ids)]</field>

    </record>


    <record model="ir.rule" id="account_bank_statement_line_comp_rule">

        <field name="name">Account bank statement line company rule</field>

        <field name="model_id" ref="model_account_bank_statement_line"/>

        <field name="global" eval="True"/>

        <field name="domain_force">['|',('company_id','=',False),('company_id', 'in', company_ids)]</field>

    </record>


    <record model="ir.rule" id="account_reconcile_model_template_comp_rule">

        <field name="name">Account reconcile model template company rule</field>

        <field name="model_id" ref="model_account_reconcile_model"/>

        <field name="global" eval="True"/>

        <field name="domain_force">['|',('company_id','=',False),('company_id', 'in', company_ids)]</field>

    </record>


    <record model="ir.rule" id="account_payment_comp_rule">

        <field name="name">Account payment company rule</field>

        <field name="model_id" ref="model_account_payment"/>

        <field name="global" eval="True"/>

        <field name="domain_force">['|',('company_id','=',False),('company_id', 'in', company_ids)]</field>

    </record>


    <record model="ir.rule" id="account_payment_term_comp_rule">

        <field name="name">Account payment term company rule</field>

        <field name="model_id" ref="model_account_payment_term"/>

        <field name="domain_force">['|',('company_id','=',False),('company_id', 'in', company_ids)]</field>

    </record>


    <!-- Billing record rules for account.move -->


    <record id="account_move_see_all" model="ir.rule">

        <field name="name">All Journal Entries</field>

        <field ref="model_account_move" name="model_id"/>

        <field name="domain_force">[(1, '=', 1)]</field>

        <field name="groups" eval="[(4, ref('account.group_account_invoice'))]"/>

    </record>


    <record id="account_move_line_see_all" model="ir.rule">

        <field name="name">All Journal Items</field>

        <field ref="model_account_move_line" name="model_id"/>

        <field name="domain_force">[(1, '=', 1)]</field>

        <field name="groups" eval="[(4, ref('account.group_account_invoice'))]"/>

    </record>


    <!-- Portal for invoice move and invoice move lines -->

    <record id="account_invoice_rule_portal" model="ir.rule">

        <field name="name">Portal Personal Account Invoices</field>

        <field name="model_id" ref="account.model_account_move"/>

        <field name="domain_force">[('type', 'in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund')), ('message_partner_ids','child_of',[user.commercial_partner_id.id])]</field>

        <field name="groups" eval="[(4, ref('base.group_portal'))]"/>

    </record>


    <record id="account_invoice_line_rule_portal" model="ir.rule">

        <field name="name">Portal Invoice Lines</field>

        <field name="model_id" ref="account.model_account_move_line"/>

        <field name="domain_force">[('move_id.type', 'in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund')), ('move_id.message_partner_ids','child_of',[user.commercial_partner_id.id])]</field>

        <field name="groups" eval="[(4, ref('base.group_portal'))]"/>

    </record>

</data>

</odoo>

Avatar
Discard
Best Answer

Hello ken,

try to upgrade "base" module

Avatar
Discard
Author

Thank you, upgrading the "base" module resolved the error

Related Posts Replies Views Activity
1
Sep 24
429
1
Aug 22
1572
0
Oct 16
1985
3
Jul 15
3102
1
Mar 15
2792