diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2016-04-18 14:30:01 +0200 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2016-04-19 10:25:41 +0200 |
| commit | a4fbaaa77673dfd68ea2a453a892ca7216ea6110 (patch) | |
| tree | 1b279f6277d296bb27cc585421e8a431e7d89eb3 /addons | |
| parent | 4ff34a98bcefa96c908baae1646a5af8acd21913 (diff) | |
[FIX] sale_timesheet: fix traceback in write
When calling `write` with more than one id, `_get_timesheet_cost`
generates a traceback since it uses `self.is_timesheet`.
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/sale_timesheet/models/sale_timesheet.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/addons/sale_timesheet/models/sale_timesheet.py b/addons/sale_timesheet/models/sale_timesheet.py index b64c5850e63..b0398664ec8 100644 --- a/addons/sale_timesheet/models/sale_timesheet.py +++ b/addons/sale_timesheet/models/sale_timesheet.py @@ -85,8 +85,10 @@ class AccountAnalyticLine(models.Model): @api.multi def write(self, values): - values = self._get_timesheet_cost(vals=values) - return super(AccountAnalyticLine, self).write(values) + for line in self: + values = line._get_timesheet_cost(vals=values) + super(AccountAnalyticLine, line).write(values) + return True @api.model def create(self, values): |
