From 64f2cd956e6108257a0b771af737376b02d0605a Mon Sep 17 00:00:00 2001 From: Marcel Savegnago Date: Thu, 5 Dec 2024 11:23:02 -0300 Subject: [PATCH] [WIP][IMP] l10n_br_mdfe: temp fixes --- l10n_br_mdfe/models/modal_rodoviario.py | 3 +- ...05472475000102580200000602011208018449.xml | 4 +++ ...05472475000102580200000602071611554500.xml | 14 +++------ ...05472475000102580200000602081550195716.xml | 4 +++ ...05472475000102580200000602161434590525.xml | 4 +++ l10n_br_mdfe/tests/test_mdfe_serialize.py | 29 ++++++++++--------- l10n_br_mdfe/views/document.xml | 17 +++++++++-- 7 files changed, 49 insertions(+), 26 deletions(-) diff --git a/l10n_br_mdfe/models/modal_rodoviario.py b/l10n_br_mdfe/models/modal_rodoviario.py index 58f32abee43d..7dbed078a4d1 100644 --- a/l10n_br_mdfe/models/modal_rodoviario.py +++ b/l10n_br_mdfe/models/modal_rodoviario.py @@ -18,7 +18,8 @@ class MDFeModalRodoviario(spec_models.StackedModel): _mdfe30_binding_module = "nfelib.mdfe.bindings.v3_0.mdfe_modal_rodoviario_v3_00" _mdfe30_stacking_mixin = "mdfe.30.rodo" # all m2o at this level will be stacked even if not required: - _mdfe30_stacking_force_paths = ["rodo.infANTT", "rodo.infANTT.ValePed"] + _mdfe30_stacking_force_paths = ["rodo.infANTT", "rodo.infANTT.InfContratante"] + _mdfe30_stacking_skip_paths = ("mdfe30_valePed",) document_id = fields.Many2one(comodel_name="l10n_br_fiscal.document") diff --git a/l10n_br_mdfe/tests/mdfe/v3_00/leiauteMDFe/MDFe35230905472475000102580200000602011208018449.xml b/l10n_br_mdfe/tests/mdfe/v3_00/leiauteMDFe/MDFe35230905472475000102580200000602011208018449.xml index 7d18071d480f..973abbfe5ae6 100644 --- a/l10n_br_mdfe/tests/mdfe/v3_00/leiauteMDFe/MDFe35230905472475000102580200000602011208018449.xml +++ b/l10n_br_mdfe/tests/mdfe/v3_00/leiauteMDFe/MDFe35230905472475000102580200000602011208018449.xml @@ -90,4 +90,8 @@ Documento emitido por: Marc Demo + + https://dfe-portal.svrs.rs.gov.br/mdfe/qrCode?chMDFe=35230905472475000102580200000602011208018449&tpAmb=2 + diff --git a/l10n_br_mdfe/tests/mdfe/v3_00/leiauteMDFe/MDFe35230905472475000102580200000602071611554500.xml b/l10n_br_mdfe/tests/mdfe/v3_00/leiauteMDFe/MDFe35230905472475000102580200000602071611554500.xml index 3e25dd05ecb2..34b6f9996e4f 100644 --- a/l10n_br_mdfe/tests/mdfe/v3_00/leiauteMDFe/MDFe35230905472475000102580200000602071611554500.xml +++ b/l10n_br_mdfe/tests/mdfe/v3_00/leiauteMDFe/MDFe35230905472475000102580200000602071611554500.xml @@ -49,16 +49,6 @@ 123456789101 99999999999 - - - 99999999999999 - 99999999999999 - 1234 - 5.00 - 01 - - 02 - Intel do Brasil 86144802000190 @@ -124,4 +114,8 @@ Documento emitido por: Marc Demo + + https://dfe-portal.svrs.rs.gov.br/mdfe/qrCode?chMDFe=35230905472475000102580200000602071611554500&tpAmb=2 + diff --git a/l10n_br_mdfe/tests/mdfe/v3_00/leiauteMDFe/MDFe35230905472475000102580200000602081550195716.xml b/l10n_br_mdfe/tests/mdfe/v3_00/leiauteMDFe/MDFe35230905472475000102580200000602081550195716.xml index 87b6a1ae6e94..c2c33ad7d73a 100644 --- a/l10n_br_mdfe/tests/mdfe/v3_00/leiauteMDFe/MDFe35230905472475000102580200000602081550195716.xml +++ b/l10n_br_mdfe/tests/mdfe/v3_00/leiauteMDFe/MDFe35230905472475000102580200000602081550195716.xml @@ -71,4 +71,8 @@ Documento emitido por: Marc Demo + + https://dfe-portal.svrs.rs.gov.br/mdfe/qrCode?chMDFe=35230905472475000102580200000602081550195716&tpAmb=2 + diff --git a/l10n_br_mdfe/tests/mdfe/v3_00/leiauteMDFe/MDFe35231005472475000102580200000602161434590525.xml b/l10n_br_mdfe/tests/mdfe/v3_00/leiauteMDFe/MDFe35231005472475000102580200000602161434590525.xml index 29602375b63b..b579ae88fd20 100644 --- a/l10n_br_mdfe/tests/mdfe/v3_00/leiauteMDFe/MDFe35231005472475000102580200000602161434590525.xml +++ b/l10n_br_mdfe/tests/mdfe/v3_00/leiauteMDFe/MDFe35231005472475000102580200000602161434590525.xml @@ -88,4 +88,8 @@ Documento emitido por: Marc Demo + + https://dfe-portal.svrs.rs.gov.br/mdfe/qrCode?chMDFe=35231005472475000102580200000602161434590525&tpAmb=2 + diff --git a/l10n_br_mdfe/tests/test_mdfe_serialize.py b/l10n_br_mdfe/tests/test_mdfe_serialize.py index ccd99ca5285f..2fa36bfb3093 100644 --- a/l10n_br_mdfe/tests/test_mdfe_serialize.py +++ b/l10n_br_mdfe/tests/test_mdfe_serialize.py @@ -68,19 +68,22 @@ def prepare_modal_rodoviario_data(self, mdfe): }, ), ] - mdfe.mdfe30_disp = [ - ( - 0, - 0, - { - "mdfe30_CNPJForn": "99999999999999", - "mdfe30_CNPJPg": "99999999999999", - "mdfe30_nCompra": "1234", - "mdfe30_vValePed": 5, - "mdfe30_tpValePed": "01", - }, - ), - ] + # TODO: no momento foi desativado a tag ValePed por + # ela mesmo vazia aparecer no xml + + # mdfe.mdfe30_disp = [ + # ( + # 0, + # 0, + # { + # "mdfe30_CNPJForn": "99999999999999", + # "mdfe30_CNPJPg": "99999999999999", + # "mdfe30_nCompra": "1234", + # "mdfe30_vValePed": 5, + # "mdfe30_tpValePed": "01", + # }, + # ), + # ] mdfe.mdfe30_infPag = [ ( 0, diff --git a/l10n_br_mdfe/views/document.xml b/l10n_br_mdfe/views/document.xml index 8bed6d23ad05..9720aaeeb2ff 100644 --- a/l10n_br_mdfe/views/document.xml +++ b/l10n_br_mdfe/views/document.xml @@ -66,7 +66,7 @@ >{'invisible': [('document_type', 'in', ['58'])]} - + + + + + + + @@ -178,7 +192,6 @@ > -