Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][MIG] product_sold_by_delivery_week: Migration to 17.0 #312

Open
wants to merge 23 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
12caa88
[ADD] product_selled_delivered_weekly: New module
chienandalu Oct 14, 2021
961ab63
[IMP] product_sold_by_delivery_week: Improve performance pre-searchin…
carlosdauden Nov 17, 2021
93a1107
product_sold_by_delivery_week 13.0.1.1.0
OCA-git-bot Nov 18, 2021
ebb3a54
[FIX] product_sold_by_delivery_week: Fix param value returned as integer
sergio-teruel Apr 6, 2022
68058c4
product_sold_by_delivery_week 13.0.1.1.1
OCA-git-bot Apr 7, 2022
a562cc2
[IMP] product_sold_by_delivery_week: black, isort, prettier
cesar-tecnativa Jul 5, 2022
79f8363
[MIG] product_sold_by_delivery_week: Migration to 15.0
cesar-tecnativa Jul 5, 2022
1879672
[FIX] product_sold_by_delivery_week: Fix singleton. New function get_…
sergio-teruel Oct 14, 2022
c0dbc79
[FIX] product_sold_by_delivery_week: Fix key error when product not i…
carlosdauden Nov 24, 2022
3f5ce2e
[MIG] product_sold_by_delivery_week: Migration to 16.0
Yadier-Tecnativa Apr 24, 2023
8af8099
[UPD] Update product_sold_by_delivery_week.pot
Jun 5, 2023
8ee9cf2
[UPD] README.rst
OCA-git-bot Jun 5, 2023
40d82b9
Update translation files
weblate Jun 5, 2023
00d073e
[UPD] README.rst
OCA-git-bot Sep 3, 2023
55fdffa
Translated using Weblate (Spanish)
Ivorra78 Aug 25, 2023
fcc403c
Added translation using Weblate (Portuguese (Brazil))
adrianojprado Nov 9, 2023
50b95bf
Added translation using Weblate (Italian)
mymage Dec 12, 2023
c304da1
Translated using Weblate (Italian)
mymage Dec 12, 2023
d27ab84
[FIX] product_sold_by_delivery_week: work with lower permissions
yajo Feb 16, 2024
9bcbaea
[BOT] post-merge updates
OCA-git-bot Feb 19, 2024
4a42ace
Translated using Weblate (Portuguese (Brazil))
May 29, 2024
69fefbd
[IMP] product_sold_by_delivery_week: pre-commit auto fixes
HeliconiaSolutions Jan 22, 2025
92ee38a
[MIG] product_sold_by_delivery_week: Migration to 17.0
HeliconiaSolutions Jan 22, 2025
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
139 changes: 139 additions & 0 deletions product_sold_by_delivery_week/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
=========================
Product weekly sales hint
=========================

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

.. |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--reporting-lightgray.png?logo=github
:target: https://github.com/OCA/sale-reporting/tree/17.0/product_sold_by_delivery_week
:alt: OCA/sale-reporting
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/sale-reporting-17-0/sale-reporting-17-0-product_sold_by_delivery_week
: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/sale-reporting&target_branch=17.0
:alt: Try me on Runboat

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

This module allows to compute a graphical hint, stored in the product
itself, to display whether that product was sold and delivered in recent
weeks.

|image|

.. |image| image:: https://raw.githubusercontent.com/OCA/sale-reporting/17.0/product_sold_by_delivery_week/static/description/sold_by_week_hint.png

**Table of contents**

.. contents::
:local:

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

Some variables can be configured using config parameter keys:

- For hint characters:

..

- For the sold char: product_sold_by_delivery_week.sold_char
- For the not sold: product_sold_by_delivery_week.not_sold_char
- For weeks length: product_sold_by_delivery_week.weeks_to_consider

Assign the security group 'Weekly selling info in order lines' and/or
'Weekly selling info in product list' to users that should see weekly
sales info in product lists or in order lines. (If you want to see the
info in other views like product recommendations, this is not needed.)

Usage
=====

Once configured, hints will appear as an optional column in sale order
lines or in products tree.

In the general products view, general sales info is shown. Meanwhile, in
the sale lines field we can see this field in context by simply
filtering partner sales.

Only salespeople can access this information.

Known issues / Roadmap
======================

- Services are not taken into consideration.
- A widget could be created on top of the main field to have nicer icons
and probably colors.
- For the near future, a configurable granularity would be desirable, so
behavior could be changed to years, months or days as the period of
choice. To simplify this module, only weekly periods will be
considered for now.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-reporting/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/sale-reporting/issues/new?body=module:%20product_sold_by_delivery_week%0Aversion:%2017.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
-------

* Tecnativa

Contributors
------------

- `Tecnativa <https://www.tecnativa.com>`__:

- David Vidal
- Carlos Dauden
- César A. Sánchez
- Luis D. Lafaurie

- Jairo Llopis ([Moduon](https://www.moduon.team/))
- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`__

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-chienandalu| image:: https://github.com/chienandalu.png?size=40px
:target: https://github.com/chienandalu
:alt: chienandalu

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

|maintainer-chienandalu|

This module is part of the `OCA/sale-reporting <https://github.com/OCA/sale-reporting/tree/17.0/product_sold_by_delivery_week>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions product_sold_by_delivery_week/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from .hooks import post_init_hook
22 changes: 22 additions & 0 deletions product_sold_by_delivery_week/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2021 Tecnativa - David Vidal
# Copyright 2021 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Product weekly sales hint",
"summary": "Adds a field that graphically hints the weekly product sales",
"version": "17.0.1.0.0",
"development_status": "Beta",
"category": "Sale",
"website": "https://github.com/OCA/sale-reporting",
"author": "Tecnativa, Odoo Community Association (OCA)",
"maintainers": ["chienandalu"],
"license": "AGPL-3",
"depends": ["sale_stock"],
"data": [
"data/ir_cron.xml",
"security/product_sold_by_delivery_week_security.xml",
"views/product_views.xml",
"views/sale_views.xml",
],
"post_init_hook": "post_init_hook",
}
17 changes: 17 additions & 0 deletions product_sold_by_delivery_week/data/ir_cron.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record
forcecreate="True"
id="ir_cron_recalculate_all_weekly_sold_delivered"
model="ir.cron"
>
<field name="name">Recalculate Weekly Delivered Products</field>
<field name="interval_number">1</field>
<field name="interval_type">weeks</field>
<field name="numbercall">-1</field>
<field name="doall" eval="False" />
<field name="model_id" ref="model_product_product" />
<field name="code">model._action_recalculate_all_weekly_sold_delivered()</field>
<field name="state">code</field>
</record>
</odoo>
8 changes: 8 additions & 0 deletions product_sold_by_delivery_week/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright 2017-2018 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import SUPERUSER_ID, api


def post_init_hook(env):
envs = api.Environment(env.cr, SUPERUSER_ID, {})
envs["product.product"]._action_recalculate_all_weekly_sold_delivered()
70 changes: 70 additions & 0 deletions product_sold_by_delivery_week/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_sold_by_delivery_week
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-17 18:34+0000\n"
"PO-Revision-Date: 2023-09-03 13:40+0000\n"
"Last-Translator: Ivorra78 <[email protected]>\n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: product_sold_by_delivery_week
#: model:ir.model,name:product_sold_by_delivery_week.model_product_template
msgid "Product"
msgstr "Producto"

#. module: product_sold_by_delivery_week
#: model:ir.model,name:product_sold_by_delivery_week.model_product_product
msgid "Product Variant"
msgstr "Variante del producto"

#. module: product_sold_by_delivery_week
#: model:ir.actions.server,name:product_sold_by_delivery_week.ir_cron_recalculate_all_weekly_sold_delivered_ir_actions_server
#: model:ir.cron,cron_name:product_sold_by_delivery_week.ir_cron_recalculate_all_weekly_sold_delivered
msgid "Recalculate Weekly Delivered Products"
msgstr "Recalcular productos entregados semanalmente"

#. module: product_sold_by_delivery_week
#: model:ir.model,name:product_sold_by_delivery_week.model_sale_order_line
msgid "Sales Order Line"
msgstr "Línea de pedido de venta"

#. module: product_sold_by_delivery_week
#: model:ir.model,name:product_sold_by_delivery_week.model_stock_move
msgid "Stock Move"
msgstr "Movimiento de existencias"

#. module: product_sold_by_delivery_week
#: model:ir.model.fields,field_description:product_sold_by_delivery_week.field_product_product__weekly_sold_delivered_shown
#: model:ir.model.fields,field_description:product_sold_by_delivery_week.field_product_template__weekly_sold_delivered_shown
#: model:ir.model.fields,field_description:product_sold_by_delivery_week.field_sale_order_line__weekly_sold_delivered_shown
msgid "Weekly Sold"
msgstr "Venta semanal"

#. module: product_sold_by_delivery_week
#: model:ir.model.fields,field_description:product_sold_by_delivery_week.field_product_product__weekly_sold_delivered
#: model:ir.model.fields,field_description:product_sold_by_delivery_week.field_product_template__weekly_sold_delivered
msgid "Weekly Sold Delivered"
msgstr "Vendidos y entregados semanalmente"

#. module: product_sold_by_delivery_week
#: model:res.groups,name:product_sold_by_delivery_week.group_weekly_selling_order_line
msgid "Weekly selling info in order lines"
msgstr "Información de venta semanal en líneas de pedido"

#. module: product_sold_by_delivery_week
#: model:res.groups,name:product_sold_by_delivery_week.group_weekly_selling_product_list
msgid "Weekly selling info in product list"
msgstr "Información de venta semanal en lista de productos"

#~ msgid "Product Template"
#~ msgstr "Plantilla de producto"
66 changes: 66 additions & 0 deletions product_sold_by_delivery_week/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_sold_by_delivery_week
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-12-12 11:34+0000\n"
"Last-Translator: mymage <[email protected]>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: product_sold_by_delivery_week
#: model:ir.model,name:product_sold_by_delivery_week.model_product_template
msgid "Product"
msgstr "Prodotto"

#. module: product_sold_by_delivery_week
#: model:ir.model,name:product_sold_by_delivery_week.model_product_product
msgid "Product Variant"
msgstr "Variante prodotto"

#. module: product_sold_by_delivery_week
#: model:ir.actions.server,name:product_sold_by_delivery_week.ir_cron_recalculate_all_weekly_sold_delivered_ir_actions_server
#: model:ir.cron,cron_name:product_sold_by_delivery_week.ir_cron_recalculate_all_weekly_sold_delivered
msgid "Recalculate Weekly Delivered Products"
msgstr "Ricalcolo prdotti consegnati settimanalmente"

#. module: product_sold_by_delivery_week
#: model:ir.model,name:product_sold_by_delivery_week.model_sale_order_line
msgid "Sales Order Line"
msgstr "Riga ordine di vendita"

#. module: product_sold_by_delivery_week
#: model:ir.model,name:product_sold_by_delivery_week.model_stock_move
msgid "Stock Move"
msgstr "Movimento di magazzino"

#. module: product_sold_by_delivery_week
#: model:ir.model.fields,field_description:product_sold_by_delivery_week.field_product_product__weekly_sold_delivered_shown
#: model:ir.model.fields,field_description:product_sold_by_delivery_week.field_product_template__weekly_sold_delivered_shown
#: model:ir.model.fields,field_description:product_sold_by_delivery_week.field_sale_order_line__weekly_sold_delivered_shown
msgid "Weekly Sold"
msgstr "Venduto settimanale"

#. module: product_sold_by_delivery_week
#: model:ir.model.fields,field_description:product_sold_by_delivery_week.field_product_product__weekly_sold_delivered
#: model:ir.model.fields,field_description:product_sold_by_delivery_week.field_product_template__weekly_sold_delivered
msgid "Weekly Sold Delivered"
msgstr "Cnsegnato vendite settimanali"

#. module: product_sold_by_delivery_week
#: model:res.groups,name:product_sold_by_delivery_week.group_weekly_selling_order_line
msgid "Weekly selling info in order lines"
msgstr "Informazioni vendite settimanali nelle righe ordine"

#. module: product_sold_by_delivery_week
#: model:res.groups,name:product_sold_by_delivery_week.group_weekly_selling_product_list
msgid "Weekly selling info in product list"
msgstr "Informazioni vendite settimanali nell'elenco prodotti"
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_sold_by_delivery_week
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \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: product_sold_by_delivery_week
#: model:ir.model,name:product_sold_by_delivery_week.model_product_template
msgid "Product"
msgstr ""

#. module: product_sold_by_delivery_week
#: model:ir.model,name:product_sold_by_delivery_week.model_product_product
msgid "Product Variant"
msgstr ""

#. module: product_sold_by_delivery_week
#: model:ir.actions.server,name:product_sold_by_delivery_week.ir_cron_recalculate_all_weekly_sold_delivered_ir_actions_server
#: model:ir.cron,cron_name:product_sold_by_delivery_week.ir_cron_recalculate_all_weekly_sold_delivered
msgid "Recalculate Weekly Delivered Products"
msgstr ""

#. module: product_sold_by_delivery_week
#: model:ir.model,name:product_sold_by_delivery_week.model_sale_order_line
msgid "Sales Order Line"
msgstr ""

#. module: product_sold_by_delivery_week
#: model:ir.model,name:product_sold_by_delivery_week.model_stock_move
msgid "Stock Move"
msgstr ""

#. module: product_sold_by_delivery_week
#: model:ir.model.fields,field_description:product_sold_by_delivery_week.field_product_product__weekly_sold_delivered_shown
#: model:ir.model.fields,field_description:product_sold_by_delivery_week.field_product_template__weekly_sold_delivered_shown
#: model:ir.model.fields,field_description:product_sold_by_delivery_week.field_sale_order_line__weekly_sold_delivered_shown
msgid "Weekly Sold"
msgstr ""

#. module: product_sold_by_delivery_week
#: model:ir.model.fields,field_description:product_sold_by_delivery_week.field_product_product__weekly_sold_delivered
#: model:ir.model.fields,field_description:product_sold_by_delivery_week.field_product_template__weekly_sold_delivered
msgid "Weekly Sold Delivered"
msgstr ""

#. module: product_sold_by_delivery_week
#: model:res.groups,name:product_sold_by_delivery_week.group_weekly_selling_order_line
msgid "Weekly selling info in order lines"
msgstr ""

#. module: product_sold_by_delivery_week
#: model:res.groups,name:product_sold_by_delivery_week.group_weekly_selling_product_list
msgid "Weekly selling info in product list"
msgstr ""
Loading
Loading