Giter Club home page Giter Club logo

l10n_co_res_partner's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

l10n_co_res_partner's Issues

AttributeError: type object 'ir.model.fields' has no attribute 'formbuilder_whitelist'

Hi @dkrimmer84 I am using the 12.0 branch for l10n_co_res_partner module on Odoo CE 12 version, and trying to install it, return this error:

Error:
Odoo Server Error

Traceback (most recent call last):
  File "/home/macagua/projects/odoo12x/odoo/tools/convert.py", line 758, in parse
    self._tags[rec.tag](rec, de, mode=mode)
  File "/home/macagua/projects/odoo12x/odoo/tools/convert.py", line 343, in _tag_function
    _eval_xml(self, rec, env)
  File "/home/macagua/projects/odoo12x/odoo/tools/convert.py", line 194, in _eval_xml
    return odoo.api.call_kw(model, method, args, {})
  File "/home/macagua/projects/odoo12x/odoo/api.py", line 752, in call_kw
    method = getattr(type(model), name)
AttributeError: type object 'ir.model.fields' has no attribute 'formbuilder_whitelist'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/macagua/projects/odoo12x/odoo/http.py", line 656, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/macagua/projects/odoo12x/odoo/http.py", line 314, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/home/macagua/projects/odoo12x/odoo/tools/pycompat.py", line 87, in reraise
    raise value
  File "/home/macagua/projects/odoo12x/odoo/http.py", line 698, in dispatch
    result = self._call_function(**self.params)
  File "/home/macagua/projects/odoo12x/odoo/http.py", line 346, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/macagua/projects/odoo12x/odoo/service/model.py", line 98, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/macagua/projects/odoo12x/odoo/http.py", line 339, in checked_call
    result = self.endpoint(*a, **kw)
  File "/home/macagua/projects/odoo12x/odoo/http.py", line 941, in __call__
    return self.method(*args, **kw)
  File "/home/macagua/projects/odoo12x/odoo/http.py", line 519, in response_wrap
    response = f(*args, **kw)
  File "/home/macagua/projects/odoo12x/addons/web/controllers/main.py", line 966, in call_button
    action = self._call_kw(model, method, args, {})
  File "/home/macagua/projects/odoo12x/addons/web/controllers/main.py", line 954, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/home/macagua/projects/odoo12x/odoo/api.py", line 759, in call_kw
    return _call_kw_multi(method, model, args, kwargs)
  File "/home/macagua/projects/odoo12x/odoo/api.py", line 746, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "<decorator-gen-61>", line 2, in button_immediate_install
  File "/home/macagua/projects/odoo12x/odoo/addons/base/models/ir_module.py", line 74, in check_and_log
    return method(self, *args, **kwargs)
  File "/home/macagua/projects/odoo12x/odoo/addons/base/models/ir_module.py", line 445, in button_immediate_install
    return self._button_immediate_function(type(self).button_install)
  File "/home/macagua/projects/odoo12x/odoo/addons/base/models/ir_module.py", line 561, in _button_immediate_function
    modules.registry.Registry.new(self._cr.dbname, update_module=True)
  File "/home/macagua/projects/odoo12x/odoo/modules/registry.py", line 86, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/home/macagua/projects/odoo12x/odoo/modules/loading.py", line 421, in load_modules
    loaded_modules, update_module, models_to_check)
  File "/home/macagua/projects/odoo12x/odoo/modules/loading.py", line 313, in load_marked_modules
    perform_checks=perform_checks, models_to_check=models_to_check
  File "/home/macagua/projects/odoo12x/odoo/modules/loading.py", line 222, in load_module_graph
    load_data(cr, idref, mode, kind='data', package=package, report=report)
  File "/home/macagua/projects/odoo12x/odoo/modules/loading.py", line 68, in load_data
    tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)
  File "/home/macagua/projects/odoo12x/odoo/tools/convert.py", line 802, in convert_file
    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
  File "/home/macagua/projects/odoo12x/odoo/tools/convert.py", line 865, in convert_xml_import
    obj.parse(doc.getroot(), mode=mode)
  File "/home/macagua/projects/odoo12x/odoo/tools/convert.py", line 764, in parse
    exc_info[2]
  File "/home/macagua/projects/odoo12x/odoo/tools/pycompat.py", line 86, in reraise
    raise value.with_traceback(tb)
  File "/home/macagua/projects/odoo12x/odoo/tools/convert.py", line 758, in parse
    self._tags[rec.tag](rec, de, mode=mode)
  File "/home/macagua/projects/odoo12x/odoo/tools/convert.py", line 343, in _tag_function
    _eval_xml(self, rec, env)
  File "/home/macagua/projects/odoo12x/odoo/tools/convert.py", line 194, in _eval_xml
    return odoo.api.call_kw(model, method, args, {})
  File "/home/macagua/projects/odoo12x/odoo/api.py", line 752, in call_kw
    method = getattr(type(model), name)
odoo.tools.convert.ParseError: "type object 'ir.model.fields' has no attribute 'formbuilder_whitelist'" while parsing /home/macagua/projects/odoo12x/extra-addons/l10n_co_res_partner/views/l10n_co_res_partner.xml:218, near
<function model="ir.model.fields" name="formbuilder_whitelist">
            <value>res.partner</value>
            <value eval="[                 'name', 'phone', 'email',                 'city', 'zip', 'street', 'street2', 'state_id', 'country_id',                 'vat', 'company_name', 'district_id','mobile','partner_id',                 'x_name1','x_name2','x_lastname1','x_lastname2',                  'xidentification','xcity', 'doctype', 'personType',                  'verificationDigit', 'pos_name', 'companyBrandName', 'is_company'             ]"/>
        </function>

Existing Contacts: Fields are shown although it's defined as "invisible" in XML File.

BUG: After installation of the module: Existing contacts shows that are defined as "invisible" in the XML File.

Here is the problem:

When I install my module on an fresh odoo instance with EXISTING contacts, I observe that when I want to edit this existing contact, the variable "ident" is shown although the contact is a person (not a company).

Interesting: When I change the contact on the frontend to "company" and change it back to "person" (without saving the form) I see that the effect is correct.

The problem is that when I have my module fresh installed and edit an existing contact, the variable does not behave as it should (being invisible on first edit of existing parter). After the first edit everything works out, but for a user that wants to install the module on his instance it could be confusing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.