Compare commits
6 Commits
14.0-accou
...
14.0-accou
Author | SHA1 | Date | |
---|---|---|---|
|
5c1d8b71e1 | ||
|
c33cd1749c | ||
|
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_chorus_notify/__init__.py
Normal file
3
account_chorus_notify/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import models
|
75
account_chorus_notify/__manifest__.py
Normal file
75
account_chorus_notify/__manifest__.py
Normal file
@@ -0,0 +1,75 @@
|
||||
# Copyright 2021 Elabore ()
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
"name": "account_chorus_notify",
|
||||
"version": "14.0.1.0.0",
|
||||
"author": "Elabore",
|
||||
"maintainer": "False",
|
||||
"website": "False",
|
||||
"license": "AGPL-3",
|
||||
"category": "False",
|
||||
"summary": "Send notification when chorus invoice failed",
|
||||
"description": """
|
||||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
=======================
|
||||
Account Chorus Notify
|
||||
=======================
|
||||
Send notification when chorus invoice failed
|
||||
|
||||
Installation
|
||||
============
|
||||
Just install account_chorus_notify, all dependencies will be installed by default.
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
Bugs are tracked on `GitHub Issues
|
||||
<https://github.com/elabore-coop/elabore-odoo-addons/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>`_.
|
||||
|
||||
|
||||
Funders
|
||||
-------
|
||||
The development of this module has been financially supported by:
|
||||
* Elabore (https://elabore.coop)
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
This module is maintained by ELABORE.
|
||||
|
||||
""",
|
||||
# any module necessary for this one to work correctly
|
||||
"depends": [
|
||||
"l10n_fr_chorus_account",
|
||||
],
|
||||
"external_dependencies": {
|
||||
"python": [],
|
||||
},
|
||||
# always loaded
|
||||
"data": [
|
||||
|
||||
],
|
||||
# only loaded in demonstration mode
|
||||
"demo": [],
|
||||
"js": [],
|
||||
"css": [],
|
||||
"qweb": [],
|
||||
"installable": True,
|
||||
# Install this module automatically if all dependency have been previously
|
||||
# and independently installed. Used for synergetic or glue modules.
|
||||
"auto_install": False,
|
||||
"application": False,
|
||||
}
|
3
account_chorus_notify/models/__init__.py
Normal file
3
account_chorus_notify/models/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import chorus_flow
|
15
account_chorus_notify/models/chorus_flow.py
Normal file
15
account_chorus_notify/models/chorus_flow.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import models, fields, api, _
|
||||
|
||||
|
||||
class ChorusFlow(models.Model):
|
||||
_inherit = "chorus.flow"
|
||||
|
||||
def update_flow_status(self):
|
||||
res = super(ChorusFlow, self).update_flow_status()
|
||||
for flow in self:
|
||||
if flow.status == 'IN_REJETE':
|
||||
for invoice in flow.invoice_ids:
|
||||
invoice.message_post(body=_("Chorus flow n°%s rejected.")%(flow.name,))
|
||||
return res
|
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">
|
||||
|
Reference in New Issue
Block a user