Skip to content

Commit 4c10960

Browse files
committed
[16.0][ADD] base_company_legal_info
1 parent 1cdcb71 commit 4c10960

21 files changed

Lines changed: 939 additions & 0 deletions

base_company_legal_info/README.rst

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
================================
2+
Base - Company Legal Information
3+
================================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:e353c532a4e020f6139beaabba46a080aa588f8cc34354c7d62c742c568daf8c
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmulti--company-lightgray.png?logo=github
20+
:target: https://github.com/OCA/multi-company/tree/16.0/base_company_legal_info
21+
:alt: OCA/multi-company
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/multi-company-16-0/multi-company-16-0-base_company_legal_info
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/multi-company&target_branch=16.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This module adds legal fields on companies :
32+
33+
* ``legal_name`` : Also called 'Official Name' or 'Business Name', used
34+
in official documents
35+
36+
* ``legal_type`` : to mention the juricial form of the company :
37+
Ltd ('Limited company' in many countries),
38+
SARL ('Société Anonyme à Responsabilité Limitée' in France),
39+
GmbH ('Gesellschaft mit beschränkter Haftung' in germany, Austria),
40+
etc.
41+
42+
With that design, you can now use the ``name`` field for the Trade name
43+
of your companies.
44+
45+
**Table of contents**
46+
47+
.. contents::
48+
:local:
49+
50+
Configuration
51+
=============
52+
53+
* go to the company form view and set the new information.
54+
55+
.. figure:: https://raw.githubusercontent.com/OCA/multi-company/16.0/base_company_legal_info/static/description/res_company_form.jpeg
56+
57+
* The new informations are now available in the external Layout
58+
background used for official reports. (quotation, invoices, etc.)
59+
60+
.. figure:: https://raw.githubusercontent.com/OCA/multi-company/16.0/base_company_legal_info/static/description/report_layout_footer.png
61+
62+
If you create your custom report, you can call the new computed field
63+
``report_legal_description``
64+
65+
Bug Tracker
66+
===========
67+
68+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/multi-company/issues>`_.
69+
In case of trouble, please check there if your issue has already been reported.
70+
If you spotted it first, help us to smash it by providing a detailed and welcomed
71+
`feedback <https://github.com/OCA/multi-company/issues/new?body=module:%20base_company_legal_info%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
72+
73+
Do not contact contributors directly about support or help with technical issues.
74+
75+
Credits
76+
=======
77+
78+
Authors
79+
~~~~~~~
80+
81+
* Akretion
82+
* GRAP
83+
84+
Contributors
85+
~~~~~~~~~~~~
86+
87+
* Alexis DE LATTRE <alexis.delattre@akretion.com>
88+
* Sylvain LE GAL <https://twitter.com/legalsylvain>
89+
* Quentin DUPONT <quentin.dupont@grap.coop>
90+
91+
Maintainers
92+
~~~~~~~~~~~
93+
94+
This module is maintained by the OCA.
95+
96+
.. image:: https://odoo-community.org/logo.png
97+
:alt: Odoo Community Association
98+
:target: https://odoo-community.org
99+
100+
OCA, or the Odoo Community Association, is a nonprofit organization whose
101+
mission is to support the collaborative development of Odoo features and
102+
promote its widespread use.
103+
104+
.. |maintainer-legalsylvain| image:: https://github.com/legalsylvain.png?size=40px
105+
:target: https://github.com/legalsylvain
106+
:alt: legalsylvain
107+
.. |maintainer-quentinDupont| image:: https://github.com/quentinDupont.png?size=40px
108+
:target: https://github.com/quentinDupont
109+
:alt: quentinDupont
110+
111+
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
112+
113+
|maintainer-legalsylvain| |maintainer-quentinDupont|
114+
115+
This module is part of the `OCA/multi-company <https://github.com/OCA/multi-company/tree/16.0/base_company_legal_info>`_ project on GitHub.
116+
117+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# © 2014-2016 Akretion (http://www.akretion.com)
2+
# Copyright (C) 2018 - Today: GRAP (http://www.grap.coop)
3+
# @author Alexis de Lattre <alexis.delattre@akretion.com>
4+
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
5+
# @author: Quentin DUPONT (quentin.dupont@grap.coop)
6+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
7+
8+
{
9+
"name": "Base - Company Legal Information",
10+
"version": "16.0.1.0.0",
11+
"category": "Tools",
12+
"license": "AGPL-3",
13+
"summary": "Adds Legal informations on company model",
14+
"author": "Akretion,GRAP,Odoo Community Association (OCA)",
15+
"maintainers": ["legalsylvain", "quentinDupont"],
16+
"website": "https://github.com/OCA/multi-company",
17+
"depends": [
18+
"web",
19+
],
20+
"data": [
21+
"views/view_res_company.xml",
22+
"views/external_layout_footer.xml",
23+
],
24+
"demo": [
25+
"demo/res_groups.xml",
26+
"demo/res_company.xml",
27+
],
28+
"installable": True,
29+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<!--
3+
Copyright (C) 2018 - Today: GRAP (http://www.grap.coop)
4+
@author: Sylvain LE GAL (https://twitter.com/legalsylvain)
5+
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
6+
-->
7+
<odoo>
8+
9+
<record id="company_grap" model="res.company">
10+
<field name="name">GRAP</field>
11+
<field
12+
name="legal_name"
13+
>GRAP, Groupement Régional Alimentaire de Proximité</field>
14+
<field name="legal_type">SA coopérative à conseil d'administration</field>
15+
<field name="street">3, grande rue des feuillants</field>
16+
<field name="zip">69001</field>
17+
<field name="city">Lyon</field>
18+
<field name="website">https://www.grap.coop/</field>
19+
<field name="phone">+33 9 72 32 33 17</field>
20+
<field name="email">contact@grap.coop</field>
21+
</record>
22+
23+
<record id="company_akretion" model="res.company">
24+
<field name="name">Akretion Coop</field>
25+
<field name="legal_name">AKRETION FRANCE</field>
26+
<field
27+
name="legal_type"
28+
>Société coopérative exploitée sous forme de SARL</field>
29+
<field name="street">27, rue Henri Rolland</field>
30+
<field name="zip">69100</field>
31+
<field name="city">Villeurbanne</field>
32+
<field name="website">https://akretion.com/fr</field>
33+
<field name="phone">+33 4 82 53 84 57</field>
34+
<field name="email">contact@akretion.com</field>
35+
</record>
36+
37+
<record id="base.main_company" model="res.company">
38+
<field name="legal_name">Your Legal Name</field>
39+
<field name="legal_type">Your Legal Type</field>
40+
</record>
41+
42+
</odoo>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<!--
3+
Copyright (C) 2018 - Today: GRAP (http://www.grap.coop)
4+
@author: Sylvain LE GAL (https://twitter.com/legalsylvain)
5+
@author: Quentin DUPONT (quentin.dupont@grap.coop)
6+
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
7+
-->
8+
<odoo>
9+
10+
<record id="base.group_no_one" model="res.groups">
11+
<field name="users" eval="[(4, ref('base.user_admin'))]" />
12+
</record>
13+
14+
</odoo>

base_company_legal_info/i18n/fr.po

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * base_company_legal_info
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 12.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"POT-Creation-Date: 2019-07-17 13:45+0000\n"
10+
"PO-Revision-Date: 2019-07-17 13:45+0000\n"
11+
"Last-Translator: <>\n"
12+
"Language-Team: \n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: \n"
17+
18+
#. module: base_company_legal_info
19+
#: code:addons/base_company_legal_info/models/res_company.py:33
20+
#, python-format
21+
msgid "%s, %s"
22+
msgstr "%s, %s"
23+
24+
#. module: base_company_legal_info
25+
#: model:ir.model.fields,help:base_company_legal_info.field_res_company__legal_name
26+
msgid "Also called 'Business Name'.\n"
27+
" Set the official name of the company, and in the regular 'name' field, the Trade name of the company."
28+
msgstr "Aussi appelé 'Nom de la société'.\n"
29+
" Définissez le nom officiel de l'entreprise, et dans le champ 'nom' habituel, le nom commercial de l'entreprise."
30+
31+
#. module: base_company_legal_info
32+
#: model:ir.model,name:base_company_legal_info.model_res_company
33+
msgid "Companies"
34+
msgstr "Sociétés"
35+
36+
#. module: base_company_legal_info
37+
#: model:res.company,overdue_msg:base_company_legal_info.company_akretion
38+
#: model:res.company,overdue_msg:base_company_legal_info.company_grap
39+
msgid "Dear Sir/Madam,\n"
40+
"\n"
41+
"Our records indicate that some payments on your account are still due. Please find details below.\n"
42+
"If the amount has already been paid, please disregard this notice. Otherwise, please forward us the total amount stated below.\n"
43+
"If you have any queries regarding your account, Please contact us.\n"
44+
"\n"
45+
"Thank you in advance for your cooperation.\n"
46+
"Best Regards,"
47+
msgstr "Cher Madame/Monsieur,\n"
48+
"\n"
49+
"Nos dossiers indiquent que certains paiements sur votre compte sont encore dus. Veuillez trouver les détails ci-dessous.\n"
50+
"Si le montant a déjà été payé, veuillez ne pas tenir compte de cet avis. Sinon, veuillez nous faire parvenir le montant total indiqué ci-dessous.\n"
51+
"Si vous avez des questions concernant votre compte, veuillez nous contacter.\n"
52+
"\n"
53+
"Merci d'avance pour votre coopération.\n"
54+
"Meilleures salutations,"
55+
56+
#. module: base_company_legal_info
57+
#: model:ir.model.fields,field_description:base_company_legal_info.field_res_company__legal_name
58+
msgid "Legal Name"
59+
msgstr "Dénomination sociale"
60+
61+
#. module: base_company_legal_info
62+
#: model:ir.model.fields,field_description:base_company_legal_info.field_res_company__legal_type
63+
msgid "Legal Type"
64+
msgstr "Type juridique"
65+
66+
#. module: base_company_legal_info
67+
#: model:ir.model.fields,field_description:base_company_legal_info.field_res_company__report_legal_description
68+
msgid "Report Legal Description"
69+
msgstr "Description juridique pour les rapports"
70+
71+
#. module: base_company_legal_info
72+
#: model:ir.model.fields,help:base_company_legal_info.field_res_company__legal_type
73+
msgid "Type of Company, e.g. Ltd., SARL, GmbH ..."
74+
msgstr "Type d'entreprise, ex. SARL, SCOP, SCIC ..."
75+
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from . import base_document_layout
2+
from . import res_company
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# © 2014-2016 Akretion (http://www.akretion.com)
2+
# Copyright (C) 2018 - Today: GRAP (http://www.grap.coop)
3+
# @author Alexis de Lattre <alexis.delattre@akretion.com>
4+
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
5+
# @author: Quentin DUPONT
6+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
7+
8+
from odoo import fields, models
9+
10+
11+
class BaseDocumentLayout(models.TransientModel):
12+
_inherit = "base.document.layout"
13+
14+
report_legal_description = fields.Char(
15+
related="company_id.report_legal_description", readonly=True
16+
)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# © 2014-2016 Akretion (http://www.akretion.com)
2+
# Copyright (C) 2018 - Today: GRAP (http://www.grap.coop)
3+
# @author Alexis de Lattre <alexis.delattre@akretion.com>
4+
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
5+
# @author: Quentin DUPONT
6+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
7+
8+
from odoo import _, api, fields, models
9+
10+
11+
class ResCompany(models.Model):
12+
_inherit = "res.company"
13+
14+
legal_name = fields.Char(
15+
help="Also called 'Business Name'.\n"
16+
"Set the official name of the company, and in the "
17+
"regular 'name' field, the Trade name of the company.",
18+
)
19+
20+
legal_type = fields.Char(help="Type of Company, e.g. Ltd., SARL, GmbH ...")
21+
22+
report_legal_description = fields.Char(
23+
compute="_compute_report_legal_description",
24+
)
25+
26+
@api.depends("name", "legal_name", "legal_type")
27+
def _compute_report_legal_description(self):
28+
for company in self:
29+
name = company.legal_name or company.name
30+
if not company.legal_type:
31+
company.report_legal_description = name
32+
else:
33+
company.report_legal_description = _(f"{name}, {company.legal_type}")
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
* go to the company form view and set the new information.
2+
3+
.. figure:: ../static/description/res_company_form.jpeg
4+
5+
* The new informations are now available in the external Layout
6+
background used for official reports. (quotation, invoices, etc.)
7+
8+
.. figure:: ../static/description/report_layout_footer.png
9+
10+
If you create your custom report, you can call the new computed field
11+
``report_legal_description``

0 commit comments

Comments
 (0)