[IMP] account_sub_accounts : apply changes proposed by pre-commit
Some checks failed
pre-commit / pre-commit (pull_request) Failing after 1m28s
Some checks failed
pre-commit / pre-commit (pull_request) Failing after 1m28s
This commit is contained in:
@@ -1 +1 @@
|
|||||||
from . import models
|
from . import models
|
||||||
|
|||||||
@@ -1,21 +1,22 @@
|
|||||||
{
|
{
|
||||||
'name': 'Account Sub-accounts',
|
"name": "Account Sub-accounts",
|
||||||
'version': '18.0.1.0.0',
|
"version": "18.0.1.0.0",
|
||||||
'summary': 'Add sub-account fields in res.partners and account.move.line, and sync them.',
|
"summary": "Add sub-account fields in res.partners and account.move.line, "
|
||||||
'author': 'Elabore',
|
"and sync them.",
|
||||||
'website': 'https://elabore.coop/',
|
"author": "Elabore",
|
||||||
'license': 'AGPL-3',
|
"website": "https://git.elabore.coop/elabore/account-tools",
|
||||||
'category': 'Accounting',
|
"license": "AGPL-3",
|
||||||
'depends': [
|
"category": "Accounting",
|
||||||
'account',
|
"depends": [
|
||||||
'base',
|
"account",
|
||||||
|
"base",
|
||||||
],
|
],
|
||||||
'data': [
|
"data": [
|
||||||
'views/res_partner_views.xml',
|
"views/res_partner_views.xml",
|
||||||
'views/account_move_line_views.xml',
|
"views/account_move_line_views.xml",
|
||||||
],
|
],
|
||||||
'installable': True,
|
"installable": True,
|
||||||
'auto_install': False,
|
"auto_install": False,
|
||||||
'application': False,
|
"application": False,
|
||||||
'assets': {},
|
"assets": {},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,11 +5,9 @@ class AccountMoveLine(models.Model):
|
|||||||
_inherit = "account.move.line"
|
_inherit = "account.move.line"
|
||||||
|
|
||||||
sub_account_customer = fields.Char(
|
sub_account_customer = fields.Char(
|
||||||
string="Custommer sub-account",
|
string="Custommer sub-account", related="partner_id.sub_account_customer"
|
||||||
related="partner_id.sub_account_customer"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
sub_account_supplier = fields.Char(
|
sub_account_supplier = fields.Char(
|
||||||
string="Supplier sub-account",
|
string="Supplier sub-account", related="partner_id.sub_account_supplier"
|
||||||
related="partner_id.sub_account_supplier"
|
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,16 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data>
|
<record id="account_move_line_tree_sub_accounts_view" model="ir.ui.view">
|
||||||
<record id="account_move_line_tree_sub_accounts_view" model="ir.ui.view">
|
<field name="name">Account Move Line sub-accounts tree view</field>
|
||||||
<field name="name">Account Move Line sub-accounts tree view</field>
|
<field name="model">account.move.line</field>
|
||||||
<field name="model">account.move.line</field>
|
<field name="inherit_id" ref="account.view_move_line_tree" />
|
||||||
<field name="inherit_id" ref="account.view_move_line_tree"/>
|
<field name="arch" type="xml">
|
||||||
<field name="arch" type="xml">
|
<xpath expr="//field[@name='analytic_distribution']" position="after">
|
||||||
<xpath expr="//field[@name='analytic_distribution']" position="after">
|
<field name="sub_account_customer" optional="hide" />
|
||||||
<field name="sub_account_customer" optional="hide"/>
|
<field name="sub_account_supplier" optional="hide" />
|
||||||
<field name="sub_account_supplier" optional="hide"/>
|
</xpath>
|
||||||
</xpath>
|
</field>
|
||||||
</field>
|
</record>
|
||||||
</record>
|
|
||||||
</data>
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -1,18 +1,16 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data>
|
<record id="res_partner_form_sub_accounts_view" model="ir.ui.view">
|
||||||
<record id="res_partner_form_sub_accounts_view" model="ir.ui.view">
|
<field name="name">Res Partner sub-accounts form view</field>
|
||||||
<field name="name">Res Partner sub-accounts form view</field>
|
<field name="model">res.partner</field>
|
||||||
<field name="model">res.partner</field>
|
<field name="inherit_id" ref="account.view_partner_property_form" />
|
||||||
<field name="inherit_id" ref="account.view_partner_property_form"/>
|
<field name="arch" type="xml">
|
||||||
<field name="arch" type="xml">
|
<xpath expr="//page[@name='accounting']/group" position="inside">
|
||||||
<xpath expr="//page[@name='accounting']/group" position="inside">
|
<group string="Sub-accounts" name="sub_accounts">
|
||||||
<group string="Sub-accounts" name="sub_accounts">
|
<field name="sub_account_customer" />
|
||||||
<field name="sub_account_customer" />
|
<field name="sub_account_supplier" />
|
||||||
<field name="sub_account_supplier" />
|
</group>
|
||||||
</group>
|
</xpath>
|
||||||
</xpath>
|
</field>
|
||||||
</field>
|
</record>
|
||||||
</record>
|
|
||||||
</data>
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
Reference in New Issue
Block a user