Skip to content

Commit

Permalink
Changes according to reviews on OCA#114
Browse files Browse the repository at this point in the history
  • Loading branch information
grindtildeath authored and alan196 committed Feb 15, 2020
1 parent acc64f8 commit a664f59
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions account_operating_unit/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
# © 2016 Serpent Consulting Services Pvt. Ltd.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).

from odoo.tools.translate import _
from odoo import api, fields, models
from odoo import api, fields, models, _
from odoo.exceptions import UserError


Expand All @@ -21,8 +20,7 @@ def create(self, vals):
move = self.env['account.move'].browse(vals['move_id'])
if move.operating_unit_id:
vals['operating_unit_id'] = move.operating_unit_id.id
_super = super(AccountMoveLine, self)
return _super.create(vals)
return super(AccountMoveLine, self).create(vals)

@api.model
def _query_get(self, domain=None):
Expand Down Expand Up @@ -81,7 +79,6 @@ def _prepare_inter_ou_balancing_move_line(self, move, ou_id,

if ou_balances[ou_id] < 0.0:
res['debit'] = abs(ou_balances[ou_id])

else:
res['credit'] = ou_balances[ou_id]
return res
Expand Down

0 comments on commit a664f59

Please sign in to comment.