-
-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by mileo
- Loading branch information
Showing
29 changed files
with
1,181 additions
and
60 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
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,31 @@ | ||
# Copyright (C) 2023 Felipe Zago Rodrigues - Kmee | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
from odoo import fields, models | ||
|
||
from odoo.addons.l10n_br_fiscal.constants.fiscal import FISCAL_IN_OUT_ALL | ||
|
||
|
||
class DocumentImportWizardMixin(models.TransientModel): | ||
|
||
_name = "l10n_br_fiscal.document.import.wizard.mixin" | ||
_inherit = "l10n_br_fiscal.base.wizard.mixin" | ||
|
||
company_id = fields.Many2one( | ||
comodel_name="res.company", | ||
string="Company", | ||
default=lambda self: self.env.company.id, | ||
) | ||
|
||
importing_type = fields.Selection( | ||
selection=[("xml_file", "XML File")], | ||
string="Importing Type", | ||
required=True, | ||
default="xml_file", | ||
) | ||
|
||
xml = fields.Binary(string="XML to Import") | ||
|
||
fiscal_operation_type = fields.Selection( | ||
string="Fiscal Operation Type", selection=FISCAL_IN_OUT_ALL | ||
) |
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,41 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!-- Copyright 2023 KMEE | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> | ||
<odoo> | ||
|
||
<record id="l10n_br_fiscal_document_import_wizard_mixin_form" model="ir.ui.view"> | ||
<field name="name">l10n_br_fiscal.document.import.wizard.mixin.form</field> | ||
<field name="model">l10n_br_fiscal.document.import.wizard.mixin</field> | ||
<field name="arch" type="xml"> | ||
<form string="Import Document"> | ||
<group> | ||
<field name="importing_type" /> | ||
<field | ||
name="xml" | ||
attrs="{ | ||
'invisible': [('importing_type', '!=', 'xml_file')], | ||
'required': [('importing_type', '=', 'xml_file')] | ||
}" | ||
/> | ||
</group> | ||
<separator | ||
string="Preview Data" | ||
attrs="{'invisible': [('xml', '=', False)]}" | ||
/> | ||
<group id="document_info" attrs="{'invisible': [('xml', '=', False)]}"> | ||
<group> | ||
<field name="document_key" readonly="1" /> | ||
<field name="document_number" readonly="1" /> | ||
<field name="document_serie" readonly="1" /> | ||
</group> | ||
|
||
<group> | ||
<field name="partner_id" readonly="1" /> | ||
</group> | ||
</group> | ||
<footer /> | ||
</form> | ||
</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 |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
|
||
from .hooks import post_init_hook | ||
from . import models | ||
from . import tests | ||
from . import wizards |
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
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,15 @@ | ||
# Copyright (C) 2022 Renan Hiroki Bastos - Kmee | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class SupplierInfo(models.Model): | ||
_inherit = "product.supplierinfo" | ||
|
||
partner_uom_id = fields.Many2one( | ||
comodel_name="uom.uom", | ||
string="Partner Unit of Measure", | ||
) | ||
|
||
partner_uom_factor = fields.Float(string="Partner UOM Factor", default=1) |
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
Oops, something went wrong.