Dear Sergi and Cedric,

Thanks for your support. I added following record in the xml file:

<record model="ir.model.button" id="record_round_button">
            <field name="name">recordrounding</field>
            <field name="model" search="[('model', '=',
'gnuhealth.inpatient.registration')]"/>
        </record>

and in .py:

 cls._buttons.update({
        'recordrounding': {
                    'invisible': Not(Equal(Eval('state'), 'hospitalized')),
                    },})


@classmethod
    @ModelView.button_action('health_proc.act_create_inpatient_rounding')
    def recordrounding(cls, registrations):
        pass

When I updated the module, a record appeared in the list from Admin ->
Model -> Model Access -> Buttons. I updated this record and allowed access
to two groups.

But, still a user having access to one of these groups sees this button
disabled.

Any other configuration is required?

Regards,
Khurram.

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/CAM3N3Cwvd9xi3qgQXvfNgPfGpX6yCFPwtEBUG8ybOiSCbBCU8g%40mail.gmail.com.

Reply via email to