Skip to content

Commit

Permalink
[10.0][account_operating_unit]Add support for cash basis. Migrate to …
Browse files Browse the repository at this point in the history
…v10 nomenclature (#55)

* Add support for cash basis. Migrate to v10 nomenclature

* Remove apply_taxes from the create method, as in v10 this parameter is not accepted in the created method
  • Loading branch information
JordiBForgeFlow authored and alan196 committed Apr 15, 2020
1 parent 61dfcd7 commit 7ece5b0
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 18 deletions.
4 changes: 2 additions & 2 deletions account_operating_unit/models/account_journal.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# © 2016-17 Eficent Business and IT Consulting Services S.L.
# © 2016 Serpent Consulting Services Pvt. Ltd.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from openerp import api, fields, models, _
from openerp.exceptions import UserError
from odoo import api, fields, models, _
from odoo.exceptions import UserError


class AccountJournal(models.Model):
Expand Down
9 changes: 5 additions & 4 deletions account_operating_unit/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# © 2016-17 Eficent Business and IT Consulting Services S.L.
# © 2016 Serpent Consulting Services Pvt. Ltd.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from openerp.tools.translate import _
from openerp import api, fields, models
from openerp.exceptions import UserError
from odoo.tools.translate import _
from odoo import api, fields, models
from odoo.exceptions import UserError


class AccountMoveLine(models.Model):
Expand All @@ -21,7 +21,8 @@ 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
return super(AccountMoveLine, self).create(vals)
_super = super(AccountMoveLine, self)
return _super.create(vals)

@api.model
def _query_get(self, domain=None):
Expand Down
2 changes: 1 addition & 1 deletion account_operating_unit/models/account_payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# © 2016-17 Eficent Business and IT Consulting Services S.L.
# © 2016 Serpent Consulting Services Pvt. Ltd.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from openerp import api, fields, models, _
from odoo import api, fields, models, _


class AccountPayment(models.Model):
Expand Down
6 changes: 3 additions & 3 deletions account_operating_unit/models/company.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# © 2016-17 Eficent Business and IT Consulting Services S.L.
# © 2016 Serpent Consulting Services Pvt. Ltd.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from openerp import api, fields, models
from openerp.tools.translate import _
from openerp.exceptions import UserError
from odoo import api, fields, models
from odoo.tools.translate import _
from odoo.exceptions import UserError


class ResCompany(models.Model):
Expand Down
6 changes: 3 additions & 3 deletions account_operating_unit/models/invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# © 2016-17 Eficent Business and IT Consulting Services S.L.
# © 2016 Serpent Consulting Services Pvt. Ltd.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from openerp import api, fields, models
from openerp.exceptions import ValidationError
from openerp.tools.translate import _
from odoo import api, fields, models
from odoo.exceptions import ValidationError
from odoo.tools.translate import _


class AccountInvoice(models.Model):
Expand Down
2 changes: 1 addition & 1 deletion account_operating_unit/report/account_invoice_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# © 2016-17 Eficent Business and IT Consulting Services S.L.
# © 2016 Serpent Consulting Services Pvt. Ltd.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from openerp import fields, models
from odoo import fields, models


class AccountInvoiceReport(models.Model):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# © 2016-17 Eficent Business and IT Consulting Services S.L.
# © 2016 Serpent Consulting Services Pvt. Ltd.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from openerp.addons.account_operating_unit.tests import\
from odoo.addons.account_operating_unit.tests import\
test_account_operating_unit as test_ou
import time

Expand Down
2 changes: 1 addition & 1 deletion account_operating_unit/wizard/account_financial_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# © 2016-17 Eficent Business and IT Consulting Services S.L.
# © 2016 Serpent Consulting Services Pvt. Ltd.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from openerp import fields, models
from odoo import fields, models


class AccountingReport(models.TransientModel):
Expand Down
2 changes: 1 addition & 1 deletion account_operating_unit/wizard/account_report_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# © 2016-17 Eficent Business and IT Consulting Services S.L.
# © 2016 Serpent Consulting Services Pvt. Ltd.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from openerp import fields, models
from odoo import fields, models


class AccountCommonReport(models.TransientModel):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# © 2016-17 Eficent Business and IT Consulting Services S.L.
# © 2016 Serpent Consulting Services Pvt. Ltd.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from openerp import fields, models
from odoo import fields, models


class AccountBalanceReport(models.TransientModel):
Expand Down

0 comments on commit 7ece5b0

Please sign in to comment.