diff --git a/views/account_payment_order.xml b/views/account_payment_order.xml index 2046b865db69d5d0e1eaa7ec012793c4f47bf1c3..3a21dd4b7898d8e673acbe962eb517e6aa352356 100644 --- a/views/account_payment_order.xml +++ b/views/account_payment_order.xml @@ -20,16 +20,16 @@ type="object" string="Envoyer un email aux coopératives" class="btn-info" - groups="base.group_system" - attrs="{'invisible': ['|', ('state', 'not in', ('generated', 'uploaded')), ('email_sent', '=', True)]}" + groups="account.group_account_manager" + attrs="{'invisible': ['|', '|', ('state', 'not in', ('generated', 'uploaded')), ('email_sent', '=', True), ('company_id', '!=', %(base.main_company)d)]}" confirm="Valider l'envoi des emails ?" /> <button name="action_send_email" type="object" string="Renvoyer un email aux coopératives" - groups="base.group_system" - attrs="{'invisible': ['|', ('state', 'not in', ('generated', 'uploaded')), ('email_sent', '!=', True)]}" + groups="account.group_account_manager" + attrs="{'invisible': ['|', '|', ('state', 'not in', ('generated', 'uploaded')), ('email_sent', '!=', True), ('company_id', '!=', %(base.main_company)d)]}" confirm="Valider l'envoi des emails ?" /> </xpath>