diff --git a/sale_order_type_image/README.rst b/sale_order_type_image/README.rst new file mode 100644 index 00000000..368f9fba --- /dev/null +++ b/sale_order_type_image/README.rst @@ -0,0 +1,32 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +===================== +Sale order type image +===================== + +* In type of sale order new field "Sale Type Image. +* When printing a sales order, picking, or customer invoice, if the sales order + type has an image defined, that image will be printed, otherwise the company +image will be printed. + + +Bug Tracker +=========== + +Bugs are tracked on `GitHub 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. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Contributors +------------ + +* Ana Juaristi +* Alfredo de la Fuente diff --git a/sale_order_type_image/__init__.py b/sale_order_type_image/__init__.py new file mode 100644 index 00000000..0650744f --- /dev/null +++ b/sale_order_type_image/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/sale_order_type_image/__manifest__.py b/sale_order_type_image/__manifest__.py new file mode 100644 index 00000000..e9c7ce7f --- /dev/null +++ b/sale_order_type_image/__manifest__.py @@ -0,0 +1,18 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +{ + "name": "Sale Order Type Image", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "author": "AvanzOSC", + "website": "https://github.com/avanzosc/sale-addons", + "category": "Sales Management", + "depends": [ + "sale_order_type", + ], + "data": [ + "data/layouts.xml", + "views/sale_order_type_views.xml", + ], + "installable": True, +} diff --git a/sale_order_type_image/data/layouts.xml b/sale_order_type_image/data/layouts.xml new file mode 100644 index 00000000..29a5061f --- /dev/null +++ b/sale_order_type_image/data/layouts.xml @@ -0,0 +1,38 @@ + + + + diff --git a/sale_order_type_image/i18n/ca_ES.po b/sale_order_type_image/i18n/ca_ES.po new file mode 100644 index 00000000..7f5152bb --- /dev/null +++ b/sale_order_type_image/i18n/ca_ES.po @@ -0,0 +1,31 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_type_image +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-10-28 06:03+0000\n" +"PO-Revision-Date: 2024-10-28 06: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_order_type_image +#: model_terms:ir.ui.view,arch_db:sale_order_type_image.external_layout_standard +msgid "Logo" +msgstr "" + +#. module: sale_order_type_image +#: model:ir.model.fields,field_description:sale_order_type_image.field_sale_order_type__sale_type_image +msgid "Sale Type Image" +msgstr "" + +#. module: sale_order_type_image +#: model:ir.model,name:sale_order_type_image.model_sale_order_type +msgid "Type of sale order" +msgstr "Tipus de comanda de venda" diff --git a/sale_order_type_image/i18n/en_GB.po b/sale_order_type_image/i18n/en_GB.po new file mode 100644 index 00000000..c4ba5b62 --- /dev/null +++ b/sale_order_type_image/i18n/en_GB.po @@ -0,0 +1,31 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_type_image +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-10-28 06:04+0000\n" +"PO-Revision-Date: 2024-10-28 06:04+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_order_type_image +#: model_terms:ir.ui.view,arch_db:sale_order_type_image.external_layout_standard +msgid "Logo" +msgstr "" + +#. module: sale_order_type_image +#: model:ir.model.fields,field_description:sale_order_type_image.field_sale_order_type__sale_type_image +msgid "Sale Type Image" +msgstr "" + +#. module: sale_order_type_image +#: model:ir.model,name:sale_order_type_image.model_sale_order_type +msgid "Type of sale order" +msgstr "" diff --git a/sale_order_type_image/i18n/es.po b/sale_order_type_image/i18n/es.po new file mode 100644 index 00000000..fb028db2 --- /dev/null +++ b/sale_order_type_image/i18n/es.po @@ -0,0 +1,31 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_type_image +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-10-28 06:04+0000\n" +"PO-Revision-Date: 2024-10-28 06:04+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_order_type_image +#: model_terms:ir.ui.view,arch_db:sale_order_type_image.external_layout_standard +msgid "Logo" +msgstr "Logo" + +#. module: sale_order_type_image +#: model:ir.model.fields,field_description:sale_order_type_image.field_sale_order_type__sale_type_image +msgid "Sale Type Image" +msgstr "Imagen tipo venta" + +#. module: sale_order_type_image +#: model:ir.model,name:sale_order_type_image.model_sale_order_type +msgid "Type of sale order" +msgstr "Tipo de pedido de venta" diff --git a/sale_order_type_image/i18n/fr.po b/sale_order_type_image/i18n/fr.po new file mode 100644 index 00000000..f98a0c25 --- /dev/null +++ b/sale_order_type_image/i18n/fr.po @@ -0,0 +1,31 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_type_image +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-10-28 06:04+0000\n" +"PO-Revision-Date: 2024-10-28 06:04+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_order_type_image +#: model_terms:ir.ui.view,arch_db:sale_order_type_image.external_layout_standard +msgid "Logo" +msgstr "" + +#. module: sale_order_type_image +#: model:ir.model.fields,field_description:sale_order_type_image.field_sale_order_type__sale_type_image +msgid "Sale Type Image" +msgstr "" + +#. module: sale_order_type_image +#: model:ir.model,name:sale_order_type_image.model_sale_order_type +msgid "Type of sale order" +msgstr "Type de bon de commande" diff --git a/sale_order_type_image/i18n/sale_order_type_image.pot b/sale_order_type_image/i18n/sale_order_type_image.pot new file mode 100644 index 00000000..fcbbef9d --- /dev/null +++ b/sale_order_type_image/i18n/sale_order_type_image.pot @@ -0,0 +1,31 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_type_image +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-10-28 06:03+0000\n" +"PO-Revision-Date: 2024-10-28 06: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_order_type_image +#: model_terms:ir.ui.view,arch_db:sale_order_type_image.external_layout_standard +msgid "Logo" +msgstr "" + +#. module: sale_order_type_image +#: model:ir.model.fields,field_description:sale_order_type_image.field_sale_order_type__sale_type_image +msgid "Sale Type Image" +msgstr "" + +#. module: sale_order_type_image +#: model:ir.model,name:sale_order_type_image.model_sale_order_type +msgid "Type of sale order" +msgstr "" diff --git a/sale_order_type_image/models/__init__.py b/sale_order_type_image/models/__init__.py new file mode 100644 index 00000000..c6ed3af6 --- /dev/null +++ b/sale_order_type_image/models/__init__.py @@ -0,0 +1 @@ +from . import sale_order_type diff --git a/sale_order_type_image/models/sale_order_type.py b/sale_order_type_image/models/sale_order_type.py new file mode 100644 index 00000000..378e5fa6 --- /dev/null +++ b/sale_order_type_image/models/sale_order_type.py @@ -0,0 +1,9 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import fields, models + + +class SaleOrderType(models.Model): + _inherit = "sale.order.type" + + sale_type_image = fields.Binary(copy=False) diff --git a/sale_order_type_image/views/sale_order_type_views.xml b/sale_order_type_image/views/sale_order_type_views.xml new file mode 100644 index 00000000..0a21807f --- /dev/null +++ b/sale_order_type_image/views/sale_order_type_views.xml @@ -0,0 +1,21 @@ + + + + sale.order.type + + + + + + + + + + + + + diff --git a/setup/sale_order_type_image/odoo/addons/sale_order_type_image b/setup/sale_order_type_image/odoo/addons/sale_order_type_image new file mode 120000 index 00000000..a2134879 --- /dev/null +++ b/setup/sale_order_type_image/odoo/addons/sale_order_type_image @@ -0,0 +1 @@ +../../../../sale_order_type_image \ No newline at end of file diff --git a/setup/sale_order_type_image/setup.py b/setup/sale_order_type_image/setup.py new file mode 100644 index 00000000..28c57bb6 --- /dev/null +++ b/setup/sale_order_type_image/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)