-
-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
df937a4
commit 778ea20
Showing
40 changed files
with
2,237 additions
and
817 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,10 +28,12 @@ CT-e | |
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
[ This file must be max 2-3 paragraphs, and is required. ] | ||
Este módulo permite a emissão de CT-e. | ||
|
||
This module extends the functionality of ... to support ... | ||
and to allow you to ... | ||
Mais especificamente ele: | ||
* mapea os campos de CT-e do módulo ``l10n_br_cte_spec`` com os campos Odoo. | ||
* usa a logica do módulo ``spec_driven_model`` para realizar esse mapeamento de forma dinâmica, em especial ele usa o sistema de modelos com várias camadas, ou ``StackedModel``, com os modelos ``l10n_br_fiscal.document`` e ``l10n_br_fiscal.document.related`` que tem varios niveis hierarquicos de elementos XML que estão sendo denormalizados dentro desses modelos Odoo | ||
* tem wizards para implementar a comunicação SOAP de CT-e com a SEFAZ (Autorização, Cancelamento, Encerramento...) | ||
|
||
.. IMPORTANT:: | ||
This is an alpha version, the data model and design can change at any time without warning. | ||
|
@@ -46,31 +48,31 @@ and to allow you to ... | |
Configuration | ||
============= | ||
|
||
[ This file is optional, it should explain how to configure | ||
the module before using it; it is aimed at advanced users. ] | ||
To configure this module you need to set a digital certificate on the company, and also set the company edoc processor. | ||
|
||
To configure this module, you need to: | ||
Usage | ||
===== | ||
|
||
#. Go to ... | ||
Para utilizar o módulo `l10n_br_cte` em conjunto com o módulo `l10n_br_account`, é necessário configurar uma linha de operação fiscal que não adicione valor ao montante do documento, uma vez que o CT-e (Manifesto Eletrônico de Documentos Fiscais) não possui valor financeiro. | ||
|
||
.. figure:: https://raw.githubusercontent.com/OCA/l10n-brazil/14.0/l10n_br_cte/static/description/image.png | ||
:alt: alternative description | ||
:width: 600 px | ||
**Passo a Passo:** | ||
|
||
Usage | ||
===== | ||
1. **Criar uma Fatura:** | ||
- Defina o tipo de documento como **57 (CTe)**. | ||
|
||
[ This file must be present and contains the usage instructions | ||
for end-users. As all other rst files included in the README, | ||
it MUST NOT contain reStructuredText sections | ||
only body text (paragraphs, lists, tables, etc). Should you need | ||
a more elaborate structure to explain the addon, please create a | ||
Sphinx documentation (which may include this file as a "quick start" | ||
section). ] | ||
2. **Configurar o Parceiro da Fatura:** | ||
- Configure o parceiro responsável pelo pagamento do CTe e os parceiros como Rementente, Expedidor, Destinatário e Recebedor. | ||
|
||
To use this module, you need to: | ||
3. **Adicionar uma Linha na Aba Produtos:** | ||
- Adicione uma linha de fatura e selecione o produto Frete ou outro que esteja previamente configurado. | ||
|
||
#. Go to ... | ||
4. **Acesse os detalhes fiscais da fatura e informe os demais dados necessário para emissão do CT-e:** | ||
- Preencha os campos obrigatórios para emissão do CT-e. | ||
|
||
5. **Valide o CT-e, verifique os dados do XML e envie para a SEFAZ:** | ||
- Após preencher todos os dados necessários, valide o CT-e e envie para a SEFAZ. | ||
|
||
Seguindo esses passos, o módulo `l10n_br_cte` funcionará corretamente em conjunto com o `l10n_br_account`, permitindo a emissão de CT-e sem valores financeiros associados. | ||
|
||
Bug Tracker | ||
=========== | ||
|
@@ -89,11 +91,24 @@ Authors | |
~~~~~~~ | ||
|
||
* KMEE | ||
* Escodoo | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* Ygor Carvalho <[email protected]> | ||
|
||
* `KMEE <https://kmee.com.br>`_: | ||
|
||
* Luis Felipe Mileo <[email protected]> | ||
* Ygor Carvalho <[email protected]> | ||
|
||
* `ESCODOO <https://escodoo.com.br>`_: | ||
|
||
* Marcel Savegnago <[email protected]> | ||
|
||
* `AKRETION <https://akretion.com/pt-BR/>`_: | ||
|
||
* Raphaël Valyi <[email protected]> | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
@@ -108,6 +123,17 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose | |
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
.. |maintainer-mileo| image:: https://github.com/mileo.png?size=40px | ||
:target: https://github.com/mileo | ||
:alt: mileo | ||
.. |maintainer-marcelsavegnago| image:: https://github.com/marcelsavegnago.png?size=40px | ||
:target: https://github.com/marcelsavegnago | ||
:alt: marcelsavegnago | ||
|
||
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__: | ||
|
||
|maintainer-mileo| |maintainer-marcelsavegnago| | ||
|
||
This module is part of the `OCA/l10n-brazil <https://github.com/OCA/l10n-brazil/tree/14.0/l10n_br_cte>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Copyright (C) 2024 - TODAY, Marcel Savegnago <[email protected]> | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
CTE_VERSIONS = [("4.00", "4.00")] | ||
|
||
CTE_VERSION_DEFAULT = "4.00" | ||
|
||
CTE_ENVIRONMENTS = [("1", "Produção"), ("2", "Homologação")] | ||
|
||
CTE_ENVIRONMENT_DEFAULT = "2" | ||
|
||
CTE_EMIT_TYPES = [ | ||
("1", "1 - Prestador de serviço de transporte"), | ||
("2", "2 - Transportador de Carga Própria"), | ||
("3", "3 - Prestador de serviço de transporte que emitirá CT-e Globalizado"), | ||
] | ||
|
||
CTE_EMIT_TYPE_DEFAULT = "2" | ||
|
||
CTE_TRANSP_TYPE = [ | ||
("1", "Empresa de Transporte de Cargas – ETC"), | ||
("2", "Transportador Autônomo de Cargas – TAC"), | ||
("3", "Cooperativa de Transporte de Cargas – CTC"), | ||
] | ||
|
||
CTE_TRANSP_TYPE_DEFAULT = "1" | ||
|
||
CTE_TRANSMISSIONS = [ | ||
("1", "Emissão Normal"), | ||
("2", "Contingência Off-Line"), | ||
("3", "Regime Especial NFF"), | ||
] | ||
|
||
CTE_TRANSMISSION_DEFAULT = "1" | ||
|
||
CTE_EMISSION_PROCESSES = [("0", "Emissão de CTe com aplicativo do contribuinte")] | ||
|
||
CTE_EMISSION_PROCESS_DEFAULT = "0" | ||
|
||
CTE_TYPE = [ | ||
("0", "CT-e Normal"), | ||
("1", "CT-e de Complemento de Valores"), | ||
("3", "CT-e de Substituição"), | ||
] | ||
|
||
CTE_TYPE_DEFAULT = "0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo noupdate="1"> | ||
|
||
<record id="cte_version_name" model="ir.config_parameter" forcecreate="True"> | ||
<field name="key">l10n_br_cte.version.name</field> | ||
<field name="value">Odoo Brasil OCA v14</field> | ||
</record> | ||
|
||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo noupdate="1"> | ||
|
||
<!-- Empresa Lucro Presumido --> | ||
<record id="l10n_br_base.empresa_lucro_presumido" model="res.company"> | ||
<field name="processador_edoc">oca</field> | ||
</record> | ||
|
||
<!-- Empresa Simples Nacional --> | ||
<record id="l10n_br_base.empresa_simples_nacional" model="res.company"> | ||
<field name="processador_edoc">oca</field> | ||
</record> | ||
|
||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo noupdate="1"> | ||
|
||
<!-- CTe Test - Modal Rodoviário - LC --> | ||
<record id="demo_cte_lc_modal_rodoviario" model="l10n_br_fiscal.document"> | ||
<field name="fiscal_operation_id" ref="l10n_br_fiscal.fo_venda" /> | ||
<field name="document_type_id" ref="l10n_br_fiscal.document_57" /> | ||
<field | ||
name="document_serie_id" | ||
ref="l10n_br_fiscal.empresa_lc_document_57_serie_1" | ||
/> | ||
<field name="company_id" ref="l10n_br_base.empresa_lucro_presumido" /> | ||
<field name="document_number">573</field> | ||
<field name="document_serie">1</field> | ||
<field name="document_key">35240708318053000167570010000000311040645898</field> | ||
<field name="cte_environment">2</field> | ||
<field name="processador_edoc">oca</field> | ||
<field name="partner_id" ref="l10n_br_base.res_partner_cliente1_sp" /> | ||
|
||
<!--Remetente--> | ||
<field name="partner_sendering_id" ref="l10n_br_base.res_partner_cliente2_sp" /> | ||
|
||
<!--Expedidor--> | ||
<field | ||
name="partner_shippering_id" | ||
ref="l10n_br_base.res_partner_cliente2_sp" | ||
/> | ||
|
||
<!--Destinatario--> | ||
<field name="partner_shipping_id" ref="l10n_br_base.res_partner_cliente3_am" /> | ||
|
||
<!--Recebedor--> | ||
<field | ||
name="partner_receivering_id" | ||
ref="l10n_br_base.res_partner_cliente4_am" | ||
/> | ||
|
||
<field name="user_id" ref="base.user_demo" /> | ||
<field name="fiscal_operation_type">out</field> | ||
</record> | ||
|
||
<record id="demo_cte_lc_modal_rodoviario_1-1" model="l10n_br_fiscal.document.line"> | ||
<field name="document_id" ref="demo_cte_lc_modal_rodoviario" /> | ||
<field name="name">Frete</field> | ||
<field name="product_id" ref="product.product_product_9" /> | ||
<field name="uom_id" ref="uom.product_uom_unit" /> | ||
<field name="price_unit">100</field> | ||
<field name="quantity">1</field> | ||
<field name="fiscal_operation_type">out</field> | ||
<field name="fiscal_operation_id" ref="l10n_br_fiscal.fo_venda" /> | ||
<field name="fiscal_operation_line_id" ref="l10n_br_fiscal.fo_venda_revenda" /> | ||
</record> | ||
|
||
<function model="l10n_br_fiscal.document.line" name="_onchange_product_id_fiscal"> | ||
<value eval="[ref('l10n_br_cte.demo_cte_lc_modal_rodoviario_1-1')]" /> | ||
</function> | ||
|
||
<function | ||
model="l10n_br_fiscal.document.line" | ||
name="_onchange_fiscal_operation_line_id" | ||
> | ||
<value eval="[ref('l10n_br_cte.demo_cte_lc_modal_rodoviario_1-1')]" /> | ||
</function> | ||
|
||
<!-- CTe Test - Modal Rodoviário - SN --> | ||
<record id="demo_cte_sn_modal_rodoviario" model="l10n_br_fiscal.document"> | ||
<field name="fiscal_operation_id" ref="l10n_br_fiscal.fo_venda" /> | ||
<field name="document_type_id" ref="l10n_br_fiscal.document_57" /> | ||
<field | ||
name="document_serie_id" | ||
ref="l10n_br_fiscal.empresa_sn_document_57_serie_1" | ||
/> | ||
<field name="company_id" ref="l10n_br_base.empresa_simples_nacional" /> | ||
<field name="document_number">574</field> | ||
<field name="document_serie">1</field> | ||
<field name="document_key">35240708318053000167570010000000311040445899</field> | ||
<field name="cte_environment">2</field> | ||
<field name="processador_edoc">oca</field> | ||
<field name="partner_id" ref="l10n_br_base.res_partner_cliente1_sp" /> | ||
|
||
<!--Remetente--> | ||
<field name="partner_sendering_id" ref="l10n_br_base.res_partner_cliente2_sp" /> | ||
|
||
<!--Expedidor--> | ||
<field | ||
name="partner_shippering_id" | ||
ref="l10n_br_base.res_partner_cliente2_sp" | ||
/> | ||
|
||
<!--Destinatario--> | ||
<field name="partner_shipping_id" ref="l10n_br_base.res_partner_cliente3_am" /> | ||
|
||
<!--Recebedor--> | ||
<field | ||
name="partner_receivering_id" | ||
ref="l10n_br_base.res_partner_cliente4_am" | ||
/> | ||
|
||
<field name="user_id" ref="base.user_demo" /> | ||
<field name="fiscal_operation_type">out</field> | ||
</record> | ||
|
||
<record id="demo_cte_sn_modal_rodoviario_1-1" model="l10n_br_fiscal.document.line"> | ||
<field name="document_id" ref="demo_cte_sn_modal_rodoviario" /> | ||
<field name="name">Frete</field> | ||
<field name="product_id" ref="product.product_product_9" /> | ||
<field name="uom_id" ref="uom.product_uom_unit" /> | ||
<field name="price_unit">100</field> | ||
<field name="quantity">1</field> | ||
<field name="fiscal_operation_type">out</field> | ||
<field name="fiscal_operation_id" ref="l10n_br_fiscal.fo_venda" /> | ||
<field name="fiscal_operation_line_id" ref="l10n_br_fiscal.fo_venda_revenda" /> | ||
</record> | ||
|
||
<function model="l10n_br_fiscal.document.line" name="_onchange_product_id_fiscal"> | ||
<value eval="[ref('l10n_br_cte.demo_cte_sn_modal_rodoviario_1-1')]" /> | ||
</function> | ||
|
||
<function | ||
model="l10n_br_fiscal.document.line" | ||
name="_onchange_fiscal_operation_line_id" | ||
> | ||
<value eval="[ref('l10n_br_cte.demo_cte_sn_modal_rodoviario_1-1')]" /> | ||
</function> | ||
|
||
|
||
</odoo> |
Oops, something went wrong.