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