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

[add] couts annexes + modif affichage kanban

parent ee2dfbcb
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
.*
*.pyc
!.gitignore
...@@ -16,6 +16,7 @@ class SapovalPartners(models.Model): ...@@ -16,6 +16,7 @@ class SapovalPartners(models.Model):
lf_heures_passees = fields.Float('Heures passées', compute='_total_heures_passees') lf_heures_passees = fields.Float('Heures passées', compute='_total_heures_passees')
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')
@api.one @api.one
def _taux_horaire(self): def _taux_horaire(self):
...@@ -45,3 +46,15 @@ class SapovalPartners(models.Model): ...@@ -45,3 +46,15 @@ class SapovalPartners(models.Model):
for record in self.task_ids: for record in self.task_ids:
res = res + record.planned_hours res = res + record.planned_hours
self.lf_heures_planifiees = res self.lf_heures_planifiees = res
@api.one
def _couts_annexes(self):
account = self.analytic_account_id.id
############## Calcul couts annexes ################
self.env.cr.execute("select sum(amount) from account_analytic_line where amount<0 and is_timesheet=FALSE and account_id=%s;", (account, ) )
couts_annexes = self.env.cr.fetchone()[0]
if couts_annexes:
self.lf_couts_annexes = couts_annexes * (-1.0)
else:
self.lf_couts_annexes = 0.0
Aucun aperçu pour ce type de fichier
.o_project_kanban_main { width: 100%!important; }
.lf_cell { padding: 5px 0;border-top: 1px solid #555; }
.budget_table { margin-top: 10px; }
.budget_table td { padding: 0 5px; }
\ No newline at end of file
...@@ -3,6 +3,13 @@ ...@@ -3,6 +3,13 @@
<openerp> <openerp>
<data> <data>
<!-- Assets -->
<template id="assets_backend" name="project assets le filament" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet" href="/lefilament_projets/static/src/css/style.css"/>
</xpath>
</template>
<!-- Project Form --> <!-- Project Form -->
<record id="view_form_lefilament_project_form_inherited" model="ir.ui.view"> <record id="view_form_lefilament_project_form_inherited" model="ir.ui.view">
<field name="name">Le Filament Projets</field> <field name="name">Le Filament Projets</field>
...@@ -38,6 +45,7 @@ ...@@ -38,6 +45,7 @@
<field name="lf_heures_projet" /> <field name="lf_heures_projet" />
<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" />
</xpath> </xpath>
</field> </field>
</record> </record>
...@@ -49,35 +57,35 @@ ...@@ -49,35 +57,35 @@
<field name="inherit_id" ref="project.view_project_kanban"/> <field name="inherit_id" ref="project.view_project_kanban"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//div[@class='o_kanban_primary_left']" position="after"> <xpath expr="//div[@class='o_kanban_primary_left']" position="after">
<field name="lf_total_budget"> euros</field>
<table class="table table-condensed" style="margin-bottom: 0;"> <table class="table table-condensed" style="margin-bottom: 0;">
<thead style="background: transparent; border-bottom: 1px solid #555;"> <thead style="background: transparent; border-bottom: 1px solid #555;">
<tr> <tr>
<td style="padding: 5px 0;">potentiel</td> <td>vendues</td>
<td style="padding: 5px 0;">planifié</td> <td>passées</td>
<td>restantes</td>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td style="padding: 5px 0;border-top: 1px solid #555;"><field name="lf_heures_projet" >h</field></td> <td class="lf_cell"><field name="lf_heures_projet" >h</field></td>
<td style="padding: 5px 0;border-top: 1px solid #555;"><field name="lf_heures_planifiees" >h</field></td> <td class="lf_cell"><field name="lf_heures_passees" >h</field></td>
<td class="lf_cell"><field name="lf_heures_restantes" >h</field></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<table class="table table-condensed"> <table class="budget_table"><tbody><tr>
<thead style="background: transparent; border-bottom: 1px solid #555;"> <td><strong>Budget : </strong></td>
<tr> <td><field name="lf_total_budget"></field></td>
<td style="padding: 5px 0;">en cours</td>
<td style="padding: 5px 0;">reste</td>
</tr> </tr>
</thead>
<tbody>
<tr> <tr>
<td style="padding: 5px 0;border-top: 1px solid #555;"><field name="lf_heures_passees" >h</field></td> <td><strong>Coûts Annexes : </strong></td>
<td style="padding: 5px 0;border-top: 1px solid #555;"><field name="lf_heures_restantes" >h</field></td> <td><field name="lf_couts_annexes"></field></td>
</tr> </tr></tbody></table>
</tbody>
</table> </xpath>
<!-- HIDE TASK AND DOCS NUMBER -->
<xpath expr="//div[@class='o_project_kanban_boxes']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath> </xpath>
</field> </field>
</record> </record>
......
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