Add `scan_code = "loop"` via `view_attributes`

I would like to add scan_code = "loop" via view_attributes into some views.

    @classmethod
    def view_attributes(cls):
        return super().view_attributes() + [
            ('/form', 'scan_code', 'loop')
            ]

The resulting view arch(-itechture) in trytond/model/modelview.py:parse_view creates the following form XML:

<form scan_code="&quot;loop&quot;" scan_code_depends="[&quot;lines&quot;]">
…

I would expect it creates this XML:

<form scan_code="loop" scan_code_depends="[lines]">
…

Is view_attributes not the right tool and it is better to use

WDYT?

No use view extension.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.