Skip to content

Commit

Permalink
[14.0][MIG] contract_operating_unit
Browse files Browse the repository at this point in the history
  • Loading branch information
kittiu committed May 28, 2021
1 parent 34ab817 commit 05a0578
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 443 deletions.
6 changes: 3 additions & 3 deletions contract_operating_unit/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

{
"name": "Contract Operating Unit",
"version": "12.0.1.0.0",
"version": "14.0.1.0.0",
"license": "LGPL-3",
"author": "ForgeFlow S.L., " "Odoo Community Association (OCA)",
"author": "ForgeFlow S.L., Odoo Community Association (OCA)",
"website": "https://github.com/OCA/operating-unit",
"category": "Invoicing",
"depends": ["contract", "operating_unit"],
"depends": ["contract", "account_operating_unit"],
"data": ["views/contract_view.xml", "security/contract_security.xml"],
"installable": True,
}
9 changes: 5 additions & 4 deletions contract_operating_unit/models/contract.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright 2020 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).

from odoo import api, fields, models
from odoo import fields, models


class ContractContract(models.Model):
Expand All @@ -16,9 +16,10 @@ class ContractContract(models.Model):
),
)

@api.multi
def _prepare_invoice(self, date_invoice, journal=None):
invoice_vals = super()._prepare_invoice(date_invoice, journal)
(invoice_vals, move_form) = super()._prepare_invoice(
date_invoice, journal=journal
)
if self.operating_unit_id:
invoice_vals["operating_unit_id"] = self.operating_unit_id.id
return invoice_vals
return (invoice_vals, move_form)
1 change: 1 addition & 0 deletions contract_operating_unit/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* Aaron Henriquez <ahenriquez@forgeflow.com>
* Kitti U. <kittiu@ecosoft.co.th>
Loading

0 comments on commit 05a0578

Please sign in to comment.