Compare commits
9 Commits
14.0-accou
...
16.0-accou
Author | SHA1 | Date | |
---|---|---|---|
a4e51a8c3e | |||
0885712a7e | |||
0f14b1c55d | |||
fe8ab134f1 | |||
8ec9fb68f7 | |||
|
2d799eaf8c | ||
|
5074244aa6 | ||
|
2c3a647c17 | ||
|
6dea772ace |
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*.*~
|
||||
*.pyc
|
@@ -15,10 +15,10 @@
|
||||
<field name="model">budget.forecast.model.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="top">
|
||||
<field name="budget_model" />
|
||||
<field name="display_type" />
|
||||
<field name="product_id" />
|
||||
<field name="name" />
|
||||
<field name="budget_model" required="True" />
|
||||
<field name="display_type" required="True" />
|
||||
<field name="product_id" required="True" />
|
||||
<field name="name" required="True" />
|
||||
<field name="parent_id" />
|
||||
</tree>
|
||||
</field>
|
||||
|
3
account_partner_account_number/__init__.py
Normal file
3
account_partner_account_number/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import models
|
63
account_partner_account_number/__manifest__.py
Normal file
63
account_partner_account_number/__manifest__.py
Normal file
@@ -0,0 +1,63 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
{
|
||||
"name": "Account partner account number",
|
||||
"category": "Account",
|
||||
"version": "14.0.1.0",
|
||||
"summary": "Add account number in partner",
|
||||
"author": "Elabore",
|
||||
"website": "https://elabore.coop/",
|
||||
"installable": True,
|
||||
"application": False,
|
||||
"auto_install": False,
|
||||
"description": """
|
||||
======================================
|
||||
Account partner account number
|
||||
======================================
|
||||
This module add a new field in partner, visible in account move lines for payable and receivable accounts
|
||||
|
||||
Installation
|
||||
============
|
||||
Just install account_partner_account_number, all dependencies will be installed by default.
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
Bugs are tracked on `GitHub Issues
|
||||
<https://github.com/elabore-coop/.../issues>`_. In case of trouble, please
|
||||
check there if your issue has already been reported. If you spotted it first,
|
||||
help us smashing it by providing a detailed and welcomed feedback.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Images
|
||||
------
|
||||
* Elabore: `Icon <https://elabore.coop/web/image/res.company/1/logo?unique=f3db262>`_.
|
||||
|
||||
Contributors
|
||||
------------
|
||||
* Clément Thoams
|
||||
|
||||
Funders
|
||||
-------
|
||||
The development of this module has been financially supported by:
|
||||
* Elabore (https://elabore.coop)
|
||||
* Rovalterre
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
This module is maintained by ELABORE.
|
||||
|
||||
""",
|
||||
"depends": [
|
||||
"base",
|
||||
"account",
|
||||
],
|
||||
"data": [
|
||||
"views/account_move_views.xml",
|
||||
"views/partner_views.xml",
|
||||
],
|
||||
"qweb": [],
|
||||
}
|
61
account_partner_account_number/i18n/fr.po
Normal file
61
account_partner_account_number/i18n/fr.po
Normal file
@@ -0,0 +1,61 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_partner_account_number
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 14.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-06-09 07:37+0000\n"
|
||||
"PO-Revision-Date: 2023-06-09 07:37+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: account_partner_account_number
|
||||
#: model:ir.model.fields,field_description:account_partner_account_number.field_account_move_line__account_code
|
||||
msgid "Account code"
|
||||
msgstr "Code comptable"
|
||||
|
||||
#. module: account_partner_account_number
|
||||
#: model:ir.model.fields,field_description:account_partner_account_number.field_res_partner__account_code
|
||||
#: model:ir.model.fields,field_description:account_partner_account_number.field_res_users__account_code
|
||||
#: model_terms:ir.ui.view,arch_db:account_partner_account_number.view_partner_property_form_account_code
|
||||
msgid "Account code"
|
||||
msgstr "Code comptable"
|
||||
|
||||
#. module: account_partner_account_number
|
||||
#: model:ir.model.constraint,message:account_partner_account_number.constraint_res_partner_account_coder_unique
|
||||
msgid "Choose another value of account code - it has to be unique!"
|
||||
msgstr "Choisissez une autre valeur de code comptable - il doit être unique !"
|
||||
|
||||
#. module: account_partner_account_number
|
||||
#: model:ir.model,name:account_partner_account_number.model_res_partner
|
||||
msgid "Contact"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_partner_account_number
|
||||
#: model:ir.model.fields,field_description:account_partner_account_number.field_account_move_line__display_name
|
||||
#: model:ir.model.fields,field_description:account_partner_account_number.field_res_partner__display_name
|
||||
msgid "Display Name"
|
||||
msgstr "Nom affiché"
|
||||
|
||||
#. module: account_partner_account_number
|
||||
#: model:ir.model.fields,field_description:account_partner_account_number.field_account_move_line__id
|
||||
#: model:ir.model.fields,field_description:account_partner_account_number.field_res_partner__id
|
||||
msgid "ID"
|
||||
msgstr "Identifiant"
|
||||
|
||||
#. module: account_partner_account_number
|
||||
#: model:ir.model,name:account_partner_account_number.model_account_move_line
|
||||
msgid "Journal Item"
|
||||
msgstr "Écriture comptable"
|
||||
|
||||
#. module: account_partner_account_number
|
||||
#: model:ir.model.fields,field_description:account_partner_account_number.field_account_move_line____last_update
|
||||
#: model:ir.model.fields,field_description:account_partner_account_number.field_res_partner____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr "Dernière modification le"
|
3
account_partner_account_number/models/__init__.py
Normal file
3
account_partner_account_number/models/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from . import res_partner
|
||||
from . import account_move_line
|
20
account_partner_account_number/models/account_move_line.py
Normal file
20
account_partner_account_number/models/account_move_line.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from odoo import fields, models, _, api
|
||||
|
||||
|
||||
class AccountMoveLine(models.Model):
|
||||
_inherit = "account.move.line"
|
||||
|
||||
account_code = fields.Char(compute='get_account_code', string="Account code")
|
||||
|
||||
@api.depends('partner_id','account_id')
|
||||
def get_account_code(self):
|
||||
"""
|
||||
assign account number of partner if move line is receivable (Customers) or payable (Suppliers)
|
||||
"""
|
||||
for account_move_line in self:
|
||||
if account_move_line.account_id.id == account_move_line.partner_id.commercial_partner_id.property_account_receivable_id.id or \
|
||||
account_move_line.account_id.id == account_move_line.partner_id.commercial_partner_id.property_account_payable_id.id:
|
||||
account_move_line.account_code = account_move_line.partner_id.commercial_partner_id.account_code
|
||||
else:
|
||||
account_move_line.account_code = ''
|
||||
|
13
account_partner_account_number/models/res_partner.py
Normal file
13
account_partner_account_number/models/res_partner.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from odoo import fields, models, _
|
||||
|
||||
|
||||
class ResPartner(models.Model):
|
||||
_inherit = "res.partner"
|
||||
|
||||
account_code = fields.Char('Account code')
|
||||
|
||||
_sql_constraints = [
|
||||
('account_coder_unique',
|
||||
'unique(account_code)',
|
||||
'Choose another value of account code - it has to be unique!')
|
||||
]
|
14
account_partner_account_number/views/account_move_views.xml
Normal file
14
account_partner_account_number/views/account_move_views.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="view_move_line_tree_inherit_account_code" model="ir.ui.view">
|
||||
<field name="name">account.move.line.tree.inherit.account.number</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field eval="100" name="priority"/>
|
||||
<field name="inherit_id" ref="account.view_move_line_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='partner_id']" position="after">
|
||||
<field name="account_code" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
17
account_partner_account_number/views/partner_views.xml
Normal file
17
account_partner_account_number/views/partner_views.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="view_partner_property_form_account_code" model="ir.ui.view">
|
||||
<field name="name">res.partner.property.form.inherit.account.number</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="priority">2</field>
|
||||
<field name="inherit_id" ref="account.view_partner_property_form"/>
|
||||
<field name="groups_id" eval="[(5,)]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[@name='accounting']/group" position="inside">
|
||||
<group string="Account code" name="account_code" groups="account.group_account_readonly">
|
||||
<field name="account_code" />
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
@@ -1,7 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="view_move_title_tree" model="ir.ui.view">
|
||||
<field name="name">amove_title.move.tree</field>
|
||||
<field name="name">move_title.move.tree</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='name']" position="after">
|
||||
<field name="move_title" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_invoice_title_tree" model="ir.ui.view">
|
||||
<field name="name">invoice_title.move.tree</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_invoice_tree" />
|
||||
<field name="arch" type="xml">
|
||||
|
0
account_usability_elabore/__init__.py
Normal file
0
account_usability_elabore/__init__.py
Normal file
25
account_usability_elabore/__manifest__.py
Normal file
25
account_usability_elabore/__manifest__.py
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
'name': 'Account Usability Elabore',
|
||||
'version': '16.0.1.1.0',
|
||||
'description': 'account usability Elabore : improve account usability in v16',
|
||||
'summary': '',
|
||||
'author': '',
|
||||
'website': '',
|
||||
'license': 'AGPL-3',
|
||||
'category': '',
|
||||
'depends': [
|
||||
'account','base','account_reconcile_oca','account_check_deposit','account_cash_deposit'
|
||||
],
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
'views/account_search.xml',
|
||||
'views/account_menu.xml',
|
||||
'views/account_tree_view.xml',
|
||||
],
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
'application': False,
|
||||
'assets': {
|
||||
|
||||
}
|
||||
}
|
26
account_usability_elabore/i18n/fr.po
Normal file
26
account_usability_elabore/i18n/fr.po
Normal file
@@ -0,0 +1,26 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_usability_elabore
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 16.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-01-18 10:32+0000\n"
|
||||
"PO-Revision-Date: 2024-01-18 10:32+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: account_usability_elabore
|
||||
#: model:ir.ui.menu,name:account_usability_elabore.deposit_menu
|
||||
msgid "Deposit"
|
||||
msgstr "Dépôt"
|
||||
|
||||
#. module: account_usability_elabore
|
||||
#: model_terms:ir.ui.view,arch_db:account_usability_elabore.account_move_line_search_reconcile_view_inherit
|
||||
msgid "Amount/Name/Partner"
|
||||
msgstr "Montant/Libellé/Partenaire"
|
3
account_usability_elabore/security/ir.model.access.csv
Normal file
3
account_usability_elabore/security/ir.model.access.csv
Normal file
@@ -0,0 +1,3 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
account.access_account_bank_statement,account.bank.statement,account.model_account_bank_statement,account.group_account_user,1,1,1,0
|
||||
account.access_account_bank_statement_line,account.bank.statement.line,account.model_account_bank_statement_line,account.group_account_user,1,1,1,0
|
|
16
account_usability_elabore/views/account_menu.xml
Normal file
16
account_usability_elabore/views/account_menu.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<menuitem
|
||||
id="deposit_menu"
|
||||
name="Deposit"
|
||||
parent="account.menu_finance"
|
||||
sequence="5"/>
|
||||
<menuitem
|
||||
id="account_cash_deposit.account_cash_deposit_menu"
|
||||
parent="account_usability_elabore.deposit_menu"
|
||||
sequence="1"/>
|
||||
<menuitem
|
||||
id="account_check_deposit.menu_check_deposit_tree"
|
||||
parent="account_usability_elabore.deposit_menu"
|
||||
sequence="2"/>
|
||||
</odoo>
|
18
account_usability_elabore/views/account_search.xml
Normal file
18
account_usability_elabore/views/account_search.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="account_move_line_search_reconcile_view_inherit" model="ir.ui.view">
|
||||
<field name="name">Account move line search reconcile view inherit</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="inherit_id" ref="account_reconcile_oca.account_move_line_search_reconcile_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<field name="name" position="attributes">
|
||||
<attribute name="filter_domain">['|', '|', '|', ('name', 'ilike', self), ('amount_residual', 'ilike', self), ('ref', 'ilike', self), ('partner_id', 'ilike', self)]</attribute>
|
||||
<attribute name="string">Amount/Name/Partner</attribute>
|
||||
</field>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
17
account_usability_elabore/views/account_tree_view.xml
Normal file
17
account_usability_elabore/views/account_tree_view.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="account_view_tree_inherit_message_attachment" model="ir.ui.view">
|
||||
<field name="name">account view tree inherit message attachment</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_in_invoice_bill_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<field name="state" position="after">
|
||||
<field name="message_attachment_count"/>
|
||||
</field>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
Reference in New Issue
Block a user