Skip to content

Commit

Permalink
[ADD] eng_customer_fiscal_comments: customer fiscal comments
Browse files Browse the repository at this point in the history
  • Loading branch information
CristianoMafraJunior committed Feb 3, 2025
1 parent 5ec2706 commit 0011afe
Show file tree
Hide file tree
Showing 7 changed files with 111 additions and 0 deletions.
1 change: 1 addition & 0 deletions eng_customer_fiscal_comments/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
23 changes: 23 additions & 0 deletions eng_customer_fiscal_comments/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "Customer Fiscal Comments ",
"summary": """
The Customer Fiscal Comments module enables users
to add tax-related comments to customer profiles,
which are displayed on invoices for better compliance.
""",
"license": "AGPL-3",
"author": "Engenere",
"maintainers": ["cristianomafrajunior"],
"website": "https://engenere.one",
"category": "Services/Industry",
"version": "14.0.1.0.0",
"development_status": "Beta",
"depends": [
"account",
"l10n_br_nfe",
],
"data": [
"views/res_partner_views.xml",
],
"installable": True,
}
50 changes: 50 additions & 0 deletions eng_customer_fiscal_comments/i18n/pt_BR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * eng_customer_fiscal_comments
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-10-14 20:17+0000\n"
"PO-Revision-Date: 2024-10-14 20:17+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: eng_customer_fiscal_comments
#: model:ir.model,name:eng_customer_fiscal_comments.model_res_partner
msgid "Contact"
msgstr "Contato"

#. module: eng_customer_fiscal_comments
#: model:ir.model.fields,field_description:eng_customer_fiscal_comments.field_l10n_br_fiscal_document_mixin_methods__display_name
#: model:ir.model.fields,field_description:eng_customer_fiscal_comments.field_res_partner__display_name
msgid "Display Name"
msgstr "Nome de exibição"

#. module: eng_customer_fiscal_comments
#: model:ir.model.fields,field_description:eng_customer_fiscal_comments.field_res_partner__fiscal_comments
#: model:ir.model.fields,field_description:eng_customer_fiscal_comments.field_res_users__fiscal_comments
msgid "Fiscal Comments"
msgstr "Comentários Fiscais"

#. module: eng_customer_fiscal_comments
#: model:ir.model,name:eng_customer_fiscal_comments.model_l10n_br_fiscal_document_mixin_methods
msgid "Fiscal Document Mixin Methods"
msgstr ""

#. module: eng_customer_fiscal_comments
#: model:ir.model.fields,field_description:eng_customer_fiscal_comments.field_l10n_br_fiscal_document_mixin_methods__id
#: model:ir.model.fields,field_description:eng_customer_fiscal_comments.field_res_partner__id
msgid "ID"
msgstr "ID"

#. module: eng_customer_fiscal_comments
#: model:ir.model.fields,field_description:eng_customer_fiscal_comments.field_l10n_br_fiscal_document_mixin_methods____last_update
#: model:ir.model.fields,field_description:eng_customer_fiscal_comments.field_res_partner____last_update
msgid "Last Modified on"
msgstr "Última atualização em"
2 changes: 2 additions & 0 deletions eng_customer_fiscal_comments/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import res_partner
from . import document_mixin_methods
13 changes: 13 additions & 0 deletions eng_customer_fiscal_comments/models/document_mixin_methods.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from odoo import models


class DocumentMixinMethods(models.AbstractModel):
_inherit = "l10n_br_fiscal.document.mixin.methods"

def _document_comment(self):
for d in self:
if d.partner_id:
d.manual_fiscal_additional_data = d.partner_id.fiscal_comments
super()._document_comment()
else:
d.manual_fiscal_additional_data = False
7 changes: 7 additions & 0 deletions eng_customer_fiscal_comments/models/res_partner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from odoo import fields, models


class ResPartner(models.Model):
_inherit = "res.partner"

fiscal_comments = fields.Text()
15 changes: 15 additions & 0 deletions eng_customer_fiscal_comments/views/res_partner_views.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<odoo>
<record id="eng_customer_fiscal_comments_view" model="ir.ui.view">
<field name="name">res.partner.property.form.inherit</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form" />
<field name="arch" type="xml">
<xpath
expr="//field[@name='property_account_position_id']"
position="after"
>
<field name="fiscal_comments" />
</xpath>
</field>
</record>
</odoo>

0 comments on commit 0011afe

Please sign in to comment.