Skip to content
Extraits de code Groupes Projets
Valider b5a74c9d rédigé par Juliana's avatar Juliana
Parcourir les fichiers

[UPD]Change process adhesion when pass to statut follow

parent 128e0a28
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!6[add] merge 14.0 new process adh
......@@ -497,6 +497,7 @@ class ScopPartner(models.Model):
errors += (
"<hr/><strong>Documents manquants :</strong><ul>" + errors_str + "</ul>"
)
# Si des erreurs remplir les logs avec la liste des documents manquants
if errors:
local_tz = timezone("Europe/Paris")
utc_tz = timezone("UTC")
......@@ -505,9 +506,11 @@ class ScopPartner(models.Model):
+ utc_tz.localize(fields.Datetime.now())
.astimezone(local_tz)
.strftime("%d/%m/%Y - %-H:%M")
+ "</strong> - Impossible de soumettre le dossier à la CG Scop"
+ "</strong> - Impossible de passer en statut Suivi"
+ errors
)
else:
self.list_logs = False
def scop_suivi_non_adhesion(self):
"""
......
......@@ -3,7 +3,28 @@
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
<data>
<!-- Questionnaire Type -->
<record id="scop_adhesion_file_search" model="ir.ui.view">
<field name="name">scop.adhesion.file.search</field>
<field name="model">scop.adhesion.file</field>
<field name="arch" type="xml">
<search string="Recherche Documents">
<field name="name"/>
<filter
string="Projets de création"
name="project"
domain="[('type_process','=', 'project')]"
/>
<filter
string="Adhésion"
name="adh"
domain="[('type_process','=', 'adhesion')]"
/>
</search>
</field>
</record>
<!-- Documents -->
<record id="scop_adhesion_file_tree" model="ir.ui.view">
<field name="name">scop.adhesion.file.tree</field>
<field name="model">scop.adhesion.file</field>
......@@ -21,6 +42,7 @@
<field name="name">Documents</field>
<field name="res_model">scop.adhesion.file</field>
<field name="view_mode">tree</field>
<field name="search_view_id" ref="scop_adhesion_file_search" />
<field
name="help"
>Liste des documents pour l'adhésion et les projets de création</field>
......
......@@ -37,3 +37,9 @@ class ScopCompulsoryFieldsSuiviWizard(models.TransientModel):
if self.with_adhesion:
self.partner_id.write({"membership_status": "adhesion"})
return {"type": "ir.actions.act_window_close"}
def save_data(self):
"""
Sauvegarder les données même avec erreurs
"""
return {"type": "ir.actions.act_window_close"}
......@@ -48,14 +48,21 @@
type="object"
string="Valider sans adhésion"
class="oe_highlight"
attrs="{'invisible':['|', ('with_adhesion','=',True),('list_logs', '=', False)]}"
attrs="{'invisible':['|', ('with_adhesion','=',True),('list_logs', '!=', False)]}"
/>
<button
name="confirm"
type="object"
string="Valider avec adhésion"
class="oe_highlight"
attrs="{'invisible':['|', ('with_adhesion','=',False), ('list_logs', '=', False)]}"
attrs="{'invisible':['|', ('with_adhesion','=',False), ('list_logs', '!=', False)]}"
/>
<button
name="save_data"
type="object"
string="Sauvegarder"
class="oe_highlight"
attrs="{'invisible':[('list_logs', '=', False)]}"
/>
<button special="cancel" string="Annuler" />
</footer>
......
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