Merge PR #1168 into 12.0

Signed-off-by dreispt
This commit is contained in:
OCA-git-bot
2021-12-04 14:42:02 +00:00
8 changed files with 79 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import models

View 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",
],
}

View File

@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import account_move_line

View File

@@ -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,
)

View File

@@ -0,0 +1,3 @@
* `CorporateHub <https://corporatehub.eu/>`__
* Alexey Pelykh <alexey.pelykh@corphub.eu>

View File

@@ -0,0 +1 @@
This module allows viewing Partner's Country on Account Move Line.

View File

@@ -0,0 +1 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

View File

@@ -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>