-
-
Notifications
You must be signed in to change notification settings - Fork 247
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
Showing
10 changed files
with
279 additions
and
23 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
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
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,27 @@ | ||
# Copyright 2023 KMEE | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import api, fields | ||
|
||
from odoo.addons.spec_driven_model.models import spec_models | ||
|
||
|
||
class CTeCargoQuantityInfos(spec_models.SpecModel): | ||
_name = "l10n_br_cte.cargo.quantity.infos" | ||
_inherit = "cte.40.tcte_infq" | ||
_binding_module = "nfelib.cte.bindings.v4_0.cte_tipos_basico_v4_00" | ||
_description = "Informações de quantidades da Carga do CT-e" | ||
|
||
document_id = fields.Many2one(comodel_name="l10n_br_fiscal.document") | ||
|
||
cte40_cUnid = fields.Selection( | ||
required=True, | ||
) | ||
|
||
cte40_tpMed = fields.Char( | ||
required=True, | ||
) | ||
|
||
cte40_qCarga = fields.Float( | ||
required=True, | ||
) |
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,22 @@ | ||
# Copyright 2023 KMEE (Luiz Felipe do Divino <[email protected]>) | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
|
||
from odoo import fields | ||
|
||
from odoo.addons.spec_driven_model.models import spec_models | ||
|
||
|
||
class CTeSupplement(spec_models.StackedModel): | ||
_name = "l10n_br_fiscal.document.supplement" | ||
_inherit = ["l10n_br_fiscal.document.supplement", "cte.40.tcte_infctesupl"] | ||
_stacked = "cte.40.tcte_infctesupl" | ||
_schema_name = "cte" | ||
_schema_version = "4.0.0" | ||
_odoo_module = "l10n_br_cte" | ||
_spec_module = "odoo.addons.l10n_br_cte_spec.models.v4_0.cte_tipos_basico_v4_00" | ||
_binding_module = "nfelib.cte.bindings.v4_0.cte_tipos_basico_v4_00" | ||
_field_prefix = "cte40_" | ||
_spec_tab_name = "CTe" | ||
_description = "Informações Complementares do Documento Fiscal" | ||
|
||
cte40_qrCodCTe = fields.Char(related="qrcode") |
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 2023 KMEE | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import api, fields | ||
|
||
from odoo.addons.spec_driven_model.models import spec_models | ||
|
||
|
||
class CTeCargoQuantityInfos(spec_models.SpecModel): | ||
_name = "l10n_br_cte.transported.vehicles" | ||
_inherit = "cte.40.veicnovos" | ||
_binding_module = "nfelib.cte.bindings.v4_0.cte_tipos_basico_v4_00" | ||
_description = "Informações dos veículos transportados" | ||
|
||
document_id = fields.Many2one(comodel_name="l10n_br_fiscal.document") | ||
|
||
currency_id = fields.Many2one( | ||
comodel_name="res.currency", | ||
related="document_id.company_id.currency_id", | ||
) | ||
|
||
cte40_chassi = fields.Char(string="Chassi do veículo", required=True) | ||
|
||
cte40_cCor = fields.Char( | ||
string="Cor do veículo", | ||
required=True, | ||
) | ||
|
||
cte40_xCor = fields.Char(string="Descrição da cor", required=True) | ||
|
||
cte40_cMod = fields.Char( | ||
string="Código Marca Modelo", | ||
required=True, | ||
) | ||
|
||
cte40_vUnit = fields.Monetary( | ||
string="Valor Unitário do Veículo", | ||
required=True, | ||
currency_field="currency_id", | ||
) | ||
|
||
cte40_vFrete = fields.Monetary( | ||
string="Frete Unitário", | ||
required=True, | ||
currency_field="currency_id", | ||
) |
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,60 @@ | ||
# Copyright 2023 KMEE | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import api, fields | ||
|
||
from odoo.addons.spec_driven_model.models import spec_models | ||
|
||
|
||
class CTeNormalInfos(spec_models.StackedModel): | ||
_name = "l10n_br_cte.normal.infos" | ||
_inherit = ["cte.40.tcte_infctenorm"] | ||
_stacked = "cte.40.tcte_infctenorm" | ||
_field_prefix = "cte40_" | ||
_schema_name = "cte" | ||
_schema_version = "4.0.0" | ||
_odoo_module = "l10n_br_cte" | ||
_spec_module = "odoo.addons.l10n_br_cte_spec.models.v4_0.cte_tipos_basico_v4_00" | ||
_binding_module = "nfelib.cte.bindings.v4_0.cte_tipos_basico_v4_00" | ||
_spec_tab_name = "CTe" | ||
_description = "Grupo de informações do CTe Normal e Substituto" | ||
_force_stack_paths = "infctenorm.infdoc" | ||
|
||
document_id = fields.Many2one(comodel_name="l10n_br_fiscal.document") | ||
|
||
currency_id = fields.Many2one( | ||
comodel_name="res.currency", | ||
related="document_id.company_id.currency_id", | ||
) | ||
|
||
cte40_vCarga = fields.Monetary( | ||
related="document_id.cte40_vCarga", | ||
currency_field="currency_id", | ||
) | ||
|
||
cte40_proPred = fields.Char( | ||
related="document_id.cte40_proPred", | ||
) | ||
|
||
cte40_xOutCat = fields.Char( | ||
related="document_id.cte40_xOutCat", | ||
) | ||
|
||
cte40_infQ = fields.One2many( | ||
comodel_name="l10n_br_cte.cargo.quantity.infos", | ||
related="document_id.cte40_infQ", | ||
) | ||
|
||
cte40_vCargaAverb = fields.Monetary( | ||
related="document_id.cte40_vCargaAverb", | ||
) | ||
|
||
cte40_veicNovos = fields.One2many( | ||
comodel_name="l10n_br_cte.transported.vehicles", | ||
related="document_id.cte40_veicNovos", | ||
) | ||
|
||
cte40_infNFe = fields.One2many( | ||
comodel_name="l10n_br_fiscal.document.related", | ||
related="document_id.document_related_ids", | ||
) |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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