projects
/
OpenERP
/
cmmi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a9e473b
)
Ajout d'un champ fonction charge réel à palier_phase
author
Alicia FLOREZ
<alicflorez@gmail.com>
Thu, 13 Jun 2013 15:47:33 +0000
(17:47 +0200)
committer
Alicia FLOREZ
<alicflorez@gmail.com>
Thu, 13 Jun 2013 15:47:33 +0000
(17:47 +0200)
axes.py
patch
|
blob
|
history
diff --git
a/axes.py
b/axes.py
index
23437c1
..
aa2e4ac
100644
(file)
--- a/
axes.py
+++ b/
axes.py
@@
-371,6
+371,12
@@
class PalierPhase(osv.Model):
result[pp.id] = sum([p.charge_plan for p in pp.phases])
return result
result[pp.id] = sum([p.charge_plan for p in pp.phases])
return result
+ def _get_charge_reel(self, cr, uid, ids, field, arg, context=None):
+ result = {}
+ for pp in self.browse(cr, uid, ids, context=context):
+ result[pp.id] = sum([c.quantite for c in pp.charges])
+ return result
+
_columns = {
"name": fields.function(_get_name,
_columns = {
"name": fields.function(_get_name,
@@
-387,6
+393,9
@@
class PalierPhase(osv.Model):
"charge_plan": fields.function(_get_charge_plan,
type="integer",
string="Charge plannifiée"),
"charge_plan": fields.function(_get_charge_plan,
type="integer",
string="Charge plannifiée"),
+ "charge_reel": fields.function(_get_charge_reel,
+ type="integer",
+ string="Charge plannifiée"),
# backrefs
"charges": fields.one2many("cmmi.evolution.charge",
"phase_id",
# backrefs
"charges": fields.one2many("cmmi.evolution.charge",
"phase_id",