Skip to content

Commit

Permalink
[14.0][ADD] sale_certificat_typology
Browse files Browse the repository at this point in the history
  • Loading branch information
chafique-delli committed Sep 20, 2023
1 parent 0fe6c8e commit 82a5635
Show file tree
Hide file tree
Showing 21 changed files with 1,233 additions and 0 deletions.
79 changes: 79 additions & 0 deletions sale_certificat_typology/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
=========================
Sale Certificat Typology
=========================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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%2Fsale--workflow-lightgray.png?logo=github
:target: https://github.com/OCA/sale-workflow/tree/14.0/sale_certificat_typology
:alt: OCA/sale-workflow
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_certificat_typology
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/99/14.0
:alt: Try me on Runbot

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

This module allows:
- to indicate on a product, the certificate necessary to be authorized to purchase it (eg professional card).
- to display on an order, the certificates necessary to confirm the order.
- to check and display a warning on the sale order if one of the products requires certificat.


**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-workflow/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_certificat_typology%0Aversion:%2014.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

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

* `Akretion <https://www.akretion.com>`_

* Chafique Delli <[email protected]>

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.

This module is part of the `OCA/sale-workflow <https://github.com/OCA/sale-workflow/tree/14.0/sale_certificat_typology>`_ 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 sale_certificat_typology/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
22 changes: 22 additions & 0 deletions sale_certificat_typology/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2023 Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Sale Certificat Typology",
"version": "14.0.1.0.0",
"category": "Sales Management",
"website": "https://github.com/akretion/ak-odoo-incubator",
"author": "Akretion, Odoo Community Association (OCA)",
"license": "AGPL-3",
"depends": [
"sale",
],
"data": [
"security/ir.model.access.csv",
"views/sale_order.xml",
"views/product.xml",
"views/certificat_typology.xml",
"data/ir_cron_data.xml",
],
"installable": True,
}
18 changes: 18 additions & 0 deletions sale_certificat_typology/data/ir_cron_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<odoo noupdate="1">
<record
forcecreate="True"
id="certificat_items_delete_documents_stored"
model="ir.cron"
>
<field name="name">Certificats: Deleted the documents that are stored</field>
<field name="user_id" ref="base.user_root" />
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="active">0</field>
<field name="numbercall">-1</field>
<field name="doall">1</field>
<field name="model_id" ref="model_sale_order_certificat_item" />
<field name="state">code</field>
<field name="code">model._delete_documents_stored()</field>
</record>
</odoo>
245 changes: 245 additions & 0 deletions sale_certificat_typology/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,245 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_certificat_typology
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-20 18:03+0000\n"
"PO-Revision-Date: 2023-09-20 18:03+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: sale_certificat_typology
#: model_terms:ir.ui.view,arch_db:sale_certificat_typology.view_order_form
msgid ""
"<i class=\"fa fa-info-circle\"/>\n"
" &amp;nbsp;"
msgstr ""

#. module: sale_certificat_typology
#: model_terms:ir.ui.view,arch_db:sale_certificat_typology.view_certificat_typology_form
msgid ""
"<span attrs=\"{'invisible': [('automatic_deletion', '=', 'none')]}\"> days "
"</span>"
msgstr ""
"<span attrs=\"{'invisible': [('automatic_deletion', '=', 'none')]}\"> jours "
"</span>"

#. module: sale_certificat_typology
#: model:ir.model.fields,field_description:sale_certificat_typology.field_certificat_typology__automatic_deletion
msgid "Automatic deletion"
msgstr "Suppression automatique"

#. module: sale_certificat_typology
#: model:ir.model.fields,field_description:sale_certificat_typology.field_sale_order_certificat_item__certificat
msgid "Certificat"
msgstr "Justificatifs"

#. module: sale_certificat_typology
#: model_terms:ir.ui.view,arch_db:sale_certificat_typology.view_order_form
msgid "Certificat Items"
msgstr "Justificatifs"

#. module: sale_certificat_typology
#: model:ir.model,name:sale_certificat_typology.model_sale_order_certificat_item
msgid "Certificat Items in Sale Order"
msgstr "Les justificatifs dans une commande de vente"

#. module: sale_certificat_typology
#: model:ir.model,name:sale_certificat_typology.model_certificat_typology
msgid "Certificat Typology"
msgstr "Types de justificatifs"

#. module: sale_certificat_typology
#: model:ir.model.fields,field_description:sale_certificat_typology.field_sale_order__certificat_item_ids
msgid "Certificat items"
msgstr "Justificatifs"

#. module: sale_certificat_typology
#: model:ir.actions.act_window,name:sale_certificat_typology.action_certificat_typology_form
#: model:ir.model.fields,field_description:sale_certificat_typology.field_sale_order_certificat_item__certificat_typology_id
#: model:ir.ui.menu,name:sale_certificat_typology.menu_action_certificat_typology_form
#: model_terms:ir.ui.view,arch_db:sale_certificat_typology.view_certificat_typology_form
#: model_terms:ir.ui.view,arch_db:sale_certificat_typology.view_certificat_typology_tree
msgid "Certificat typology"
msgstr "Types de justificatifs"

#. module: sale_certificat_typology
#: model:ir.actions.server,name:sale_certificat_typology.certificat_items_delete_documents_stored_ir_actions_server
#: model:ir.cron,cron_name:sale_certificat_typology.certificat_items_delete_documents_stored
#: model:ir.cron,name:sale_certificat_typology.certificat_items_delete_documents_stored
msgid "Certificats: Deleted the documents that are stored"
msgstr "Justificatifs: Supprimer les documents stockés"

#. module: sale_certificat_typology
#: model:ir.model.fields,field_description:sale_certificat_typology.field_certificat_typology__company_id
#: model:ir.model.fields,field_description:sale_certificat_typology.field_sale_order_certificat_item__company_id
msgid "Company"
msgstr "Société"

#. module: sale_certificat_typology
#: model:ir.model.fields,field_description:sale_certificat_typology.field_certificat_typology__create_uid
#: model:ir.model.fields,field_description:sale_certificat_typology.field_sale_order_certificat_item__create_uid
msgid "Created by"
msgstr "Créé par"

#. module: sale_certificat_typology
#: model:ir.model.fields,field_description:sale_certificat_typology.field_certificat_typology__create_date
#: model:ir.model.fields,field_description:sale_certificat_typology.field_sale_order_certificat_item__create_date
msgid "Created on"
msgstr "Créé le"

#. module: sale_certificat_typology
#: model_terms:ir.actions.act_window,help:sale_certificat_typology.action_certificat_typology_form
msgid "Define new certificat typology"
msgstr "Définir un nouveau type de justificatif"

#. module: sale_certificat_typology
#: model:ir.model.fields,field_description:sale_certificat_typology.field_certificat_typology__description
msgid "Description"
msgstr ""

#. module: sale_certificat_typology
#: model:ir.model.fields,field_description:sale_certificat_typology.field_certificat_typology__display_name
#: model:ir.model.fields,field_description:sale_certificat_typology.field_product_product__display_name
#: model:ir.model.fields,field_description:sale_certificat_typology.field_product_template__display_name
#: model:ir.model.fields,field_description:sale_certificat_typology.field_sale_order__display_name
#: model:ir.model.fields,field_description:sale_certificat_typology.field_sale_order_certificat_item__display_name
#: model:ir.model.fields,field_description:sale_certificat_typology.field_sale_order_line__display_name
msgid "Display Name"
msgstr "Nom affiché"

#. module: sale_certificat_typology
#: model:ir.model.fields,help:sale_certificat_typology.field_certificat_typology__storage_duration
msgid "Enter the number of days to keep the document."
msgstr "Saisir le nombre de jours durant lesquels on doit stocker le document"

#. module: sale_certificat_typology
#: model:ir.model.fields,field_description:sale_certificat_typology.field_certificat_typology__id
#: model:ir.model.fields,field_description:sale_certificat_typology.field_product_product__id
#: model:ir.model.fields,field_description:sale_certificat_typology.field_product_template__id
#: model:ir.model.fields,field_description:sale_certificat_typology.field_sale_order__id
#: model:ir.model.fields,field_description:sale_certificat_typology.field_sale_order_certificat_item__id
#: model:ir.model.fields,field_description:sale_certificat_typology.field_sale_order_line__id
msgid "ID"
msgstr ""

#. module: sale_certificat_typology
#: model:ir.model.fields,field_description:sale_certificat_typology.field_sale_order_certificat_item__certificat_is_ok
msgid "Is valid ?"
msgstr "Est valide ?"

#. module: sale_certificat_typology
#: model:ir.model.fields,field_description:sale_certificat_typology.field_certificat_typology____last_update
#: model:ir.model.fields,field_description:sale_certificat_typology.field_product_product____last_update
#: model:ir.model.fields,field_description:sale_certificat_typology.field_product_template____last_update
#: model:ir.model.fields,field_description:sale_certificat_typology.field_sale_order____last_update
#: model:ir.model.fields,field_description:sale_certificat_typology.field_sale_order_certificat_item____last_update
#: model:ir.model.fields,field_description:sale_certificat_typology.field_sale_order_line____last_update
msgid "Last Modified on"
msgstr "Dernière modification le"

#. module: sale_certificat_typology
#: model:ir.model.fields,field_description:sale_certificat_typology.field_certificat_typology__write_uid
#: model:ir.model.fields,field_description:sale_certificat_typology.field_sale_order_certificat_item__write_uid
msgid "Last Updated by"
msgstr "Dernière mise à jour par"

#. module: sale_certificat_typology
#: model:ir.model.fields,field_description:sale_certificat_typology.field_certificat_typology__write_date
#: model:ir.model.fields,field_description:sale_certificat_typology.field_sale_order_certificat_item__write_date
msgid "Last Updated on"
msgstr "Dernière mise à jour le"

#. module: sale_certificat_typology
#: model:ir.model.fields,field_description:sale_certificat_typology.field_sale_order_line__certificat_item_ids
msgid "Linked certificat items"
msgstr "Justificatifs liés"

#. module: sale_certificat_typology
#: model:ir.model.fields,field_description:sale_certificat_typology.field_sale_order_certificat_item__order_id
msgid "Linked order"
msgstr "Commande liée"

#. module: sale_certificat_typology
#: model:ir.model.fields,field_description:sale_certificat_typology.field_sale_order_certificat_item__order_line_ids
msgid "Linked order lines"
msgstr "Lignes de commande liées"

#. module: sale_certificat_typology
#: model:ir.model.fields,field_description:sale_certificat_typology.field_certificat_typology__name
#: model_terms:ir.ui.view,arch_db:sale_certificat_typology.view_certificat_typology_form
msgid "Name"
msgstr "Nom"

#. module: sale_certificat_typology
#: model:ir.model.fields.selection,name:sale_certificat_typology.selection__certificat_typology__automatic_deletion__none
msgid "None"
msgstr "Non"

#. module: sale_certificat_typology
#: model:ir.model,name:sale_certificat_typology.model_product_product
msgid "Product"
msgstr "Article"

#. module: sale_certificat_typology
#: model:ir.model,name:sale_certificat_typology.model_product_template
msgid "Product Template (Multi-Company)"
msgstr "Modèle de produit (Multi-Sociétés)"

#. module: sale_certificat_typology
#: model:ir.model.fields,field_description:sale_certificat_typology.field_product_product__required_certificat_ids
#: model:ir.model.fields,field_description:sale_certificat_typology.field_product_template__required_certificat_ids
msgid "Requested certificats"
msgstr "Justificatifs demandés"

#. module: sale_certificat_typology
#: model:ir.model.fields,field_description:sale_certificat_typology.field_sale_order__sale_warn_msg
msgid "Sale Warn Msg"
msgstr ""

#. module: sale_certificat_typology
#: model:ir.model,name:sale_certificat_typology.model_sale_order
msgid "Sales Order"
msgstr "Bon de commande"

#. module: sale_certificat_typology
#: model:ir.model,name:sale_certificat_typology.model_sale_order_line
msgid "Sales Order Line"
msgstr "Ligne de bons de commande"

#. module: sale_certificat_typology
#: model:ir.model.fields,field_description:sale_certificat_typology.field_certificat_typology__storage_duration
msgid "Storage duration"
msgstr "Durée de stockage"

#. module: sale_certificat_typology
#: code:addons/sale_certificat_typology/models/sale_order.py:0
#, python-format
msgid "Warning: in this order, some products require certificates !"
msgstr "Alerte: dans cette commande, il y a des produits qui nécessitent des justificatifs !"

#. module: sale_certificat_typology
#: code:addons/sale_certificat_typology/models/sale_order.py:0
#, python-format
msgid ""
"You cannot validate your order because some products require certificates !"
msgstr ""
"Vous ne pouvez pas confirmer la commande car des produits nécessitent des "
"justificatifs !"

#. module: sale_certificat_typology
#: model:ir.model.fields.selection,name:sale_certificat_typology.selection__certificat_typology__automatic_deletion__x_day_after_so_confirm
msgid "after SO confirmation"
msgstr "après confirmation de la commande"

#. module: sale_certificat_typology
#: model_terms:ir.ui.view,arch_db:sale_certificat_typology.view_certificat_typology_form
msgid "e.g. ID card"
msgstr "ex. Carte d'identité"
3 changes: 3 additions & 0 deletions sale_certificat_typology/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import certificat_typology
from . import product
from . import sale_order
24 changes: 24 additions & 0 deletions sale_certificat_typology/models/certificat_typology.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2023 Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models


class CertificatTypology(models.Model):
_name = "certificat.typology"
_description = "Certificat Typology"

name = fields.Char(string="Name", required=True, translate=True)
description = fields.Char(string="Description", translate=True)
storage_duration = fields.Integer(
string="Storage duration", help="Enter the number of days to keep the document."
)
automatic_deletion = fields.Selection(
[
("none", "None"),
("x_day_after_so_confirm", "after SO confirmation"),
],
string="Automatic deletion",
default="none",
)
company_id = fields.Many2one(comodel_name="res.company", string="Company")
Loading

0 comments on commit 82a5635

Please sign in to comment.