Skip to Content

Contributors

Re: Migration to v14 requirement - readony / invisible

Is that a future deprecation?

Odoo code still references attributes in this way:

:                     <field invisible="context.get('no_mapping',False)"

From account_consolidation, for example?

Also, basic_model.js:

    _evalModifiers: function (element, modifiers) {
        let evalContext = null;
        const evaluated = {};
        for (const k of ['invisible', 'column_invisible', 'readonly', 'required']) {
            const mod = modifiers[k];
            if (mod === undefined || mod === false || mod === true) {
                if (k in modifiers) {
                    evaluated[k] = !!mod;
                }
                continue;
            }
            try {
                evalContext = evalContext || this._getEvalContext(element);
                evaluated[k] = new Domain(mod, evalContext).compute(evalContext);
            } catch (e) {
                throw new Error(_.str.sprintf('for modifier "%s": %s', k, e.message));
            }
        }
        return evaluated;
    },




Richard deMeester

Senior Development Analyst

WilldooIT Pty Ltd

E: richard.demeester@willdooit.com

M: +61 403 76 76 76

P: +61 3 9135 1900

A: 10/435 Williamstown Road, Port Melbourne, Vic 3207

 

 

Making growth through technology easy

 

 

DISCLAIMER | This electronic message together with any attachments is confidential. If you are not the recipient, do not copy, disclose, or use the contents in any way. Please also advise us by e-mail that you have received this message in error and then please destroy this email and any of its attachments. WilldooIT Pty. Ltd. is not responsible for any changes made to this message and/or any attachments after sending by WilldooIT Pty. Ltd. WilldooIT Pty. Ltd. use virus scanning software but exclude all liability for virus or anything similar in this email or attachment.



From: Daniel Reis <dreis@opensourceintegrators.com>
Sent: Thursday, 15 October 2020 5:12 AM
To: Contributors <contributors@odoo-community.org>
Subject: Re: Migration to v14 requirement - readony / invisible
 
Got it. I edited it for clarity.

Thanks!

On 14/10/2020 16:42, Pedro M. Baeza (Tecnativa) wrote:

> Hi, sorry I meant to say invisible="<condition>". invisible="1" or 

> invisible="0" is still supported. What it's not supported is to put an 

> expression there, like `invisible=context.get("x")`

>

> Regards.

>

> _______________________________________________

> Mailing-List: https://odoo-community.org/groups/contributors-15 

> <https://odoo-community.org/groups/contributors-15>

> Post to: mailto:contributors@odoo-community.org

> Unsubscribe: https://odoo-community.org/groups?unsubscribe 

> <https://odoo-community.org/groups?unsubscribe>

>

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe


by Richard deMeester <richard.demeester@willdooit.com> - 01:46 - 15 Oct 2020

Reference

  • Migration to v14 requirement - readony / invisible

    Hello All,


    Some XML modifiers in views disappear: invisible and readonly. They should be assigned through general modifier attrs.

    Can anyone shed light on this?  I see no reference in base Odoo to deprecation of these modifiers?

    Richard




    Richard deMeester

    Senior Development Analyst

    WilldooIT Pty Ltd

    E: richard.demeester@willdooit.com

    M: +61 403 76 76 76

    P: +61 3 9135 1900

    A: 10/435 Williamstown Road, Port Melbourne, Vic 3207

     

     

    Making growth through technology easy

     

     

    DISCLAIMER | This electronic message together with any attachments is confidential. If you are not the recipient, do not copy, disclose, or use the contents in any way. Please also advise us by e-mail that you have received this message in error and then please destroy this email and any of its attachments. WilldooIT Pty. Ltd. is not responsible for any changes made to this message and/or any attachments after sending by WilldooIT Pty. Ltd. WilldooIT Pty. Ltd. use virus scanning software but exclude all liability for virus or anything similar in this email or attachment.



    by Richard deMeester <richard.demeester@willdooit.com> - 02:31 - 13 Oct 2020