Add some unit tests on the module account_credit_control

(cherry picked from commit 7fa1b0ac883914f3cdfcaaa1a00016a35cced368)

[IMP] Add some unitest and fix a bug with exceptions

(cherry picked from commit c2f34ecd06fa5ba093084cf32f35c722c5866ff5)

[FIX] Reindent line

(cherry picked from commit b643a48f86b20ed6496f2e08366a407095d1540b)

[IMP] Add some new unittests

(cherry picked from commit f118e2391de3b443558d26186fe44f55a7f0b9c4)

[IMP] Add encoding in each python files

(cherry picked from commit 9599a88303b921c8e73174db61318f6dc9f02017)
This commit is contained in:
Sylvain Van Hoof
2017-06-02 10:18:24 +02:00
committed by Pedro M. Baeza
parent 0d567fa4b0
commit 74c9e63199
3 changed files with 15 additions and 0 deletions

View File

@@ -1,8 +1,14 @@
<<<<<<< 3bb811bb84ec5c265d8e9245eff93a4a5f98059f
<<<<<<< f4a71683cf11965d8ffc1f5016e254fe6aa2eaf5
# -*- coding: utf-8 -*-
# Copyright 2017 Okia SPRL (https://okia.be)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
=======
>>>>>>> Fix errors, improve menus, views, readme
=======
# -*- coding: utf-8 -*-
# Copyright 2017 Okia SPRL (https://okia.be)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
>>>>>>> Add some unit tests on the module account_credit_control
from . import models
from . import wizard

View File

@@ -1,9 +1,15 @@
<<<<<<< 3bb811bb84ec5c265d8e9245eff93a4a5f98059f
<<<<<<< f4a71683cf11965d8ffc1f5016e254fe6aa2eaf5
# -*- coding: utf-8 -*-
# Copyright 2017 Okia SPRL (https://okia.be)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
=======
>>>>>>> Fix errors, improve menus, views, readme
=======
# -*- coding: utf-8 -*-
# Copyright 2017 Okia SPRL (https://okia.be)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
>>>>>>> Add some unit tests on the module account_credit_control
from . import account_account
from . import account_invoice
from . import credit_control_line

View File

@@ -82,10 +82,13 @@ class CreditControlPolicyChanger(models.TransientModel):
@api.model
def _set_invoice_policy(self, move_lines, policy):
""" Force policy on invoice """
<<<<<<< 3bb811bb84ec5c265d8e9245eff93a4a5f98059f
<<<<<<< f4a71683cf11965d8ffc1f5016e254fe6aa2eaf5
=======
invoice_obj = self.env['account.invoice']
>>>>>>> Fix errors, improve menus, views, readme
=======
>>>>>>> Add some unit tests on the module account_credit_control
invoices = move_lines.mapped('invoice_id')
invoices.write({'credit_policy_id': policy.id})