Skip to Content
Menu
This question has been flagged
1 Reply
3092 Views

Hello,  I have many system provided modules installed and working on V13.  Now tried to install the "Project" module but got below error:

Error:
Odoo Server Error

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 745, in get
    value = self._data[field][record._ids[0]]
KeyError: 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1004, in __get__
    value = env.cache.get(record, self)
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 751, in get
    raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: ('res.users(1,).lang', None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 712, in parse
    self._tag_root(de)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 674, in _tag_root
    f(rec)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 674, in _tag_root
    f(rec)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 577, in _tag_record
    record = model._load_records([data], self.mode == 'update')
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 4146, in _load_records
    records = self._load_records_create([data['values'] for data in to_create])
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 4060, in _load_records_create
    return self.create(values)
  File "<decorator-gen-189>", line 2, in create
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 317, in _model_create_single
    return self.browse().concat(*(create(self, vals) for vals in arg))
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 317, in <genexpr>
    return self.browse().concat(*(create(self, vals) for vals in arg))
  File "/usr/lib/python3/dist-packages/odoo/addons/project/models/project.py", line 292, in create
    project = super(Project, self).create(vals)
  File "<decorator-gen-103>", line 2, in create
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 314, in _model_create_single
    return create(self, arg)
  File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_alias.py", line 219, in create
    record = super(AliasMixin, self.with_context(
  File "<decorator-gen-109>", line 2, in create
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 335, in _model_create_multi
    return create(self, [arg])
  File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_thread.py", line 295, in create
    track_threads = threads.with_lang()
  File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_thread.py", line 429, in with_lang
    return self.with_context(lang=self.env.user.lang)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1028, in __get__
    self.compute_value(recs)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1113, in compute_value
    records._compute_field_value(self)
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 3983, in _compute_field_value
    field.compute(self)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 579, in _compute_related
    record[self.name] = self._process_related(value[self.related_field.name])
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 5718, in __setitem__
    return self._fields[key].__set__(self, value)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1074, in __set__
    self.write(protected_records, value)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 953, in write
    cache_value = self.convert_to_cache(value, records)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 2262, in convert_to_cache
    raise ValueError("Wrong value for %s: %r" % (self, value))
ValueError: Wrong value for res.users.lang: 'en_US'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 624, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 310, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 14, in reraise
    raise value
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 669, in dispatch
    result = self._call_function(**self.params)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 350, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 339, in checked_call
    result = self.endpoint(*a, **kw)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 915, in __call__
    return self.method(*args, **kw)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 515, in response_wrap
    response = f(*args, **kw)
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1326, in call_button
    action = self._call_kw(model, method, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1314, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 387, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/usr/lib/python3/dist-packages/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 "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 72, in check_and_log
    return method(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 463, in button_immediate_install
    return self._button_immediate_function(type(self).button_install)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 573, in _button_immediate_function
    modules.registry.Registry.new(self._cr.dbname, update_module=True)
  File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 86, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 421, in load_modules
    processed_modules += load_marked_modules(cr, graph,
  File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 313, in load_marked_modules
    loaded, processed = load_module_graph(
  File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 225, in load_module_graph
    load_data(cr, idref, mode, kind='data', package=package, report=report)
  File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 68, in load_data
    tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 736, in convert_file
    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 803, in convert_xml_import
    obj.parse(doc.getroot())
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 715, in parse
    pycompat.reraise(
  File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 13, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 712, in parse
    self._tag_root(de)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 674, in _tag_root
    f(rec)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 674, in _tag_root
    f(rec)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 577, in _tag_record
    record = model._load_records([data], self.mode == 'update')
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 4146, in _load_records
    records = self._load_records_create([data['values'] for data in to_create])
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 4060, in _load_records_create
    return self.create(values)
  File "<decorator-gen-189>", line 2, in create
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 317, in _model_create_single
    return self.browse().concat(*(create(self, vals) for vals in arg))
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 317, in <genexpr>
    return self.browse().concat(*(create(self, vals) for vals in arg))
  File "/usr/lib/python3/dist-packages/odoo/addons/project/models/project.py", line 292, in create
    project = super(Project, self).create(vals)
  File "<decorator-gen-103>", line 2, in create
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 314, in _model_create_single
    return create(self, arg)
  File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_alias.py", line 219, in create
    record = super(AliasMixin, self.with_context(
  File "<decorator-gen-109>", line 2, in create
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 335, in _model_create_multi
    return create(self, [arg])
  File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_thread.py", line 295, in create
    track_threads = threads.with_lang()
  File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_thread.py", line 429, in with_lang
    return self.with_context(lang=self.env.user.lang)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1028, in __get__
    self.compute_value(recs)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1113, in compute_value
    records._compute_field_value(self)
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 3983, in _compute_field_value
    field.compute(self)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 579, in _compute_related
    record[self.name] = self._process_related(value[self.related_field.name])
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 5718, in __setitem__
    return self._fields[key].__set__(self, value)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1074, in __set__
    self.write(protected_records, value)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 953, in write
    cache_value = self.convert_to_cache(value, records)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 2262, in convert_to_cache
    raise ValueError("Wrong value for %s: %r" % (self, value))
odoo.tools.convert.ParseError: "Wrong value for res.users.lang: 'en_US'" while parsing /usr/lib/python3/dist-packages/odoo/addons/project/data/project_data.xml:2, near
<odoo>
    <data noupdate="1">

        <record id="ir_cron_rating_project" model="ir.cron">
            <field name="name">Project: Send rating</field>
            <field name="model_id" ref="project.model_project_project"/>
            <field name="state">code</field>
            <field name="code">model._send_rating_all()</field>
            <field name="interval_type">days</field>
            <field name="numbercall">-1</field>
        </record>

        <!-- Task-related subtypes for messaging / Chatter -->
        <record id="mt_task_new" model="mail.message.subtype">
            <field name="name">Task Created</field>
            <field name="res_model">project.task</field>
            <field name="default" eval="False"/>
            <field name="hidden" eval="True"/>
            <field name="description">Task Created</field>
        </record>
        <record id="mt_task_blocked" model="mail.message.subtype">
            <field name="name">Task Blocked</field>
            <field name="res_model">project.task</field>
            <field name="default" eval="False"/>
            <field name="description">Task blocked</field>
        </record>
        <record id="mt_task_ready" model="mail.message.subtype">
            <field name="name">Task Ready</field>
            <field name="res_model">project.task</field>
            <field name="default" eval="False"/>
            <field name="description">Task ready for Next Stage</field>
        </record>
        <record id="mt_task_stage" model="mail.message.subtype">
            <field name="name">Stage Changed</field>
            <field name="res_model">project.task</field>
            <field name="default" eval="False"/>
            <field name="description">Stage changed</field>
        </record>
        <record id="mt_task_rating" model="mail.message.subtype">
            <field name="name">Task Rating</field>
            <field name="res_model">project.task</field>
            <field name="default" eval="True"/>
            <field name="description">Ratings</field>
        </record>
        <!-- Project-related subtypes for messaging / Chatter -->
        <record id="mt_project_task_new" model="mail.message.subtype">
            <field name="name">Task Created</field>
            <field name="sequence">10</field>
            <field name="res_model">project.project</field>
            <field name="default" eval="False"/>
            <field name="parent_id" eval="ref('mt_task_new')"/>
            <field name="relation_field">project_id</field>
        </record>
        <record id="mt_project_task_blocked" model="mail.message.subtype">
            <field name="name">Task Blocked</field>
            <field name="sequence">11</field>
            <field name="res_model">project.project</field>
            <field name="default" eval="False"/>
            <field name="parent_id" eval="ref('mt_task_blocked')"/>
            <field name="relation_field">project_id</field>
        </record>
        <record id="mt_project_task_ready" model="mail.message.subtype">
            <field name="name">Task Ready</field>
            <field name="sequence">12</field>
            <field name="res_model">project.project</field>
            <field name="default" eval="False"/>
            <field name="parent_id" eval="ref('mt_task_ready')"/>
            <field name="relation_field">project_id</field>
        </record>
        <record id="mt_project_task_stage" model="mail.message.subtype">
            <field name="name">Task Stage Changed</field>
            <field name="sequence">13</field>
            <field name="res_model">project.project</field>
            <field name="default" eval="False"/>
            <field name="parent_id" eval="ref('mt_task_stage')"/>
            <field name="relation_field">project_id</field>
        </record>
        <record id="mt_project_task_rating" model="mail.message.subtype">
            <field name="name">Task Rating</field>
            <field name="sequence">14</field>
            <field name="res_model">project.project</field>
            <field name="default" eval="True"/>
            <field name="parent_id" eval="ref('mt_task_rating')"/>
            <field name="relation_field">project_id</field>
        </record>
    </data>

    <data noupdate="1">

        <record forcecreate="False" id="project_project_data" model="project.project">
            <field name="name">Start here to discover Odoo</field>
            <field name="privacy_visibility">followers</field>
            <field name="user_id" ref="base.user_admin"/>
            <field name="active" eval="False"/>
            <field name="alias_name">discover</field>
            <field name="alias_model_id" ref="model_project_task"/>
            <field name="alias_contact">everyone</field>
            <field name="alias_defaults">{'project_id': 1}</field>
            <field name="alias_force_thread_id">0</field>
            <field name="alias_parent_model_id" ref="model_project_project"/>
        </record>

        <record forcecreate="False" id="project_stage_data_0" model="project.task.type">
            <field name="sequence">1</field>
            <field name="name">New</field>
            <field name="project_ids" eval="[(4, ref('project_project_data'))]"/>
        </record>

        <record forcecreate="False" id="project_stage_data_1" model="project.task.type">
            <field name="sequence">2</field>
            <field name="name">Basic</field>
            <field name="project_ids" eval="[(4, ref('project_project_data'))]"/>
        </record>

        <record forcecreate="False" id="project_stage_data_2" model="project.task.type">
            <field name="sequence">3</field>
            <field name="name">Advanced</field>
            <field name="project_ids" eval="[(4, ref('project_project_data'))]"/>
        </record>

        <record forcecreate="False" id="project_task_data_0" model="project.task">
            <field name="sequence">1</field>
            <field name="user_id" ref="base.user_admin"/>
            <field name="priority">0</field>
            <field name="project_id" ref="project.project_project_data"/>
            <field name="active" eval="False"/>
            <field name="name">Welcome to Odoo</field>
            <field name="description">Welcome! This project has the objective to show you all the main feature in the project app. Each card will help you to manage your projects easily in a few minutes.</field>
            <field name="color">2</field>
            <field name="stage_id" ref="project_stage_data_0"/>
        </record>

        <record forcecreate="False" id="project_task_data_1" model="project.task">
            <field name="sequence">2</field>
            <field name="user_id" ref="base.user_admin"/>
            <field name="priority">0</field>
            <field name="project_id" ref="project.project_project_data"/>
            <field name="active" eval="False"/>
            <field name="name">Try to play with the search bar. Use the filters</field>
            <field name="description">Come back to the tasks view to play with the filters. They are up to the form</field>
            <field name="stage_id" ref="project_stage_data_0"/>
        </record>

        <record forcecreate="False" id="project_task_data_5" model="project.task">
            <field name="sequence">3</field>
            <field name="user_id" ref="base.user_admin"/>
            <field name="priority">0</field>
            <field name="project_id" ref="project.project_project_data"/>
            <field name="active" eval="False"/>
            <field name="name">Try to drag a task wherever your want</field>
            <field name="kanban_state">done</field>
            <field name="stage_id" ref="project_stage_data_0"/>
        </record>

        <record forcecreate="False" id="project_task_data_2" model="project.task">
            <field name="sequence">4</field>
            <field name="user_id" ref="base.user_admin"/>
            <field name="priority">0</field>
            <field name="project_id" ref="project.project_project_data"/>
            <field name="active" eval="False"/>
            <field name="name">Guess what happens if you set this task as favorite?</field>
            <field name="description">Click on the top left star to change the priority and come back in the tasks view. You task is now at the top of the column.</field>
            <field name="stage_id" ref="project_stage_data_0"/>
        </record>

        <record forcecreate="False" id="project_task_data_4" model="project.task">
            <field name="user_id" ref="base.user_admin"/>
            <field name="priority">0</field>
            <field name="project_id" ref="project.project_project_data"/>
            <field name="active" eval="False"/>
            <field name="name">Use the chatter to collaborate with your members</field>
            <field name="description">The chatter is right below</field>
            <field name="stage_id" ref="project_stage_data_2"/>
        </record>

        <record forcecreate="False" id="msg_task_4" model="mail.message">
            <field name="subject">Converse with your customers and colleagues</field>
            <field name="model">project.task</field>
            <field name="author_id" ref="base.partner_root"/>
            <field name="res_id" ref="project_task_data_4"/>
            <field name="body">Use this chatter to send emails. Add new people in the followers list, to make them aware about the main changes about this task!</field>
            <field name="message_type">email</field>
            <field name="subtype_id" ref="mail.mt_comment"/>
        </record>

        <record forcecreate="False" id="project_tag_data" model="project.tags">
            <field name="name">Need Assistance</field>
            <field name="color" eval="5"/>
        </record>

        <record forcecreate="False" id="project_task_data_6" model="project.task">
            <field name="sequence">3</field>
            <field name="user_id" ref="base.user_admin"/>
            <field name="priority">0</field>
            <field name="project_id" ref="project.project_project_data"/>
            <field name="active" eval="False"/>
            <field name="name">Use tags to organize your tasks</field>
            <field name="kanban_state">blocked</field>
            <field name="stage_id" ref="project_stage_data_1"/>
            <field name="description">Tags will be represented by colored bars on the card</field>
            <field name="tag_ids" eval="[(6,0,[ref('project.project_tag_data')])]"/>
        </record>

        <record forcecreate="False" id="project_task_data_12" model="project.task">
            <field name="sequence">4</field>
            <field name="user_id" ref="base.user_admin"/>
            <field name="priority">0</field>
            <field name="project_id" ref="project.project_project_data"/>
            <field name="active" eval="False"/>
            <field name="color">3</field>
            <field name="name">Try to customize this card. Change its background.</field>
            <field name="description">Use the edit icon on the card to customize the background.</field>
            <field name="stage_id" ref="project_stage_data_1"/>
        </record>

        <record forcecreate="False" id="project_task_data_13" model="project.task">
            <field name="sequence">5</field>
            <field name="user_id" ref="base.user_admin"/>
            <field name="priority">0</field>
            <field name="project_id" ref="project.project_project_data"/>
            <field name="active" eval="False"/>
            <field name="name">Set this task as 'Ready for next stage' to proceed further in the process</field>
            <field name="description">You can change its state by clicking on the small circle on the card, or here, next to the task title.</field>
            <field name="stage_id" ref="project_stage_data_1"/>
        </record>

        <record forcecreate="False" id="project_task_data_7" model="project.task">
            <field name="user_id" ref="base.user_admin"/>
            <field name="priority">0</field>
            <field name="project_id" ref="project.project_project_data"/>
            <field name="active" eval="False"/>
            <field name="name">Finished with this stage? Archive it !</field>
            <field name="stage_id" ref="project_stage_data_2"/>
            <field name="description">Click on the gear icon on the column, to archive the stage, with all the tasks in it. You can also archive one card only, by clicking on the button in the task form view.</field>
        </record>

        <record forcecreate="False" id="project_task_data_9" model="project.task">
            <field name="user_id" ref="base.user_admin"/>
            <field name="priority">0</field>
            <field name="project_id" ref="project.project_project_data"/>
            <field name="active" eval="False"/>
            <field name="name">You want to add a stage? Add a new column !</field>
            <field name="stage_id" ref="project_stage_data_2"/>
            <field name="description">Click on the last column to create a stage. The name depends on the process. For example, in a customer service process, a stage name may be 'Backlog', 'Waiting Customer Feedback' or 'Done'.</field>
        </record>

        <record forcecreate="False" id="project_task_data_11" model="project.task">
            <field name="user_id" ref="base.user_admin"/>
            <field name="priority">0</field>
            <field name="project_id" ref="project.project_project_data"/>
            <field name="active" eval="False"/>
            <field name="name">You can set a deadline on a task</field>
            <field name="stage_id" ref="project_stage_data_1"/>
            <field name="date_deadline" eval="datetime.now()+timedelta(days=30)"/>
        </record>

        <record forcecreate="False" id="project_task_data_14" model="project.task">
            <field name="user_id" ref="base.user_admin"/>
            <field name="priority">0</field>
            <field name="project_id" ref="project.project_project_data"/>
            <field name="active" eval="False"/>
            <field name="name">Send a message with a picture as attachment, and see what happens!</field>
            <field name="stage_id" ref="project_stage_data_2"/>
            <field name="description">In the chatter, sending an email with an attachment will display the picture on the card. When there are several image attachments, you can choose which one you want to display.</field>
        </record>

    </data>
</odoo>

Avatar
Discard
Author Best Answer

This morning I was able to add the Project module, not sure what made the difference.

I did two things since the original post:

(1) ran "apt update" & upgrade, which updated the nightly ODOO V13 release. (which I've also done many times before).

(2) changed my ODOO account preference language from English(UK) to English(US).   Since the complaint above stated something about "language".  odoo.exceptions.CacheMiss: ('res.users(1,).lang', None)

Thanks.

Avatar
Discard
Related Posts Replies Views Activity
1
Apr 21
4590
2
Apr 15
3538
3
Jan 24
11023
1
Mar 15
2965
1
Mar 24
3016