mirror of
https://github.com/bringout/oca-ocb-l10n_americas.git
synced 2026-04-26 13:52:02 +02:00
19.0 vanilla
This commit is contained in:
parent
89c6e82fe7
commit
1b82c20a58
572 changed files with 43570 additions and 53303 deletions
|
|
@ -1,6 +1,7 @@
|
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import fields
|
||||
from odoo.addons.account_edi.tests.common import AccountEdiTestCommon
|
||||
from odoo.exceptions import UserError
|
||||
from odoo.tests import tagged, Form
|
||||
|
||||
|
|
@ -11,14 +12,16 @@ from odoo.addons.account.tests.common import AccountTestInvoicingCommon
|
|||
class TestEcAccountMove(AccountTestInvoicingCommon):
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls, chart_template_ref='l10n_ec.l10n_ec_ifrs'):
|
||||
super().setUpClass(chart_template_ref=chart_template_ref)
|
||||
@AccountEdiTestCommon.setup_country('ec')
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
|
||||
def test_document_number_credit_note(self):
|
||||
"""
|
||||
Test that when creating a Credit Note in the Purchase journal with a partner not from Ecuador a document number can be anything
|
||||
If the partner is from Ecuador, an error should be raised
|
||||
"""
|
||||
self.partner_a.country_id = self.env.ref('base.us')
|
||||
self.partner_b.country_id = self.env.ref('base.ec')
|
||||
|
||||
document_credit_note = self.env['l10n_latam.document.type'].search([
|
||||
|
|
@ -27,7 +30,7 @@ class TestEcAccountMove(AccountTestInvoicingCommon):
|
|||
('l10n_ec_check_format', '=', True),
|
||||
], limit=1)
|
||||
move_form = Form(self.env['account.move'].with_context(default_move_type='in_refund'))
|
||||
move_form.partner_id = self.partner_agrolait
|
||||
move_form.partner_id = self.partner_a
|
||||
move_form.l10n_latam_document_type_id = document_credit_note
|
||||
move_form.invoice_date = fields.Date.from_string('2024-08-08')
|
||||
move_form.l10n_latam_document_number = '123456'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue