mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
3
account_move_line_partner_country/__init__.py
Normal file
3
account_move_line_partner_country/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import models
|
||||
20
account_move_line_partner_country/__manifest__.py
Normal file
20
account_move_line_partner_country/__manifest__.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# Copyright 2021 CorporateHub (https://corporatehub.eu)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
{
|
||||
"name": "Accounting: Account Move Line Partner's Country",
|
||||
"summary": "Show Partner's Country on Account Move Line.",
|
||||
"version": "12.0.1.0.0",
|
||||
"category": "Accounting",
|
||||
"website": "https://github.com/OCA/account-financial-tools",
|
||||
"author": "CorporateHub, Odoo Community Association (OCA)",
|
||||
"maintainers": ["alexey-pelykh"],
|
||||
"license": "AGPL-3",
|
||||
"application": False,
|
||||
"installable": True,
|
||||
"depends": [
|
||||
"account",
|
||||
],
|
||||
"data": [
|
||||
"views/account_move_line.xml",
|
||||
],
|
||||
}
|
||||
3
account_move_line_partner_country/models/__init__.py
Normal file
3
account_move_line_partner_country/models/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import account_move_line
|
||||
@@ -0,0 +1,15 @@
|
||||
# Copyright 2021 CorporateHub (https://corporatehub.eu)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class AccountMoveLine(models.Model):
|
||||
_inherit = "account.move.line"
|
||||
|
||||
partner_country_id = fields.Many2one(
|
||||
comodel_name="res.country",
|
||||
string="Partner's Country",
|
||||
related="partner_id.country_id",
|
||||
store=True,
|
||||
)
|
||||
@@ -0,0 +1,3 @@
|
||||
* `CorporateHub <https://corporatehub.eu/>`__
|
||||
|
||||
* Alexey Pelykh <alexey.pelykh@corphub.eu>
|
||||
1
account_move_line_partner_country/readme/DESCRIPTION.rst
Normal file
1
account_move_line_partner_country/readme/DESCRIPTION.rst
Normal file
@@ -0,0 +1 @@
|
||||
This module allows viewing Partner's Country on Account Move Line.
|
||||
1
account_move_line_partner_country/tests/__init__.py
Normal file
1
account_move_line_partner_country/tests/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2021 CorporateHub (https://corporatehub.eu)
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<record id="view_move_line_form" model="ir.ui.view">
|
||||
<field name="name">account.move.line.form</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="inherit_id" ref="account.view_move_line_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="partner_id" position="after">
|
||||
<field name="partner_country_id"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_move_line_filter" model="ir.ui.view">
|
||||
<field name="name">account.move.line.filter</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="inherit_id" ref="account.view_account_move_line_filter"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="partner_id" position="after">
|
||||
<field name="partner_country_id"/>
|
||||
</field>
|
||||
<filter name="partner" position="after">
|
||||
<filter string="Partner's Country" name="groupby_partner_country_id" context="{'group_by':'partner_country_id'}"/>
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user