diff options
| author | Vidhin Mehta (OpenERP) <vme@tinyerp.com> | 2012-12-13 16:48:30 +0530 |
|---|---|---|
| committer | Vidhin Mehta (OpenERP) <vme@tinyerp.com> | 2012-12-13 16:48:30 +0530 |
| commit | 672883fd608ae893e33ff5f63d572bf353b81bb5 (patch) | |
| tree | 918390f7cba13156c96424d9cf87067f3322707e /addons/project_long_term/project_long_term.py | |
| parent | d4023e09337c93c8f763e5a5f701a409c8b4a48f (diff) | |
| parent | 4f880230a9126c22d33e2167815a39fc6a2c6c33 (diff) | |
[MERGE]Trunk
bzr revid: vme@tinyerp.com-20121213111830-uxvy8c6ttrlsonyv
Diffstat (limited to 'addons/project_long_term/project_long_term.py')
| -rw-r--r-- | addons/project_long_term/project_long_term.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py index db6c532d503..419aa5e3381 100644 --- a/addons/project_long_term/project_long_term.py +++ b/addons/project_long_term/project_long_term.py @@ -123,7 +123,6 @@ class project_phase(osv.osv): _defaults = { 'state': 'draft', 'sequence': 10, - 'product_uom': lambda self,cr,uid,c: self.pool.get('product.uom').search(cr, uid, [('name', '=', _('Day'))], context=c)[0] } _order = "project_id, date_start, sequence" _constraints = [ @@ -169,11 +168,12 @@ class project_phase(osv.osv): for phase in phases: if phase.state in ('done','cancelled'): continue + # FIXME: brittle and not working if context['lang'] != 'en_US' duration_uom = { - 'days': 'd', 'day': 'd', 'd':'d', - 'months': 'm', 'month':'month', 'm':'m', - 'weeks': 'w', 'week': 'w', 'w':'w', - 'hours': 'H', 'hour': 'H', 'h':'H', + 'day(s)': 'd', 'days': 'd', 'day': 'd', 'd':'d', + 'month(s)': 'm', 'months': 'm', 'month':'month', 'm':'m', + 'week(s)': 'w', 'weeks': 'w', 'week': 'w', 'w':'w', + 'hour(s)': 'H', 'hours': 'H', 'hour': 'H', 'h':'H', }.get(phase.product_uom.name.lower(), "H") duration = str(phase.duration) + duration_uom result += ''' |
