Skip to content

Commit

Permalink
[hr_timesheet_accrue_income] 8.0.1.2.1
Browse files Browse the repository at this point in the history
* Fix duplicate method name
  • Loading branch information
andhit-r committed Aug 28, 2020
1 parent 7e0edce commit 63dfdd5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion hr_timesheet_accrue_income/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Generate Accrue Income Based On Timesheet Details",
"version": "8.0.1.2.0",
"version": "8.0.1.2.1",
"website": "https://simetri-sinergi.id",
"author": "PT. Simetri Sinergi Indonesia, OpenSynergy Indonesia",
"license": "AGPL-3",
Expand Down
14 changes: 7 additions & 7 deletions hr_timesheet_accrue_income/models/hr_analytic_timesheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def _get_income_account(self):
return result

@api.multi
def _get_period(self):
def _get_accrue_income_period(self):
self.ensure_one()
period = self.env["account.period"].find(self.date)
return period
Expand All @@ -173,24 +173,24 @@ def _get_period(self):
def _prepare_accrue_income_move(self):
self.ensure_one()
journal = self._get_accrue_income_journal()
period = self._get_period()
period = self._get_accrue_income_period()
return {
"journal_id": journal.id,
"period_id": period.id,
"date": self.date,
"line_id": self._prepare_move_lines()
"line_id": self._prepare_accrue_income_move_lines()
}

@api.multi
def _prepare_move_lines(self):
def _prepare_accrue_income_move_lines(self):
self.ensure_one()
result = []
result.append(self._prepare_accrue_income_line())
result.append(self._prepare_income_line())
return result

@api.multi
def _get_partner(self):
def _get_accrue_income_partner(self):
self.ensure_one()
partner = self.account_id.partner_id
if not partner:
Expand All @@ -206,7 +206,7 @@ def _prepare_accrue_income_line(self):
"account_id": self._get_accrue_income_account().id,
"credit": 0.0,
"debit": amount,
"partner_id": self._get_partner().id,
"partner_id": self._get_accrue_income_partner().id,
"name": self.name,
"product_id": self.product_id.id,
"product_uom_id": self.product_uom_id.id,
Expand All @@ -222,7 +222,7 @@ def _prepare_income_line(self):
"analytic_account_id": self.account_id.id,
"debit": 0.0,
"credit": amount,
"partner_id": self._get_partner().id,
"partner_id": self._get_accrue_income_partner().id,
"name": self.name,
"product_id": self.product_id.id,
"product_uom_id": self.product_uom_id.id,
Expand Down

0 comments on commit 63dfdd5

Please sign in to comment.