-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[8.0] web_readonly_bypass: Doesn't work on children popup views #256
Comments
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? |
@pedrobaeza normally this case is covered...can you explain What you mean by "correct context" ? and where do you add it? |
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> |
@pedrobaeza hope this solves this issue -jne |
Solved already, so I close. |
When you have a view that contains a one2many field, and this field opens a popup for the form window, fields that are readonly in this sub-model are not saved although you pass the correct context.
@JonathanNEMRY, @petrus-v, have you faced this case?
The text was updated successfully, but these errors were encountered: