Skip to content
Extraits de code Groupes Projets
Valider 56789d7b rédigé par Benjamin - Le Filament's avatar Benjamin - Le Filament
Parcourir les fichiers

[add] buttons on director and contact form to archive or remove director

parent b84ae895
Branches
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -593,6 +593,10 @@ class ScopPartner(models.Model):
"url": self.instagram,
}
def remove_director(self):
self.write({"mandate_id": False})
return {"type": "ir.actions.act_window_close"}
# ------------------------------------------------------
# Onchange
# ------------------------------------------------------
......
......@@ -1740,10 +1740,23 @@
<field name="model">res.partner</field>
<field name="arch" type="xml">
<form string="Contact Dirigeant">
<header>
<button
name="remove_director"
type="object"
string="Supprimer le statut de dirigeant"
attrs="{'invisible': [('mandate_id', '=', False)]}"
/>
<button
name="action_archive"
type="object"
string="Archiver le contact"
/>
</header>
<sheet>
<field name="parent_id_onchange" invisible="1" />
<field name="parent_id" invisible="1" />
<group col="2">
<group>
<group>
<field
name="title"
......@@ -1830,6 +1843,13 @@
<field name="model">res.partner</field>
<field name="arch" type="xml">
<form string="Contacts / Addresses">
<header>
<button
name="action_archive"
type="object"
string="Archiver le contact"
/>
</header>
<sheet>
<field
name="type"
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter