콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
4446 화면

I am creating a module to change the display of a form, I know how to hide a field from the form but not a whole group

What should I put to hide a whole group of a form?

아바타
취소
베스트 답변

Hi,

To hide the whole group based on user, you may provide groups for the group tag. |
E.g
                    <group string="Configure your Fiscal Year" groups="account.group_account_user">
                        <field name="has_default_company" invisible="1" />
                        <field name="period"/>
                    </group>
You may also apply attrs same as field in group tag if required in your case. 
e.g
                                    <group attrs="{'readonly':[('state','=','valid')]}" string="Currency">
                                        <field name="currency_id" invisible="1"/>
                                        <field name="amount_currency" widget="monetary" options="{'currency_field': 'currency_id'}"/>
                                    </group>

 

아바타
취소