Readonly Many2One and buttons

21 views
Skip to first unread message

Sergi Almacellas Abellana

unread,
Aug 4, 2016, 3:58:51 AM8/4/16
to try...@googlegroups.com
Hi,

I have noticed that when you have a readonly Many2One field and open
it's related form all the fields are readonly, which make sense as I
opened it on a readonly field.

On the other hand, if the record form has buttons, the buttons are
clickable, so you may (indirectly) modify a readonly form.

Is this done on propose?

P.S:You can see this behavior on the move field of a posted invoice.
--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

Cédric Krier

unread,
Aug 4, 2016, 4:55:03 AM8/4/16
to try...@googlegroups.com
On 2016-08-04 09:58, Sergi Almacellas Abellana wrote:
> Hi,
>
> I have noticed that when you have a readonly Many2One field and open it's
> related form all the fields are readonly, which make sense as I opened it on
> a readonly field.
>
> On the other hand, if the record form has buttons, the buttons are
> clickable, so you may (indirectly) modify a readonly form.
>
> Is this done on propose?

I think it is a side effect of the implementation of many things.
But for me, this behaviour makes sense because buttons (which change the
record) are known/expected changes so it will be a mistake to create a
readonly Many2One which does not take into account those possible
changes.

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Jean Cavallo

unread,
Aug 4, 2016, 4:57:13 AM8/4/16
to try...@googlegroups.com

2016-08-04 10:52 GMT+02:00 Cédric Krier <cedric...@b2ck.com>:
I think it is a side effect of the implementation of many things.
But for me, this behaviour makes sense because buttons (which change the
record) are known/expected changes so it will be a mistake to create a
readonly Many2One which does not take into account those possible
changes.

Agreed. If we wanted this kind of behaviour, we also would have
to deactivate the right-click menu on readonly M2O fields, since
"Edit" and "Actions" could modify the target contents as well.

Jean Cavallo
Coopengo
Reply all
Reply to author
Forward
0 new messages