Giter VIP home page Giter VIP logo

Comments (5)

petrus-v avatar petrus-v commented on July 30, 2024

@pedrobaeza,

I've no idea, can you let an example of your definition view, what do you mean by 'you pass the correct context'? I wonder if the context is forwarded to the popup and if it should be retrieved in the same way as a form view. Did you try to add context on the one2many field that open the popup?

from web.

JonathanNEMRY avatar JonathanNEMRY commented on July 30, 2024

@pedrobaeza normally this case is covered...can you explain What you mean by "correct context" ? and where do you add it?

from web.

pedrobaeza avatar pedrobaeza commented on July 30, 2024

Thanks for your replies.

Yeah, I tried both. Let me draft one quick example (the one where I tried was on MRP routing line sub-sub-screen, so it's very difficult to see full example with that):

<record id="..." model="ir.actions.act_window">
    <field name="res_model">main.model</field>
    <field name="context">{'readonly_by_pass': True}</field>
    ...
</record>

<record id="..." model="ir.ui.view">
    <field name="model">main.model</field>
    ...
    <field name=arch>
        <form string="...">
            <field name="submodel_one2many_field"
                   context="{'readonly_by_pass': True}"/> <!-- I have tried also this -->
        </form>
    </field>
</record>

<record id="..." model="ir.ui.view">
    <field name="model">sub.model</field>
    ...
    <field name=arch>
        <form string="...">
            <field name="readonly_field" readonly="1"/>
        </form>
    </field>
</record>

from web.

JonathanNEMRY avatar JonathanNEMRY commented on July 30, 2024

@pedrobaeza
The right place to set the readonly_by_pass attribute is into the context of the action.
But with some missing args into Odoo, it appears that the options dictionary is not well passed.
So I propose an added value with this #258

hope this solves this issue

-jne

from web.

pedrobaeza avatar pedrobaeza commented on July 30, 2024

Solved already, so I close.

from web.

Related Issues (20)

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.