mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[IMP] account_exception: back to detedt error on post
H11044
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
# from odoo.tests import common
|
||||
from odoo.addons.account.tests.common import AccountTestInvoicingCommon
|
||||
from odoo.tests import tagged
|
||||
# from odoo.tests.common import Form
|
||||
|
||||
|
||||
@tagged('post_install', '-at_install')
|
||||
class TestAccountMoveException(AccountTestInvoicingCommon):
|
||||
|
||||
def test_10_validation_on_write(self):
|
||||
|
||||
def test_10_validation_on_post(self):
|
||||
self.env.user.groups_id += self.env.ref('analytic.group_analytic_accounting')
|
||||
exception = self.env.ref('account_exception.excep_no_phone').sudo()
|
||||
exception.active = True
|
||||
exception = self.env.ref('account_exception.except_no_phone').sudo()
|
||||
exception.active = True
|
||||
invoice = self.init_invoice('out_invoice', products=self.product_a)
|
||||
|
||||
# must be exceptions when no phone and posting
|
||||
@@ -20,5 +21,4 @@ class TestAccountMoveException(AccountTestInvoicingCommon):
|
||||
# no exceptions when phone and posting
|
||||
invoice.partner_id.phone = '123'
|
||||
invoice.action_post()
|
||||
self.assertTrue(invoice.exception_ids)
|
||||
self.assertTrue(invoice.state='posted')
|
||||
self.assertFalse(invoice.exception_ids)
|
||||
|
||||
Reference in New Issue
Block a user