Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 117 additions & 0 deletions base_company_legal_info/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
================================
Base - Company Legal Information
================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e353c532a4e020f6139beaabba46a080aa588f8cc34354c7d62c742c568daf8c
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmulti--company-lightgray.png?logo=github
:target: https://github.com/OCA/multi-company/tree/16.0/base_company_legal_info
:alt: OCA/multi-company
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/multi-company-16-0/multi-company-16-0-base_company_legal_info
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/multi-company&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module adds legal fields on companies :

* ``legal_name`` : Also called 'Official Name' or 'Business Name', used
in official documents

* ``legal_type`` : to mention the juricial form of the company :
Ltd ('Limited company' in many countries),
SARL ('Société Anonyme à Responsabilité Limitée' in France),
GmbH ('Gesellschaft mit beschränkter Haftung' in germany, Austria),
etc.

With that design, you can now use the ``name`` field for the Trade name
of your companies.

**Table of contents**

.. contents::
:local:

Configuration
=============

* go to the company form view and set the new information.

.. figure:: https://raw.githubusercontent.com/OCA/multi-company/16.0/base_company_legal_info/static/description/res_company_form.jpeg

* The new informations are now available in the external Layout
background used for official reports. (quotation, invoices, etc.)

.. figure:: https://raw.githubusercontent.com/OCA/multi-company/16.0/base_company_legal_info/static/description/report_layout_footer.png

If you create your custom report, you can call the new computed field
``report_legal_description``

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/multi-company/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`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**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Akretion
* GRAP

Contributors
~~~~~~~~~~~~

* Alexis DE LATTRE <alexis.delattre@akretion.com>
* Sylvain LE GAL <https://twitter.com/legalsylvain>
* Quentin DUPONT <quentin.dupont@grap.coop>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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.

.. |maintainer-legalsylvain| image:: https://github.com/legalsylvain.png?size=40px
:target: https://github.com/legalsylvain
:alt: legalsylvain
.. |maintainer-quentinDupont| image:: https://github.com/quentinDupont.png?size=40px
:target: https://github.com/quentinDupont
:alt: quentinDupont

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-legalsylvain| |maintainer-quentinDupont|

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.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions base_company_legal_info/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
29 changes: 29 additions & 0 deletions base_company_legal_info/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# © 2014-2016 Akretion (http://www.akretion.com)
# Copyright (C) 2018 - Today: GRAP (http://www.grap.coop)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# @author: Quentin DUPONT (quentin.dupont@grap.coop)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Base - Company Legal Information",
"version": "16.0.1.0.0",
"category": "Tools",
"license": "AGPL-3",
"summary": "Adds Legal informations on company model",
"author": "Akretion,GRAP,Odoo Community Association (OCA)",
"maintainers": ["legalsylvain", "quentinDupont"],
"website": "https://github.com/OCA/multi-company",
"depends": [
"web",
],
"data": [
"views/view_res_company.xml",
"views/external_layout_footer.xml",
],
"demo": [
"demo/res_groups.xml",
"demo/res_company.xml",
],
"installable": True,
}
42 changes: 42 additions & 0 deletions base_company_legal_info/demo/res_company.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright (C) 2018 - Today: GRAP (http://www.grap.coop)
@author: Sylvain LE GAL (https://twitter.com/legalsylvain)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>

<record id="company_grap" model="res.company">
<field name="name">GRAP</field>
<field
name="legal_name"
>GRAP, Groupement Régional Alimentaire de Proximité</field>
<field name="legal_type">SA coopérative à conseil d'administration</field>
<field name="street">3, grande rue des feuillants</field>
<field name="zip">69001</field>
<field name="city">Lyon</field>
<field name="website">https://www.grap.coop/</field>
<field name="phone">+33 9 72 32 33 17</field>
<field name="email">contact@grap.coop</field>
</record>

<record id="company_akretion" model="res.company">
<field name="name">Akretion Coop</field>
<field name="legal_name">AKRETION FRANCE</field>
<field
name="legal_type"
>Société coopérative exploitée sous forme de SARL</field>
<field name="street">27, rue Henri Rolland</field>
<field name="zip">69100</field>
<field name="city">Villeurbanne</field>
<field name="website">https://akretion.com/fr</field>
<field name="phone">+33 4 82 53 84 57</field>
<field name="email">contact@akretion.com</field>
</record>

<record id="base.main_company" model="res.company">
<field name="legal_name">Your Legal Name</field>
<field name="legal_type">Your Legal Type</field>
</record>

</odoo>
14 changes: 14 additions & 0 deletions base_company_legal_info/demo/res_groups.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright (C) 2018 - Today: GRAP (http://www.grap.coop)
@author: Sylvain LE GAL (https://twitter.com/legalsylvain)
@author: Quentin DUPONT (quentin.dupont@grap.coop)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>

<record id="base.group_no_one" model="res.groups">
<field name="users" eval="[(4, ref('base.user_admin'))]" />
</record>

</odoo>
75 changes: 75 additions & 0 deletions base_company_legal_info/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * base_company_legal_info
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-07-17 13:45+0000\n"
"PO-Revision-Date: 2019-07-17 13:45+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: base_company_legal_info
#: code:addons/base_company_legal_info/models/res_company.py:33
#, python-format
msgid "%s, %s"
msgstr "%s, %s"

#. module: base_company_legal_info
#: model:ir.model.fields,help:base_company_legal_info.field_res_company__legal_name
msgid "Also called 'Business Name'.\n"
" Set the official name of the company, and in the regular 'name' field, the Trade name of the company."
msgstr "Aussi appelé 'Nom de la société'.\n"
" Définissez le nom officiel de l'entreprise, et dans le champ 'nom' habituel, le nom commercial de l'entreprise."

#. module: base_company_legal_info
#: model:ir.model,name:base_company_legal_info.model_res_company
msgid "Companies"
msgstr "Sociétés"

#. module: base_company_legal_info
#: model:res.company,overdue_msg:base_company_legal_info.company_akretion
#: model:res.company,overdue_msg:base_company_legal_info.company_grap
msgid "Dear Sir/Madam,\n"
"\n"
"Our records indicate that some payments on your account are still due. Please find details below.\n"
"If the amount has already been paid, please disregard this notice. Otherwise, please forward us the total amount stated below.\n"
"If you have any queries regarding your account, Please contact us.\n"
"\n"
"Thank you in advance for your cooperation.\n"
"Best Regards,"
msgstr "Cher Madame/Monsieur,\n"
"\n"
"Nos dossiers indiquent que certains paiements sur votre compte sont encore dus. Veuillez trouver les détails ci-dessous.\n"
"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"
"Si vous avez des questions concernant votre compte, veuillez nous contacter.\n"
"\n"
"Merci d'avance pour votre coopération.\n"
"Meilleures salutations,"

#. module: base_company_legal_info
#: model:ir.model.fields,field_description:base_company_legal_info.field_res_company__legal_name
msgid "Legal Name"
msgstr "Dénomination sociale"

#. module: base_company_legal_info
#: model:ir.model.fields,field_description:base_company_legal_info.field_res_company__legal_type
msgid "Legal Type"
msgstr "Type juridique"

#. module: base_company_legal_info
#: model:ir.model.fields,field_description:base_company_legal_info.field_res_company__report_legal_description
msgid "Report Legal Description"
msgstr "Description juridique pour les rapports"

#. module: base_company_legal_info
#: model:ir.model.fields,help:base_company_legal_info.field_res_company__legal_type
msgid "Type of Company, e.g. Ltd., SARL, GmbH ..."
msgstr "Type d'entreprise, ex. SARL, SCOP, SCIC ..."

2 changes: 2 additions & 0 deletions base_company_legal_info/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import base_document_layout
from . import res_company
16 changes: 16 additions & 0 deletions base_company_legal_info/models/base_document_layout.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# © 2014-2016 Akretion (http://www.akretion.com)
# Copyright (C) 2018 - Today: GRAP (http://www.grap.coop)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# @author: Quentin DUPONT
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models


class BaseDocumentLayout(models.TransientModel):
_inherit = "base.document.layout"

report_legal_description = fields.Char(
related="company_id.report_legal_description", readonly=True
)
33 changes: 33 additions & 0 deletions base_company_legal_info/models/res_company.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# © 2014-2016 Akretion (http://www.akretion.com)
# Copyright (C) 2018 - Today: GRAP (http://www.grap.coop)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# @author: Quentin DUPONT
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import _, api, fields, models


class ResCompany(models.Model):
_inherit = "res.company"

legal_name = fields.Char(
help="Also called 'Business Name'.\n"
"Set the official name of the company, and in the "
"regular 'name' field, the Trade name of the company.",
)

legal_type = fields.Char(help="Type of Company, e.g. Ltd., SARL, GmbH ...")

report_legal_description = fields.Char(
compute="_compute_report_legal_description",
)

@api.depends("name", "legal_name", "legal_type")
def _compute_report_legal_description(self):
for company in self:
name = company.legal_name or company.name
if not company.legal_type:
company.report_legal_description = name
else:
company.report_legal_description = _(f"{name}, {company.legal_type}")
11 changes: 11 additions & 0 deletions base_company_legal_info/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
* go to the company form view and set the new information.

.. figure:: ../static/description/res_company_form.jpeg

* The new informations are now available in the external Layout
background used for official reports. (quotation, invoices, etc.)

.. figure:: ../static/description/report_layout_footer.png

If you create your custom report, you can call the new computed field
``report_legal_description``
3 changes: 3 additions & 0 deletions base_company_legal_info/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* Alexis DE LATTRE <alexis.delattre@akretion.com>
* Sylvain LE GAL <https://twitter.com/legalsylvain>
* Quentin DUPONT <quentin.dupont@grap.coop>
13 changes: 13 additions & 0 deletions base_company_legal_info/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
This module adds legal fields on companies :

* ``legal_name`` : Also called 'Official Name' or 'Business Name', used
in official documents

* ``legal_type`` : to mention the juricial form of the company :
Ltd ('Limited company' in many countries),
SARL ('Société Anonyme à Responsabilité Limitée' in France),
GmbH ('Gesellschaft mit beschränkter Haftung' in germany, Austria),
etc.

With that design, you can now use the ``name`` field for the Trade name
of your companies.
Loading