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

[add] champ couts estimé + progressbar

parent dd24e1c8
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -18,6 +18,8 @@ class SapovalPartners(models.Model): ...@@ -18,6 +18,8 @@ class SapovalPartners(models.Model):
lf_heures_restantes = fields.Float('Restant (h)', compute='_total_heures_restantes') lf_heures_restantes = fields.Float('Restant (h)', compute='_total_heures_restantes')
lf_heures_planifiees = fields.Float('Planifiées (h)', compute='_total_heures_planifiees') lf_heures_planifiees = fields.Float('Planifiées (h)', compute='_total_heures_planifiees')
lf_couts_annexes = fields.Float('Coûts Annexes', compute='_couts_annexes') lf_couts_annexes = fields.Float('Coûts Annexes', compute='_couts_annexes')
lf_couts_estimes = fields.Float('Coûts Estimes')
lf_commentaire = fields.Text('Commentaires')
@api.one @api.one
def _taux_horaire(self): def _taux_horaire(self):
...@@ -57,7 +59,7 @@ class SapovalPartners(models.Model): ...@@ -57,7 +59,7 @@ class SapovalPartners(models.Model):
@api.one @api.one
@api.depends('lf_total_budget','lf_couts_annexes') @api.depends('lf_total_budget','lf_couts_annexes')
def _budget_heures(self): def _budget_heures(self):
self.lf_heures_budget = self.lf_total_budget - self.lf_couts_annexes self.lf_heures_budget = self.lf_total_budget - self.lf_couts_estimes
@api.one @api.one
def _total_heures(self): def _total_heures(self):
......
...@@ -4,3 +4,11 @@ ...@@ -4,3 +4,11 @@
.lf_cell { padding: 5px 0; border-top: 1px solid #999!important; } .lf_cell { padding: 5px 0; border-top: 1px solid #999!important; }
.budget_table { margin-top: 10px; margin-bottom: 20px; } .budget_table { margin-top: 10px; margin-bottom: 20px; }
.budget_table td { padding: 0 5px; } .budget_table td { padding: 0 5px; }
.project-progress .o_progressbar .o_progress {
border-radius: 0;
border: 1px solid #f0f0f0;
}
.project-progress .o_progressbar .o_progress .o_progressbar_complete {
background-color: #26a69a;
}
\ No newline at end of file
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
<group> <group>
<field name="lf_total_budget" widget="monetary" options="{'currency_field': 'company_currency'}"/> <field name="lf_total_budget" widget="monetary" options="{'currency_field': 'company_currency'}"/>
<field name="lf_tarif_jour" widget="monetary" options="{'currency_field': 'company_currency'}"/> <field name="lf_tarif_jour" widget="monetary" options="{'currency_field': 'company_currency'}"/>
<field name="lf_couts_estimes" widget="monetary" options="{'currency_field': 'company_currency'}"/>
</group> </group>
<group> <group>
<field name="lf_taux_horaire" widget="monetary" options="{'currency_field': 'company_currency'}"/> <field name="lf_taux_horaire" widget="monetary" options="{'currency_field': 'company_currency'}"/>
...@@ -28,6 +29,11 @@ ...@@ -28,6 +29,11 @@
</group> </group>
</group> </group>
</xpath> </xpath>
<xpath expr="//page" position="before">
<page string="Commentaires" name="commentaires">
<field name="lf_commentaire" />
</page>
</xpath>
</field> </field>
</record> </record>
...@@ -47,6 +53,7 @@ ...@@ -47,6 +53,7 @@
<field name="lf_heures_planifiees" /> <field name="lf_heures_planifiees" />
<field name="lf_heures_restantes" /> <field name="lf_heures_restantes" />
<field name="lf_couts_annexes" /> <field name="lf_couts_annexes" />
<field name="lf_couts_estimes" />
</xpath> </xpath>
</field> </field>
</record> </record>
...@@ -74,21 +81,29 @@ ...@@ -74,21 +81,29 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div class="project-progress">
<field name="lf_heures_restantes" widget="progress" options="{'current_value': 'lf_heures_restantes', 'max_value': 'lf_heures_projet', 'editable': false, 'edit_max_value': false, }" />
</div>
<table class="budget_table"><tbody><tr> <table class="budget_table"><tbody><tr>
<td><strong>Budget total : </strong></td> <td>Budget total : </td>
<td><field name="lf_total_budget"></field></td> <td><field name="lf_total_budget"></field></td>
</tr> </tr>
<tr> <tr>
<td><strong>Coûts Annexes : </strong></td> <td>Budget heures : </td>
<td><field name="lf_couts_annexes"></field></td> <td><field name="lf_heures_budget"></field></td>
</tr> </tr>
<tr> <tr>
<td><strong>Budget heures : </strong></td> <td>Coûts estimés : </td>
<td><field name="lf_heures_budget"></field></td> <td><field name="lf_couts_estimes"></field></td>
</tr></tbody></table> </tr>
<tr>
<td>Coûts annexes : </td>
<td><field name="lf_couts_annexes"></field></td>
</tr>
</tbody></table>
<table class="budget_table"><tbody><tr> <table class="budget_table"><tbody><tr>
<td><a t-if="record.use_tasks.raw_value" name="%(project.act_project_project_2_project_task_all)d" type="action">Voir les tâches</a></td> <td><a t-if="record.use_tasks.raw_value" name="%(project.act_project_project_2_project_task_all)d" type="action">Voir les tâches</a></td>
<td><a type="edit">Editer le projet</a></td>
</tr></tbody></table> </tr></tbody></table>
</xpath> </xpath>
<!-- HIDE TASK AND DOCS NUMBER --> <!-- HIDE TASK AND DOCS NUMBER -->
......
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