Compare commits
131 Commits
14.0-imp-a
...
14-account
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
252da11a30 | ||
|
|
4ee69f3bff | ||
|
|
46fcf5c0ef | ||
|
|
2c794033b0 | ||
|
|
2f784eb1a0 | ||
|
|
b019baed6e | ||
|
|
5532a8e165 | ||
|
|
a4c2a43cf7 | ||
|
|
f9246c6988 | ||
|
|
8364b42930 | ||
|
|
df370f4948 | ||
|
|
282f48db3e | ||
|
|
73c3c1a664 | ||
|
|
ac0afd6e2b | ||
|
|
a61d1458d8 | ||
|
|
0756beb8f5 | ||
|
|
0656d319ce | ||
|
|
a517fe67a8 | ||
|
|
2953baba22 | ||
|
|
5ea3f5adfd | ||
|
|
92a1b511c1 | ||
|
|
5ad925cee1 | ||
|
|
b8e335fb10 | ||
|
|
c693ccc62c | ||
|
|
983a25367f | ||
|
|
e36f88e23a | ||
|
|
18e9ed99ff | ||
|
|
dea732e270 | ||
|
|
150916200d | ||
|
|
48247b6d06 | ||
|
|
1971808c7d | ||
|
|
5724d31ac1 | ||
|
|
3ecfde15f0 | ||
|
|
44fedbf72e | ||
|
|
5f731d18f1 | ||
|
|
7477deeae3 | ||
|
|
2905b5f426 | ||
|
|
42287c674a | ||
|
|
01eff33bcb | ||
|
|
14bb6c5834 | ||
|
|
695eaed6b9 | ||
|
|
2a862a96d5 | ||
|
|
e435a250f3 | ||
|
|
facd3adf74 | ||
|
|
e5393eb88d | ||
|
|
2764390d40 | ||
|
|
d87ff61f2f | ||
|
|
a1f8185549 | ||
|
|
2997154c49 | ||
|
|
db24e73175 | ||
|
|
1e19fc906c | ||
|
|
b954772126 | ||
|
|
3f16203ffc | ||
|
|
21f5b53f8b | ||
|
|
02970847f4 | ||
|
|
16f5c9e955 | ||
|
|
875eadc516 | ||
|
|
f9f5d2e1b9 | ||
|
|
795e9a1737 | ||
|
|
492a7275c2 | ||
|
|
16c4b1cebe | ||
|
|
aad5fa4ff0 | ||
|
|
a0c1d5f55f | ||
|
|
a63c35fcbf | ||
|
|
03d045be1c | ||
|
|
a86f90b382 | ||
|
|
4aaee98c43 | ||
|
|
62627a63a6 | ||
|
|
6d69bc659e | ||
|
|
767c6a7fd9 | ||
|
|
fbdf814cb0 | ||
|
|
5c14e3199e | ||
|
|
70957e8404 | ||
|
|
6025575ae4 | ||
|
|
8486c75f90 | ||
|
|
a7a1eefb15 | ||
|
|
fe6a332ba9 | ||
|
|
bbb0cb17f7 | ||
|
|
71ebe2adea | ||
|
|
367cb1af93 | ||
|
|
a9292506ae | ||
|
|
15c77b3e8a | ||
|
|
4f13432bdc | ||
|
|
9aac933dcb | ||
|
|
deb37a1688 | ||
|
|
6d3e4d83c7 | ||
|
|
58afed17e5 | ||
|
|
b1b4620cdc | ||
|
|
164397fbac | ||
|
|
3ae427c5de | ||
|
|
db2cd72d04 | ||
|
|
44a92bde2d | ||
|
|
da8849e745 | ||
|
|
23222e997b | ||
|
|
3259a667eb | ||
|
|
9aa65925a9 | ||
|
|
f23aa52b08 | ||
|
|
f4687b886c | ||
|
|
daddd6c17c | ||
|
|
b790aac9d8 | ||
|
|
ca61dbce3f | ||
|
|
6242dec047 | ||
|
|
7b0e4bcb55 | ||
|
|
6c04b2dd5a | ||
|
|
01e209ed43 | ||
|
|
a69556bad0 | ||
|
|
82da5e1afb | ||
|
|
fd5e620373 | ||
|
|
9589db3abe | ||
|
|
c51a847f80 | ||
|
|
a800657f54 | ||
|
|
5fbe6d340a | ||
|
|
f3874a5903 | ||
|
|
f0faa58830 | ||
|
|
b38fc99978 | ||
|
|
372a18365c | ||
|
|
27d86cf151 | ||
|
|
d67141e128 | ||
|
|
02450832cb | ||
|
|
627c5980c9 | ||
|
|
6f27b13bf9 | ||
|
|
1de8676d4e | ||
|
|
9139955fac | ||
|
|
a5b5dd83a2 | ||
|
|
5f704d34a7 | ||
|
|
9087296a54 | ||
|
|
4ac5c23b30 | ||
|
|
403b24ffc1 | ||
|
|
85f8fe5b30 | ||
|
|
fde3dfae10 | ||
|
|
686c6f3900 |
@@ -1,23 +0,0 @@
|
|||||||
# © 2016-2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
|
|
||||||
{
|
|
||||||
"name": "Account Fiscal Position Payable Receivable",
|
|
||||||
"version": "12.0.1.0.0",
|
|
||||||
"category": "Accounting & Finance",
|
|
||||||
"license": "AGPL-3",
|
|
||||||
"summary": "Configure payable/receivable accounts on fiscal positions",
|
|
||||||
"description": """
|
|
||||||
Account Fiscal Position Payable Receivable
|
|
||||||
==========================================
|
|
||||||
|
|
||||||
This module allows to configure a special *Partner Receivable Account* and a special *Partner Payable Account* on fiscal positions. This is used in the onchange of the fiscal position of partners.
|
|
||||||
|
|
||||||
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
|
|
||||||
""",
|
|
||||||
"author": "Akretion",
|
|
||||||
"website": "http://www.akretion.com",
|
|
||||||
"depends": ["account"],
|
|
||||||
"data": ["views/account_fiscal_position_view.xml"],
|
|
||||||
"installable": False,
|
|
||||||
}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
from . import account_fiscal_position
|
|
||||||
from . import res_partner
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# © 2016-2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
|
|
||||||
from odoo import models, fields
|
|
||||||
|
|
||||||
|
|
||||||
class AccountFiscalPosition(models.Model):
|
|
||||||
_inherit = "account.fiscal.position"
|
|
||||||
|
|
||||||
receivable_account_id = fields.Many2one(
|
|
||||||
"account.account",
|
|
||||||
string="Partner Receivable Account",
|
|
||||||
company_dependent=True,
|
|
||||||
domain=[("internal_type", "=", "receivable")],
|
|
||||||
)
|
|
||||||
payable_account_id = fields.Many2one(
|
|
||||||
"account.account",
|
|
||||||
string="Partner Payable Account",
|
|
||||||
company_dependent=True,
|
|
||||||
domain=[("internal_type", "=", "payable")],
|
|
||||||
)
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# © 2016-2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
|
|
||||||
from odoo import models, api
|
|
||||||
|
|
||||||
|
|
||||||
class ResPartner(models.Model):
|
|
||||||
_inherit = "res.partner"
|
|
||||||
|
|
||||||
@api.onchange("property_account_position_id")
|
|
||||||
def fiscal_position_receivable_payable_change(self):
|
|
||||||
fp = self.property_account_position_id
|
|
||||||
ipo = self.env["ir.property"]
|
|
||||||
if fp.receivable_account_id:
|
|
||||||
self.property_account_receivable_id = fp.receivable_account_id
|
|
||||||
else:
|
|
||||||
self.property_account_receivable_id = ipo.get(
|
|
||||||
"property_account_receivable_id", "res.partner"
|
|
||||||
)
|
|
||||||
if fp.payable_account_id:
|
|
||||||
self.property_account_payable_id = fp.payable_account_id
|
|
||||||
else:
|
|
||||||
self.property_account_payable_id = ipo.get(
|
|
||||||
"property_account_payable_id", "res.partner"
|
|
||||||
)
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
© 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
-->
|
|
||||||
|
|
||||||
<odoo>
|
|
||||||
|
|
||||||
|
|
||||||
<record id="view_account_position_form" model="ir.ui.view">
|
|
||||||
<field name="name">receivable_payable.fiscal_position_form</field>
|
|
||||||
<field name="model">account.fiscal.position</field>
|
|
||||||
<field name="inherit_id" ref="account.view_account_position_form" />
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="company_id" position="after">
|
|
||||||
<field name="receivable_account_id"/>
|
|
||||||
<field name="payable_account_id"/>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
</odoo>
|
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Account Invoice Update Wizard',
|
'name': 'Account Invoice Update Wizard',
|
||||||
'version': '12.0.1.0.0',
|
'version': '14.0.1.0.0',
|
||||||
'category': 'Accounting & Finance',
|
'category': 'Accounting & Finance',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'summary': 'Wizard to update non-legal fields of an open/paid invoice',
|
'summary': 'Wizard to update non-legal fields of an open/paid invoice',
|
||||||
@@ -14,8 +14,9 @@
|
|||||||
'account',
|
'account',
|
||||||
],
|
],
|
||||||
'data': [
|
'data': [
|
||||||
'wizard/account_invoice_update_view.xml',
|
'security/ir.model.access.csv',
|
||||||
'views/account_invoice.xml',
|
'wizard/account_move_update_view.xml',
|
||||||
],
|
'views/account_move.xml',
|
||||||
|
],
|
||||||
'installable': False,
|
'installable': False,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
from . import account_invoice
|
from . import account_move
|
||||||
|
|||||||
@@ -1,22 +1,18 @@
|
|||||||
# Copyright 2019 Camptocamp
|
# Copyright 2019-2022 Camptocamp
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from odoo import models, fields, api, _
|
from odoo import models
|
||||||
from odoo.exceptions import UserError
|
|
||||||
import odoo.addons.decimal_precision as dp
|
|
||||||
|
|
||||||
|
|
||||||
class AccountInvoice(models.Model):
|
class AccountMove(models.Model):
|
||||||
_inherit = 'account.invoice'
|
_inherit = 'account.move'
|
||||||
|
|
||||||
def prepare_update_wizard(self):
|
def prepare_update_wizard(self):
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
wizard = self.env['account.invoice.update']
|
wizard = self.env['account.move.update']
|
||||||
res = wizard._prepare_default_get(self)
|
res = wizard._prepare_default_get(self)
|
||||||
action = self.env.ref(
|
action = self.env["ir.actions.actions"]._for_xml_id(
|
||||||
'account_invoice_update_wizard.account_invoice_update_action'
|
'account_invoice_update_wizard.account_invoice_update_action')
|
||||||
).read()[0]
|
|
||||||
action['name'] = "Update Wizard"
|
action['name'] = "Update Wizard"
|
||||||
action['res_id'] = wizard.create(res).id
|
action['res_id'] = wizard.create(res).id
|
||||||
return action
|
return action
|
||||||
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||||
|
access_account_move_update,account.move.update.user,model_account_move_update,account.group_account_invoice,1,1,1,1
|
||||||
|
access_account_move_line_update,account.move.line.update.user,model_account_move_line_update,account.group_account_invoice,1,1,1,1
|
||||||
|
@@ -1 +1 @@
|
|||||||
from . import test_account_invoice_update_wizard
|
from . import test_account_move_update_wizard
|
||||||
|
|||||||
@@ -1,196 +0,0 @@
|
|||||||
# Copyright 2018-2019 Camptocamp
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
|
|
||||||
from odoo.tests.common import SavepointCase
|
|
||||||
from odoo.exceptions import UserError
|
|
||||||
|
|
||||||
|
|
||||||
class TestAccountInvoiceUpdateWizard(SavepointCase):
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def setUpClass(cls):
|
|
||||||
super().setUpClass()
|
|
||||||
cls.customer12 = cls.env.ref('base.res_partner_12')
|
|
||||||
cls.product16 = cls.env.ref('product.product_product_16')
|
|
||||||
cls.product24 = cls.env.ref('product.product_product_24')
|
|
||||||
uom_unit = cls.env.ref('uom.product_uom_categ_unit')
|
|
||||||
|
|
||||||
cls.invoice1 = cls.env['account.invoice'].create({
|
|
||||||
'name': 'Test invoice',
|
|
||||||
'partner_id': cls.customer12.id,
|
|
||||||
})
|
|
||||||
cls.inv_line1 = cls.env['account.invoice.line'].create({
|
|
||||||
'invoice_id': cls.invoice1.id,
|
|
||||||
'name': "Line1",
|
|
||||||
'product_id': cls.product16.id,
|
|
||||||
'product_uom_id': uom_unit.id,
|
|
||||||
'account_id': cls.invoice1.account_id.id,
|
|
||||||
'price_unit': 42.0,
|
|
||||||
})
|
|
||||||
cls.inv_line2 = cls.env['account.invoice.line'].create({
|
|
||||||
'invoice_id': cls.invoice1.id,
|
|
||||||
'name': "Line2",
|
|
||||||
'product_id': cls.product24.id,
|
|
||||||
'product_uom_id': uom_unit.id,
|
|
||||||
'account_id': cls.invoice1.account_id.id,
|
|
||||||
'price_unit': 1111.1,
|
|
||||||
})
|
|
||||||
|
|
||||||
cls.aa1 = cls.env.ref('analytic.analytic_partners_camp_to_camp')
|
|
||||||
cls.aa2 = cls.env.ref('analytic.analytic_nebula')
|
|
||||||
cls.atag1 = cls.env.ref('analytic.tag_contract')
|
|
||||||
cls.atag2 = cls.env['account.analytic.tag'].create({
|
|
||||||
'name': 'の',
|
|
||||||
})
|
|
||||||
|
|
||||||
def create_wizard(self, invoice):
|
|
||||||
res = self.invoice1.prepare_update_wizard()
|
|
||||||
self.wiz = self.env['account.invoice.update'].browse(res['res_id'])
|
|
||||||
|
|
||||||
def test_add_analytic_account_line1(self):
|
|
||||||
""" Add analytic account on an invoice line
|
|
||||||
after the invoice has been approved.
|
|
||||||
|
|
||||||
This will:
|
|
||||||
- update the move line
|
|
||||||
- create a new analytic line.
|
|
||||||
"""
|
|
||||||
self.invoice1.action_invoice_open()
|
|
||||||
self.create_wizard(self.invoice1)
|
|
||||||
|
|
||||||
wiz_line = self.wiz.line_ids.filtered(
|
|
||||||
lambda rec: rec.invoice_line_id == self.inv_line1)
|
|
||||||
wiz_line.account_analytic_id = self.aa1
|
|
||||||
self.wiz.run()
|
|
||||||
|
|
||||||
related_ml = self.invoice1.move_id.line_ids.filtered(
|
|
||||||
lambda rec: rec.product_id == self.product16)
|
|
||||||
self.assertEqual(related_ml.analytic_account_id, self.aa1)
|
|
||||||
self.assertEqual(related_ml.analytic_line_ids.account_id, self.aa1)
|
|
||||||
|
|
||||||
def test_change_analytic_account_line1(self):
|
|
||||||
""" Change analytic account on an invoice line
|
|
||||||
after the invoice has been approved.
|
|
||||||
|
|
||||||
This will:
|
|
||||||
- update the move line
|
|
||||||
- update the existing analytic line."""
|
|
||||||
self.inv_line1.account_analytic_id = self.aa2
|
|
||||||
|
|
||||||
self.invoice1.action_invoice_open()
|
|
||||||
self.create_wizard(self.invoice1)
|
|
||||||
|
|
||||||
wiz_line = self.wiz.line_ids.filtered(
|
|
||||||
lambda rec: rec.invoice_line_id == self.inv_line1)
|
|
||||||
wiz_line.account_analytic_id = self.aa1
|
|
||||||
self.wiz.run()
|
|
||||||
|
|
||||||
related_ml = self.invoice1.move_id.line_ids.filtered(
|
|
||||||
lambda rec: rec.product_id == self.product16)
|
|
||||||
self.assertEqual(related_ml.analytic_account_id, self.aa1)
|
|
||||||
self.assertEqual(related_ml.analytic_line_ids.account_id, self.aa1)
|
|
||||||
|
|
||||||
def test_error_grouped_move_lines(self):
|
|
||||||
""" Change analytic account on an invoice line
|
|
||||||
after the invoice has been approved where both
|
|
||||||
lines were grouped in the same move line.
|
|
||||||
|
|
||||||
This will raise an error.
|
|
||||||
"""
|
|
||||||
self.invoice1.journal_id.group_invoice_lines = True
|
|
||||||
|
|
||||||
self.inv_line2.product_id = self.product16
|
|
||||||
self.inv_line2.unit_price = 42.0
|
|
||||||
|
|
||||||
self.invoice1.action_invoice_open()
|
|
||||||
self.create_wizard(self.invoice1)
|
|
||||||
|
|
||||||
line1 = self.wiz.line_ids[0]
|
|
||||||
line1.account_analytic_id = self.aa1
|
|
||||||
with self.assertRaises(UserError):
|
|
||||||
self.wiz.run()
|
|
||||||
|
|
||||||
def test_add_analytic_tags_line1(self):
|
|
||||||
""" Add analytic tags on an invoice line
|
|
||||||
after the invoice has been approved.
|
|
||||||
|
|
||||||
This will update move line.
|
|
||||||
"""
|
|
||||||
self.invoice1.action_invoice_open()
|
|
||||||
self.create_wizard(self.invoice1)
|
|
||||||
|
|
||||||
wiz_line = self.wiz.line_ids.filtered(
|
|
||||||
lambda rec: rec.invoice_line_id == self.inv_line1)
|
|
||||||
wiz_line.analytic_tag_ids = self.atag2
|
|
||||||
self.wiz.run()
|
|
||||||
|
|
||||||
related_ml = self.invoice1.move_id.line_ids.filtered(
|
|
||||||
lambda rec: rec.product_id == self.product16)
|
|
||||||
self.assertEqual(related_ml.analytic_tag_ids, self.atag2)
|
|
||||||
self.assertFalse(related_ml.analytic_line_ids)
|
|
||||||
|
|
||||||
def test_change_analytic_tags_line1(self):
|
|
||||||
""" Change analytic tags on an invoice line
|
|
||||||
after the invoice has been approved.
|
|
||||||
|
|
||||||
It will update move line and analytic line
|
|
||||||
"""
|
|
||||||
self.inv_line1.account_analytic_id = self.aa2
|
|
||||||
self.inv_line1.analytic_tag_ids = self.atag1
|
|
||||||
|
|
||||||
self.invoice1.action_invoice_open()
|
|
||||||
self.create_wizard(self.invoice1)
|
|
||||||
|
|
||||||
wiz_line = self.wiz.line_ids.filtered(
|
|
||||||
lambda rec: rec.invoice_line_id == self.inv_line1)
|
|
||||||
wiz_line.analytic_tag_ids = self.atag2
|
|
||||||
self.wiz.run()
|
|
||||||
|
|
||||||
related_ml = self.invoice1.move_id.line_ids.filtered(
|
|
||||||
lambda rec: rec.product_id == self.product16)
|
|
||||||
self.assertEqual(related_ml.analytic_tag_ids, self.atag2)
|
|
||||||
self.assertEqual(related_ml.analytic_line_ids.tag_ids, self.atag2)
|
|
||||||
|
|
||||||
def test_add_analytic_info_line1(self):
|
|
||||||
""" Add analytic account and tags on an invoice line
|
|
||||||
after the invoice has been approved.
|
|
||||||
|
|
||||||
This will:
|
|
||||||
- update move line
|
|
||||||
- create an analytic line
|
|
||||||
"""
|
|
||||||
self.invoice1.action_invoice_open()
|
|
||||||
self.create_wizard(self.invoice1)
|
|
||||||
|
|
||||||
wiz_line = self.wiz.line_ids.filtered(
|
|
||||||
lambda rec: rec.invoice_line_id == self.inv_line1)
|
|
||||||
wiz_line.account_analytic_id = self.aa1
|
|
||||||
wiz_line.analytic_tag_ids = self.atag2
|
|
||||||
self.wiz.run()
|
|
||||||
|
|
||||||
related_ml = self.invoice1.move_id.line_ids.filtered(
|
|
||||||
lambda rec: rec.product_id == self.product16)
|
|
||||||
self.assertEqual(related_ml.analytic_account_id, self.aa1)
|
|
||||||
self.assertEqual(related_ml.analytic_tag_ids, self.atag2)
|
|
||||||
self.assertEqual(related_ml.analytic_line_ids.account_id, self.aa1)
|
|
||||||
self.assertEqual(related_ml.analytic_line_ids.tag_ids, self.atag2)
|
|
||||||
|
|
||||||
def test_empty_analytic_account_line1(self):
|
|
||||||
""" Remove analytic account
|
|
||||||
after the invoice has been approved.
|
|
||||||
|
|
||||||
This will raise an error as it is not implemented.
|
|
||||||
"""
|
|
||||||
self.inv_line1.account_analytic_id = self.aa2
|
|
||||||
|
|
||||||
self.invoice1.action_invoice_open()
|
|
||||||
self.create_wizard(self.invoice1)
|
|
||||||
|
|
||||||
wiz_line = self.wiz.line_ids.filtered(
|
|
||||||
lambda rec: rec.invoice_line_id == self.inv_line1)
|
|
||||||
wiz_line.account_analytic_id = False
|
|
||||||
self.wiz.run()
|
|
||||||
related_ml = self.invoice1.move_id.line_ids.filtered(
|
|
||||||
lambda rec: rec.product_id == self.product16)
|
|
||||||
self.assertFalse(related_ml.analytic_account_id)
|
|
||||||
self.assertFalse(related_ml.analytic_line_ids)
|
|
||||||
@@ -0,0 +1,173 @@
|
|||||||
|
# Copyright 2018-2022 Camptocamp
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo.tests.common import SavepointCase
|
||||||
|
|
||||||
|
|
||||||
|
class TestAccountInvoiceUpdateWizard(SavepointCase):
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def setUpClass(cls):
|
||||||
|
super().setUpClass()
|
||||||
|
cls.customer12 = cls.env.ref('base.res_partner_12')
|
||||||
|
cls.product16 = cls.env.ref('product.product_product_16')
|
||||||
|
uom_unit = cls.env.ref('uom.product_uom_categ_unit')
|
||||||
|
|
||||||
|
cls.move1 = cls.env['account.move'].create({
|
||||||
|
'name': 'Test invoice',
|
||||||
|
'partner_id': cls.customer12.id,
|
||||||
|
'move_type': 'out_invoice',
|
||||||
|
'invoice_line_ids': [
|
||||||
|
[0, None, {
|
||||||
|
'name': 'Line1',
|
||||||
|
'product_id': cls.product16.id,
|
||||||
|
'product_uom_id': uom_unit.id,
|
||||||
|
'quantity': 1,
|
||||||
|
'price_unit': 42.0,
|
||||||
|
'credit': 42.0,
|
||||||
|
'debit': 0
|
||||||
|
}],
|
||||||
|
],
|
||||||
|
})
|
||||||
|
|
||||||
|
cls.aa1 = cls.env.ref('analytic.analytic_partners_camp_to_camp')
|
||||||
|
cls.aa2 = cls.env.ref('analytic.analytic_nebula')
|
||||||
|
cls.atag1 = cls.env.ref('analytic.tag_contract')
|
||||||
|
cls.atag2 = cls.env['account.analytic.tag'].create({
|
||||||
|
'name': 'の',
|
||||||
|
})
|
||||||
|
|
||||||
|
def create_wizard(self, move):
|
||||||
|
res = move.prepare_update_wizard()
|
||||||
|
self.wiz = self.env['account.move.update'].browse(res['res_id'])
|
||||||
|
|
||||||
|
def test_add_analytic_account_line1(self):
|
||||||
|
""" Add analytic account on a move line
|
||||||
|
after the move has been approved.
|
||||||
|
|
||||||
|
This will:
|
||||||
|
- update the move line
|
||||||
|
- create a new analytic line.
|
||||||
|
"""
|
||||||
|
self.move1._post()
|
||||||
|
self.create_wizard(self.move1)
|
||||||
|
|
||||||
|
wiz_line = self.wiz.line_ids.filtered(
|
||||||
|
lambda rec: rec.invoice_line_id.product_id.id == self.product16.id)
|
||||||
|
wiz_line.analytic_account_id = self.aa1
|
||||||
|
self.wiz.run()
|
||||||
|
|
||||||
|
related_ml = self.move1.invoice_line_ids.filtered(
|
||||||
|
lambda rec: rec.product_id == self.product16)
|
||||||
|
self.assertEqual(related_ml.analytic_account_id, self.aa1)
|
||||||
|
self.assertEqual(related_ml.analytic_line_ids.account_id, self.aa1)
|
||||||
|
|
||||||
|
def test_change_analytic_account_line1(self):
|
||||||
|
""" Change analytic account on a move line
|
||||||
|
after the move has been approved.
|
||||||
|
|
||||||
|
This will:
|
||||||
|
- update the move line
|
||||||
|
- update the existing analytic line."""
|
||||||
|
move_line1 = self.move1.invoice_line_ids.filtered(lambda rec: rec.product_id == self.product16)
|
||||||
|
move_line1.analytic_account_id = self.aa2
|
||||||
|
|
||||||
|
self.move1._post()
|
||||||
|
self.create_wizard(self.move1)
|
||||||
|
|
||||||
|
wiz_line = self.wiz.line_ids.filtered(
|
||||||
|
lambda rec: rec.invoice_line_id.product_id.id == self.product16.id)
|
||||||
|
wiz_line.analytic_account_id = self.aa1
|
||||||
|
self.wiz.run()
|
||||||
|
|
||||||
|
related_ml = self.move1.invoice_line_ids.filtered(
|
||||||
|
lambda rec: rec.product_id == self.product16)
|
||||||
|
self.assertEqual(related_ml.analytic_account_id, self.aa1)
|
||||||
|
self.assertEqual(related_ml.analytic_line_ids.account_id, self.aa1)
|
||||||
|
|
||||||
|
def test_add_analytic_tags_line1(self):
|
||||||
|
""" Add analytic tags on a move line
|
||||||
|
after the move has been approved.
|
||||||
|
|
||||||
|
This will update move line.
|
||||||
|
"""
|
||||||
|
self.move1._post()
|
||||||
|
self.create_wizard(self.move1)
|
||||||
|
|
||||||
|
wiz_line = self.wiz.line_ids.filtered(
|
||||||
|
lambda rec: rec.invoice_line_id.product_id.id == self.product16.id)
|
||||||
|
wiz_line.analytic_tag_ids = self.atag2
|
||||||
|
self.wiz.run()
|
||||||
|
|
||||||
|
related_ml = self.move1.invoice_line_ids.filtered(
|
||||||
|
lambda rec: rec.product_id == self.product16)
|
||||||
|
self.assertEqual(related_ml.analytic_tag_ids, self.atag2)
|
||||||
|
self.assertFalse(related_ml.analytic_line_ids)
|
||||||
|
|
||||||
|
def test_change_analytic_tags_line1(self):
|
||||||
|
""" Change analytic tags on a move line
|
||||||
|
after the move has been approved.
|
||||||
|
|
||||||
|
It will update move line and analytic line
|
||||||
|
"""
|
||||||
|
move_line1 = self.move1.invoice_line_ids.filtered(lambda rec: rec.product_id == self.product16)
|
||||||
|
move_line1.analytic_account_id = self.aa2
|
||||||
|
move_line1.analytic_tag_ids = self.atag1
|
||||||
|
|
||||||
|
self.move1._post()
|
||||||
|
self.create_wizard(self.move1)
|
||||||
|
|
||||||
|
wiz_line = self.wiz.line_ids.filtered(
|
||||||
|
lambda rec: rec.invoice_line_id.product_id.id == self.product16.id)
|
||||||
|
wiz_line.analytic_tag_ids = self.atag2
|
||||||
|
self.wiz.run()
|
||||||
|
|
||||||
|
related_ml = self.move1.invoice_line_ids.filtered(
|
||||||
|
lambda rec: rec.product_id == self.product16)
|
||||||
|
self.assertEqual(related_ml.analytic_tag_ids, self.atag2)
|
||||||
|
self.assertEqual(related_ml.analytic_line_ids.tag_ids, self.atag2)
|
||||||
|
|
||||||
|
def test_add_analytic_info_line1(self):
|
||||||
|
""" Add analytic account and tags on a move line
|
||||||
|
after the move has been approved.
|
||||||
|
|
||||||
|
This will:
|
||||||
|
- update move line
|
||||||
|
- create an analytic line
|
||||||
|
"""
|
||||||
|
self.move1._post()
|
||||||
|
self.create_wizard(self.move1)
|
||||||
|
|
||||||
|
wiz_line = self.wiz.line_ids.filtered(
|
||||||
|
lambda rec: rec.invoice_line_id.product_id.id == self.product16.id)
|
||||||
|
wiz_line.analytic_account_id = self.aa1
|
||||||
|
wiz_line.analytic_tag_ids = self.atag2
|
||||||
|
self.wiz.run()
|
||||||
|
|
||||||
|
related_ml = self.move1.invoice_line_ids.filtered(
|
||||||
|
lambda rec: rec.product_id == self.product16)
|
||||||
|
self.assertEqual(related_ml.analytic_account_id, self.aa1)
|
||||||
|
self.assertEqual(related_ml.analytic_tag_ids, self.atag2)
|
||||||
|
self.assertEqual(related_ml.analytic_line_ids.account_id, self.aa1)
|
||||||
|
self.assertEqual(related_ml.analytic_line_ids.tag_ids, self.atag2)
|
||||||
|
|
||||||
|
def test_empty_analytic_account_line1(self):
|
||||||
|
""" Remove analytic account
|
||||||
|
after the move has been approved.
|
||||||
|
|
||||||
|
This will raise an error as it is not implemented.
|
||||||
|
"""
|
||||||
|
move_line1 = self.move1.invoice_line_ids.filtered(lambda rec: rec.product_id == self.product16)
|
||||||
|
move_line1.analytic_account_id = self.aa2
|
||||||
|
|
||||||
|
self.move1._post()
|
||||||
|
self.create_wizard(self.move1)
|
||||||
|
|
||||||
|
wiz_line = self.wiz.line_ids.filtered(
|
||||||
|
lambda rec: rec.invoice_line_id.product_id.id == self.product16.id)
|
||||||
|
wiz_line.analytic_account_id = False
|
||||||
|
self.wiz.run()
|
||||||
|
related_ml = self.move1.invoice_line_ids.filtered(
|
||||||
|
lambda rec: rec.product_id == self.product16)
|
||||||
|
self.assertFalse(related_ml.analytic_account_id)
|
||||||
|
self.assertFalse(related_ml.analytic_line_ids)
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
Copyright 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
-->
|
|
||||||
|
|
||||||
<odoo>
|
|
||||||
|
|
||||||
<record id="invoice_supplier_form" model="ir.ui.view">
|
|
||||||
<field name="model">account.invoice</field>
|
|
||||||
<field name="inherit_id" ref="account.invoice_supplier_form"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<button name="action_invoice_draft" position="before">
|
|
||||||
<button name="prepare_update_wizard" type="object" string="Update Invoice" states="open,paid" groups="account.group_account_invoice"/>
|
|
||||||
</button>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="invoice_form" model="ir.ui.view">
|
|
||||||
<field name="model">account.invoice</field>
|
|
||||||
<field name="inherit_id" ref="account.invoice_form"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<button name="action_invoice_draft" position="before">
|
|
||||||
<button name="prepare_update_wizard" type="object" string="Update Invoice" states="open,paid" groups="account.group_account_invoice"/>
|
|
||||||
</button>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
</odoo>
|
|
||||||
19
account_invoice_update_wizard/views/account_move.xml
Normal file
19
account_invoice_update_wizard/views/account_move.xml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||||
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
-->
|
||||||
|
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<record id="view_move_form_inherit" model="ir.ui.view">
|
||||||
|
<field name="model">account.move</field>
|
||||||
|
<field name="inherit_id" ref="account.view_move_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<button name="button_draft" position="before">
|
||||||
|
<button name="prepare_update_wizard" type="object" string="Update Invoice" states="posted" groups="account.group_account_invoice"/>
|
||||||
|
</button>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</odoo>
|
||||||
@@ -1 +1 @@
|
|||||||
from . import account_invoice_update
|
from . import account_move_update
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Copyright 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
# Copyright 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||||
# Copyright 2018-2019 Camptocamp
|
# Copyright 2018-2022 Camptocamp
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from odoo import models, fields, api, _
|
from odoo import models, fields, api, _
|
||||||
@@ -7,38 +7,34 @@ from odoo.exceptions import UserError
|
|||||||
import odoo.addons.decimal_precision as dp
|
import odoo.addons.decimal_precision as dp
|
||||||
|
|
||||||
|
|
||||||
class AccountInvoiceUpdate(models.TransientModel):
|
class AccountMoveUpdate(models.TransientModel):
|
||||||
_name = 'account.invoice.update'
|
_name = 'account.move.update'
|
||||||
_description = 'Wizard to update non-legal fields of invoice'
|
_description = 'Wizard to update non-legal fields of invoice'
|
||||||
|
|
||||||
invoice_id = fields.Many2one(
|
invoice_id = fields.Many2one(
|
||||||
'account.invoice', string='Invoice', required=True,
|
'account.move', string='Invoice', required=True,
|
||||||
readonly=True)
|
readonly=True)
|
||||||
type = fields.Selection(related='invoice_id.type', readonly=True)
|
move_type = fields.Selection(related='invoice_id.move_type')
|
||||||
company_id = fields.Many2one(
|
company_id = fields.Many2one(related='invoice_id.company_id')
|
||||||
related='invoice_id.company_id', readonly=True)
|
partner_id = fields.Many2one(related='invoice_id.partner_id')
|
||||||
partner_id = fields.Many2one(
|
|
||||||
related='invoice_id.partner_id', readonly=True)
|
|
||||||
user_id = fields.Many2one('res.users', string='Salesperson')
|
user_id = fields.Many2one('res.users', string='Salesperson')
|
||||||
payment_term_id = fields.Many2one(
|
invoice_payment_term_id = fields.Many2one(
|
||||||
'account.payment.term', string='Payment Term')
|
'account.payment.term', string='Payment Term')
|
||||||
reference = fields.Char(string='Invoice Reference')
|
ref = fields.Char(string='Reference') # field label is customized in the view
|
||||||
name = fields.Char(string='Reference/Description')
|
invoice_origin = fields.Char(string='Source Document')
|
||||||
origin = fields.Char(string='Source Document')
|
|
||||||
comment = fields.Text('Additional Information')
|
|
||||||
partner_bank_id = fields.Many2one(
|
partner_bank_id = fields.Many2one(
|
||||||
'res.partner.bank', string='Bank Account')
|
'res.partner.bank', string='Bank Account')
|
||||||
line_ids = fields.One2many(
|
line_ids = fields.One2many(
|
||||||
'account.invoice.line.update', 'parent_id', string='Invoice Lines')
|
'account.move.line.update', 'parent_id', string='Invoice Lines')
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def _simple_fields2update(self):
|
def _simple_fields2update(self):
|
||||||
'''List boolean, date, datetime, char, text fields'''
|
'''List boolean, date, datetime, char, text fields'''
|
||||||
return ['reference', 'name', 'origin', 'comment']
|
return ['ref', 'invoice_origin']
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def _m2o_fields2update(self):
|
def _m2o_fields2update(self):
|
||||||
return ['payment_term_id', 'user_id', 'partner_bank_id']
|
return ['invoice_payment_term_id', 'user_id', 'partner_bank_id']
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def _prepare_default_get(self, invoice):
|
def _prepare_default_get(self, invoice):
|
||||||
@@ -55,16 +51,17 @@ class AccountInvoiceUpdate(models.TransientModel):
|
|||||||
'name': line.name,
|
'name': line.name,
|
||||||
'quantity': line.quantity,
|
'quantity': line.quantity,
|
||||||
'price_subtotal': line.price_subtotal,
|
'price_subtotal': line.price_subtotal,
|
||||||
'account_analytic_id': line.account_analytic_id.id,
|
'analytic_account_id': line.analytic_account_id.id,
|
||||||
|
'currency_id': line.currency_id.id,
|
||||||
'analytic_tag_ids': aa_tags,
|
'analytic_tag_ids': aa_tags,
|
||||||
'display_type': line.display_type,
|
'display_type': line.display_type,
|
||||||
}])
|
}])
|
||||||
return res
|
return res
|
||||||
|
|
||||||
@api.onchange('type')
|
@api.onchange('move_type')
|
||||||
def type_on_change(self):
|
def move_type_on_change(self):
|
||||||
res = {'domain': {}}
|
res = {'domain': {}}
|
||||||
if self.type in ('out_invoice', 'out_refund'):
|
if self.move_type in ('out_invoice', 'out_refund'):
|
||||||
res['domain']['partner_bank_id'] =\
|
res['domain']['partner_bank_id'] =\
|
||||||
"[('partner_id.ref_company_ids', 'in', [company_id])]"
|
"[('partner_id.ref_company_ids', 'in', [company_id])]"
|
||||||
else:
|
else:
|
||||||
@@ -72,7 +69,6 @@ class AccountInvoiceUpdate(models.TransientModel):
|
|||||||
"[('partner_id', '=', partner_id)]"
|
"[('partner_id', '=', partner_id)]"
|
||||||
return res
|
return res
|
||||||
|
|
||||||
@api.multi
|
|
||||||
def _prepare_invoice(self):
|
def _prepare_invoice(self):
|
||||||
vals = {}
|
vals = {}
|
||||||
inv = self.invoice_id
|
inv = self.invoice_id
|
||||||
@@ -82,8 +78,8 @@ class AccountInvoiceUpdate(models.TransientModel):
|
|||||||
for m2ofield in self._m2o_fields2update():
|
for m2ofield in self._m2o_fields2update():
|
||||||
if self[m2ofield] != inv[m2ofield]:
|
if self[m2ofield] != inv[m2ofield]:
|
||||||
vals[m2ofield] = self[m2ofield].id or False
|
vals[m2ofield] = self[m2ofield].id or False
|
||||||
if 'payment_term_id' in vals:
|
if 'invoice_payment_term_id' in vals:
|
||||||
pterm_list = self.payment_term_id.compute(
|
pterm_list = self.invoice_payment_term_id.compute(
|
||||||
value=1, date_ref=inv.date_invoice)[0]
|
value=1, date_ref=inv.date_invoice)[0]
|
||||||
if pterm_list:
|
if pterm_list:
|
||||||
vals['date_due'] = max(line[0] for line in pterm_list)
|
vals['date_due'] = max(line[0] for line in pterm_list)
|
||||||
@@ -91,15 +87,15 @@ class AccountInvoiceUpdate(models.TransientModel):
|
|||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def _line_simple_fields2update(self):
|
def _line_simple_fields2update(self):
|
||||||
return ["name",]
|
return ["name"]
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def _line_m2o_fields2update(self):
|
def _line_m2o_fields2update(self):
|
||||||
return ["account_analytic_id",]
|
return ["analytic_account_id"]
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def _line_m2m_fields2update(self):
|
def _line_m2m_fields2update(self):
|
||||||
return ["analytic_tag_ids",]
|
return ["analytic_tag_ids"]
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def _prepare_invoice_line(self, line):
|
def _prepare_invoice_line(self, line):
|
||||||
@@ -115,87 +111,45 @@ class AccountInvoiceUpdate(models.TransientModel):
|
|||||||
vals[field] = [(6, 0, line[field].ids)]
|
vals[field] = [(6, 0, line[field].ids)]
|
||||||
return vals
|
return vals
|
||||||
|
|
||||||
@api.multi
|
def _prepare_move_line_and_analytic_line(self, inv_line):
|
||||||
def _prepare_move(self):
|
|
||||||
mvals = {}
|
|
||||||
inv = self.invoice_id
|
|
||||||
ini_ref = inv.move_id.ref
|
|
||||||
ref = inv.reference or inv.name
|
|
||||||
if ini_ref != ref:
|
|
||||||
mvals['ref'] = ref
|
|
||||||
return mvals
|
|
||||||
|
|
||||||
@api.multi
|
|
||||||
def _get_matching_inv_line(self, move_line):
|
|
||||||
""" Find matching invoice line by product """
|
|
||||||
# TODO make it accept more case as lines won't
|
|
||||||
# be grouped unless journal.group_invoice_line is True
|
|
||||||
inv_line = self.invoice_id.invoice_line_ids.filtered(
|
|
||||||
lambda rec: rec.product_id == move_line.product_id)
|
|
||||||
if len(inv_line) != 1:
|
|
||||||
raise UserError(
|
|
||||||
"Cannot match a single invoice line to move line %s" %
|
|
||||||
move_line.name)
|
|
||||||
return inv_line
|
|
||||||
|
|
||||||
@api.multi
|
|
||||||
def _prepare_move_line(self, inv_line):
|
|
||||||
mlvals = {}
|
mlvals = {}
|
||||||
inv_line_upd = self.line_ids.filtered(
|
|
||||||
lambda rec: rec.invoice_line_id == inv_line)
|
|
||||||
|
|
||||||
ini_aa = inv_line.account_analytic_id
|
|
||||||
new_aa = inv_line_upd.account_analytic_id
|
|
||||||
|
|
||||||
if ini_aa != new_aa:
|
|
||||||
mlvals['analytic_account_id'] = new_aa.id
|
|
||||||
|
|
||||||
ini_aa_tags = inv_line.analytic_tag_ids
|
|
||||||
new_aa_tags = inv_line_upd.analytic_tag_ids
|
|
||||||
|
|
||||||
if ini_aa_tags != new_aa_tags:
|
|
||||||
mlvals['analytic_tag_ids'] = [(6, None, new_aa_tags.ids)]
|
|
||||||
return mlvals
|
|
||||||
|
|
||||||
@api.multi
|
|
||||||
def _prepare_analytic_line(self, inv_line):
|
|
||||||
alvals = {}
|
alvals = {}
|
||||||
inv_line_upd = self.line_ids.filtered(
|
inv_line_upd = self.line_ids.filtered(
|
||||||
lambda rec: rec.invoice_line_id == inv_line)
|
lambda rec: rec.invoice_line_id == inv_line)
|
||||||
|
|
||||||
ini_aa = inv_line.account_analytic_id
|
ini_aa = inv_line.analytic_account_id
|
||||||
new_aa = inv_line_upd.account_analytic_id
|
new_aa = inv_line_upd.analytic_account_id
|
||||||
|
|
||||||
if ini_aa != new_aa:
|
if ini_aa != new_aa:
|
||||||
|
mlvals['analytic_account_id'] = new_aa.id
|
||||||
alvals['account_id'] = new_aa.id
|
alvals['account_id'] = new_aa.id
|
||||||
|
|
||||||
ini_aa_tags = inv_line.analytic_tag_ids
|
ini_aa_tags = inv_line.analytic_tag_ids
|
||||||
new_aa_tags = inv_line_upd.analytic_tag_ids
|
new_aa_tags = inv_line_upd.analytic_tag_ids
|
||||||
|
|
||||||
if ini_aa_tags != new_aa_tags:
|
if ini_aa_tags != new_aa_tags:
|
||||||
|
mlvals['analytic_tag_ids'] = [(6, None, new_aa_tags.ids)]
|
||||||
alvals['tag_ids'] = [(6, None, new_aa_tags.ids)]
|
alvals['tag_ids'] = [(6, None, new_aa_tags.ids)]
|
||||||
return alvals
|
return mlvals, alvals
|
||||||
|
|
||||||
@api.multi
|
|
||||||
def _update_payment_term_move(self):
|
def _update_payment_term_move(self):
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
inv = self.invoice_id
|
inv = self.invoice_id
|
||||||
if (
|
if (
|
||||||
self.payment_term_id and
|
self.invoice_payment_term_id and
|
||||||
self.payment_term_id != inv.payment_term_id and
|
self.invoice_payment_term_id != inv.invoice_payment_term_id):
|
||||||
inv.move_id):
|
|
||||||
# I don't update pay term when the invoice is partially (or fully)
|
# I don't update pay term when the invoice is partially (or fully)
|
||||||
# paid because if you have a payment term with several lines
|
# paid because if you have a payment term with several lines
|
||||||
# of the same amount, you would also have to take into account
|
# of the same amount, you would also have to take into account
|
||||||
# the reconcile marks to put the new maturity date on the right
|
# the reconcile marks to put the new maturity date on the right
|
||||||
# lines
|
# lines
|
||||||
if inv.payment_ids:
|
if inv.payment_id:
|
||||||
raise UserError(_(
|
raise UserError(_(
|
||||||
"This wizard doesn't support the update of payment "
|
"This wizard doesn't support the update of payment "
|
||||||
"terms on an invoice which is partially or fully "
|
"terms on an invoice which is partially or fully "
|
||||||
"paid."))
|
"paid."))
|
||||||
prec = self.env['decimal.precision'].precision_get('Account')
|
prec = self.env['decimal.precision'].precision_get('Account')
|
||||||
term_res = self.payment_term_id.compute(
|
term_res = self.invoice_payment_term_id.compute(
|
||||||
inv.amount_total, inv.date_invoice)[0]
|
inv.amount_total, inv.date_invoice)[0]
|
||||||
new_pterm = {} # key = int(amount * 100), value = [date1, date2]
|
new_pterm = {} # key = int(amount * 100), value = [date1, date2]
|
||||||
for entry in term_res:
|
for entry in term_res:
|
||||||
@@ -220,11 +174,10 @@ class AccountInvoiceUpdate(models.TransientModel):
|
|||||||
"new payment term '%s'. You can only switch to a "
|
"new payment term '%s'. You can only switch to a "
|
||||||
"payment term that has the same number of terms "
|
"payment term that has the same number of terms "
|
||||||
"with the same amount.") % (
|
"with the same amount.") % (
|
||||||
inv.payment_term_id.name, self.payment_term_id.name))
|
inv.invoice_payment_term_id.name, self.invoice_payment_term_id.name))
|
||||||
for line in lines:
|
for line in lines:
|
||||||
line.date_maturity = new_pterm[iamount].pop()
|
line.date_maturity = new_pterm[iamount].pop()
|
||||||
|
|
||||||
@api.multi
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
inv = self.invoice_id
|
inv = self.invoice_id
|
||||||
@@ -235,28 +188,24 @@ class AccountInvoiceUpdate(models.TransientModel):
|
|||||||
if ivals:
|
if ivals:
|
||||||
updated = True
|
updated = True
|
||||||
inv.write(ivals)
|
inv.write(ivals)
|
||||||
if inv.move_id:
|
if inv:
|
||||||
mvals = self._prepare_move()
|
for ml in inv.line_ids.filtered(
|
||||||
if mvals:
|
|
||||||
inv.move_id.write(mvals)
|
|
||||||
for ml in inv.move_id.line_ids.filtered(
|
|
||||||
# we are only interested in invoice lines, not tax lines
|
# we are only interested in invoice lines, not tax lines
|
||||||
lambda rec: bool(rec.product_id)
|
lambda rec: bool(rec.product_id)
|
||||||
):
|
):
|
||||||
if ml.credit == 0.0:
|
if ml.credit == 0.0:
|
||||||
continue
|
continue
|
||||||
inv_line = self._get_matching_inv_line(ml)
|
analytic_account = ml.analytic_account_id
|
||||||
mlvals = self._prepare_move_line(inv_line)
|
mlvals, alvals = self._prepare_move_line_and_analytic_line(ml)
|
||||||
if mlvals:
|
if mlvals:
|
||||||
updated = True
|
updated = True
|
||||||
ml.write(mlvals)
|
ml.write(mlvals)
|
||||||
aalines = ml.analytic_line_ids
|
aalines = ml.analytic_line_ids
|
||||||
alvals = self._prepare_analytic_line(inv_line)
|
|
||||||
if aalines and alvals:
|
if aalines and alvals:
|
||||||
updated = True
|
updated = True
|
||||||
if ('account_id' in alvals and
|
if ('account_id' in alvals and
|
||||||
alvals['account_id'] is False):
|
alvals['account_id'] is False):
|
||||||
former_aa = inv_line.account_analytic_id
|
former_aa = analytic_account
|
||||||
to_remove_aalines = aalines.filtered(
|
to_remove_aalines = aalines.filtered(
|
||||||
lambda rec: rec.account_id == former_aa)
|
lambda rec: rec.account_id == former_aa)
|
||||||
# remove existing analytic line
|
# remove existing analytic line
|
||||||
@@ -279,24 +228,24 @@ class AccountInvoiceUpdate(models.TransientModel):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class AccountInvoiceLineUpdate(models.TransientModel):
|
class AccountMoveLineUpdate(models.TransientModel):
|
||||||
_name = 'account.invoice.line.update'
|
_name = 'account.move.line.update'
|
||||||
_description = 'Update non-legal fields of invoice lines'
|
_description = 'Update non-legal fields of invoice lines'
|
||||||
|
|
||||||
parent_id = fields.Many2one(
|
parent_id = fields.Many2one(
|
||||||
'account.invoice.update', string='Wizard', ondelete='cascade')
|
'account.move.update', string='Wizard', ondelete='cascade')
|
||||||
invoice_line_id = fields.Many2one(
|
invoice_line_id = fields.Many2one(
|
||||||
'account.invoice.line', string='Invoice Line', readonly=True)
|
'account.move.line', string='Invoice Line', readonly=True)
|
||||||
name = fields.Text(string='Description', required=True)
|
name = fields.Text(string='Description', required=True)
|
||||||
display_type = fields.Selection([
|
display_type = fields.Selection([
|
||||||
('line_section', "Section"),
|
('line_section', "Section"),
|
||||||
('line_note', "Note")], default=False, help="Technical field for UX purpose.")
|
('line_note', "Note")], default=False, help="Technical field for UX purpose.")
|
||||||
quantity = fields.Float(
|
quantity = fields.Float(
|
||||||
string='Quantity', digits=dp.get_precision('Product Unit of Measure'),
|
string='Quantity', digits='Product Unit of Measure', readonly=True)
|
||||||
readonly=True)
|
price_subtotal = fields.Monetary(
|
||||||
price_subtotal = fields.Float(
|
string='Amount', readonly=True)
|
||||||
string='Amount', readonly=True, digits=dp.get_precision('Account'))
|
analytic_account_id = fields.Many2one(
|
||||||
account_analytic_id = fields.Many2one(
|
|
||||||
'account.analytic.account', string='Analytic Account')
|
'account.analytic.account', string='Analytic Account')
|
||||||
analytic_tag_ids = fields.Many2many(
|
analytic_tag_ids = fields.Many2many(
|
||||||
'account.analytic.tag', string='Analytic Tags')
|
'account.analytic.tag', string='Analytic Tags')
|
||||||
|
currency_id = fields.Many2one('res.currency', readonly=True)
|
||||||
@@ -7,32 +7,32 @@
|
|||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<record id="account_invoice_update_form" model="ir.ui.view">
|
<record id="account_invoice_update_form" model="ir.ui.view">
|
||||||
<field name="model">account.invoice.update</field>
|
<field name="model">account.move.update</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Update Invoice Wizard">
|
<form string="Update Invoice Wizard">
|
||||||
<group name="main">
|
<group name="main">
|
||||||
<field name="invoice_id" invisible="1"/>
|
<field name="invoice_id" invisible="1"/>
|
||||||
<field name="type" invisible="1"/>
|
<field name="move_type" invisible="1"/>
|
||||||
<field name="company_id" invisible="1"/>
|
<field name="company_id" invisible="1"/>
|
||||||
<field name="partner_id" invisible="1"/>
|
<field name="partner_id" invisible="1"/>
|
||||||
<field name="reference" attrs="{'invisible': [('type', 'not in', ('in_invoice', 'in_refund'))]}"/>
|
<field string="Bill Reference" attrs="{'invisible': [('move_type', 'not in', ('in_invoice', 'in_refund'))]}" name="ref"/>
|
||||||
<field name="origin"/>
|
<field string="Customer Reference" attrs="{'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund'))]}" name="ref"/>
|
||||||
<field name="name"/>
|
<field name="invoice_origin"/>
|
||||||
<field name="payment_term_id" widget="selection"/>
|
<field name="invoice_payment_term_id" widget="selection"/>
|
||||||
<field name="partner_bank_id"/>
|
<field name="partner_bank_id"/>
|
||||||
<field name="user_id"/>
|
<field name="user_id" options="{'no_open': True, 'no_create': True, 'no_create_edit': True}"/>
|
||||||
<field name="comment"/>
|
|
||||||
</group>
|
</group>
|
||||||
<group name="lines">
|
<group name="lines">
|
||||||
<field name="line_ids" nolabel="1">
|
<field name="line_ids" nolabel="1">
|
||||||
<tree editable="bottom" create="false" delete="false" edit="true">
|
<tree editable="bottom" create="false" delete="false" edit="true">
|
||||||
<field name="invoice_line_id" invisible="1"/>
|
<field name="invoice_line_id" invisible="1"/>
|
||||||
<field name="display_type" invisible="1"/>
|
<field name="display_type" invisible="1"/>
|
||||||
|
<field name="currency_id" invisible="1"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="quantity" attrs="{'invisible': [('display_type', '!=', False)]}"/>
|
<field name="quantity" attrs="{'invisible': [('display_type', '!=', False)]}"/>
|
||||||
<field name="price_subtotal" attrs="{'invisible': [('display_type', '!=', False)]}"/>
|
<field name="price_subtotal" attrs="{'invisible': [('display_type', '!=', False)]}"/>
|
||||||
<field name="account_analytic_id" attrs="{'invisible': [('display_type', '!=', False)]}" groups="analytic.group_analytic_accounting"/>
|
<field name="analytic_account_id" attrs="{'invisible': [('display_type', '!=', False)]}" groups="analytic.group_analytic_accounting"/>
|
||||||
<field name="analytic_tag_ids" attrs="{'invisible': [('display_type', '!=', False)]}" groups="analytic.group_analytic_accounting" widget="many2many_tags"/>
|
<field name="analytic_tag_ids" attrs="{'invisible': [('display_type', '!=', False)]}" groups="analytic.group_analytic_tags" widget="many2many_tags"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</group>
|
</group>
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
<record id="account_invoice_update_action" model="ir.actions.act_window">
|
<record id="account_invoice_update_action" model="ir.actions.act_window">
|
||||||
<field name="name">Invoice Update Wizard</field>
|
<field name="name">Invoice Update Wizard</field>
|
||||||
<field name="res_model">account.invoice.update</field>
|
<field name="res_model">account.move.update</field>
|
||||||
<field name="view_mode">form</field>
|
<field name="view_mode">form</field>
|
||||||
<field name="target">new</field>
|
<field name="target">new</field>
|
||||||
</record>
|
</record>
|
||||||
39
account_invoice_update_wizard_payment_mode/README.rst
Normal file
39
account_invoice_update_wizard_payment_mode/README.rst
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
||||||
|
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
:alt: License: AGPL-3
|
||||||
|
|
||||||
|
Account Invoice Update Wizard
|
||||||
|
=============================
|
||||||
|
|
||||||
|
This module adds a button *Update Invoice* on Customer and Supplier invoices in
|
||||||
|
Open or Paid state. This button starts a wizard which allows the user to update
|
||||||
|
non-legal fields of the invoice:
|
||||||
|
|
||||||
|
* Source Document
|
||||||
|
* Reference/Description
|
||||||
|
* Payment terms (update allowed only to a payment term with same number of terms
|
||||||
|
of the same amount and on invoices without any payment)
|
||||||
|
* Bank Account
|
||||||
|
* Salesman
|
||||||
|
* Notes
|
||||||
|
* Description of invoice lines
|
||||||
|
* Analytic account
|
||||||
|
* Analytic tags
|
||||||
|
|
||||||
|
Bug Tracker
|
||||||
|
===========
|
||||||
|
|
||||||
|
Bugs are tracked on `GitHub Issues
|
||||||
|
<https://github.com/akretion/odoo-usability/issues>`_. In case of trouble, please
|
||||||
|
check there if your issue has already been reported. If you spotted it first,
|
||||||
|
help us smash it by providing detailed and welcomed feedback.
|
||||||
|
|
||||||
|
Contributors
|
||||||
|
------------
|
||||||
|
|
||||||
|
* Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
* Florian da Costa <florian.dacosta@akretion.com>
|
||||||
|
* Matthieu Dietrich <matthieu.dietrich@camptocamp.com>
|
||||||
|
* Yannick Vaucher <yannick.vaucher@camptocamp.com>
|
||||||
|
* Mykhailo Panarin <m.panarin@mobilunity.com>
|
||||||
|
* Artem Kostyuk <a.kostyuk@mobilunity.com>
|
||||||
1
account_invoice_update_wizard_payment_mode/__init__.py
Normal file
1
account_invoice_update_wizard_payment_mode/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
from . import wizard
|
||||||
17
account_invoice_update_wizard_payment_mode/__manifest__.py
Normal file
17
account_invoice_update_wizard_payment_mode/__manifest__.py
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# Copyright 2022 Akretion France (http://www.akretion.com/)
|
||||||
|
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
{
|
||||||
|
'name': 'Account Invoice Update Wizard Payment Mode',
|
||||||
|
'version': '14.0.1.0.0',
|
||||||
|
'category': 'Accounting & Finance',
|
||||||
|
'license': 'AGPL-3',
|
||||||
|
'summary': 'Add Payment Mode to Invoice Update Wizard',
|
||||||
|
'author': 'Akretion',
|
||||||
|
'website': 'https://github.com/akretion/odoo-usability',
|
||||||
|
'depends': ['account_invoice_update_wizard', 'account_payment_partner'],
|
||||||
|
'data': ['wizard/account_move_update_view.xml'],
|
||||||
|
'installable': False,
|
||||||
|
'auto_install': True,
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||||
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
-->
|
||||||
|
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<record id="view_move_form_inherit" model="ir.ui.view">
|
||||||
|
<field name="model">account.move</field>
|
||||||
|
<field name="inherit_id" ref="account.view_move_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<button name="button_draft" position="before">
|
||||||
|
<button name="prepare_update_wizard" type="object" string="Update Invoice" states="posted" groups="account.group_account_invoice"/>
|
||||||
|
</button>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</odoo>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
from . import account_move_update
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# Copyright 2022 Akretion France (http://www.akretion.com/)
|
||||||
|
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
|
||||||
|
from odoo import models, fields, api, _
|
||||||
|
|
||||||
|
|
||||||
|
class AccountMoveUpdate(models.TransientModel):
|
||||||
|
_inherit = 'account.move.update'
|
||||||
|
|
||||||
|
payment_mode_filter_type_domain = fields.Char(
|
||||||
|
related='invoice_id.payment_mode_filter_type_domain')
|
||||||
|
partner_bank_filter_type_domain = fields.Many2one(
|
||||||
|
related='invoice_id.partner_bank_filter_type_domain')
|
||||||
|
bank_account_required = fields.Boolean(
|
||||||
|
related='invoice_id.bank_account_required')
|
||||||
|
payment_mode_id = fields.Many2one("account.payment.mode")
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _m2o_fields2update(self):
|
||||||
|
m2o_list = super()._m2o_fields2update()
|
||||||
|
m2o_list.append('payment_mode_id')
|
||||||
|
return m2o_list
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2022 Akretion France (http://www.akretion.com/)
|
||||||
|
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
-->
|
||||||
|
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
|
||||||
|
<record id="account_invoice_update_form" model="ir.ui.view">
|
||||||
|
<field name="model">account.move.update</field>
|
||||||
|
<field name="inherit_id" ref="account_invoice_update_wizard.account_invoice_update_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<field name="invoice_payment_term_id" position="after">
|
||||||
|
<field name="payment_mode_filter_type_domain" invisible="1"/>
|
||||||
|
<field name="partner_bank_filter_type_domain" invisible="1"/>
|
||||||
|
<field name="bank_account_required" invisible="1"/>
|
||||||
|
<field name="payment_mode_id" domain="[('payment_type', '=', payment_mode_filter_type_domain), ('company_id', '=', company_id)]"/>
|
||||||
|
</field>
|
||||||
|
<field name="partner_bank_id" position="attributes">
|
||||||
|
<attribute name="domain">
|
||||||
|
[('partner_id', '=', partner_bank_filter_type_domain),
|
||||||
|
'|',('company_id', '=', company_id),('company_id', '=', False)]
|
||||||
|
</attribute>
|
||||||
|
<attribute name="attrs">{'required': [('bank_account_required', '=', True),('move_type', 'in', ('in_invoice', 'in_refund'))]}</attribute>
|
||||||
|
</field>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
|
||||||
|
</odoo>
|
||||||
18
account_menu_usability/__manifest__.py
Normal file
18
account_menu_usability/__manifest__.py
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# Copyright 2022 Akretion France (http://www.akretion.com)
|
||||||
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
{
|
||||||
|
'name': 'Account Menu Usability',
|
||||||
|
'version': '14.0.1.0.0',
|
||||||
|
'category': 'Accounting & Finance',
|
||||||
|
'license': 'AGPL-3',
|
||||||
|
'summary': 'Small usability enhancements in account_menu module',
|
||||||
|
'author': 'Akretion',
|
||||||
|
'website': 'https://github.com/akretion/odoo-usability',
|
||||||
|
'depends': ['account_menu'],
|
||||||
|
'data': [
|
||||||
|
'views/account_menu.xml',
|
||||||
|
],
|
||||||
|
'installable': False,
|
||||||
|
}
|
||||||
20
account_menu_usability/views/account_menu.xml
Normal file
20
account_menu_usability/views/account_menu.xml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2022 Akretion France (http://www.akretion.com/)
|
||||||
|
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
-->
|
||||||
|
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Accounting Templates are useful only when creating a new company/loading
|
||||||
|
a chart of accounts, so we put it under 'Settings > Technical' and not
|
||||||
|
under 'Invoicing > Configuration' which already has a lot of menu entries -->
|
||||||
|
<record id="account_menu.menu_account_coa_settings" model="ir.ui.menu">
|
||||||
|
<field name="name">Accounting Templates</field>
|
||||||
|
<field name="parent_id" ref="base.menu_custom"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
|
||||||
|
</odoo>
|
||||||
29
account_move_label_copy/__manifest__.py
Normal file
29
account_move_label_copy/__manifest__.py
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
# Copyright 2022 Akretion (http://www.akretion.com)
|
||||||
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
{
|
||||||
|
'name': 'Account Move Label Copy',
|
||||||
|
'version': '14.0.1.0.0',
|
||||||
|
'category': 'Accounting & Finance',
|
||||||
|
'license': 'AGPL-3',
|
||||||
|
'summary': 'When creating a Journal Entry manually, copy label from line to line',
|
||||||
|
'description': """
|
||||||
|
Account Move Label Copy
|
||||||
|
=======================
|
||||||
|
|
||||||
|
This module is ONLY for users who don't accept to use the 'Reference' (ref) to store the description of the journal entry (the recommended method), but want to use the label on the lines for that purpose (name field of account.move.line). With this module, the label of the first line will be copied by default to the other lines upon creation of each line.
|
||||||
|
|
||||||
|
I don't recommend the use of this module.
|
||||||
|
""",
|
||||||
|
'author': 'Akretion',
|
||||||
|
'website': 'http://www.akretion.com',
|
||||||
|
'depends': [
|
||||||
|
'account',
|
||||||
|
'base_view_inheritance_extension',
|
||||||
|
],
|
||||||
|
'data': [
|
||||||
|
'views/account_move.xml',
|
||||||
|
],
|
||||||
|
'installable': False,
|
||||||
|
}
|
||||||
1
account_move_label_copy/models/__init__.py
Normal file
1
account_move_label_copy/models/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
from . import account_move
|
||||||
13
account_move_label_copy/models/account_move.py
Normal file
13
account_move_label_copy/models/account_move.py
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# Copyright 2022 Akretion France (http://www.akretion.com/)
|
||||||
|
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo import fields, models
|
||||||
|
|
||||||
|
|
||||||
|
class AccountMove(models.Model):
|
||||||
|
_inherit = "account.move"
|
||||||
|
|
||||||
|
default_move_line_name = fields.Char(
|
||||||
|
related='line_ids.name',
|
||||||
|
string='Default Journal Item Label')
|
||||||
23
account_move_label_copy/views/account_move.xml
Normal file
23
account_move_label_copy/views/account_move.xml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2022 Akretion France (http://www.akretion.com/)
|
||||||
|
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
-->
|
||||||
|
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<record id="view_move_form" model="ir.ui.view">
|
||||||
|
<field name="model">account.move</field>
|
||||||
|
<field name="inherit_id" ref="account.view_move_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<field name="narration" position="after">
|
||||||
|
<field name="default_move_line_name" invisible="1"/>
|
||||||
|
</field>
|
||||||
|
<xpath expr="//page[@id='aml_tab']/field[@name='line_ids']" position="attributes">
|
||||||
|
<attribute name="context" operation="python_dict" key="default_name">default_move_line_name</attribute>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</odoo>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
from . import report
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
# Copyright 2023 Akretion France (http://www.akretion.com/)
|
||||||
|
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
{
|
||||||
|
'name': 'Account Product Fiscal Classification - Sale',
|
||||||
|
'version': '16.0.1.0.0',
|
||||||
|
'category': 'Sales',
|
||||||
|
'license': 'AGPL-3',
|
||||||
|
'summary': 'Glue module between account_product_fiscal_classification and sale',
|
||||||
|
'description': """
|
||||||
|
This module adds a **Start Date** and **End Date** field on invoice
|
||||||
|
lines. For example, if you have an insurance contrat for your company
|
||||||
|
that run from April 1st 2013 to March 31st 2014, you will enter these
|
||||||
|
dates as start and end dates on the supplier invoice line. If your
|
||||||
|
fiscal year ends on December 31st 2013, 3 months of expenses are part of
|
||||||
|
the 2014 fiscal year and should not be part of the 2013 fiscal year. So,
|
||||||
|
thanks to this module, you will create a *Prepaid Expense* on December
|
||||||
|
31st 2013 and OpenERP will identify this expense with the 3 months that
|
||||||
|
are after the cut-off date and propose to generate the appropriate
|
||||||
|
cut-off journal entry.
|
||||||
|
|
||||||
|
This module has been written by Alexis de Lattre from Akretion
|
||||||
|
<alexis.delattre@akretion.com>.
|
||||||
|
""",
|
||||||
|
'author': 'Akretion',
|
||||||
|
'maintainers': ['alexis-via'],
|
||||||
|
'website': 'https://github.com/akretion/odoo-usability',
|
||||||
|
'depends': ['pos_sale', 'account_product_fiscal_classification'],
|
||||||
|
"data": ['report/sale_report_view.xml'],
|
||||||
|
'auto_install': True,
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
from . import sale_report
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
# Copyright 2023 Akretion France (http://www.akretion.com)
|
||||||
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo import fields, models
|
||||||
|
|
||||||
|
|
||||||
|
class SaleReport(models.Model):
|
||||||
|
_inherit = "sale.report"
|
||||||
|
|
||||||
|
fiscal_classification_id = fields.Many2one(
|
||||||
|
"account.product.fiscal.classification",
|
||||||
|
string="Product Fiscal Classification",
|
||||||
|
readonly=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
def _select_additional_fields(self):
|
||||||
|
res = super()._select_additional_fields()
|
||||||
|
res["fiscal_classification_id"] = "t.fiscal_classification_id"
|
||||||
|
return res
|
||||||
|
|
||||||
|
def _group_by_sale(self):
|
||||||
|
res = super()._group_by_sale()
|
||||||
|
res += ", t.fiscal_classification_id"
|
||||||
|
return res
|
||||||
|
|
||||||
|
def _fill_pos_fields(self, additional_fields):
|
||||||
|
res = super()._fill_pos_fields(additional_fields)
|
||||||
|
res['fiscal_classification_id'] = "t.fiscal_classification_id"
|
||||||
|
return res
|
||||||
|
|
||||||
|
def _group_by_pos(self):
|
||||||
|
res = super()._group_by_pos()
|
||||||
|
res += ", t.fiscal_classification_id"
|
||||||
|
return res
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2023 Akretion France (http://www.akretion.com/)
|
||||||
|
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
-->
|
||||||
|
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<record id="view_order_product_search" model="ir.ui.view">
|
||||||
|
<field name="model">sale.report</field>
|
||||||
|
<field name="inherit_id" ref="sale.view_order_product_search"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<filter name="Category" position="after">
|
||||||
|
<filter name="fiscal_classification_groupby" string="Product Fiscal Classification" context="{'group_by': 'fiscal_classification_id'}"/>
|
||||||
|
</filter>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</odoo>
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
# Copyright 2015-2020 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
|
|
||||||
from odoo import api, models
|
|
||||||
import logging
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class AccountAccount(models.Model):
|
|
||||||
_inherit = 'account.account'
|
|
||||||
|
|
||||||
@api.depends('name', 'code')
|
|
||||||
def name_get(self):
|
|
||||||
if self._context.get('account_account_show_code_only'):
|
|
||||||
res = []
|
|
||||||
for record in self:
|
|
||||||
res.append((record.id, record.code))
|
|
||||||
return res
|
|
||||||
else:
|
|
||||||
return super().name_get()
|
|
||||||
|
|
||||||
# https://github.com/odoo/odoo/issues/23040
|
|
||||||
# TODO mig to v14 ?
|
|
||||||
def fix_bank_account_types(self):
|
|
||||||
aao = self.env['account.account']
|
|
||||||
companies = self.env['res.company'].search([])
|
|
||||||
if len(companies) > 1:
|
|
||||||
self = self.sudo()
|
|
||||||
logger.info("START the script 'fix bank and cash account types'")
|
|
||||||
bank_type = self.env.ref('account.data_account_type_liquidity')
|
|
||||||
asset_type = self.env.ref('account.data_account_type_current_assets')
|
|
||||||
journals = self.env['account.journal'].search(
|
|
||||||
[('type', 'in', ('bank', 'cash'))], order='company_id')
|
|
||||||
journal_accounts_bank_type = aao
|
|
||||||
for journal in journals:
|
|
||||||
for account in [
|
|
||||||
journal.default_credit_account_id,
|
|
||||||
journal.default_debit_account_id]:
|
|
||||||
if account:
|
|
||||||
if account.user_type_id != bank_type:
|
|
||||||
account.user_type_id = bank_type.id
|
|
||||||
logger.info(
|
|
||||||
'Company %s: Account %s updated to Bank '
|
|
||||||
'and Cash type',
|
|
||||||
account.company_id.display_name, account.code)
|
|
||||||
if account not in journal_accounts_bank_type:
|
|
||||||
journal_accounts_bank_type += account
|
|
||||||
accounts = aao.search([
|
|
||||||
('user_type_id', '=', bank_type.id)], order='company_id, code')
|
|
||||||
for account in accounts:
|
|
||||||
if account not in journal_accounts_bank_type:
|
|
||||||
account.user_type_id = asset_type.id
|
|
||||||
logger.info(
|
|
||||||
'Company %s: Account %s updated to Current Asset type',
|
|
||||||
account.company_id.display_name, account.code)
|
|
||||||
logger.info("END of the script 'fix bank and cash account types'")
|
|
||||||
return True
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
# Copyright 2015-2020 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
|
|
||||||
from odoo import api, fields, models
|
|
||||||
|
|
||||||
|
|
||||||
class AccountJournal(models.Model):
|
|
||||||
_inherit = 'account.journal'
|
|
||||||
|
|
||||||
hide_bank_statement_balance = fields.Boolean(
|
|
||||||
string='Hide Bank Statement Balance',
|
|
||||||
help="You may want to enable this option when your bank "
|
|
||||||
"journal is generated from a bank statement file that "
|
|
||||||
"doesn't handle start/end balance (QIF for instance) and "
|
|
||||||
"you don't want to enter the start/end balance manually: it "
|
|
||||||
"will prevent the display of wrong information in the accounting "
|
|
||||||
"dashboard and on bank statements.")
|
|
||||||
# Used to set default user_type_id on account fields
|
|
||||||
account_type_current_liabilities_id = fields.Many2one(
|
|
||||||
'account.account.type',
|
|
||||||
default=lambda self: self.env.ref('account.data_account_type_current_liabilities').id)
|
|
||||||
account_type_current_assets_id = fields.Many2one(
|
|
||||||
'account.account.type',
|
|
||||||
default=lambda self: self.env.ref('account.data_account_type_current_assets').id)
|
|
||||||
|
|
||||||
@api.depends(
|
|
||||||
'name', 'currency_id', 'company_id', 'company_id.currency_id', 'code')
|
|
||||||
def name_get(self):
|
|
||||||
res = []
|
|
||||||
if self._context.get('journal_show_code_only'):
|
|
||||||
for journal in self:
|
|
||||||
res.append((journal.id, journal.code))
|
|
||||||
return res
|
|
||||||
else:
|
|
||||||
for journal in self:
|
|
||||||
name = "[%s] %s" % (journal.code, journal.name)
|
|
||||||
if (
|
|
||||||
journal.currency_id and
|
|
||||||
journal.currency_id != journal.company_id.currency_id):
|
|
||||||
name = "%s (%s)" % (name, journal.currency_id.name)
|
|
||||||
res.append((journal.id, name))
|
|
||||||
return res
|
|
||||||
|
|
||||||
# @api.constrains('default_credit_account_id', 'default_debit_account_id')
|
|
||||||
# def _check_account_type_on_bank_journal(self):
|
|
||||||
# bank_acc_type = self.env.ref('account.data_account_type_liquidity')
|
|
||||||
# for jrl in self:
|
|
||||||
# if jrl.type in ('bank', 'cash'):
|
|
||||||
# if (
|
|
||||||
# jrl.default_debit_account_id and
|
|
||||||
# jrl.default_debit_account_id.user_type_id !=
|
|
||||||
# bank_acc_type):
|
|
||||||
# raise ValidationError(_(
|
|
||||||
# "On journal '%s', the default debit account '%s' "
|
|
||||||
# "should be configured with Type = 'Bank and Cash'.")
|
|
||||||
# % (jrl.display_name,
|
|
||||||
# jrl.default_debit_account_id.display_name))
|
|
||||||
# if (
|
|
||||||
# jrl.default_credit_account_id and
|
|
||||||
# jrl.default_credit_account_id.user_type_id !=
|
|
||||||
# bank_acc_type):
|
|
||||||
# raise ValidationError(_(
|
|
||||||
# "On journal '%s', the default credit account '%s' "
|
|
||||||
# "should be configured with Type = 'Bank and Cash'.")
|
|
||||||
# % (jrl.display_name,
|
|
||||||
# jrl.default_credit_account_id.display_name))
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
Copyright 2015-2020 Akretion France (http://www.akretion.com/)
|
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
-->
|
|
||||||
|
|
||||||
<odoo>
|
|
||||||
|
|
||||||
<record id="view_account_type_tree" model="ir.ui.view">
|
|
||||||
<field name="name">account_usability.account_type_tree</field>
|
|
||||||
<field name="model">account.account.type</field>
|
|
||||||
<field name="inherit_id" ref="account.view_account_type_tree" />
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="type" position="after">
|
|
||||||
<field name="include_initial_balance" optional="show"/>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
</odoo>
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
Copyright 2015-2021 Akretion France (http://www.akretion.com/)
|
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
-->
|
|
||||||
|
|
||||||
<odoo>
|
|
||||||
|
|
||||||
|
|
||||||
<record id="view_account_analytic_account_list" model="ir.ui.view">
|
|
||||||
<field name="model">account.analytic.account</field>
|
|
||||||
<field name="inherit_id" ref="analytic.view_account_analytic_account_list"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="code" position="after">
|
|
||||||
<field name="group_id" optional="show"/>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
<record id="view_account_analytic_account_search" model="ir.ui.view">
|
|
||||||
<field name="model">account.analytic.account</field>
|
|
||||||
<field name="inherit_id" ref="analytic.view_account_analytic_account_search"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<filter name="associatedpartner" position="before">
|
|
||||||
<filter name="group_groupby" string="Group" context="{'group_by': 'group_id'}"/>
|
|
||||||
</filter>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
</odoo>
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
Copyright 2021 Akretion France (http://www.akretion.com/)
|
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
-->
|
|
||||||
|
|
||||||
<odoo>
|
|
||||||
|
|
||||||
|
|
||||||
<record id="account_analytic_group_tree_view" model="ir.ui.view">
|
|
||||||
<field name="model">account.analytic.group</field>
|
|
||||||
<field name="inherit_id" ref="analytic.account_analytic_group_tree_view"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="name" position="after">
|
|
||||||
<field name="parent_id" optional="show"/>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
</odoo>
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
Copyright 2018-2020 Akretion (http://www.akretion.com/)
|
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
-->
|
|
||||||
|
|
||||||
<odoo>
|
|
||||||
|
|
||||||
|
|
||||||
<record id="account_invoice_report_tree" model="ir.ui.view">
|
|
||||||
<field name="name">usability.account.invoice.report.tree</field>
|
|
||||||
<field name="model">account.invoice.report</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<tree string="Invoices Analysis">
|
|
||||||
<field name="move_id"/>
|
|
||||||
<field name="journal_id" optional="hide"/>
|
|
||||||
<field name="company_id" optional="hide" groups="base.group_multi_company"/>
|
|
||||||
<field name="invoice_date"/>
|
|
||||||
<field name="invoice_date_due"/>
|
|
||||||
<field name="move_type"/>
|
|
||||||
<field name="commercial_partner_id"/>
|
|
||||||
<field name="partner_id" optional="hide"/>
|
|
||||||
<field name="country_id" optional="hide"/>
|
|
||||||
<field name="industry_id" optional="hide"/>
|
|
||||||
<field name="invoice_user_id"/>
|
|
||||||
<field name="fiscal_position_id" optional="hide"/>
|
|
||||||
<field name="product_id"/>
|
|
||||||
<field name="product_categ_id" optional="hide"/>
|
|
||||||
<field name="account_id" optional="hide"/>
|
|
||||||
<field name="analytic_account_id" optional="hide" groups="analytic.group_analytic_accounting"/>
|
|
||||||
<field name="quantity" sum="1"/>
|
|
||||||
<field name="product_uom_id" groups="uom.group_uom"/>
|
|
||||||
<field name="price_subtotal" sum="1"/>
|
|
||||||
<field name="state"/>
|
|
||||||
<field name="payment_state" optional="hide"/>
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="account.action_account_invoice_report_all_supp" model="ir.actions.act_window">
|
|
||||||
<field name="context">{'search_default_current': 1, 'search_default_supplier': 1, 'group_by': ['invoice_date']}</field> <!-- Remove group_by_no_leaf, which breaks tree view -->
|
|
||||||
<field name="view_mode">pivot,graph</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="account.action_account_invoice_report_all" model="ir.actions.act_window">
|
|
||||||
<field name="context">{'search_default_current': 1, 'search_default_customer': 1, 'group_by': ['invoice_date']}</field> <!-- Remove group_by_no_leaf, which breaks tree view -->
|
|
||||||
<field name="view_mode">pivot,graph</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="view_account_invoice_report_pivot" model="ir.ui.view">
|
|
||||||
<field name="name">usability.account.invoice.report</field>
|
|
||||||
<field name="model">account.invoice.report</field>
|
|
||||||
<field name="inherit_id" ref="account.view_account_invoice_report_pivot"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<pivot position="attributes">
|
|
||||||
<attribute name="disable_linking"></attribute>
|
|
||||||
</pivot>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
</odoo>
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
Copyright 2015-2020 Akretion France (http://www.akretion.com/)
|
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
-->
|
|
||||||
|
|
||||||
<odoo>
|
|
||||||
|
|
||||||
<record id="res_config_settings_view_form" model="ir.ui.view">
|
|
||||||
<field name="name">account_usability account config page</field>
|
|
||||||
<field name="model">res.config.settings</field>
|
|
||||||
<field name="inherit_id" ref="account.res_config_settings_view_form"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<xpath expr="//div[@id='bank_cash']" position="inside">
|
|
||||||
<div class="col-xs-12 col-md-6 o_setting_box" id="transfer_account">
|
|
||||||
<div class="o_setting_left_pane"/>
|
|
||||||
<div class="o_setting_right_pane">
|
|
||||||
<label for="transfer_account_id"/>
|
|
||||||
<div class="text-muted">
|
|
||||||
Transit account when you transfer money from a bank account of your company to another bank account of your company.
|
|
||||||
</div>
|
|
||||||
<field name="transfer_account_id"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</xpath>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
</odoo>
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
Copyright 2017-2020 Akretion (http://www.akretion.com/)
|
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
-->
|
|
||||||
|
|
||||||
<odoo>
|
|
||||||
|
|
||||||
|
|
||||||
<record id="view_partner_property_form" model="ir.ui.view">
|
|
||||||
<field name="name">account_usability.res.partner.form</field>
|
|
||||||
<field name="model">res.partner</field>
|
|
||||||
<field name="inherit_id" ref="account.view_partner_property_form"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="property_account_position_id" position="attributes">
|
|
||||||
<attribute name="widget">selection</attribute>
|
|
||||||
</field>
|
|
||||||
<xpath expr="//field[@name='bank_ids']/tree/field[@name='acc_number']" position="after">
|
|
||||||
<field name="acc_type"/>
|
|
||||||
</xpath>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
</odoo>
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
# Copyright 2018-2020 Akretion France (https://akretion.com/)
|
|
||||||
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
|
|
||||||
from odoo import api, fields, models
|
|
||||||
from dateutil.relativedelta import relativedelta
|
|
||||||
|
|
||||||
|
|
||||||
class AccountMoveReversal(models.TransientModel):
|
|
||||||
_inherit = 'account.move.reversal'
|
|
||||||
|
|
||||||
@api.model
|
|
||||||
def _default_date(self):
|
|
||||||
date_dt = None
|
|
||||||
if (
|
|
||||||
self._context.get('active_model') == 'account.move' and
|
|
||||||
self._context.get('active_id')):
|
|
||||||
move = self.env['account.move'].browse(self._context['active_id'])
|
|
||||||
date_dt = move.date + relativedelta(days=1)
|
|
||||||
return date_dt
|
|
||||||
|
|
||||||
date = fields.Date(default=_default_date)
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
# Copyright 2015-2020 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
|
|
||||||
from odoo import fields, models
|
|
||||||
|
|
||||||
|
|
||||||
class ResConfigSettings(models.TransientModel):
|
|
||||||
_inherit = 'res.config.settings'
|
|
||||||
|
|
||||||
transfer_account_id = fields.Many2one(
|
|
||||||
related='company_id.transfer_account_id', readonly=False)
|
|
||||||
@@ -1,2 +1,3 @@
|
|||||||
from . import models
|
from . import models
|
||||||
from . import wizard
|
from . import wizard
|
||||||
|
from .hooks import post_init_hook
|
||||||
@@ -1,44 +1,40 @@
|
|||||||
# Copyright 2015-2020 Akretion (http://www.akretion.com)
|
# Copyright 2015-2022 Akretion (http://www.akretion.com)
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Account Usability',
|
'name': 'Account Usability',
|
||||||
'version': '14.0.1.0.0',
|
'version': '16.0.1.0.0',
|
||||||
'category': 'Accounting & Finance',
|
'category': 'Accounting & Finance',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'summary': 'Small usability enhancements in account module',
|
'summary': 'Small usability enhancements in account module',
|
||||||
'author': 'Akretion',
|
'author': 'Akretion',
|
||||||
'website': 'http://www.akretion.com',
|
'website': 'https://github.com/akretion/odoo-usability',
|
||||||
'depends': [
|
'depends': [
|
||||||
'account',
|
'account',
|
||||||
'base_view_inheritance_extension',
|
|
||||||
'base_usability', # needed only to access base_usability.group_nobody
|
'base_usability', # needed only to access base_usability.group_nobody
|
||||||
# in v12, I may create a module only for group_nobody
|
|
||||||
],
|
],
|
||||||
'data': [
|
'data': [
|
||||||
'views/account_account_type.xml',
|
|
||||||
'views/account_account.xml',
|
'views/account_account.xml',
|
||||||
'views/account_group.xml',
|
'views/account_group.xml',
|
||||||
'views/account_analytic_account.xml',
|
# 'views/account_bank_statement.xml',
|
||||||
'views/account_analytic_group.xml',
|
|
||||||
'views/account_bank_statement.xml',
|
|
||||||
'views/account_invoice_report.xml',
|
'views/account_invoice_report.xml',
|
||||||
'views/account_journal.xml',
|
'views/account_journal.xml',
|
||||||
'views/account_move.xml',
|
'views/account_move.xml',
|
||||||
|
'views/account_analytic_line.xml',
|
||||||
'views/account_menu.xml',
|
'views/account_menu.xml',
|
||||||
'views/account_tax.xml',
|
'views/account_tax.xml',
|
||||||
'views/product.xml',
|
# 'views/product.xml', # TODO
|
||||||
'views/res_config_settings.xml',
|
|
||||||
'views/res_partner.xml',
|
|
||||||
'views/res_company.xml',
|
'views/res_company.xml',
|
||||||
'views/account_report.xml',
|
'views/account_report.xml',
|
||||||
'wizard/account_invoice_mark_sent_view.xml',
|
'wizard/account_invoice_mark_sent_view.xml',
|
||||||
'wizard/account_group_generate_view.xml',
|
'wizard/account_group_generate_view.xml',
|
||||||
'wizard/account_payment_register_views.xml',
|
'wizard/account_payment_register_views.xml',
|
||||||
'security/ir.model.access.csv',
|
'security/ir.model.access.csv',
|
||||||
'report/invoice_report.xml',
|
# 'report/invoice_report.xml', # TODO
|
||||||
],
|
"views/res_partner.xml",
|
||||||
'qweb': ['static/src/xml/account_payment.xml'],
|
],
|
||||||
|
# 'qweb': ['static/src/xml/account_payment.xml'],
|
||||||
'installable': True,
|
'installable': True,
|
||||||
|
# "post_init_hook": "post_init_hook",
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
diff --git a/addons/account/models/account_journal_dashboard.py b/addons/account/models/account_journal_dashboard.py
|
||||||
|
index 49e166e5823..5e352c03d7a 100644
|
||||||
|
--- a/addons/account/models/account_journal_dashboard.py
|
||||||
|
+++ b/addons/account/models/account_journal_dashboard.py
|
||||||
|
@@ -309,6 +309,7 @@ class account_journal(models.Model):
|
||||||
|
'has_at_least_one_statement': has_at_least_one_statement,
|
||||||
|
'nb_lines_bank_account_balance': nb_lines_bank_account_balance,
|
||||||
|
'outstanding_pay_account_balance': formatLang(self.env, currency.round(outstanding_pay_account_balance), currency_obj=currency),
|
||||||
|
+ 'account_balance_plus_outstanding': formatLang(self.env, currency.round(bank_account_balance + outstanding_pay_account_balance), currency_obj=currency),
|
||||||
|
'nb_lines_outstanding_pay_account_balance': nb_lines_outstanding_pay_account_balance,
|
||||||
|
'last_balance': formatLang(self.env, currency.round(last_balance) + 0.0, currency_obj=currency),
|
||||||
|
'number_draft': number_draft,
|
||||||
|
diff --git a/addons/account/views/account_journal_dashboard_view.xml b/addons/account/views/account_journal_dashboard_view.xml
|
||||||
|
index 347a36c265e..fd7fb7b67ca 100644
|
||||||
|
--- a/addons/account/views/account_journal_dashboard_view.xml
|
||||||
|
+++ b/addons/account/views/account_journal_dashboard_view.xml
|
||||||
|
@@ -278,6 +278,15 @@
|
||||||
|
<span><t t-esc="dashboard.outstanding_pay_account_balance"/></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
+ <div class="row" t-if="dashboard.nb_lines_outstanding_pay_account_balance > 0">
|
||||||
|
+ <div id="dashboard_account_balance_plus_outstanding" class="col overflow-hidden text-left">
|
||||||
|
+ <span title="Balance + Outstanding">Balance + Outstanding</span>
|
||||||
|
+ </div>
|
||||||
|
+ <div class="col-auto text-right">
|
||||||
|
+ <span><t t-esc="dashboard.account_balance_plus_outstanding"/></span>
|
||||||
|
+ </div>
|
||||||
|
+ </div>
|
||||||
|
+
|
||||||
|
<t t-if="dashboard.has_at_least_one_statement and dashboard.account_balance != dashboard.last_balance">
|
||||||
|
<div class="row" name="latest_statement">
|
||||||
|
<div class="col overflow-hidden text-left">
|
||||||
9
account_usability_akretion/hooks.py
Normal file
9
account_usability_akretion/hooks.py
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# Copyright 2022 Akretion (https://www.akretion.com).
|
||||||
|
# @author Sébastien BEAU <sebastien.beau@akretion.com>
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo import SUPERUSER_ID, api
|
||||||
|
|
||||||
|
def post_init_hook(cr, registry):
|
||||||
|
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||||
|
env["account.move.line"].update_matching_number()
|
||||||
@@ -6,29 +6,25 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Odoo Server 14.0\n"
|
"Project-Id-Version: Odoo Server 14.0\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2022-06-01 14:17+0000\n"
|
|
||||||
"PO-Revision-Date: 2022-06-01 16:22+0200\n"
|
|
||||||
"Last-Translator: \n"
|
"Last-Translator: \n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"Language: fr\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: \n"
|
||||||
"Plural-Forms: \n"
|
"Plural-Forms: \n"
|
||||||
"X-Generator: Poedit 3.0.1\n"
|
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: code:addons/account_usability/wizard/account_group_generate.py:0
|
#: code:addons/account_usability/wizard/account_group_generate.py:0
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"%d account groups already exists in company '%s'. This wizard is designed "
|
"%d account groups already exists in company '%s'. This wizard is designed to"
|
||||||
"to generate account groups from scratch."
|
" generate account groups from scratch."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model,name:account_usability.model_account_account
|
#: model:ir.model,name:account_usability.model_account_account
|
||||||
msgid "Account"
|
msgid "Account"
|
||||||
msgstr "Compte"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: code:addons/account_usability/wizard/account_group_generate.py:0
|
#: code:addons/account_usability/wizard/account_group_generate.py:0
|
||||||
@@ -44,7 +40,7 @@ msgstr ""
|
|||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model,name:account_usability.model_account_reconciliation_widget
|
#: model:ir.model,name:account_usability.model_account_reconciliation_widget
|
||||||
msgid "Account Reconciliation widget"
|
msgid "Account Reconciliation widget"
|
||||||
msgstr "Outils de lettrage de compte"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_account_journal__account_type_current_assets_id
|
#: model:ir.model.fields,field_description:account_usability.field_account_journal__account_type_current_assets_id
|
||||||
@@ -59,7 +55,7 @@ msgstr ""
|
|||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_account_move_line__account_reconcile
|
#: model:ir.model.fields,field_description:account_usability.field_account_move_line__account_reconcile
|
||||||
msgid "Allow Reconciliation"
|
msgid "Allow Reconciliation"
|
||||||
msgstr "Autoriser le lettrage"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model.constraint,message:account_usability.constraint_account_analytic_account_code_company_unique
|
#: model:ir.model.constraint,message:account_usability.constraint_account_analytic_account_code_company_unique
|
||||||
@@ -70,17 +66,11 @@ msgstr ""
|
|||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model,name:account_usability.model_account_analytic_account
|
#: model:ir.model,name:account_usability.model_account_analytic_account
|
||||||
msgid "Analytic Account"
|
msgid "Analytic Account"
|
||||||
msgstr "Compte analytique"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model_terms:ir.ui.view,arch_db:account_usability.view_bank_statement_form
|
#: model_terms:ir.ui.view,arch_db:account_usability.view_bank_statement_form
|
||||||
msgid "Are you sure to unreconcile all the entrie of the bank statement?"
|
msgid "Are you sure to unreconcile all the entrie of the bank statement?"
|
||||||
msgstr "Êtes-vous sûr de vouloir délettrer toute les écritures du relevés?"
|
|
||||||
|
|
||||||
#. module: account_usability
|
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_account_move_line__balance
|
|
||||||
#: model_terms:ir.ui.view,arch_db:account_usability.view_move_line_tree
|
|
||||||
msgid "Balance"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
@@ -91,35 +81,32 @@ msgid ""
|
|||||||
"account if this is a Customer Invoice or Vendor Credit Note, otherwise a "
|
"account if this is a Customer Invoice or Vendor Credit Note, otherwise a "
|
||||||
"Partner bank account number."
|
"Partner bank account number."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Numéro du compte bancaire sur lequel la facture sera payée. Un compte "
|
|
||||||
"bancaire de la Société s'il s'agit d'une facture client ou d'un avoir du "
|
|
||||||
"fournisseur, sinon un numéro de compte bancaire du tiers."
|
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.ui.menu,name:account_usability.res_partner_bank_account_config_menu
|
#: model:ir.ui.menu,name:account_usability.res_partner_bank_account_config_menu
|
||||||
msgid "Bank Accounts"
|
msgid "Bank Accounts"
|
||||||
msgstr "Comptes bancaires"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model,name:account_usability.model_account_bank_statement
|
#: model:ir.model,name:account_usability.model_account_bank_statement
|
||||||
msgid "Bank Statement"
|
msgid "Bank Statement"
|
||||||
msgstr "Relevé bancaire"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model,name:account_usability.model_account_bank_statement_line
|
#: model:ir.model,name:account_usability.model_account_bank_statement_line
|
||||||
msgid "Bank Statement Line"
|
msgid "Bank Statement Line"
|
||||||
msgstr "Ligne de relevé bancaire"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.ui.menu,name:account_usability.res_bank_account_config_menu
|
#: model:ir.ui.menu,name:account_usability.res_bank_account_config_menu
|
||||||
msgid "Banks"
|
msgid "Banks"
|
||||||
msgstr "Banques"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model_terms:ir.ui.view,arch_db:account_usability.account_group_generate_form
|
#: model_terms:ir.ui.view,arch_db:account_usability.account_group_generate_form
|
||||||
#: model_terms:ir.ui.view,arch_db:account_usability.account_invoice_mark_sent_form
|
#: model_terms:ir.ui.view,arch_db:account_usability.account_invoice_mark_sent_form
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
msgstr "Annuler"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model.fields,help:account_usability.field_account_move_line__account_reconcile
|
#: model:ir.model.fields,help:account_usability.field_account_move_line__account_reconcile
|
||||||
@@ -127,8 +114,6 @@ msgid ""
|
|||||||
"Check this box if this account allows invoices & payments matching of "
|
"Check this box if this account allows invoices & payments matching of "
|
||||||
"journal items."
|
"journal items."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Cochez cette case si ce compte permet de faire du rapprochement entre "
|
|
||||||
"factures et paiements."
|
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model_terms:ir.ui.view,arch_db:account_usability.view_account_search
|
#: model_terms:ir.ui.view,arch_db:account_usability.view_account_search
|
||||||
@@ -138,12 +123,12 @@ msgstr ""
|
|||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model,name:account_usability.model_res_company
|
#: model:ir.model,name:account_usability.model_res_company
|
||||||
msgid "Companies"
|
msgid "Companies"
|
||||||
msgstr "Sociétés"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model,name:account_usability.model_res_config_settings
|
#: model:ir.model,name:account_usability.model_res_config_settings
|
||||||
msgid "Config Settings"
|
msgid "Config Settings"
|
||||||
msgstr "Paramètres de configuration"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model,name:account_usability.model_res_partner
|
#: model:ir.model,name:account_usability.model_res_partner
|
||||||
@@ -154,18 +139,18 @@ msgstr ""
|
|||||||
#: model:ir.model.fields,field_description:account_usability.field_account_group_generate__create_uid
|
#: model:ir.model.fields,field_description:account_usability.field_account_group_generate__create_uid
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_account_invoice_mark_sent__create_uid
|
#: model:ir.model.fields,field_description:account_usability.field_account_invoice_mark_sent__create_uid
|
||||||
msgid "Created by"
|
msgid "Created by"
|
||||||
msgstr "Créé par"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_account_group_generate__create_date
|
#: model:ir.model.fields,field_description:account_usability.field_account_group_generate__create_date
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_account_invoice_mark_sent__create_date
|
#: model:ir.model.fields,field_description:account_usability.field_account_invoice_mark_sent__create_date
|
||||||
msgid "Created on"
|
msgid "Created on"
|
||||||
msgstr "Créé le"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model.fields,help:account_usability.field_account_move_line__matched_credit_ids
|
#: model:ir.model.fields,help:account_usability.field_account_move_line__matched_credit_ids
|
||||||
msgid "Credit journal items that are matched with this journal item."
|
msgid "Credit journal items that are matched with this journal item."
|
||||||
msgstr "Pièces au crédit qui correspondent à cette pièce."
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model_terms:ir.ui.view,arch_db:account_usability.view_account_move_line_filter
|
#: model_terms:ir.ui.view,arch_db:account_usability.view_account_move_line_filter
|
||||||
@@ -182,7 +167,7 @@ msgstr ""
|
|||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model.fields,help:account_usability.field_account_move_line__matched_debit_ids
|
#: model:ir.model.fields,help:account_usability.field_account_move_line__matched_debit_ids
|
||||||
msgid "Debit journal items that are matched with this journal item."
|
msgid "Debit journal items that are matched with this journal item."
|
||||||
msgstr "Pièces au débit qui correspondent avec cette pièce."
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model_terms:ir.ui.view,arch_db:account_usability.view_account_move_line_filter
|
#: model_terms:ir.ui.view,arch_db:account_usability.view_account_move_line_filter
|
||||||
@@ -209,20 +194,20 @@ msgstr ""
|
|||||||
#: model:ir.model.fields,field_description:account_usability.field_res_config_settings__display_name
|
#: model:ir.model.fields,field_description:account_usability.field_res_config_settings__display_name
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_res_partner__display_name
|
#: model:ir.model.fields,field_description:account_usability.field_res_partner__display_name
|
||||||
msgid "Display Name"
|
msgid "Display Name"
|
||||||
msgstr "Nom affiché"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_account_bank_statement_line__invoice_date_due
|
#: model:ir.model.fields,field_description:account_usability.field_account_bank_statement_line__invoice_date_due
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_account_move__invoice_date_due
|
#: model:ir.model.fields,field_description:account_usability.field_account_move__invoice_date_due
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_account_payment__invoice_date_due
|
#: model:ir.model.fields,field_description:account_usability.field_account_payment__invoice_date_due
|
||||||
msgid "Due Date"
|
msgid "Due Date"
|
||||||
msgstr "Date d'échéance"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_account_bank_statement__end_date
|
#: model:ir.model.fields,field_description:account_usability.field_account_bank_statement__end_date
|
||||||
#: model_terms:ir.ui.view,arch_db:account_usability.view_bank_statement_search
|
#: model_terms:ir.ui.view,arch_db:account_usability.view_bank_statement_search
|
||||||
msgid "End Date"
|
msgid "End Date"
|
||||||
msgstr "Date de Fin"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model,name:account_usability.model_account_fiscal_position
|
#: model:ir.model,name:account_usability.model_account_fiscal_position
|
||||||
@@ -232,12 +217,12 @@ msgstr "Date de Fin"
|
|||||||
#: model:ir.model.fields,field_description:account_usability.field_res_partner__property_account_position_id
|
#: model:ir.model.fields,field_description:account_usability.field_res_partner__property_account_position_id
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_res_users__property_account_position_id
|
#: model:ir.model.fields,field_description:account_usability.field_res_users__property_account_position_id
|
||||||
msgid "Fiscal Position"
|
msgid "Fiscal Position"
|
||||||
msgstr "Position fiscale"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model,name:account_usability.model_account_fiscalyear
|
#: model:ir.model,name:account_usability.model_account_fiscalyear
|
||||||
msgid "Fiscal Year"
|
msgid "Fiscal Year"
|
||||||
msgstr "Exercice"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model.fields,help:account_usability.field_account_bank_statement_line__fiscal_position_id
|
#: model:ir.model.fields,help:account_usability.field_account_bank_statement_line__fiscal_position_id
|
||||||
@@ -248,9 +233,6 @@ msgid ""
|
|||||||
"customers or sales orders/invoices. The default value comes from the "
|
"customers or sales orders/invoices. The default value comes from the "
|
||||||
"customer."
|
"customer."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
" Les positions fiscales sont utilisées pour adapter les taxes et les "
|
|
||||||
"comptes à des clients particuliers ou à des bons de commande/factures. La "
|
|
||||||
"valeur par défaut provient du client."
|
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_account_move_line__full_reconcile_id
|
#: model:ir.model.fields,field_description:account_usability.field_account_move_line__full_reconcile_id
|
||||||
@@ -260,12 +242,12 @@ msgstr ""
|
|||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model_terms:ir.ui.view,arch_db:account_usability.view_account_move_line_filter
|
#: model_terms:ir.ui.view,arch_db:account_usability.view_account_move_line_filter
|
||||||
msgid "Fully Reconciled"
|
msgid "Fully Reconciled"
|
||||||
msgstr "Lettrage Complet"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model_terms:ir.ui.view,arch_db:account_usability.account_group_generate_form
|
#: model_terms:ir.ui.view,arch_db:account_usability.account_group_generate_form
|
||||||
msgid "Generate"
|
msgid "Generate"
|
||||||
msgstr "Générer"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.actions.act_window,name:account_usability.account_group_generate_action
|
#: model:ir.actions.act_window,name:account_usability.account_group_generate_action
|
||||||
@@ -288,7 +270,7 @@ msgstr ""
|
|||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model_terms:ir.ui.view,arch_db:account_usability.view_account_journal_search
|
#: model_terms:ir.ui.view,arch_db:account_usability.view_account_journal_search
|
||||||
msgid "Group By"
|
msgid "Group By"
|
||||||
msgstr "Regrouper par"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_account_bank_statement_line__has_attachment
|
#: model:ir.model.fields,field_description:account_usability.field_account_bank_statement_line__has_attachment
|
||||||
@@ -330,7 +312,7 @@ msgstr ""
|
|||||||
#: model:ir.model.fields,field_description:account_usability.field_res_config_settings__id
|
#: model:ir.model.fields,field_description:account_usability.field_res_config_settings__id
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_res_partner__id
|
#: model:ir.model.fields,field_description:account_usability.field_res_partner__id
|
||||||
msgid "ID"
|
msgid "ID"
|
||||||
msgstr "Identifiant"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model,name:account_usability.model_account_incoterms
|
#: model:ir.model,name:account_usability.model_account_incoterms
|
||||||
@@ -340,7 +322,7 @@ msgstr ""
|
|||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_res_config_settings__transfer_account_id
|
#: model:ir.model.fields,field_description:account_usability.field_res_config_settings__transfer_account_id
|
||||||
msgid "Inter-Banks Transfer Account"
|
msgid "Inter-Banks Transfer Account"
|
||||||
msgstr "Compte de transfert inter-bancaire"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model.fields,help:account_usability.field_res_config_settings__transfer_account_id
|
#: model:ir.model.fields,help:account_usability.field_res_config_settings__transfer_account_id
|
||||||
@@ -348,8 +330,6 @@ msgid ""
|
|||||||
"Intermediary account used when moving money from a liquidity account to "
|
"Intermediary account used when moving money from a liquidity account to "
|
||||||
"another"
|
"another"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Compte intermédiaire utilisé pour déplacer de l'argent d'un compte de "
|
|
||||||
"trésorerie vers un autre"
|
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model.fields,help:account_usability.field_account_move_line__product_barcode
|
#: model:ir.model.fields,help:account_usability.field_account_move_line__product_barcode
|
||||||
@@ -361,7 +341,7 @@ msgstr ""
|
|||||||
#: model:ir.model.fields,field_description:account_usability.field_res_partner__invoice_warn
|
#: model:ir.model.fields,field_description:account_usability.field_res_partner__invoice_warn
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_res_users__invoice_warn
|
#: model:ir.model.fields,field_description:account_usability.field_res_users__invoice_warn
|
||||||
msgid "Invoice"
|
msgid "Invoice"
|
||||||
msgstr "Facture"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model_terms:ir.ui.view,arch_db:account_usability.view_company_form
|
#: model_terms:ir.ui.view,arch_db:account_usability.view_company_form
|
||||||
@@ -371,17 +351,17 @@ msgstr ""
|
|||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model,name:account_usability.model_account_invoice_line
|
#: model:ir.model,name:account_usability.model_account_invoice_line
|
||||||
msgid "Invoice Line"
|
msgid "Invoice Line"
|
||||||
msgstr "Lignes de facture"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model_terms:ir.ui.view,arch_db:account_usability.account_invoice_report_tree
|
#: model_terms:ir.ui.view,arch_db:account_usability.account_invoice_report_tree
|
||||||
msgid "Invoices Analysis"
|
msgid "Invoices Analysis"
|
||||||
msgstr "Analyse des factures"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model,name:account_usability.model_account_invoice_report
|
#: model:ir.model,name:account_usability.model_account_invoice_report
|
||||||
msgid "Invoices Statistics"
|
msgid "Invoices Statistics"
|
||||||
msgstr "Statistiques des factures"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model,name:account_usability.model_account_journal
|
#: model:ir.model,name:account_usability.model_account_journal
|
||||||
@@ -394,12 +374,12 @@ msgstr ""
|
|||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model,name:account_usability.model_account_move
|
#: model:ir.model,name:account_usability.model_account_move
|
||||||
msgid "Journal Entry"
|
msgid "Journal Entry"
|
||||||
msgstr "Pièce comptable"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model,name:account_usability.model_account_move_line
|
#: model:ir.model,name:account_usability.model_account_move_line
|
||||||
msgid "Journal Item"
|
msgid "Journal Item"
|
||||||
msgstr "Écriture comptable"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_account_account____last_update
|
#: model:ir.model.fields,field_description:account_usability.field_account_account____last_update
|
||||||
@@ -421,19 +401,19 @@ msgstr "Écriture comptable"
|
|||||||
#: model:ir.model.fields,field_description:account_usability.field_res_config_settings____last_update
|
#: model:ir.model.fields,field_description:account_usability.field_res_config_settings____last_update
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_res_partner____last_update
|
#: model:ir.model.fields,field_description:account_usability.field_res_partner____last_update
|
||||||
msgid "Last Modified on"
|
msgid "Last Modified on"
|
||||||
msgstr "Dernière modification le"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_account_group_generate__write_uid
|
#: model:ir.model.fields,field_description:account_usability.field_account_group_generate__write_uid
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_account_invoice_mark_sent__write_uid
|
#: model:ir.model.fields,field_description:account_usability.field_account_invoice_mark_sent__write_uid
|
||||||
msgid "Last Updated by"
|
msgid "Last Updated by"
|
||||||
msgstr "Mis à jour par"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_account_group_generate__write_date
|
#: model:ir.model.fields,field_description:account_usability.field_account_group_generate__write_date
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_account_invoice_mark_sent__write_date
|
#: model:ir.model.fields,field_description:account_usability.field_account_invoice_mark_sent__write_date
|
||||||
msgid "Last Updated on"
|
msgid "Last Updated on"
|
||||||
msgstr "Mis à jour le"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model_terms:ir.ui.view,arch_db:account_usability.view_company_form
|
#: model_terms:ir.ui.view,arch_db:account_usability.view_company_form
|
||||||
@@ -448,19 +428,19 @@ msgstr ""
|
|||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_account_group_generate__level
|
#: model:ir.model.fields,field_description:account_usability.field_account_group_generate__level
|
||||||
msgid "Level"
|
msgid "Level"
|
||||||
msgstr "Niveau"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.actions.act_window,name:account_usability.account_invoice_mark_sent_action
|
#: model:ir.actions.act_window,name:account_usability.account_invoice_mark_sent_action
|
||||||
#: model_terms:ir.ui.view,arch_db:account_usability.account_invoice_mark_sent_form
|
#: model_terms:ir.ui.view,arch_db:account_usability.account_invoice_mark_sent_form
|
||||||
msgid "Mark as Sent"
|
msgid "Mark as Sent"
|
||||||
msgstr "Marquer comme envoyé"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model,name:account_usability.model_account_invoice_mark_sent
|
#: model:ir.model,name:account_usability.model_account_invoice_mark_sent
|
||||||
#: model_terms:ir.ui.view,arch_db:account_usability.account_invoice_mark_sent_form
|
#: model_terms:ir.ui.view,arch_db:account_usability.account_invoice_mark_sent_form
|
||||||
msgid "Mark invoices as sent"
|
msgid "Mark invoices as sent"
|
||||||
msgstr "Marquer les factures comme envoyé"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model_terms:ir.ui.view,arch_db:account_usability.view_account_invoice_filter
|
#: model_terms:ir.ui.view,arch_db:account_usability.view_account_invoice_filter
|
||||||
@@ -470,7 +450,7 @@ msgstr ""
|
|||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model,name:account_usability.model_account_partial_reconcile
|
#: model:ir.model,name:account_usability.model_account_partial_reconcile
|
||||||
msgid "Partial Reconcile"
|
msgid "Partial Reconcile"
|
||||||
msgstr "Lettrage partiel"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_account_move_line__matched_credit_ids
|
#: model:ir.model.fields,field_description:account_usability.field_account_move_line__matched_credit_ids
|
||||||
@@ -492,7 +472,7 @@ msgstr ""
|
|||||||
#: model:ir.model.fields,field_description:account_usability.field_account_move__invoice_payment_term_id
|
#: model:ir.model.fields,field_description:account_usability.field_account_move__invoice_payment_term_id
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_account_payment__invoice_payment_term_id
|
#: model:ir.model.fields,field_description:account_usability.field_account_payment__invoice_payment_term_id
|
||||||
msgid "Payment Terms"
|
msgid "Payment Terms"
|
||||||
msgstr "Conditions de paiement"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: code:addons/account_usability/models/account_move.py:0
|
#: code:addons/account_usability/models/account_move.py:0
|
||||||
@@ -503,15 +483,13 @@ msgstr ""
|
|||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_account_group_generate__name_prefix
|
#: model:ir.model.fields,field_description:account_usability.field_account_group_generate__name_prefix
|
||||||
msgid "Prefix"
|
msgid "Prefix"
|
||||||
msgstr "Préfixe"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model,name:account_usability.model_account_reconcile_model
|
#: model:ir.model,name:account_usability.model_account_reconcile_model
|
||||||
msgid ""
|
msgid ""
|
||||||
"Preset to create journal entries during a invoices and payments matching"
|
"Preset to create journal entries during a invoices and payments matching"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Préconfigurer pour créer une écriture pendant la correspondance entre des "
|
|
||||||
"factures et des paiements"
|
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model_terms:ir.ui.view,arch_db:account_usability.view_account_move_line_filter
|
#: model_terms:ir.ui.view,arch_db:account_usability.view_account_move_line_filter
|
||||||
@@ -531,7 +509,7 @@ msgstr ""
|
|||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model,name:account_usability.model_product_template
|
#: model:ir.model,name:account_usability.model_product_template
|
||||||
msgid "Product Template"
|
msgid "Product Template"
|
||||||
msgstr "Modèle de produit"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_product_product__purchase_price_type
|
#: model:ir.model.fields,field_description:account_usability.field_product_product__purchase_price_type
|
||||||
@@ -544,11 +522,6 @@ msgstr ""
|
|||||||
#: model:ir.model.fields,field_description:account_usability.field_account_bank_statement_line__partner_bank_id
|
#: model:ir.model.fields,field_description:account_usability.field_account_bank_statement_line__partner_bank_id
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_account_move__partner_bank_id
|
#: model:ir.model.fields,field_description:account_usability.field_account_move__partner_bank_id
|
||||||
msgid "Recipient Bank"
|
msgid "Recipient Bank"
|
||||||
msgstr "Compte bancaire destinataire"
|
|
||||||
|
|
||||||
#. module: account_usability
|
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_account_move_line__reconcile_string
|
|
||||||
msgid "Reconcile"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
@@ -556,12 +529,12 @@ msgstr ""
|
|||||||
#: model:ir.model.fields,field_description:account_usability.field_account_move__ref
|
#: model:ir.model.fields,field_description:account_usability.field_account_move__ref
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_account_payment__ref
|
#: model:ir.model.fields,field_description:account_usability.field_account_payment__ref
|
||||||
msgid "Reference"
|
msgid "Reference"
|
||||||
msgstr "Référence"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_account_move_reversal__date
|
#: model:ir.model.fields,field_description:account_usability.field_account_move_reversal__date
|
||||||
msgid "Reversal date"
|
msgid "Reversal date"
|
||||||
msgstr "Date de renversement"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_account_bank_statement_line__sale_dates
|
#: model:ir.model.fields,field_description:account_usability.field_account_bank_statement_line__sale_dates
|
||||||
@@ -584,26 +557,22 @@ msgid ""
|
|||||||
"Selecting \"Blocking Message\" will throw an exception with the message and "
|
"Selecting \"Blocking Message\" will throw an exception with the message and "
|
||||||
"block the flow. The Message has to be written in the next field."
|
"block the flow. The Message has to be written in the next field."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Sélectionner l'option 'Avertissement' notifiera l'utilisateur avec le "
|
|
||||||
"Message. Sélectionner 'Message Bloquant' lancera une exception avec le "
|
|
||||||
"message et bloquera le flux. Le Message doit être encodé dans le champ "
|
|
||||||
"suivant."
|
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model_terms:ir.ui.view,arch_db:account_usability.view_account_invoice_filter
|
#: model_terms:ir.ui.view,arch_db:account_usability.view_account_invoice_filter
|
||||||
msgid "Sent"
|
msgid "Sent"
|
||||||
msgstr "Envoyé"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model.fields,field_description:account_usability.field_account_bank_statement__start_date
|
#: model:ir.model.fields,field_description:account_usability.field_account_bank_statement__start_date
|
||||||
#: model_terms:ir.ui.view,arch_db:account_usability.view_bank_statement_search
|
#: model_terms:ir.ui.view,arch_db:account_usability.view_bank_statement_search
|
||||||
msgid "Start Date"
|
msgid "Start Date"
|
||||||
msgstr "Date de Début"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model:ir.model,name:account_usability.model_product_supplierinfo
|
#: model:ir.model,name:account_usability.model_product_supplierinfo
|
||||||
msgid "Supplier Pricelist"
|
msgid "Supplier Pricelist"
|
||||||
msgstr "Liste prix fournisseur"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model_terms:ir.ui.view,arch_db:account_usability.product_supplierinfo_tree_view
|
#: model_terms:ir.ui.view,arch_db:account_usability.product_supplierinfo_tree_view
|
||||||
@@ -622,15 +591,6 @@ msgstr ""
|
|||||||
msgid "Tax incl."
|
msgid "Tax incl."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
|
||||||
#: model:ir.model.fields,help:account_usability.field_account_move_line__balance
|
|
||||||
msgid ""
|
|
||||||
"Technical field holding the debit - credit in order to open meaningful "
|
|
||||||
"graph views from reports"
|
|
||||||
msgstr ""
|
|
||||||
"Champ technique égal à 'débit - crédit', utilisé pour les vues graphes dans "
|
|
||||||
"les rapports"
|
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: code:addons/account_usability/wizard/account_group_generate.py:0
|
#: code:addons/account_usability/wizard/account_group_generate.py:0
|
||||||
#, python-format
|
#, python-format
|
||||||
@@ -645,7 +605,6 @@ msgstr ""
|
|||||||
msgid ""
|
msgid ""
|
||||||
"The fiscal position determines the taxes/accounts used for this contact."
|
"The fiscal position determines the taxes/accounts used for this contact."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"La position fiscale détermine les taxes / comptes utilisés pour ce contact."
|
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: code:addons/account_usability/wizard/account_group_generate.py:0
|
#: code:addons/account_usability/wizard/account_group_generate.py:0
|
||||||
@@ -658,8 +617,8 @@ msgstr ""
|
|||||||
#: model:ir.model.fields,help:account_usability.field_account_move__sale_dates
|
#: model:ir.model.fields,help:account_usability.field_account_move__sale_dates
|
||||||
#: model:ir.model.fields,help:account_usability.field_account_payment__sale_dates
|
#: model:ir.model.fields,help:account_usability.field_account_payment__sale_dates
|
||||||
msgid ""
|
msgid ""
|
||||||
"This information appears on invoice qweb report (you may use it for your "
|
"This information appears on invoice qweb report (you may use it for your own"
|
||||||
"own report)"
|
" report)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
@@ -703,12 +662,12 @@ msgstr ""
|
|||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model_terms:ir.ui.view,arch_db:account_usability.view_bank_statement_form
|
#: model_terms:ir.ui.view,arch_db:account_usability.view_bank_statement_form
|
||||||
msgid "Unreconcile All"
|
msgid "Unreconcile All"
|
||||||
msgstr "Tous délettrés"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model_terms:ir.ui.view,arch_db:account_usability.view_account_move_line_filter
|
#: model_terms:ir.ui.view,arch_db:account_usability.view_account_move_line_filter
|
||||||
msgid "Unreconciled or Partially Reconciled"
|
msgid "Unreconciled or Partially Reconciled"
|
||||||
msgstr "Non Lettré ou Partiellement Lettré"
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_usability
|
#. module: account_usability
|
||||||
#: model_terms:ir.ui.view,arch_db:account_usability.view_bank_statement_form
|
#: model_terms:ir.ui.view,arch_db:account_usability.view_bank_statement_form
|
||||||
575
account_usability_akretion/i18n/fr.po
Normal file
575
account_usability_akretion/i18n/fr.po
Normal file
@@ -0,0 +1,575 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * account_usability_akretion
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 16.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2023-06-08 14:47+0000\n"
|
||||||
|
"PO-Revision-Date: 2023-06-08 14:47+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_akretion
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/account_usability_akretion/wizard/account_group_generate.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"%d account groups already exists in company '%s'. This wizard is designed to"
|
||||||
|
" generate account groups from scratch."
|
||||||
|
msgstr ""
|
||||||
|
"%d des groupes de comptes existent déjà dans la société '%s'. Cet assistant "
|
||||||
|
"est conçu pour créer des groupes de comptes à partir de zéro."
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/account_usability_akretion/models/account_move.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"A reverse journal entry <a href=# data-oe-model=account.move data-oe-"
|
||||||
|
"id=%d>%s</a> has been generated."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model,name:account_usability_akretion.model_account_account
|
||||||
|
msgid "Account"
|
||||||
|
msgstr "Compte"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/account_usability_akretion/wizard/account_group_generate.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Account Groups"
|
||||||
|
msgstr "Groupes de comptes"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model,name:account_usability_akretion.model_account_move_reversal
|
||||||
|
msgid "Account Move Reversal"
|
||||||
|
msgstr "Extourne d'écritures"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_move_line__account_reconcile
|
||||||
|
msgid "Allow Reconciliation"
|
||||||
|
msgstr "Autoriser le lettrage"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.constraint,message:account_usability_akretion.constraint_account_analytic_account_code_company_unique
|
||||||
|
msgid ""
|
||||||
|
"An analytic account with the same code already exists in the same company!"
|
||||||
|
msgstr ""
|
||||||
|
"Un compte analytique avec le même code existe déjà dans la même société !"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model,name:account_usability_akretion.model_account_analytic_account
|
||||||
|
msgid "Analytic Account"
|
||||||
|
msgstr "Compte analytique"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model_terms:ir.ui.view,arch_db:account_usability_akretion.view_move_form
|
||||||
|
msgid "Are you sure you want to cancel this invoice?"
|
||||||
|
msgstr "Êtes-vous sûr de vouloir annuler cette facture ?"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model_terms:ir.ui.view,arch_db:account_usability_akretion.view_move_form
|
||||||
|
msgid "Are you sure you want to cancel this journal entry?"
|
||||||
|
msgstr "Êtes-vous sûr de vouloir annuler cette écriture ?"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.ui.menu,name:account_usability_akretion.res_partner_bank_account_config_menu
|
||||||
|
msgid "Bank Accounts"
|
||||||
|
msgstr "Comptes bancaires"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.ui.menu,name:account_usability_akretion.res_bank_account_config_menu
|
||||||
|
msgid "Banks"
|
||||||
|
msgstr "Banques"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model_terms:ir.ui.view,arch_db:account_usability_akretion.account_group_generate_form
|
||||||
|
#: model_terms:ir.ui.view,arch_db:account_usability_akretion.account_invoice_mark_sent_form
|
||||||
|
msgid "Cancel"
|
||||||
|
msgstr "Annuler"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,help:account_usability_akretion.field_account_move_line__account_reconcile
|
||||||
|
msgid ""
|
||||||
|
"Check this box if this account allows invoices & payments matching of "
|
||||||
|
"journal items."
|
||||||
|
msgstr ""
|
||||||
|
"Cochez cette case si ce compte permet de faire du rapprochement entre "
|
||||||
|
"factures et paiements."
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model_terms:ir.ui.view,arch_db:account_usability_akretion.view_account_search
|
||||||
|
msgid "Code"
|
||||||
|
msgstr "Code"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model_terms:ir.ui.view,arch_db:account_usability_akretion.view_account_invoice_filter
|
||||||
|
msgid "Commercial Partner"
|
||||||
|
msgstr "Parternaire commercial"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model,name:account_usability_akretion.model_res_company
|
||||||
|
msgid "Companies"
|
||||||
|
msgstr "Sociétés"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_group_generate__company_id
|
||||||
|
msgid "Company"
|
||||||
|
msgstr "Société"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model,name:account_usability_akretion.model_res_partner
|
||||||
|
msgid "Contact"
|
||||||
|
msgstr "Contact"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_group_generate__create_uid
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_invoice_mark_sent__create_uid
|
||||||
|
msgid "Created by"
|
||||||
|
msgstr "Créé par"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_group_generate__create_date
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_invoice_mark_sent__create_date
|
||||||
|
msgid "Created on"
|
||||||
|
msgstr "Créé le"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,help:account_usability_akretion.field_account_move_line__matched_credit_ids
|
||||||
|
msgid "Credit journal items that are matched with this journal item."
|
||||||
|
msgstr "Écritures comptables au crédit qui correspondent à cette écriture comptable."
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,help:account_usability_akretion.field_account_move_line__matched_debit_ids
|
||||||
|
msgid "Debit journal items that are matched with this journal item."
|
||||||
|
msgstr "Écritures comptables au débit qui correspondent avec cette écriture comptable."
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model_terms:ir.ui.view,arch_db:account_usability_akretion.view_account_move_line_filter
|
||||||
|
msgid "Debit or Credit"
|
||||||
|
msgstr "Débit ou crédit"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_group_generate__display_name
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_invoice_mark_sent__display_name
|
||||||
|
msgid "Display Name"
|
||||||
|
msgstr "Nom affiché"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_bank_statement_line__invoice_date_due
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_move__invoice_date_due
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_payment__invoice_date_due
|
||||||
|
msgid "Due Date"
|
||||||
|
msgstr "Date d'échéance"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_bank_statement_line__fiscal_position_id
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_move__fiscal_position_id
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_payment__fiscal_position_id
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_res_partner__property_account_position_id
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_res_users__property_account_position_id
|
||||||
|
msgid "Fiscal Position"
|
||||||
|
msgstr "Position fiscale"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,help:account_usability_akretion.field_account_bank_statement_line__fiscal_position_id
|
||||||
|
#: model:ir.model.fields,help:account_usability_akretion.field_account_move__fiscal_position_id
|
||||||
|
#: model:ir.model.fields,help:account_usability_akretion.field_account_payment__fiscal_position_id
|
||||||
|
msgid ""
|
||||||
|
"Fiscal positions are used to adapt taxes and accounts for particular "
|
||||||
|
"customers or sales orders/invoices. The default value comes from the "
|
||||||
|
"customer."
|
||||||
|
msgstr ""
|
||||||
|
"Les positions fiscales sont utilisées pour adapter les taxes et les comptes "
|
||||||
|
"à des clients particuliers ou à des bons de commande/factures. La valeur "
|
||||||
|
"par défaut provient du client."
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_move_line__full_reconcile_id
|
||||||
|
msgid "Full Reconcile"
|
||||||
|
msgstr "Marque de lettrage"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model_terms:ir.ui.view,arch_db:account_usability_akretion.view_account_move_line_filter
|
||||||
|
msgid "Fully Reconciled"
|
||||||
|
msgstr "Lettré totalement"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model_terms:ir.ui.view,arch_db:account_usability_akretion.account_group_generate_form
|
||||||
|
msgid "Generate"
|
||||||
|
msgstr "Générer"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.actions.act_window,name:account_usability_akretion.account_group_generate_action
|
||||||
|
#: model:ir.model,name:account_usability_akretion.model_account_group_generate
|
||||||
|
#: model:ir.ui.menu,name:account_usability_akretion.account_group_generate_menu
|
||||||
|
msgid "Generate Account Groups"
|
||||||
|
msgstr "Générer les groupes de comptes"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model_terms:ir.ui.view,arch_db:account_usability_akretion.view_account_search
|
||||||
|
msgid "Group"
|
||||||
|
msgstr "Groupe"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model_terms:ir.ui.view,arch_db:account_usability_akretion.view_account_journal_search
|
||||||
|
msgid "Group By"
|
||||||
|
msgstr "Regrouper par"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_bank_statement_line__has_attachment
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_move__has_attachment
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_payment__has_attachment
|
||||||
|
msgid "Has Attachment"
|
||||||
|
msgstr "Possède une pièce jointe"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_bank_statement_line__has_discount
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_move__has_discount
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_payment__has_discount
|
||||||
|
msgid "Has Discount"
|
||||||
|
msgstr "A une réduction"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_journal__hide_bank_statement_balance
|
||||||
|
msgid "Hide and Disable Bank Statement Balance"
|
||||||
|
msgstr "Masquer et désactiver le solde du relevé bancaire"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_group_generate__id
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_invoice_mark_sent__id
|
||||||
|
msgid "ID"
|
||||||
|
msgstr "ID"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model,name:account_usability_akretion.model_account_incoterms
|
||||||
|
msgid "Incoterms"
|
||||||
|
msgstr "Incoterms"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,help:account_usability_akretion.field_account_move_line__product_barcode
|
||||||
|
msgid "International Article Number used for product identification."
|
||||||
|
msgstr ""
|
||||||
|
"Numéro d'article international (IAN) utilisé pour identifier cet article."
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_res_partner__invoice_warn
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_res_users__invoice_warn
|
||||||
|
msgid "Invoice"
|
||||||
|
msgstr "Facture"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model_terms:ir.ui.view,arch_db:account_usability_akretion.view_company_form
|
||||||
|
msgid "Invoice Legal Terms"
|
||||||
|
msgstr "Mentions légales sur les factures"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model,name:account_usability_akretion.model_account_invoice_report
|
||||||
|
msgid "Invoices Statistics"
|
||||||
|
msgstr "Statistiques des factures"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model,name:account_usability_akretion.model_account_journal
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_bank_statement_line__journal_id
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_move__journal_id
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_payment__journal_id
|
||||||
|
msgid "Journal"
|
||||||
|
msgstr "Journal"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model,name:account_usability_akretion.model_account_move
|
||||||
|
msgid "Journal Entry"
|
||||||
|
msgstr "Pièce comptable"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model,name:account_usability_akretion.model_account_move_line
|
||||||
|
msgid "Journal Item"
|
||||||
|
msgstr "Écriture comptable"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model_terms:ir.ui.view,arch_db:account_usability_akretion.view_account_move_line_filter
|
||||||
|
msgid "Label, Reference, Account or Partner"
|
||||||
|
msgstr "Libellé, Référence, Compte ou Partenaire"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_group_generate____last_update
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_invoice_mark_sent____last_update
|
||||||
|
msgid "Last Modified on"
|
||||||
|
msgstr "Dernière modification le"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_group_generate__write_uid
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_invoice_mark_sent__write_uid
|
||||||
|
msgid "Last Updated by"
|
||||||
|
msgstr "Mis à jour par"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_group_generate__write_date
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_invoice_mark_sent__write_date
|
||||||
|
msgid "Last Updated on"
|
||||||
|
msgstr "Mis à jour le"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model_terms:ir.ui.view,arch_db:account_usability_akretion.view_company_form
|
||||||
|
msgid "Legal Terms"
|
||||||
|
msgstr "Mentions légales"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_res_company__static_invoice_terms
|
||||||
|
msgid "Legal Terms on Invoice"
|
||||||
|
msgstr "Mentions légales sur les factures"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_group_generate__level
|
||||||
|
msgid "Level"
|
||||||
|
msgstr "Niveau"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.actions.act_window,name:account_usability_akretion.account_invoice_mark_sent_action
|
||||||
|
#: model_terms:ir.ui.view,arch_db:account_usability_akretion.account_invoice_mark_sent_form
|
||||||
|
msgid "Mark as Sent"
|
||||||
|
msgstr "Marquer comme envoyé"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model,name:account_usability_akretion.model_account_invoice_mark_sent
|
||||||
|
#: model_terms:ir.ui.view,arch_db:account_usability_akretion.account_invoice_mark_sent_form
|
||||||
|
msgid "Mark invoices as sent"
|
||||||
|
msgstr "Marquer les factures comme envoyées"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model_terms:ir.ui.view,arch_db:account_usability_akretion.view_account_journal_form
|
||||||
|
msgid "Misc"
|
||||||
|
msgstr "Divers"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model_terms:ir.ui.view,arch_db:account_usability_akretion.view_account_invoice_filter
|
||||||
|
msgid "Missing Attachment"
|
||||||
|
msgstr "Pièce jointe manquante"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/account_usability_akretion/wizard/account_move_reversal.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Move '%s' has already been reversed by move '%s'."
|
||||||
|
msgstr "L'écritures '%s' a déjà été annulée par l'écritures '%s'."
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model,name:account_usability_akretion.model_account_partial_reconcile
|
||||||
|
msgid "Partial Reconcile"
|
||||||
|
msgstr "Lettrage partiel"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_move_line__matched_credit_ids
|
||||||
|
msgid "Partial Reconcile Credit"
|
||||||
|
msgstr "Crédit de lettrage partiel"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_move_line__matched_debit_ids
|
||||||
|
msgid "Partial Reconcile Debit"
|
||||||
|
msgstr "Débit de lettrage partiel"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_invoice_report__industry_id
|
||||||
|
msgid "Partner Industry"
|
||||||
|
msgstr "Secteur d’activité du partenaire"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model_terms:ir.ui.view,arch_db:account_usability_akretion.view_account_invoice_filter
|
||||||
|
msgid "Payment Status"
|
||||||
|
msgstr "Etat de paiement"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_bank_statement_line__invoice_payment_term_id
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_move__invoice_payment_term_id
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_payment__invoice_payment_term_id
|
||||||
|
msgid "Payment Terms"
|
||||||
|
msgstr "Conditions de paiement"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/account_usability_akretion/models/account_move.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Please post the following entries before reconciliation :"
|
||||||
|
msgstr "Veuillez comptabiliser les pièces suivantes avant le lettrage :"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_group_generate__name_prefix
|
||||||
|
msgid "Prefix"
|
||||||
|
msgstr "Préfixe"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model_terms:ir.ui.view,arch_db:account_usability_akretion.view_move_form
|
||||||
|
msgid "Print"
|
||||||
|
msgstr "Imprimer"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_move_line__product_barcode
|
||||||
|
msgid "Product Barcode"
|
||||||
|
msgstr "Code barre du produit"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_bank_statement_line__ref
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_move__ref
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_payment__ref
|
||||||
|
msgid "Reference"
|
||||||
|
msgstr "Référence"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_bank_statement_line__sale_dates
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_move__sale_dates
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_payment__sale_dates
|
||||||
|
msgid "Sale Dates"
|
||||||
|
msgstr "Dates de vente"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,help:account_usability_akretion.field_res_partner__invoice_warn
|
||||||
|
#: model:ir.model.fields,help:account_usability_akretion.field_res_users__invoice_warn
|
||||||
|
msgid ""
|
||||||
|
"Selecting the \"Warning\" option will notify user with the message, "
|
||||||
|
"Selecting \"Blocking Message\" will throw an exception with the message and "
|
||||||
|
"block the flow. The Message has to be written in the next field."
|
||||||
|
msgstr ""
|
||||||
|
"Sélectionner l'option 'Avertissement' notifiera l'utilisateur avec le "
|
||||||
|
"Message. Sélectionner 'Message Bloquant' lancera une exception avec le "
|
||||||
|
"message et bloquera le flux. Le Message doit être encodé dans le champ "
|
||||||
|
"suivant."
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model_terms:ir.ui.view,arch_db:account_usability_akretion.view_account_invoice_filter
|
||||||
|
msgid "Sent"
|
||||||
|
msgstr "Envoyé"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/account_usability_akretion/models/product.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Tax excl."
|
||||||
|
msgstr "HT"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/account_usability_akretion/models/product.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Tax incl."
|
||||||
|
msgstr "TTC"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/account_usability_akretion/wizard/account_group_generate.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"The code of account '%s' is %d caracters. It cannot be inferior to level "
|
||||||
|
"(%d)."
|
||||||
|
msgstr ""
|
||||||
|
"Le code du compte '%s' fait %d caractères. Il ne peut pas être de niveau "
|
||||||
|
"inférieur à (%d)."
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,help:account_usability_akretion.field_res_partner__property_account_position_id
|
||||||
|
#: model:ir.model.fields,help:account_usability_akretion.field_res_users__property_account_position_id
|
||||||
|
msgid ""
|
||||||
|
"The fiscal position determines the taxes/accounts used for this contact."
|
||||||
|
msgstr ""
|
||||||
|
"La position fiscale détermine les taxes / comptes utilisés pour ce contact."
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/account_usability_akretion/wizard/account_group_generate.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid "The level must be >= 1."
|
||||||
|
msgstr "Le niveau doit être >= 1."
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.constraint,message:account_usability_akretion.constraint_account_incoterms_code_unique
|
||||||
|
msgid "This incoterm code already exists."
|
||||||
|
msgstr "Ce code incoterm existe déjà."
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,help:account_usability_akretion.field_account_bank_statement_line__sale_dates
|
||||||
|
#: model:ir.model.fields,help:account_usability_akretion.field_account_move__sale_dates
|
||||||
|
#: model:ir.model.fields,help:account_usability_akretion.field_account_payment__sale_dates
|
||||||
|
msgid ""
|
||||||
|
"This information appear on invoice qweb report (you may use it for your own "
|
||||||
|
"report)"
|
||||||
|
msgstr ""
|
||||||
|
"Cette information apparait sur le rapport qweb de la facture (vous "
|
||||||
|
"pouvez les utiliser pour votre propre rapport)"
|
||||||
|
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#. odoo-python
|
||||||
|
#: code:addons/account_usability_akretion/models/account_move.py:0
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"This journal entry has been generated as the reverse of <a href=# data-oe-"
|
||||||
|
"model=account.move data-oe-id=%d>%s</a>."
|
||||||
|
msgstr ""
|
||||||
|
"Cette écriture de journal a été générée comme extourne de <a href=# data-oe-"
|
||||||
|
"model=account.move data-oe-id=%d>%s</a>."
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model_terms:ir.ui.view,arch_db:account_usability_akretion.account_group_generate_form
|
||||||
|
msgid ""
|
||||||
|
"This wizard is designed to auto-generate account groups from the chart of "
|
||||||
|
"account."
|
||||||
|
msgstr ""
|
||||||
|
"Cet assistant est conçu pour générer automatiquement les groupes de comptes "
|
||||||
|
"à partir du plan comptable."
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model_terms:ir.ui.view,arch_db:account_usability_akretion.account_invoice_mark_sent_form
|
||||||
|
msgid "This wizard will mark as <i>sent</i> all the selected posted invoices."
|
||||||
|
msgstr ""
|
||||||
|
"Cet assistant marquera comme <i>envoyées</i> toutes les factures "
|
||||||
|
"sélectionnées et comptabilisées."
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model_terms:ir.ui.view,arch_db:account_usability_akretion.view_account_invoice_filter
|
||||||
|
msgid "To Send"
|
||||||
|
msgstr "À envoyer"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_bank_statement_line__amount_total
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_move__amount_total
|
||||||
|
#: model:ir.model.fields,field_description:account_usability_akretion.field_account_payment__amount_total
|
||||||
|
msgid "Total"
|
||||||
|
msgstr "Total"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model_terms:ir.ui.view,arch_db:account_usability_akretion.view_account_journal_search
|
||||||
|
msgid "Type"
|
||||||
|
msgstr "Type"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model_terms:ir.ui.view,arch_db:account_usability_akretion.view_account_move_line_filter
|
||||||
|
msgid "Unreconciled or Partially Reconciled"
|
||||||
|
msgstr "Non lettré ou partiellement lettré"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model_terms:ir.ui.view,arch_db:account_usability_akretion.view_move_line_tree
|
||||||
|
msgid "View Journal Entry Form"
|
||||||
|
msgstr "Voir la pièce comptable en vue formulaire"
|
||||||
|
|
||||||
|
#. module: account_usability_akretion
|
||||||
|
#: model:ir.model.fields,help:account_usability_akretion.field_account_journal__hide_bank_statement_balance
|
||||||
|
msgid ""
|
||||||
|
"When this option is enabled, the start and end balance is not displayed on "
|
||||||
|
"the bank statement form view, and the check of the end balance vs the real "
|
||||||
|
"end balance is disabled. When you enable this option, you process the "
|
||||||
|
"statement lines without considering the start/end balance and you regularly "
|
||||||
|
"check the accounting balance of the bank account vs the amount of your bank "
|
||||||
|
"account (the 2 processes are managed separately)."
|
||||||
|
msgstr ""
|
||||||
|
"Lorsque cette option est activée, le solde de début et de fin ne s'affiche pas sur "
|
||||||
|
"la vue du formulaire de relevé bancaire, et la vérification du solde final vs "
|
||||||
|
"le solde final réel est désactivé. Lorsque vous activez cette option, vous traitez les "
|
||||||
|
"lignes de relevé sans tenir compte du solde de début/fin et vous vérifiez régulièrement "
|
||||||
|
"le solde du compte comptable bancaire vs le montant sur votre compte en banque"
|
||||||
|
"(les 2 processus sont gérés séparément)."
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# Copyright 2020 ACSONE SA/NV
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo import SUPERUSER_ID, api
|
||||||
|
|
||||||
|
|
||||||
|
def migrate(cr, version):
|
||||||
|
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||||
|
env["account.move.line"].update_matching_number()
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
from . import account_account
|
from . import account_account
|
||||||
from . import account_analytic_account
|
from . import account_analytic_account
|
||||||
from . import account_bank_statement
|
#from . import account_bank_statement
|
||||||
from . import account_incoterms
|
from . import account_incoterms
|
||||||
from . import account_journal
|
from . import account_journal
|
||||||
from . import account_move
|
from . import account_move
|
||||||
from . import account_partial_reconcile
|
from . import account_partial_reconcile
|
||||||
from . import res_partner
|
from . import res_partner
|
||||||
from . import res_company
|
from . import res_company
|
||||||
from . import product
|
#from . import product
|
||||||
from . import account_invoice_report
|
from . import account_invoice_report
|
||||||
|
from . import res_partner_bank
|
||||||
19
account_usability_akretion/models/account_account.py
Normal file
19
account_usability_akretion/models/account_account.py
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Copyright 2015-2022 Akretion (http://www.akretion.com)
|
||||||
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo import api, models
|
||||||
|
|
||||||
|
|
||||||
|
class AccountAccount(models.Model):
|
||||||
|
_inherit = 'account.account'
|
||||||
|
|
||||||
|
@api.depends('name', 'code')
|
||||||
|
def name_get(self):
|
||||||
|
if self._context.get('account_account_show_code_only'):
|
||||||
|
res = []
|
||||||
|
for record in self:
|
||||||
|
res.append((record.id, record.code))
|
||||||
|
return res
|
||||||
|
else:
|
||||||
|
return super().name_get()
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright 2015-2020 Akretion (http://www.akretion.com)
|
# Copyright 2015-2022 Akretion (http://www.akretion.com)
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
@@ -10,11 +10,11 @@ class AccountBankStatement(models.Model):
|
|||||||
_inherit = 'account.bank.statement'
|
_inherit = 'account.bank.statement'
|
||||||
|
|
||||||
start_date = fields.Date(
|
start_date = fields.Date(
|
||||||
compute='_compute_dates', string='Start Date', readonly=True,
|
compute='_compute_dates', string='Start Date', store=True)
|
||||||
store=True)
|
|
||||||
end_date = fields.Date(
|
end_date = fields.Date(
|
||||||
compute='_compute_dates', string='End Date', readonly=True,
|
compute='_compute_dates', string='End Date', store=True)
|
||||||
store=True)
|
line_count = fields.Integer(
|
||||||
|
compute='_compute_dates', string='# of Lines', store=True)
|
||||||
hide_bank_statement_balance = fields.Boolean(
|
hide_bank_statement_balance = fields.Boolean(
|
||||||
related='journal_id.hide_bank_statement_balance', readonly=True)
|
related='journal_id.hide_bank_statement_balance', readonly=True)
|
||||||
|
|
||||||
@@ -24,6 +24,7 @@ class AccountBankStatement(models.Model):
|
|||||||
dates = [line.date for line in st.line_ids]
|
dates = [line.date for line in st.line_ids]
|
||||||
st.start_date = dates and min(dates) or False
|
st.start_date = dates and min(dates) or False
|
||||||
st.end_date = dates and max(dates) or False
|
st.end_date = dates and max(dates) or False
|
||||||
|
st.line_count = len(dates)
|
||||||
|
|
||||||
def _check_balance_end_real_same_as_computed(self):
|
def _check_balance_end_real_same_as_computed(self):
|
||||||
for stmt in self:
|
for stmt in self:
|
||||||
@@ -42,6 +43,13 @@ class AccountBankStatement(models.Model):
|
|||||||
res.append((statement.id, name))
|
res.append((statement.id, name))
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
def button_reopen(self):
|
||||||
|
self = self.with_context(skip_undo_reconciliation=True)
|
||||||
|
return super().button_reopen()
|
||||||
|
|
||||||
|
def button_undo_reconciliation(self):
|
||||||
|
self.line_ids.button_undo_reconciliation()
|
||||||
|
|
||||||
|
|
||||||
class AccountBankStatementLine(models.Model):
|
class AccountBankStatementLine(models.Model):
|
||||||
_inherit = 'account.bank.statement.line'
|
_inherit = 'account.bank.statement.line'
|
||||||
@@ -88,3 +96,9 @@ class AccountBankStatementLine(models.Model):
|
|||||||
'res_id': self.move_id.id,
|
'res_id': self.move_id.id,
|
||||||
})
|
})
|
||||||
return action
|
return action
|
||||||
|
|
||||||
|
def button_undo_reconciliation(self):
|
||||||
|
if self._context.get("skip_undo_reconciliation"):
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
return super().button_undo_reconciliation()
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright 2015-2020 Akretion (http://www.akretion.com)
|
# Copyright 2015-2022 Akretion (http://www.akretion.com)
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
@@ -8,6 +8,11 @@ from odoo import api, models
|
|||||||
class AccountIncoterms(models.Model):
|
class AccountIncoterms(models.Model):
|
||||||
_inherit = 'account.incoterms'
|
_inherit = 'account.incoterms'
|
||||||
|
|
||||||
|
_sql_constraints = [(
|
||||||
|
'code_unique',
|
||||||
|
'unique(code)',
|
||||||
|
'This incoterm code already exists.')]
|
||||||
|
|
||||||
@api.depends('code', 'name')
|
@api.depends('code', 'name')
|
||||||
def name_get(self):
|
def name_get(self):
|
||||||
res = []
|
res = []
|
||||||
58
account_usability_akretion/models/account_journal.py
Normal file
58
account_usability_akretion/models/account_journal.py
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
# Copyright 2015-2022 Akretion (http://www.akretion.com)
|
||||||
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo import api, fields, models
|
||||||
|
|
||||||
|
|
||||||
|
class AccountJournal(models.Model):
|
||||||
|
_inherit = 'account.journal'
|
||||||
|
|
||||||
|
hide_bank_statement_balance = fields.Boolean(
|
||||||
|
string='Hide and Disable Bank Statement Balance',
|
||||||
|
help="When this option is enabled, the start and end balance is "
|
||||||
|
"not displayed on the bank statement form view, and the check of "
|
||||||
|
"the end balance vs the real end balance is disabled. When you enable "
|
||||||
|
"this option, you process the statement lines without considering "
|
||||||
|
"the start/end balance and you regularly check the accounting balance "
|
||||||
|
"of the bank account vs the amount of your bank account "
|
||||||
|
"(the 2 processes are managed separately)."
|
||||||
|
)
|
||||||
|
# Used to set default user_type_id on account fields via context
|
||||||
|
# account_type_current_assets_id = fields.Many2one(
|
||||||
|
# 'account.account.type',
|
||||||
|
# default=lambda self: self.env.ref('account.data_account_type_current_assets').id)
|
||||||
|
|
||||||
|
@api.depends(
|
||||||
|
'name', 'currency_id', 'company_id', 'company_id.currency_id', 'code')
|
||||||
|
def name_get(self):
|
||||||
|
res = []
|
||||||
|
if self._context.get('journal_show_code_only'):
|
||||||
|
for journal in self:
|
||||||
|
res.append((journal.id, journal.code))
|
||||||
|
return res
|
||||||
|
else:
|
||||||
|
for journal in self:
|
||||||
|
name = "[%s] %s" % (journal.code, journal.name)
|
||||||
|
if (
|
||||||
|
journal.currency_id and
|
||||||
|
journal.currency_id != journal.company_id.currency_id):
|
||||||
|
name = "%s (%s)" % (name, journal.currency_id.name)
|
||||||
|
res.append((journal.id, name))
|
||||||
|
return res
|
||||||
|
|
||||||
|
def open_outstanding_payments(self):
|
||||||
|
self.ensure_one()
|
||||||
|
action = self.env["ir.actions.actions"]._for_xml_id(
|
||||||
|
"account.action_account_moves_all")
|
||||||
|
action['domain'] = [
|
||||||
|
('account_id', 'in', (self.payment_debit_account_id.id, self.payment_credit_account_id.id)),
|
||||||
|
('journal_id', '=', self.id),
|
||||||
|
('display_type', 'not in', ('line_section', 'line_note')),
|
||||||
|
('parent_state', '!=', 'cancel'),
|
||||||
|
]
|
||||||
|
action['context'] = {
|
||||||
|
'search_default_unreconciled': True,
|
||||||
|
'search_default_posted': True,
|
||||||
|
}
|
||||||
|
return action
|
||||||
@@ -1,13 +1,17 @@
|
|||||||
# Copyright 2015-2020 Akretion (http://www.akretion.com)
|
# Copyright 2015-2022 Akretion (http://www.akretion.com)
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from datetime import timedelta
|
||||||
|
import logging
|
||||||
|
|
||||||
from odoo import api, fields, models, _
|
from odoo import api, fields, models, _
|
||||||
|
from odoo.exceptions import UserError
|
||||||
|
from odoo.osv import expression
|
||||||
from odoo.tools import float_is_zero
|
from odoo.tools import float_is_zero
|
||||||
from odoo.tools.misc import format_date
|
from odoo.tools.misc import format_date
|
||||||
from odoo.osv import expression
|
|
||||||
from datetime import timedelta
|
_logger = logging.getLogger(__name__)
|
||||||
from odoo.exceptions import UserError
|
|
||||||
|
|
||||||
|
|
||||||
class AccountMove(models.Model):
|
class AccountMove(models.Model):
|
||||||
@@ -16,33 +20,57 @@ class AccountMove(models.Model):
|
|||||||
# By default, we can still modify "ref" when account move is posted
|
# By default, we can still modify "ref" when account move is posted
|
||||||
# which seems a bit lazy for me...
|
# which seems a bit lazy for me...
|
||||||
ref = fields.Char(states={'posted': [('readonly', True)]})
|
ref = fields.Char(states={'posted': [('readonly', True)]})
|
||||||
date = fields.Date(tracking=True)
|
|
||||||
invoice_date_due = fields.Date(tracking=True)
|
invoice_date_due = fields.Date(tracking=True)
|
||||||
invoice_payment_term_id = fields.Many2one(tracking=True)
|
invoice_payment_term_id = fields.Many2one(tracking=True)
|
||||||
journal_id = fields.Many2one(tracking=True)
|
journal_id = fields.Many2one(tracking=True)
|
||||||
partner_bank_id = fields.Many2one(tracking=True)
|
|
||||||
fiscal_position_id = fields.Many2one(tracking=True)
|
fiscal_position_id = fields.Many2one(tracking=True)
|
||||||
amount_total = fields.Monetary(tracking=True)
|
amount_total = fields.Monetary(tracking=True)
|
||||||
# for invoice report
|
# for invoice report
|
||||||
has_discount = fields.Boolean(
|
has_discount = fields.Boolean(compute='_compute_has_discount')
|
||||||
compute='_compute_has_discount', readonly=True)
|
|
||||||
# has_attachment is useful for those who use attachment to archive
|
# has_attachment is useful for those who use attachment to archive
|
||||||
# supplier invoices. It allows them to find supplier invoices
|
# supplier invoices. It allows them to find supplier invoices
|
||||||
# that don't have any attachment
|
# that don't have any attachment
|
||||||
has_attachment = fields.Boolean(
|
has_attachment = fields.Boolean(
|
||||||
compute='_compute_has_attachment',
|
compute='_compute_has_attachment', search='_search_has_attachment')
|
||||||
search='_search_has_attachment', readonly=True)
|
|
||||||
sale_dates = fields.Char(
|
sale_dates = fields.Char(
|
||||||
compute="_compute_sales_dates", readonly=True,
|
compute="_compute_sales_dates",
|
||||||
help="This information appears on invoice qweb report "
|
help="This information appear on invoice qweb report "
|
||||||
"(you may use it for your own report)")
|
"(you may use it for your own report)")
|
||||||
|
# There is a native "blocked" field (bool) on account.move.line
|
||||||
|
# We want to have that field on invoices to improve usability
|
||||||
|
# while keeping compatibility with the standard Odoo datamodel
|
||||||
|
blocked = fields.Boolean(
|
||||||
|
compute="_compute_blocked",
|
||||||
|
inverse="_inverse_blocked",
|
||||||
|
store=True,
|
||||||
|
string="Dispute",
|
||||||
|
tracking=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
@api.depends("line_ids", "line_ids.blocked")
|
||||||
|
def _compute_blocked(self):
|
||||||
|
for move in self:
|
||||||
|
move.blocked = any(
|
||||||
|
[
|
||||||
|
l.blocked
|
||||||
|
for l in move.line_ids
|
||||||
|
if l.account_id.account_type in ("liability_payable", "asset_receivable")
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
def _inverse_blocked(self):
|
||||||
|
for move in self:
|
||||||
|
for line in move.line_ids.filtered(
|
||||||
|
lambda l: l.account_id.account_type in ("liability_payable", "asset_receivable")
|
||||||
|
):
|
||||||
|
line.blocked = move.blocked
|
||||||
|
|
||||||
def _compute_has_discount(self):
|
def _compute_has_discount(self):
|
||||||
prec = self.env['decimal.precision'].precision_get('Discount')
|
prec = self.env['decimal.precision'].precision_get('Discount')
|
||||||
for inv in self:
|
for inv in self:
|
||||||
has_discount = False
|
has_discount = False
|
||||||
for line in inv.invoice_line_ids:
|
for line in inv.invoice_line_ids:
|
||||||
if not line.display_type and not float_is_zero(line.discount, precision_digits=prec):
|
if line.display_type == 'product' and not float_is_zero(line.discount, precision_digits=prec):
|
||||||
has_discount = True
|
has_discount = True
|
||||||
break
|
break
|
||||||
inv.has_discount = has_discount
|
inv.has_discount = has_discount
|
||||||
@@ -90,27 +118,19 @@ class AccountMove(models.Model):
|
|||||||
res.append((old_re[0], name))
|
res.append((old_re[0], name))
|
||||||
return res
|
return res
|
||||||
|
|
||||||
# I really hate to see a "/" in the 'name' field of the account.move.line
|
def _reverse_moves(self, default_values_list=None, cancel=False):
|
||||||
# generated from customer invoices linked to the partners' account because:
|
reverse_moves = super()._reverse_moves(
|
||||||
# 1) the label of an account move line is an important field, we can't
|
default_values_list=default_values_list, cancel=cancel)
|
||||||
# write a rubbish '/' in it !
|
# In the simple scenario 1 invoice -> 1 refund, we add a message in the chatter
|
||||||
# 2) the 'name' field of the account.move.line is used in the overdue
|
# of the invoice and in the chatter of the refund
|
||||||
# letter, and '/' is not meaningful for our customer !
|
if len(self) == 1 and len(reverse_moves) == 1:
|
||||||
# TODO mig to v12
|
self.message_post(body=_("A reverse journal entry <a href=# data-oe-model=account.move data-oe-id=%d>%s</a> has been generated.") % (reverse_moves.id, reverse_moves.display_name))
|
||||||
# def action_move_create(self):
|
reverse_moves.message_post(body=_("This journal entry has been generated as the reverse of <a href=# data-oe-model=account.move data-oe-id=%d>%s</a>.") % (self.id, self.display_name))
|
||||||
# res = super().action_move_create()
|
return reverse_moves
|
||||||
# for inv in self:
|
|
||||||
# self._cr.execute(
|
|
||||||
# "UPDATE account_move_line SET name= "
|
|
||||||
# "CASE WHEN name='/' THEN %s "
|
|
||||||
# "ELSE %s||' - '||name END "
|
|
||||||
# "WHERE move_id=%s", (inv.number, inv.number, inv.move_id.id))
|
|
||||||
# self.invalidate_cache()
|
|
||||||
# return res
|
|
||||||
|
|
||||||
def delete_lines_qty_zero(self):
|
def delete_lines_qty_zero(self):
|
||||||
lines = self.env['account.move.line'].search([
|
lines = self.env['account.move.line'].search([
|
||||||
('display_type', '=', False),
|
('display_type', '=', 'product'),
|
||||||
('move_id', 'in', self.ids),
|
('move_id', 'in', self.ids),
|
||||||
('quantity', '=', 0)])
|
('quantity', '=', 0)])
|
||||||
lines.unlink()
|
lines.unlink()
|
||||||
@@ -126,7 +146,7 @@ class AccountMove(models.Model):
|
|||||||
# Warning: the order of invoice line is forced in the view
|
# Warning: the order of invoice line is forced in the view
|
||||||
# <tree editable="bottom" default_order="sequence, date desc, move_name desc, id"
|
# <tree editable="bottom" default_order="sequence, date desc, move_name desc, id"
|
||||||
# it's not the same as the _order in the class AccountMoveLine
|
# it's not the same as the _order in the class AccountMoveLine
|
||||||
lines = self.env['account.move.line'].search([('exclude_from_invoice_tab', '=', False), ('move_id', '=', self.id)], order="sequence, date desc, move_name desc, id")
|
lines = self.env['account.move.line'].search([('display_type', 'in', ('product', 'line_section', 'line_note')), ('move_id', '=', self.id)], order="sequence, date desc, move_name desc, id")
|
||||||
for line in lines:
|
for line in lines:
|
||||||
if line.display_type == 'line_section':
|
if line.display_type == 'line_section':
|
||||||
# insert line
|
# insert line
|
||||||
@@ -135,7 +155,7 @@ class AccountMove(models.Model):
|
|||||||
subtotal = 0.0 # reset counter
|
subtotal = 0.0 # reset counter
|
||||||
has_sections = True
|
has_sections = True
|
||||||
else:
|
else:
|
||||||
if not line.display_type:
|
if line.display_type == 'product':
|
||||||
subtotal += line.price_subtotal * sign
|
subtotal += line.price_subtotal * sign
|
||||||
res.append({'line': line})
|
res.append({'line': line})
|
||||||
if has_sections: # insert last subtotal line
|
if has_sections: # insert last subtotal line
|
||||||
@@ -143,8 +163,8 @@ class AccountMove(models.Model):
|
|||||||
# res:
|
# res:
|
||||||
# [
|
# [
|
||||||
# {'line': account_invoice_line(1) with display_type=='line_section'},
|
# {'line': account_invoice_line(1) with display_type=='line_section'},
|
||||||
# {'line': account_invoice_line(2) without display_type},
|
# {'line': account_invoice_line(2) with display_type=='product'},
|
||||||
# {'line': account_invoice_line(3) without display_type},
|
# {'line': account_invoice_line(3) with display_type=='product'},
|
||||||
# {'line': account_invoice_line(4) with display_type=='line_note'},
|
# {'line': account_invoice_line(4) with display_type=='line_note'},
|
||||||
# {'subtotal': 8932.23},
|
# {'subtotal': 8932.23},
|
||||||
# ]
|
# ]
|
||||||
@@ -217,7 +237,7 @@ class AccountMove(models.Model):
|
|||||||
if self.is_purchase_document(include_receipts=True):
|
if self.is_purchase_document(include_receipts=True):
|
||||||
tax_lock_date = self.company_id.tax_lock_date
|
tax_lock_date = self.company_id.tax_lock_date
|
||||||
if invoice_date and tax_lock_date and has_tax and invoice_date <= tax_lock_date:
|
if invoice_date and tax_lock_date and has_tax and invoice_date <= tax_lock_date:
|
||||||
invoice_date = tax_lock_date + timedelta(days=1)
|
invoice_date = tax_lock_date + timedelta(days=1)
|
||||||
date = invoice_date
|
date = invoice_date
|
||||||
return date
|
return date
|
||||||
|
|
||||||
@@ -238,21 +258,8 @@ class AccountMoveLine(models.Model):
|
|||||||
full_reconcile_id = fields.Many2one(string='Full Reconcile')
|
full_reconcile_id = fields.Many2one(string='Full Reconcile')
|
||||||
matched_debit_ids = fields.One2many(string='Partial Reconcile Debit')
|
matched_debit_ids = fields.One2many(string='Partial Reconcile Debit')
|
||||||
matched_credit_ids = fields.One2many(string='Partial Reconcile Credit')
|
matched_credit_ids = fields.One2many(string='Partial Reconcile Credit')
|
||||||
reconcile_string = fields.Char(
|
|
||||||
compute='_compute_reconcile_string', string='Reconcile', store=True)
|
|
||||||
# for optional display in tree view
|
# for optional display in tree view
|
||||||
product_barcode = fields.Char(related='product_id.barcode', string="Product Barcode")
|
product_barcode = fields.Char(related='product_id.barcode', string="Product Barcode")
|
||||||
balance = fields.Monetary(
|
|
||||||
string='Balance',
|
|
||||||
default=0.0,
|
|
||||||
currency_field='company_currency_id',
|
|
||||||
compute="_compute_balance",
|
|
||||||
store=True)
|
|
||||||
|
|
||||||
@api.depends("credit", "debit")
|
|
||||||
def _compute_balance(self):
|
|
||||||
for line in self:
|
|
||||||
line.balance = line.debit - line.credit
|
|
||||||
|
|
||||||
def show_account_move_form(self):
|
def show_account_move_form(self):
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
@@ -266,19 +273,23 @@ class AccountMoveLine(models.Model):
|
|||||||
})
|
})
|
||||||
return action
|
return action
|
||||||
|
|
||||||
@api.depends(
|
def update_matching_number(self):
|
||||||
'full_reconcile_id', 'matched_debit_ids', 'matched_credit_ids')
|
records = self.search([("matching_number", "=", "P")])
|
||||||
def _compute_reconcile_string(self):
|
_logger.info(f"Update partial reconcile number for {len(records)} lines")
|
||||||
for line in self:
|
records._compute_matching_number()
|
||||||
rec_str = False
|
|
||||||
if line.full_reconcile_id:
|
|
||||||
rec_str = line.full_reconcile_id.name
|
|
||||||
else:
|
|
||||||
rec_str = ', '.join([
|
|
||||||
'a%d' % pr.id for pr in line.matched_debit_ids + line.matched_credit_ids])
|
|
||||||
line.reconcile_string = rec_str
|
|
||||||
|
|
||||||
def _get_computed_name(self):
|
# def _compute_matching_number(self):
|
||||||
|
# TODO maybe it will be better to have the same maching_number for
|
||||||
|
# all partial so it will be easier to group by
|
||||||
|
# super()._compute_matching_number()
|
||||||
|
# for record in self:
|
||||||
|
# if record.matching_number == "P":
|
||||||
|
# record.matching_number = ", ".join([
|
||||||
|
# "a%d" % pr.id
|
||||||
|
# for pr in record.matched_debit_ids + record.matched_credit_ids
|
||||||
|
# ])
|
||||||
|
|
||||||
|
def _compute_name(self):
|
||||||
# This is useful when you want to have the product code in a dedicated
|
# This is useful when you want to have the product code in a dedicated
|
||||||
# column in your customer invoice report
|
# column in your customer invoice report
|
||||||
# The same ir.config_parameter is used in sale_usability,
|
# The same ir.config_parameter is used in sale_usability,
|
||||||
@@ -287,7 +298,7 @@ class AccountMoveLine(models.Model):
|
|||||||
'usability.line_name_no_product_code')
|
'usability.line_name_no_product_code')
|
||||||
if no_product_code_param and no_product_code_param == 'True':
|
if no_product_code_param and no_product_code_param == 'True':
|
||||||
self = self.with_context(display_default_code=False)
|
self = self.with_context(display_default_code=False)
|
||||||
return super()._get_computed_name()
|
return super()._compute_name()
|
||||||
|
|
||||||
def reconcile(self):
|
def reconcile(self):
|
||||||
"""Explicit error message if unposted lines"""
|
"""Explicit error message if unposted lines"""
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright 2015-2020 Akretion (http://www.akretion.com)
|
# Copyright 2015-2022 Akretion (http://www.akretion.com)
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright 2017-2020 Akretion France (https://akretion.com/)
|
# Copyright 2017-2022 Akretion France (https://akretion.com/)
|
||||||
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
21
account_usability_akretion/models/res_partner_bank.py
Normal file
21
account_usability_akretion/models/res_partner_bank.py
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# Copyright 2015-2022 Akretion France (http://www.akretion.com/)
|
||||||
|
# @author: Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo import models
|
||||||
|
|
||||||
|
|
||||||
|
class ResPartnerBank(models.Model):
|
||||||
|
_inherit = 'res.partner.bank'
|
||||||
|
|
||||||
|
def name_get(self):
|
||||||
|
res = []
|
||||||
|
for acc in self:
|
||||||
|
name = acc.acc_number
|
||||||
|
if acc.currency_id:
|
||||||
|
name = "%s (%s)" % (name, acc.currency_id.name)
|
||||||
|
if acc.bank_id.name:
|
||||||
|
name = "%s - %s" % (name, acc.bank_id.name)
|
||||||
|
res += [(acc.id, name)]
|
||||||
|
return res
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright 2015-2021 Akretion France (http://www.akretion.com/)
|
Copyright 2015-2022 Akretion France (http://www.akretion.com/)
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
-->
|
-->
|
||||||
@@ -14,22 +14,19 @@
|
|||||||
<field name="inherit_id" ref="account.view_account_form"/>
|
<field name="inherit_id" ref="account.view_account_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<field name="deprecated" position="before">
|
<field name="deprecated" position="before">
|
||||||
<field name="reconcile" attrs="{'invisible': ['|', ('internal_type','=','liquidity'), ('internal_group', '=', 'off_balance')]}"/>
|
<field name="reconcile" attrs="{'invisible': ['|', ('account_type', 'in', ('asset_cash', 'liability_credit_card')), ('internal_group', '=', 'off_balance')]}" widget="boolean_toggle"/>
|
||||||
</field>
|
</field>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
<record id="view_account_search" model="ir.ui.view">
|
<record id="view_account_search" model="ir.ui.view">
|
||||||
<field name="name">account.account.search</field>
|
<field name="name">account.account.search</field>
|
||||||
<field name="model">account.account</field>
|
<field name="model">account.account</field>
|
||||||
<field name="inherit_id" ref="account.view_account_search"/>
|
<field name="inherit_id" ref="account.view_account_search"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<!-- The native "name" filter uses a domain ['|', ('name','ilike',self), ('code','=like',str(self)+'%')]
|
|
||||||
This is good because it uses '=like' on 'code', but sometimes there are digits in account names,
|
|
||||||
so you get additionnal unexpected accounts in the result of the search -->
|
|
||||||
<field name="name" position="after">
|
<field name="name" position="after">
|
||||||
<field name="code" filter_domain="[('code', '=like', str(self)+'%')]" string="Code"/>
|
<field name="code" filter_domain="[('code', '=like', self + '%')]" string="Code"/>
|
||||||
</field>
|
</field>
|
||||||
<filter name="accounttype" position="after">
|
<filter name="accounttype" position="after">
|
||||||
<filter name="group_groupby" string="Group" context="{'group_by': 'group_id'}"/>
|
<filter name="group_groupby" string="Group" context="{'group_by': 'group_id'}"/>
|
||||||
22
account_usability_akretion/views/account_analytic_line.xml
Normal file
22
account_usability_akretion/views/account_analytic_line.xml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2024 Akretion France (http://www.akretion.com/)
|
||||||
|
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
-->
|
||||||
|
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
|
||||||
|
<record id="view_account_analytic_line_tree_inherit_account" model="ir.ui.view">
|
||||||
|
<field name="model">account.analytic.line</field>
|
||||||
|
<field name="inherit_id" ref="account.view_account_analytic_line_tree_inherit_account"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<field name="general_account_id" position="attributes">
|
||||||
|
<attribute name="optional">show</attribute>
|
||||||
|
</field>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
|
||||||
|
</odoo>
|
||||||
@@ -13,19 +13,31 @@
|
|||||||
<field name="model">account.bank.statement</field>
|
<field name="model">account.bank.statement</field>
|
||||||
<field name="inherit_id" ref="account.view_bank_statement_form"/>
|
<field name="inherit_id" ref="account.view_bank_statement_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
|
<button name="button_reopen" position="after">
|
||||||
|
<button
|
||||||
|
name="button_undo_reconciliation"
|
||||||
|
type="object"
|
||||||
|
confirm="Are you sure to unreconcile all the entries of the bank statement?"
|
||||||
|
states="open"
|
||||||
|
string="Unreconcile All"/>
|
||||||
|
</button>
|
||||||
<xpath expr="//field[@name='line_ids']/tree/button[@name='button_undo_reconciliation']" position="after">
|
<xpath expr="//field[@name='line_ids']/tree/button[@name='button_undo_reconciliation']" position="after">
|
||||||
<field name="move_id" invisible="1"/>
|
<field name="move_id" invisible="1"/>
|
||||||
<button name="show_account_move" type="object"
|
<button name="show_account_move" type="object"
|
||||||
title="View Journal Entry" icon="fa-arrow-right"/>
|
title="View Journal Entry" icon="fa-arrow-right"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
<field name="date" position="after">
|
<xpath expr="//field[@name='balance_end_real']/.." position="after">
|
||||||
<field name="start_date"/>
|
<field name="start_date"/>
|
||||||
<field name="end_date"/>
|
<field name="end_date"/>
|
||||||
<field name="hide_bank_statement_balance" invisible="1"/>
|
<field name="hide_bank_statement_balance" invisible="1"/>
|
||||||
</field>
|
<field name="line_count"/>
|
||||||
|
</xpath>
|
||||||
<field name="date" position="attributes">
|
<field name="date" position="attributes">
|
||||||
<attribute name="invisible">1</attribute>
|
<attribute name="invisible">1</attribute>
|
||||||
</field>
|
</field>
|
||||||
|
<field name="journal_id" position="attributes">
|
||||||
|
<attribute name="widget"></attribute>
|
||||||
|
</field>
|
||||||
<label for="balance_start" position="attributes">
|
<label for="balance_start" position="attributes">
|
||||||
<attribute name="attrs">{'invisible': [('hide_bank_statement_balance', '=', True)]}</attribute>
|
<attribute name="attrs">{'invisible': [('hide_bank_statement_balance', '=', True)]}</attribute>
|
||||||
</label>
|
</label>
|
||||||
@@ -41,6 +53,9 @@
|
|||||||
<group name="sale_total" position="attributes">
|
<group name="sale_total" position="attributes">
|
||||||
<attribute name="attrs">{'invisible': [('hide_bank_statement_balance', '=', True)]}</attribute>
|
<attribute name="attrs">{'invisible': [('hide_bank_statement_balance', '=', True)]}</attribute>
|
||||||
</group>
|
</group>
|
||||||
|
<div role="alert" position="attributes">
|
||||||
|
<attribute name="attrs">{'invisible': ['|', '|', ('hide_bank_statement_balance', '=', True), ('previous_statement_id', '=', False), ('is_valid_balance_start', '=', True)]}</attribute>
|
||||||
|
</div>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
@@ -49,12 +64,30 @@
|
|||||||
<field name="model">account.bank.statement</field>
|
<field name="model">account.bank.statement</field>
|
||||||
<field name="inherit_id" ref="account.view_bank_statement_tree"/>
|
<field name="inherit_id" ref="account.view_bank_statement_tree"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
|
<tree position="attributes">
|
||||||
|
<!-- Remove is_difference_zero condition for colors -->
|
||||||
|
<attribute name="decoration-danger"></attribute>
|
||||||
|
<attribute name="decoration-info">state == 'open'</attribute>
|
||||||
|
</tree>
|
||||||
<field name="date" position="attributes">
|
<field name="date" position="attributes">
|
||||||
<attribute name="invisible">1</attribute>
|
<attribute name="invisible">1</attribute>
|
||||||
</field>
|
</field>
|
||||||
<field name="journal_id" position="after">
|
<field name="journal_id" position="after">
|
||||||
<field name="start_date"/>
|
<field name="start_date"/>
|
||||||
<field name="end_date"/>
|
<field name="end_date"/>
|
||||||
|
<field name="line_count" optional="show"/>
|
||||||
|
</field>
|
||||||
|
<field name="balance_start" position="attributes">
|
||||||
|
<attribute name="optional">show</attribute>
|
||||||
|
</field>
|
||||||
|
<field name="balance_end_real" position="attributes">
|
||||||
|
<attribute name="optional">show</attribute>
|
||||||
|
</field>
|
||||||
|
<field name="state" position="attributes">
|
||||||
|
<attribute name="widget">badge</attribute>
|
||||||
|
<attribute name="decoration-info">state == 'open'</attribute>
|
||||||
|
<attribute name="decoration-warning">state == 'posted'</attribute>
|
||||||
|
<attribute name="decoration-success">state == 'confirm'</attribute>
|
||||||
</field>
|
</field>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright 2021 Akretion France (http://www.akretion.com/)
|
Copyright 2021-2022 Akretion France (http://www.akretion.com/)
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
-->
|
-->
|
||||||
38
account_usability_akretion/views/account_invoice_report.xml
Normal file
38
account_usability_akretion/views/account_invoice_report.xml
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2018-2024 Akretion (http://www.akretion.com/)
|
||||||
|
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
-->
|
||||||
|
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
|
||||||
|
<record id="account_invoice_report_view_tree" model="ir.ui.view">
|
||||||
|
<field name="name">usability.account.invoice.report.tree</field>
|
||||||
|
<field name="model">account.invoice.report</field>
|
||||||
|
<field name="inherit_id" ref="account.account_invoice_report_view_tree"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<field name="partner_id" position="after">
|
||||||
|
<field name="commercial_partner_id" optional="hide"/>
|
||||||
|
<field name="country_id" optional="hide"/>
|
||||||
|
<field name="industry_id" optional="hide"/>
|
||||||
|
<field name="fiscal_position_id" optional="hide"/>
|
||||||
|
</field>
|
||||||
|
<field name="quantity" position="after">
|
||||||
|
<field name="product_uom_id" groups="uom.group_uom" optional="hide"/>
|
||||||
|
</field>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="view_account_invoice_report_search" model="ir.ui.view">
|
||||||
|
<field name="model">account.invoice.report</field>
|
||||||
|
<field name="inherit_id" ref="account.view_account_invoice_report_search"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<filter name="category_product" position="after">
|
||||||
|
<filter string="Product" name="product_groupby" context="{'group_by': 'product_id', 'residual_invisible':True}"/>
|
||||||
|
</filter>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</odoo>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright 2015-2020 Akretion France (http://www.akretion.com/)
|
Copyright 2015-2022 Akretion France (http://www.akretion.com/)
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
-->
|
-->
|
||||||
@@ -12,23 +12,31 @@
|
|||||||
<field name="model">account.journal</field>
|
<field name="model">account.journal</field>
|
||||||
<field name="inherit_id" ref="account.view_account_journal_form"/>
|
<field name="inherit_id" ref="account.view_account_journal_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<field name="bank_statements_source" position="after">
|
<xpath expr="//field[@name='account_control_ids']/.." position="after">
|
||||||
<field name="hide_bank_statement_balance" groups="account.group_account_readonly"/>
|
<group name="usability" string="Misc" attrs="{'invisible': [('type', '!=', 'bank')]}">
|
||||||
<field name="account_type_current_liabilities_id" invisible="1"/>
|
<field name="hide_bank_statement_balance" groups="account.group_account_readonly"/>
|
||||||
<field name="account_type_current_assets_id" invisible="1"/>
|
</group>
|
||||||
</field>
|
</xpath>
|
||||||
|
<xpath expr="//field[@name='inbound_payment_method_line_ids']/tree/field[@name='payment_account_id']" position="attributes">
|
||||||
|
<attribute name="optional">show</attribute>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//field[@name='outbound_payment_method_line_ids']/tree/field[@name='payment_account_id']" position="attributes">
|
||||||
|
<attribute name="optional">show</attribute>
|
||||||
|
</xpath>
|
||||||
|
<!--
|
||||||
<field name="suspense_account_id" position="attributes">
|
<field name="suspense_account_id" position="attributes">
|
||||||
<attribute name="context">{'default_user_type_id': account_type_current_liabilities_id, 'default_reconcile': True}</attribute>
|
<attribute name="context">{'default_user_type_id': account_type_current_assets_id, 'default_reconcile': False}</attribute>
|
||||||
</field>
|
</field>
|
||||||
<field name="payment_debit_account_id" position="attributes">
|
<field name="payment_debit_account_id" position="attributes">
|
||||||
<attribute name="context">{'default_user_type_id': account_type_current_assets_id, 'default_reconcile': True}</attribute>
|
<attribute name="context">{'default_user_type_id': account_type_current_assets_id, 'default_reconcile': True}</attribute>
|
||||||
</field>
|
</field>
|
||||||
<field name="payment_credit_account_id" position="attributes">
|
<field name="payment_credit_account_id" position="attributes">
|
||||||
<attribute name="context">{'default_user_type_id': account_type_current_assets_id, 'default_reconcile': True}</attribute>
|
<attribute name="context">{'default_user_type_id': account_type_current_assets_id, 'default_reconcile': True}</attribute>
|
||||||
</field>
|
</field> -->
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<!-- TODO
|
||||||
<record id="account_journal_dashboard_kanban_view" model="ir.ui.view">
|
<record id="account_journal_dashboard_kanban_view" model="ir.ui.view">
|
||||||
<field name="name">usability.account.journal.dashboard</field>
|
<field name="name">usability.account.journal.dashboard</field>
|
||||||
<field name="model">account.journal</field>
|
<field name="model">account.journal</field>
|
||||||
@@ -40,19 +48,12 @@
|
|||||||
<xpath expr="//div[@name='latest_statement']/.." position="attributes">
|
<xpath expr="//div[@name='latest_statement']/.." position="attributes">
|
||||||
<attribute name="t-if">dashboard.has_at_least_one_statement and dashboard.account_balance != dashboard.last_balance and !record.hide_bank_statement_balance.raw_value</attribute>
|
<attribute name="t-if">dashboard.has_at_least_one_statement and dashboard.account_balance != dashboard.last_balance and !record.hide_bank_statement_balance.raw_value</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
<t t-esc="dashboard.outstanding_pay_account_balance" position="replace">
|
||||||
|
<a name="open_outstanding_payments" type="object" title="Outstanding Payments/Receipts"><t t-esc="dashboard.outstanding_pay_account_balance"/></a>
|
||||||
|
</t>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
-->
|
||||||
<record id="view_account_journal_tree" model="ir.ui.view">
|
|
||||||
<field name="name">usability.account.journal.tree</field>
|
|
||||||
<field name="model">account.journal</field>
|
|
||||||
<field name="inherit_id" ref="account.view_account_journal_tree"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="name" position="after">
|
|
||||||
<field name="code" optional="show"/>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="view_account_journal_search" model="ir.ui.view">
|
<record id="view_account_journal_search" model="ir.ui.view">
|
||||||
<field name="name">usability.account.journal.search</field>
|
<field name="name">usability.account.journal.search</field>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright 2015-2020 Akretion France (http://www.akretion.com/)
|
Copyright 2015-2022 Akretion France (http://www.akretion.com/)
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
-->
|
-->
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright 2015-2020 Akretion France (http://www.akretion.com/)
|
Copyright 2015-2022 Akretion France (http://www.akretion.com/)
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
-->
|
-->
|
||||||
@@ -12,20 +12,22 @@
|
|||||||
<field name="model">account.move</field>
|
<field name="model">account.move</field>
|
||||||
<field name="inherit_id" ref="account.view_move_form"/>
|
<field name="inherit_id" ref="account.view_move_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
|
<!--
|
||||||
<field name="fiscal_position_id" position="attributes">
|
<field name="fiscal_position_id" position="attributes">
|
||||||
<attribute name="widget">selection</attribute>
|
<attribute name="widget">selection</attribute>
|
||||||
</field>
|
</field>
|
||||||
<field name="invoice_incoterm_id" position="attributes">
|
<field name="invoice_incoterm_id" position="attributes">
|
||||||
<attribute name="widget">selection</attribute>
|
<attribute name="widget">selection</attribute>
|
||||||
</field>
|
</field> -->
|
||||||
<button name="action_register_payment" position="attributes">
|
<button id="account_invoice_payment_btn" position="attributes">
|
||||||
<attribute name="class">btn-default</attribute>
|
<attribute name="class">btn-default</attribute>
|
||||||
</button>
|
</button>
|
||||||
<button name="action_register_payment" position="before">
|
<button name="action_register_payment" position="before">
|
||||||
<button name="%(account.account_invoices)d" type="action" string="Print" attrs="{'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund'))]}"/>
|
<button name="%(account.account_invoices)d" type="action" string="Print" attrs="{'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund'))]}"/>
|
||||||
</button>
|
</button>
|
||||||
<button name="preview_invoice" position="attributes">
|
<button name="preview_invoice" position="attributes">
|
||||||
<attribute name="attrs">{'invisible': 1}</attribute>
|
<attribute name="attrs">{}</attribute>
|
||||||
|
<attribute name="invisible">1</attribute>
|
||||||
</button>
|
</button>
|
||||||
<!-- move sent field and make it visible -->
|
<!-- move sent field and make it visible -->
|
||||||
<field name="is_move_sent" position="replace"/>
|
<field name="is_move_sent" position="replace"/>
|
||||||
@@ -35,16 +37,42 @@
|
|||||||
<field name="invoice_origin" position="after">
|
<field name="invoice_origin" position="after">
|
||||||
<field name="is_move_sent" attrs="{'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund'))]}"/>
|
<field name="is_move_sent" attrs="{'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund'))]}"/>
|
||||||
</field>
|
</field>
|
||||||
<xpath expr="//field[@name='line_ids']/tree/field[@name='analytic_account_id']" position="attributes">
|
|
||||||
<attribute name="optional">show</attribute>
|
|
||||||
</xpath>
|
|
||||||
<xpath expr="//field[@name='line_ids']/tree/field[@name='tax_tag_ids']" position="after">
|
<xpath expr="//field[@name='line_ids']/tree/field[@name='tax_tag_ids']" position="after">
|
||||||
<field name="matching_number" optional="hide"/>
|
<field name="matching_number" optional="show"/>
|
||||||
<field name="reconcile_string" optional="show"/>
|
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='invoice_line_ids']/tree/field[@name='product_id']" position="after">
|
<xpath expr="//field[@name='invoice_line_ids']/tree/field[@name='product_id']" position="after">
|
||||||
<field name="product_barcode" optional="hide"/>
|
<field name="product_barcode" optional="hide"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
<field name="invoice_source_email" position="after">
|
||||||
|
<field name="blocked"/>
|
||||||
|
</field>
|
||||||
|
<div role="alert" position="after">
|
||||||
|
<div id="warn_blocked" groups="account.group_account_invoice,account.group_account_readonly"
|
||||||
|
class="alert alert-warning" role="alert" style="margin-bottom:0px;"
|
||||||
|
attrs="{'invisible': ['|', ('move_type', 'not in', ('in_invoice', 'in_refund', 'out_invoice', 'out_refund')), ('blocked', '=', False)]}">
|
||||||
|
This <field name="move_type"/> is marked as <b>disputed</b>.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<xpath expr="//button[@name='open_duplicated_ref_bill_view']/.." position="attributes">
|
||||||
|
<!-- show duplicate warning not only in draft state, but also in posted state -->
|
||||||
|
<attribute name="attrs">{'invisible': ['|', ('state', '=', 'cancel'), ('duplicated_ref_ids', '=', [])]}</attribute>
|
||||||
|
</xpath>
|
||||||
|
<button name="button_cancel" attrs="{'invisible' : ['|', '|', ('id', '=', False), ('state', '!=', 'draft'),('move_type', '!=', 'entry')]}" position="attributes">
|
||||||
|
<attribute name="confirm">Are you sure you want to cancel this journal entry?</attribute>
|
||||||
|
</button>
|
||||||
|
<button name="button_cancel" attrs="{'invisible' : ['|', '|', ('id', '=', False), ('state', '!=', 'draft'),('move_type', '==', 'entry')]}" position="attributes">
|
||||||
|
<attribute name="confirm">Are you sure you want to cancel this invoice?</attribute>
|
||||||
|
</button>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="view_invoice_tree" model="ir.ui.view">
|
||||||
|
<field name="model">account.move</field>
|
||||||
|
<field name="inherit_id" ref="account.view_invoice_tree"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<field name="amount_residual_signed" position="attributes">
|
||||||
|
<attribute name="optional">show</attribute>
|
||||||
|
</field>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
@@ -59,7 +87,32 @@
|
|||||||
<filter name="sent" string="Sent" domain="[('is_move_sent', '=', True), ('move_type', 'in', ('out_invoice', 'out_refund'))]"/>
|
<filter name="sent" string="Sent" domain="[('is_move_sent', '=', True), ('move_type', 'in', ('out_invoice', 'out_refund'))]"/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<filter name="no_attachment" string="Missing Attachment" domain="[('has_attachment', '=', False)]"/>
|
<filter name="no_attachment" string="Missing Attachment" domain="[('has_attachment', '=', False)]"/>
|
||||||
</filter>
|
<separator/>
|
||||||
|
<filter name="dispute" string="Dispute" domain="[('blocked', '=', True)]"/>
|
||||||
|
</filter>
|
||||||
|
<filter name="salesperson" position="before">
|
||||||
|
<filter name="commercial_partner_groupby" string="Commercial Partner" context="{'group_by': 'commercial_partner_id'}"/>
|
||||||
|
</filter>
|
||||||
|
<filter name="status" position="after">
|
||||||
|
<filter name="payment_state_groupby" string="Payment Status" context="{'group_by': 'payment_state'}"/>
|
||||||
|
</filter>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="view_move_line_form" model="ir.ui.view">
|
||||||
|
<field name="model">account.move.line</field>
|
||||||
|
<field name="inherit_id" ref="account.view_move_line_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<!-- The field 'blocked' is alone in it's block
|
||||||
|
We don't want to display an empty block, so we put the attrs on the group
|
||||||
|
The drawback of this is that, if someone added a field in that group,
|
||||||
|
he won't see the field when internal_type is not payable/receivable -->
|
||||||
|
<xpath expr="//field[@name='blocked']/.." position="attributes">
|
||||||
|
<attribute name="attrs">{'invisible': [('account_type', 'not in', ('liability_payable', 'asset_receivable'))]}</attribute>
|
||||||
|
</xpath>
|
||||||
|
<field name="account_id" position="after">
|
||||||
|
<field name="account_type" invisible="1"/>
|
||||||
|
</field>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
@@ -67,12 +120,13 @@
|
|||||||
<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">
|
||||||
<field name="matching_number" position="after">
|
<field name="analytic_distribution" position="after">
|
||||||
<button title="View Journal Entry Form" type="object" name="show_account_move_form" icon="fa-arrow-right"/>
|
<button title="View Journal Entry Form" type="object" name="show_account_move_form" icon="fa-arrow-right"/>
|
||||||
</field>
|
</field>
|
||||||
|
<!-- balance is already present
|
||||||
<field name="credit" position="after">
|
<field name="credit" position="after">
|
||||||
<field name="balance" sum="Balance" />
|
<field name="balance" sum="Balance" optional="show"/>
|
||||||
</field>
|
</field> -->
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
@@ -81,35 +135,27 @@
|
|||||||
<field name="model">account.move.line</field>
|
<field name="model">account.move.line</field>
|
||||||
<field name="inherit_id" ref="account.view_account_move_line_filter"/>
|
<field name="inherit_id" ref="account.view_account_move_line_filter"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<filter name="unposted" position="before">
|
|
||||||
<filter name="current_year" string="Current Year" domain="[('date', '>=', (context_today().strftime('%Y-01-01'))), ('date', '<=', (context_today().strftime('%Y-12-31')))]"/>
|
|
||||||
<filter name="previous_year" string="Previous Year" domain="[('date', '>=', (context_today() + relativedelta(day=1, month=1, years=-1)).strftime('%Y-%m-%d')), ('date', '<=', (context_today() + relativedelta(day=31, month=12, years=-1)).strftime('%Y-%m-%d'))]"/>
|
|
||||||
<separator/>
|
|
||||||
</filter>
|
|
||||||
<field name="partner_id" position="after">
|
<field name="partner_id" position="after">
|
||||||
<field name="reconcile_string" />
|
<field name="matching_number" />
|
||||||
<field name="debit" filter_domain="['|', ('debit', '=', self), ('credit', '=', self)]" string="Debit or Credit"/>
|
<field name="debit" filter_domain="['|', ('debit', '=', self), ('credit', '=', self)]" string="Debit or Credit"/>
|
||||||
</field>
|
</field>
|
||||||
<filter name="unreconciled" position="before">
|
<filter name="unreconciled" position="before">
|
||||||
<filter name="reconciled" string="Fully Reconciled" domain="[('reconciled', '=', True)]"/>
|
<filter name="reconciled" string="Fully Reconciled" domain="[('account_id.reconcile', '=', True), ('full_reconcile_id', '!=', False)]"/>
|
||||||
</filter>
|
</filter>
|
||||||
<filter name="unreconciled" position="attributes">
|
<filter name="unreconciled" position="attributes">
|
||||||
<attribute name="string">Unreconciled or Partially Reconciled</attribute>
|
<attribute name="string">Unreconciled or Partially Reconciled</attribute>
|
||||||
<attribute name="domain">[('reconciled', '=', False), ('balance', '!=', 0), ('account_id.reconcile', '=', True)]</attribute>
|
|
||||||
</filter>
|
</filter>
|
||||||
<!--
|
|
||||||
<field name="name" position="attributes">
|
<field name="name" position="attributes">
|
||||||
<attribute name="string">Name or Reference</attribute>
|
<attribute name="string">Label, Reference, Account or Partner</attribute>
|
||||||
</field> -->
|
</field>
|
||||||
|
<field name="name" position="before">
|
||||||
|
<field name="move_id" position="move"/>
|
||||||
|
</field>
|
||||||
<field name="partner_id" position="attributes">
|
<field name="partner_id" position="attributes">
|
||||||
<attribute name="domain">['|', ('parent_id', '=', False), ('is_company', '=', True)]</attribute>
|
<attribute name="domain">['|', ('parent_id', '=', False), ('is_company', '=', True)]</attribute>
|
||||||
</field>
|
</field>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="account.action_move_journal_line" model="ir.actions.act_window">
|
|
||||||
<field name="context">{'default_move_type': 'entry', 'view_no_maturity': True}</field>
|
|
||||||
<!-- Remove 'search_default_misc_filter': 1 -->
|
|
||||||
</record>
|
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright 2018-2020 Akretion (http://www.akretion.com/)
|
Copyright 2018-2022 Akretion (http://www.akretion.com/)
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
-->
|
-->
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright 2015-2020 Akretion France (http://www.akretion.com/)
|
Copyright 2015-2022 Akretion France (http://www.akretion.com/)
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
-->
|
-->
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
<field name="model">account.tax</field>
|
<field name="model">account.tax</field>
|
||||||
<field name="inherit_id" ref="account.view_tax_tree"/>
|
<field name="inherit_id" ref="account.view_tax_tree"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<field name="description" position="after">
|
<field name="type_tax_use" position="after">
|
||||||
<field name="price_include" optional="show"/>
|
<field name="price_include" optional="show"/>
|
||||||
</field>
|
</field>
|
||||||
</field>
|
</field>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright 2017-2020 Akretion (http://www.akretion.com/)
|
Copyright 2017-2022 Akretion (http://www.akretion.com/)
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
-->
|
-->
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright 2021 Akretion (http://www.akretion.com/)
|
Copyright 2021-2022 Akretion (http://www.akretion.com/)
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
-->
|
-->
|
||||||
20
account_usability_akretion/views/res_partner.xml
Normal file
20
account_usability_akretion/views/res_partner.xml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2014-2024 Akretion (http://www.akretion.com/)
|
||||||
|
@author: Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
|
||||||
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
-->
|
||||||
|
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<record id="view_partner_simple_form" model="ir.ui.view">
|
||||||
|
<field name="name">base_usability.title.on.partner.simplified.form</field>
|
||||||
|
<field name="model">res.partner</field>
|
||||||
|
<field name="inherit_id" ref="account.view_partner_property_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[@name='bank_ids']//field[@name='acc_number']" position="after">
|
||||||
|
<field name="currency_id" optional="hide"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
</odoo>
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
from . import account_invoice_mark_sent
|
from . import account_invoice_mark_sent
|
||||||
from . import account_move_reversal
|
from . import account_move_reversal
|
||||||
from . import res_config_settings
|
|
||||||
from . import account_group_generate
|
from . import account_group_generate
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright 2015-2020 Akretion (http://www.akretion.com)
|
# Copyright 2015-2022 Akretion (http://www.akretion.com)
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
@@ -10,6 +10,9 @@ class AccountGroupGenerate(models.TransientModel):
|
|||||||
_name = 'account.group.generate'
|
_name = 'account.group.generate'
|
||||||
_description = 'Generate Account Groups'
|
_description = 'Generate Account Groups'
|
||||||
|
|
||||||
|
company_id = fields.Many2one(
|
||||||
|
'res.company', string='Company', required=True,
|
||||||
|
default=lambda self: self.env.company)
|
||||||
name_prefix = fields.Char(string='Prefix', required=True, default='Comptes')
|
name_prefix = fields.Char(string='Prefix', required=True, default='Comptes')
|
||||||
level = fields.Integer(default=2, required=True)
|
level = fields.Integer(default=2, required=True)
|
||||||
|
|
||||||
@@ -18,7 +21,7 @@ class AccountGroupGenerate(models.TransientModel):
|
|||||||
raise UserError(_("The level must be >= 1."))
|
raise UserError(_("The level must be >= 1."))
|
||||||
ago = self.env['account.group']
|
ago = self.env['account.group']
|
||||||
aao = self.env['account.account']
|
aao = self.env['account.account']
|
||||||
company = self.env.company
|
company = self.company_id
|
||||||
groups = ago.search([('company_id', '=', company.id)])
|
groups = ago.search([('company_id', '=', company.id)])
|
||||||
if groups:
|
if groups:
|
||||||
raise UserError(_(
|
raise UserError(_(
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright 2020 Akretion France (http://www.akretion.com/)
|
Copyright 2020-2022 Akretion France (http://www.akretion.com/)
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
-->
|
-->
|
||||||
@@ -11,11 +11,12 @@
|
|||||||
<field name="name">account.group.generate.form</field>
|
<field name="name">account.group.generate.form</field>
|
||||||
<field name="model">account.group.generate</field>
|
<field name="model">account.group.generate</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Generate account groups">
|
<form>
|
||||||
<p>
|
<p>
|
||||||
This wizard is designed to auto-generate account groups from the chart of account.
|
This wizard is designed to auto-generate account groups from the chart of account.
|
||||||
</p>
|
</p>
|
||||||
<group name="main">
|
<group name="main">
|
||||||
|
<field name="company_id" groups="base.group_multi_company"/>
|
||||||
<field name="name_prefix"/>
|
<field name="name_prefix"/>
|
||||||
<field name="level"/>
|
<field name="level"/>
|
||||||
</group>
|
</group>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright 2017-2020 Akretion France (https://akretion.com/en)
|
# Copyright 2017-2022 Akretion France (https://akretion.com/en)
|
||||||
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright 2017-2020 Akretion France
|
Copyright 2017-2022 Akretion France
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
-->
|
-->
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Mark invoices as sent">
|
<form string="Mark invoices as sent">
|
||||||
<p>
|
<p>
|
||||||
This wizard will mark as <i>sent</i> all the selected invoices in open or paid state.
|
This wizard will mark as <i>sent</i> all the selected posted invoices.
|
||||||
</p>
|
</p>
|
||||||
<footer>
|
<footer>
|
||||||
<button type="object" name="run" string="Mark as Sent" class="btn-primary"/>
|
<button type="object" name="run" string="Mark as Sent" class="btn-primary"/>
|
||||||
29
account_usability_akretion/wizard/account_move_reversal.py
Normal file
29
account_usability_akretion/wizard/account_move_reversal.py
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
# Copyright 2018-2022 Akretion France (https://akretion.com/)
|
||||||
|
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo import api, models, _
|
||||||
|
from dateutil.relativedelta import relativedelta
|
||||||
|
from odoo.exceptions import UserError
|
||||||
|
|
||||||
|
|
||||||
|
class AccountMoveReversal(models.TransientModel):
|
||||||
|
_inherit = 'account.move.reversal'
|
||||||
|
|
||||||
|
# Set default reversal date to original move + 1 day
|
||||||
|
# and raise error if original move has already been reversed
|
||||||
|
@api.model
|
||||||
|
def default_get(self, fields_list):
|
||||||
|
res = super().default_get(fields_list)
|
||||||
|
assert self._context.get('active_model') == 'account.move'
|
||||||
|
amo = self.env['account.move']
|
||||||
|
moves = amo.browse(self._context['active_ids'])
|
||||||
|
if len(moves) == 1:
|
||||||
|
res['date'] = moves.date + relativedelta(days=1)
|
||||||
|
reversed_move = amo.search([('reversed_entry_id', 'in', moves.ids)], limit=1)
|
||||||
|
if reversed_move:
|
||||||
|
raise UserError(_(
|
||||||
|
"Move '%s' has already been reversed by move '%s'.") % (
|
||||||
|
reversed_move.reversed_entry_id.display_name,
|
||||||
|
reversed_move.display_name))
|
||||||
|
return res
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright 2021 Akretion France (http://www.akretion.com/)
|
Copyright 2021-2022 Akretion France (http://www.akretion.com/)
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
-->
|
-->
|
||||||
@@ -14,10 +14,9 @@ So, in the view, the date should be BEFORE the amount -->
|
|||||||
<field name="inherit_id" ref="account.view_account_payment_register_form"/>
|
<field name="inherit_id" ref="account.view_account_payment_register_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<label for="amount" position="before">
|
<label for="amount" position="before">
|
||||||
<field name="payment_date" position="move"/>
|
<field name="payment_date" position="move"/>
|
||||||
</label>
|
</label>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
@@ -1 +1 @@
|
|||||||
from . import company
|
from . import models
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
# Copyright 2014-2020 Akretion (http://www.akretion.com)
|
# Copyright 2014-2022 Akretion (http://www.akretion.com)
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Base Company Extension',
|
'name': 'Base Company Extension',
|
||||||
'version': '14.0.1.0.0',
|
'version': '16.0.1.0.0',
|
||||||
'category': 'Partner',
|
'category': 'Partner',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'summary': 'Adds capital and title on company',
|
'summary': 'Adds capital and title on company',
|
||||||
'author': 'Akretion',
|
'author': 'Akretion',
|
||||||
'website': 'http://www.akretion.com',
|
'website': 'https://github.com/akretion/odoo-usability',
|
||||||
# I depend on base_usability only for _report_company_legal_name()
|
# I depend on base_usability only for _report_company_legal_name()
|
||||||
'depends': ['base_usability'],
|
'depends': ['base_usability'],
|
||||||
'data': ['company_view.xml'],
|
'data': ['views/res_company.xml'],
|
||||||
'installable': True,
|
'installable': True,
|
||||||
}
|
}
|
||||||
|
|||||||
1
base_company_extension/models/__init__.py
Normal file
1
base_company_extension/models/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
from . import res_company
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright 2014-2020 Akretion (http://www.akretion.com)
|
# Copyright 2014-2022 Akretion (http://www.akretion.com)
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user