matteopolleschi / basic_subscription

Basic subscription module for odoo 12
1 stars 3 forks source link

This module on odoo 13 #1

Closed gehtalles-de closed 4 years ago

gehtalles-de commented 4 years ago

Hi! I just tried to install this module in odoo v13 Community Edition.

Unfortunately, thie following error code comes up:

Error:
Odoo Server Error

Traceback (most recent call last):
  File "/odoo/odoo-server/odoo/tools/cache.py", line 85, in lookup
    r = d[key]
  File "/odoo/odoo-server/odoo/tools/func.py", line 69, in wrapper
    return func(self, *args, **kwargs)
  File "/odoo/odoo-server/odoo/tools/lru.py", line 44, in __getitem__
    a = self.d[obj].me
KeyError: ('ir.model.data', <function IrModelData.xmlid_lookup at 0x7f3d10c9aca0>, 'basic_subscription.group_basic_subscription_view')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/odoo/odoo-server/odoo/tools/safe_eval.py", line 351, in safe_eval
    return unsafe_eval(c, globals_dict, locals_dict)
  File "", line 1, in <module>
  File "/odoo/odoo-server/odoo/tools/convert.py", line 657, in id_get
    res = self.model_id_get(id_str, raise_if_not_found)
  File "/odoo/odoo-server/odoo/tools/convert.py", line 663, in model_id_get
    return self.env['ir.model.data'].xmlid_to_res_model_res_id(id_str, raise_if_not_found=raise_if_not_found)
  File "/odoo/odoo-server/odoo/addons/base/models/ir_model.py", line 1681, in xmlid_to_res_model_res_id
    return self.xmlid_lookup(xmlid)[1:3]
  File "<decorator-gen-25>", line 2, in xmlid_lookup
  File "/odoo/odoo-server/odoo/tools/cache.py", line 90, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/odoo/odoo-server/odoo/addons/base/models/ir_model.py", line 1670, in xmlid_lookup
    raise ValueError('External ID not found in the system: %s' % xmlid)
ValueError: External ID not found in the system: basic_subscription.group_basic_subscription_view

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/odoo/odoo-server/odoo/tools/convert.py", line 712, in parse
    self._tag_root(de)
  File "/odoo/odoo-server/odoo/tools/convert.py", line 674, in _tag_root
    f(rec)
  File "/odoo/odoo-server/odoo/tools/convert.py", line 563, in _tag_record
    f_val = _eval_xml(self, field, env)
  File "/odoo/odoo-server/odoo/tools/convert.py", line 117, in _eval_xml
    return safe_eval(a_eval, idref2)
  File "/odoo/odoo-server/odoo/tools/convert.py", line 32, in <lambda>
    safe_eval = lambda expr, ctx={}: s_eval(expr, ctx, nocopy=True)
  File "/odoo/odoo-server/odoo/tools/safe_eval.py", line 374, in safe_eval
    pycompat.reraise(ValueError, ValueError('%s: "%s" while evaluating\n%r' % (ustr(type(e)), ustr(e), expr)), exc_info[2])
  File "/odoo/odoo-server/odoo/tools/pycompat.py", line 13, in reraise
    raise value.with_traceback(tb)
  File "/odoo/odoo-server/odoo/tools/safe_eval.py", line 351, in safe_eval
    return unsafe_eval(c, globals_dict, locals_dict)
  File "", line 1, in <module>
  File "/odoo/odoo-server/odoo/tools/convert.py", line 657, in id_get
    res = self.model_id_get(id_str, raise_if_not_found)
  File "/odoo/odoo-server/odoo/tools/convert.py", line 663, in model_id_get
    return self.env['ir.model.data'].xmlid_to_res_model_res_id(id_str, raise_if_not_found=raise_if_not_found)
  File "/odoo/odoo-server/odoo/addons/base/models/ir_model.py", line 1681, in xmlid_to_res_model_res_id
    return self.xmlid_lookup(xmlid)[1:3]
  File "<decorator-gen-25>", line 2, in xmlid_lookup
  File "/odoo/odoo-server/odoo/tools/cache.py", line 90, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/odoo/odoo-server/odoo/addons/base/models/ir_model.py", line 1670, in xmlid_lookup
    raise ValueError('External ID not found in the system: %s' % xmlid)
ValueError: <class 'ValueError'>: "External ID not found in the system: basic_subscription.group_basic_subscription_view" while evaluating
"[(4, ref('basic_subscription.group_basic_subscription_view'))]"

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/odoo/odoo-server/odoo/http.py", line 624, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/odoo/odoo-server/odoo/http.py", line 310, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/odoo/odoo-server/odoo/tools/pycompat.py", line 14, in reraise
    raise value
  File "/odoo/odoo-server/odoo/http.py", line 669, in dispatch
    result = self._call_function(**self.params)
  File "/odoo/odoo-server/odoo/http.py", line 350, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/odoo/odoo-server/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/odoo/odoo-server/odoo/http.py", line 339, in checked_call
    result = self.endpoint(*a, **kw)
  File "/odoo/odoo-server/odoo/http.py", line 915, in __call__
    return self.method(*args, **kw)
  File "/odoo/odoo-server/odoo/http.py", line 515, in response_wrap
    response = f(*args, **kw)
  File "/odoo/odoo-server/addons/web/controllers/main.py", line 1326, in call_button
    action = self._call_kw(model, method, args, kwargs)
  File "/odoo/odoo-server/addons/web/controllers/main.py", line 1314, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/odoo/odoo-server/odoo/api.py", line 387, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/odoo/odoo-server/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 "/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 72, in check_and_log
    return method(self, *args, **kwargs)
  File "/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 463, in button_immediate_install
    return self._button_immediate_function(type(self).button_install)
  File "/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 573, in _button_immediate_function
    modules.registry.Registry.new(self._cr.dbname, update_module=True)
  File "/odoo/odoo-server/odoo/modules/registry.py", line 86, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/odoo/odoo-server/odoo/modules/loading.py", line 421, in load_modules
    processed_modules += load_marked_modules(cr, graph,
  File "/odoo/odoo-server/odoo/modules/loading.py", line 313, in load_marked_modules
    loaded, processed = load_module_graph(
  File "/odoo/odoo-server/odoo/modules/loading.py", line 225, in load_module_graph
    load_data(cr, idref, mode, kind='data', package=package, report=report)
  File "/odoo/odoo-server/odoo/modules/loading.py", line 68, in load_data
    tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)
  File "/odoo/odoo-server/odoo/tools/convert.py", line 736, in convert_file
    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
  File "/odoo/odoo-server/odoo/tools/convert.py", line 803, in convert_xml_import
    obj.parse(doc.getroot())
  File "/odoo/odoo-server/odoo/tools/convert.py", line 715, in parse
    pycompat.reraise(
  File "/odoo/odoo-server/odoo/tools/pycompat.py", line 13, in reraise
    raise value.with_traceback(tb)
  File "/odoo/odoo-server/odoo/tools/convert.py", line 712, in parse
    self._tag_root(de)
  File "/odoo/odoo-server/odoo/tools/convert.py", line 674, in _tag_root
    f(rec)
  File "/odoo/odoo-server/odoo/tools/convert.py", line 563, in _tag_record
    f_val = _eval_xml(self, field, env)
  File "/odoo/odoo-server/odoo/tools/convert.py", line 117, in _eval_xml
    return safe_eval(a_eval, idref2)
  File "/odoo/odoo-server/odoo/tools/convert.py", line 32, in <lambda>
    safe_eval = lambda expr, ctx={}: s_eval(expr, ctx, nocopy=True)
  File "/odoo/odoo-server/odoo/tools/safe_eval.py", line 374, in safe_eval
    pycompat.reraise(ValueError, ValueError('%s: "%s" while evaluating\n%r' % (ustr(type(e)), ustr(e), expr)), exc_info[2])
  File "/odoo/odoo-server/odoo/tools/pycompat.py", line 13, in reraise
    raise value.with_traceback(tb)
  File "/odoo/odoo-server/odoo/tools/safe_eval.py", line 351, in safe_eval
    return unsafe_eval(c, globals_dict, locals_dict)
  File "", line 1, in <module>
  File "/odoo/odoo-server/odoo/tools/convert.py", line 657, in id_get
    res = self.model_id_get(id_str, raise_if_not_found)
  File "/odoo/odoo-server/odoo/tools/convert.py", line 663, in model_id_get
    return self.env['ir.model.data'].xmlid_to_res_model_res_id(id_str, raise_if_not_found=raise_if_not_found)
  File "/odoo/odoo-server/odoo/addons/base/models/ir_model.py", line 1681, in xmlid_to_res_model_res_id
    return self.xmlid_lookup(xmlid)[1:3]
  File "<decorator-gen-25>", line 2, in xmlid_lookup
  File "/odoo/odoo-server/odoo/tools/cache.py", line 90, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/odoo/odoo-server/odoo/addons/base/models/ir_model.py", line 1670, in xmlid_lookup
    raise ValueError('External ID not found in the system: %s' % xmlid)
odoo.tools.convert.ParseError: "<class 'ValueError'>: "External ID not found in the system: basic_subscription.group_basic_subscription_view" while evaluating
"[(4, ref('basic_subscription.group_basic_subscription_view'))]"" while parsing /odoo/custom/addons/subscriptions-git/security/basic_subscription_security.xml:2, near
<odoo>

    <record model="ir.module.category" id="module_category_subscription_management">
        <field name="name">Subscriptions</field>
        <field name="description">Helps you handle subscriptions and recurring invoicing.</field>
        <field name="sequence">3</field>
    </record>

    <record id="group_basic_subscription_view" model="res.groups">
        <field name="name">See Subscriptions</field>
        <field name="category_id" ref="module_category_subscription_management"/>
        <field name="comment">The user will have read access to subscriptions.</field>
    </record>

    <record id="group_basic_subscription_manager" model="res.groups">
        <field name="name">Manage Subscriptions</field>
        <field name="category_id" ref="module_category_subscription_management"/>
        <field name="comment">The user will have write access to Subscriptions.</field>
        <field name="implied_ids" eval="[(4, ref('basic_subscription.group_basic_subscription_view'))]"/>
        <field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
    </record>

    <data noupdate="1">
        <record id="base.default_user" model="res.users">
            <field name="groups_id" eval="[(4,ref('basic_subscription.group_basic_subscription_manager'))]"/>
        </record>

        <record id="subscription_public" model="ir.rule">
            <field name="name">Subscription public access</field>
            <field name="model_id" ref="basic_subscription.model_basic_subscription"/>
            <field name="domain_force">[('type','=','subscription')]</field>
            <field name="groups" eval="[(4, ref('base.group_public'))]"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_unlink" eval="False"/>
        </record>
    </data>

</odoo>

Do you have any idea how to work this out?

matteopolleschi commented 4 years ago

Hi! This module is not compatible with odoo 13 unfortunately, it is under development for odoo 12