-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
11.0 l10n_be_coa_multilang & prereqs
- Loading branch information
1 parent
d922533
commit bd5c113
Showing
113 changed files
with
20,416 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png | ||
:target: https://www.gnu.org/licenses/agpl | ||
:alt: License: AGPL-3 | ||
|
||
================ | ||
account tag code | ||
================ | ||
|
||
This module adds a 'code' field to account tags in order to facilitate the | ||
construction of accounting reports (e.g. with the OCA mis_builder module). | ||
|
||
Installation | ||
============ | ||
|
||
There is no specific installation procedure for this module. | ||
|
||
Configuration and Usage | ||
======================= | ||
|
||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas | ||
:alt: Try me on Runbot | ||
:target: https://runbot.odoo-community.org/runbot/92/11.0 | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/OCA/account-financial-tools/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. | ||
|
||
Credits | ||
======= | ||
|
||
Contributors | ||
------------ | ||
|
||
* Luc De Meyer <[email protected]> | ||
|
||
Maintainer | ||
---------- | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
This module is maintained by the OCA. | ||
|
||
OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
To contribute to this module, please visit http://odoo-community.org. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright 2009-2018 Noviat. | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
'name': 'account tag code', | ||
'version': '11.0.1.0.0', | ||
'category': 'Accounting & Finance', | ||
'summary': """ | ||
Add 'code' field to account tags | ||
""", | ||
'author': 'Noviat,' | ||
'Odoo Community Association (OCA)', | ||
'website': 'https://github.com/OCA/account-financial-tools', | ||
'depends': [ | ||
'account', | ||
], | ||
'data': [ | ||
'views/account_account_tag.xml', | ||
], | ||
'installable': True, | ||
'license': 'AGPL-3', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import account_account_tag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Copyright 2009-2018 Noviat. | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import api, fields, models | ||
from odoo.osv.expression import NEGATIVE_TERM_OPERATORS | ||
|
||
|
||
class AccountAccountTag(models.Model): | ||
_inherit = 'account.account.tag' | ||
|
||
code = fields.Char() | ||
|
||
@api.model | ||
def name_search(self, name, args=None, operator='ilike', limit=100): | ||
args = args or [] | ||
domain = [] | ||
if name: | ||
domain = ['|', | ||
('code', '=ilike', name + '%'), | ||
('name', operator, name)] | ||
if operator in NEGATIVE_TERM_OPERATORS: | ||
domain = ['&', '!'] + domain[1:] | ||
tags = self.search(domain + args, limit=limit) | ||
return tags.name_get() | ||
|
||
@api.multi | ||
@api.depends('name', 'code') | ||
def name_get(self): | ||
result = [] | ||
for tag in self: | ||
if tag.code: | ||
name = ' - '.join([tag.code, tag.name]) | ||
result.append((tag.id, name)) | ||
return result |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<odoo> | ||
|
||
<record id="account_account_tag_view_search" model="ir.ui.view"> | ||
<field name="name">account.account.tag.search</field> | ||
<field name="model">account.account.tag</field> | ||
<field name="arch" type="xml"> | ||
<search string="Account Tags"> | ||
<field name="name" | ||
filter_domain="['|', ('name', 'ilike', self), ('code', '=like', str(self) + '%')]" | ||
string="Account Tag"/> | ||
<filter string="Accounts" domain="[('applicability', '=', 'accounts')]"/> | ||
<filter string="Taxes" domain="[('applicability', '=', 'taxes')]"/> | ||
</search> | ||
</field> | ||
</record> | ||
|
||
<record id="account_tag_view_form" model="ir.ui.view"> | ||
<field name="name">account.account.tag.form</field> | ||
<field name="model">account.account.tag</field> | ||
<field name="inherit_id" ref="account.account_tag_view_form"/> | ||
<field name="arch" type="xml"> | ||
<field name="name" position="after"> | ||
<field name="code"/> | ||
</field> | ||
</field> | ||
</record> | ||
|
||
<record id="account_account_tag_view_tree" model="ir.ui.view"> | ||
<field name="name">account.account.tag.tree</field> | ||
<field name="model">account.account.tag</field> | ||
<field name="arch" type="xml"> | ||
<tree string="Account tags"> | ||
<field name="name"/> | ||
<field name="code"/> | ||
<field name="applicability"/> | ||
</tree> | ||
</field> | ||
</record> | ||
|
||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png | ||
:target: https://www.gnu.org/licenses/agpl | ||
:alt: License: AGPL-3 | ||
|
||
=================================== | ||
Allow cancel of zero value invoices | ||
=================================== | ||
|
||
This module adds the 'Cancel' button on zero value invoices | ||
so that these can be cancelled and corrected via 'Set to Draft'. | ||
|
||
Installation | ||
============ | ||
|
||
There is no specific installation procedure for this module. | ||
|
||
Configuration and Usage | ||
======================= | ||
|
||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas | ||
:alt: Try me on Runbot | ||
:target: https://runbot.odoo-community.org/runbot/95/11.0 | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/OCA/account-invoicing/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. | ||
|
||
Credits | ||
======= | ||
|
||
Contributors | ||
------------ | ||
|
||
* Luc De Meyer <[email protected]> | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Maintainer | ||
---------- | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
This module is maintained by the OCA. | ||
|
||
OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
To contribute to this module, please visit http://odoo-community.org. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copyright 2009-2018 Noviat. | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
'name': 'Allow cancel of zero value invoices', | ||
'summary': 'Allow cancel of zero value invoices', | ||
'version': '11.0.1.0.0', | ||
'category': 'Accounting & Finance', | ||
'website': 'https://github.com/OCA/account-invoicing', | ||
'author': 'Noviat,' | ||
'Odoo Community Association (OCA)', | ||
'license': 'AGPL-3', | ||
'installable': True, | ||
'depends': [ | ||
'account_cancel', | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import account_invoice |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Copyright 2009-2018 Noviat. | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from lxml import etree | ||
|
||
from odoo import api, models | ||
|
||
|
||
class AccountInvoice(models.Model): | ||
_inherit = 'account.invoice' | ||
|
||
@api.model | ||
def fields_view_get(self, view_id=None, view_type='form', | ||
toolbar=False, submenu=False): | ||
res = super().fields_view_get( | ||
view_id=view_id, view_type=view_type, toolbar=toolbar, | ||
submenu=submenu) | ||
if view_type == 'form': | ||
doc = etree.XML(res['arch']) | ||
nodes = doc.xpath("//button[@name='action_invoice_cancel']") | ||
for node in nodes: | ||
node.attrib.pop('states', None) | ||
node.set( | ||
'modifiers', | ||
'{"invisible": ' | ||
'["|", ["state", "=", "cancel"], ' | ||
'"&", ["state", "=", "paid"], ["amount_total", "!=", 0]]}' | ||
) | ||
res['arch'] = etree.tostring(doc) | ||
return res | ||
|
||
@api.multi | ||
def action_invoice_cancel(self): | ||
for inv in self: | ||
if inv.state == 'paid' \ | ||
and inv.currency_id.is_zero(inv.amount_total): | ||
inv.action_cancel() | ||
else: | ||
super(AccountInvoice, inv).action_invoice_cancel() | ||
return True |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import test_invoice_zero_cancel |
14 changes: 14 additions & 0 deletions
14
account_invoice_zero_cancel/tests/test_invoice_zero_cancel.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Copyright 2009-2018 Noviat. | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo.tests.common import TransactionCase | ||
|
||
|
||
class TestInvoiceZeroCancel(TransactionCase): | ||
|
||
def setUp(self): | ||
super(TestInvoiceZeroCancel, self).setUp() | ||
|
||
def test_invoice_zero_cancel(self): | ||
# TODO: add unit test | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
# -*- coding: utf-8 -*- | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
from . import account_invoice_tax | ||
from . import account_tax | ||
from . import account_tax_template |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png | ||
:target: https://www.gnu.org/licenses/agpl | ||
:alt: License: AGPL-3 | ||
|
||
============================ | ||
Monolingual General Accounts | ||
============================ | ||
|
||
This module adds on option to the Accounting Settings allowing to set translate=False | ||
on the General Account (account.account) name field | ||
and hence neutralise undesired multilingual account names provoked by | ||
the localisation modules that depend on l10n_multilang (e.g. l10n_be, l10n_ch). | ||
|
||
Installation | ||
============ | ||
|
||
The 'l10n_account_translate_off' module must available in your addons path. | ||
|
||
Usage | ||
===== | ||
|
||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas | ||
:alt: Try me on Runbot | ||
:target: https://runbot.odoo-community.org/runbot/92/11.0 | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/OCA/{project_repo}/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. | ||
|
||
Credits | ||
======= | ||
|
||
Contributors | ||
------------ | ||
|
||
* Luc De Meyer, Noviat <[email protected]> | ||
|
||
Maintainer | ||
---------- | ||
.. image:: http://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: http://odoo-community.org | ||
|
||
This module is maintained by the OCA. | ||
|
||
OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
To contribute to this module, please visit http://odoo-community.org. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright 2009-2018 Noviat | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
'name': 'Monolingual General Account config', | ||
'version': '11.0.1.0.0', | ||
'category': 'Accounting & Finance', | ||
'website': 'http://odoo-community.org', | ||
'author': 'Noviat, Odoo Community Association (OCA)', | ||
'license': 'AGPL-3', | ||
'installable': True, | ||
'depends': [ | ||
'account', | ||
], | ||
'data': [ | ||
'views/res_config_settings.xml', | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import res_config_settings |
Oops, something went wrong.