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] sale_planned_consumed_date: Migration to 17.0 #1860

Open
wants to merge 3 commits into
base: 17.0
Choose a base branch
from
Open
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
84 changes: 84 additions & 0 deletions sale_planned_consumed_date/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
==========================
Sale planned consumed date
==========================

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

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

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

This offer a default behaviour while confirming sale order to set the
planned date to be use by stock_move_planned_consumed_date and
stock_restrict_by_planned_consumed_date modules.

This module add a computed field on sale order line that can be adapted
to your needs.

This planned consumed date is used while calling the procurement method
while confirming the sale order.

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-workflow/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/stock-logistics-workflow/issues/new?body=module:%20sale_planned_consumed_date%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
-------

* Pierre Verkest <[email protected]>

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

- Pierre Verkest <[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/stock-logistics-workflow <https://github.com/OCA/stock-logistics-workflow/tree/17.0/sale_planned_consumed_date>`_ 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_planned_consumed_date/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
20 changes: 20 additions & 0 deletions sale_planned_consumed_date/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2024 Foodles (https://www.foodles.co)
# @author Pierre Verkest <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Sale planned consumed date",
"Summary": "Use the commitment date as planned consumed date by customer.",
"version": "17.0.1.0.0",
"development_status": "Beta",
"author": "Pierre Verkest <[email protected]>, "
"Odoo Community Association (OCA)",
"website": "https://github.com/OCA/stock-logistics-workflow",
"category": "Warehouse Management",
"depends": [
"sale_stock",
"stock_move_planned_consumed_date",
],
"installable": True,
"license": "AGPL-3",
"data": [],
}
30 changes: 30 additions & 0 deletions sale_planned_consumed_date/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_planned_consumed_date
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0+e\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: sale_planned_consumed_date
#: model:ir.model.fields,field_description:sale_planned_consumed_date.field_sale_order_line__planned_consumed_date
msgid "Planned consumed date"
msgstr "Date de consomation prévue"

#. module: sale_planned_consumed_date
#: model:ir.model,name:sale_planned_consumed_date.model_sale_order_line
msgid "Sales Order Line"
msgstr "Ligne de vente"

#. module: sale_planned_consumed_date
#: model:ir.model.fields,help:sale_planned_consumed_date.field_sale_order_line__planned_consumed_date
msgid "The planned consumed date by customer."
msgstr "La date de consomation prévu par le client."
29 changes: 29 additions & 0 deletions sale_planned_consumed_date/i18n/sale_planned_consumed_date.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_planned_consumed_date
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0+e\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: sale_planned_consumed_date
#: model:ir.model.fields,field_description:sale_planned_consumed_date.field_sale_order_line__planned_consumed_date
msgid "Planned consumed date"
msgstr ""

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

#. module: sale_planned_consumed_date
#: model:ir.model.fields,help:sale_planned_consumed_date.field_sale_order_line__planned_consumed_date
msgid "The planned consumed date by customer."
msgstr ""
1 change: 1 addition & 0 deletions sale_planned_consumed_date/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import sale_order_line
20 changes: 20 additions & 0 deletions sale_planned_consumed_date/models/sale_order_line.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2024 Foodles (https://www.foodles.co)
# @author Pierre Verkest <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models


class SaleOrderLine(models.Model):
_inherit = "sale.order.line"

planned_consumed_date = fields.Datetime(
"Planned consumed date",
related="order_id.commitment_date",
help="The planned consumed date by customer.",
)

def _prepare_procurement_values(self, group_id=False):
return {
**super()._prepare_procurement_values(group_id=group_id),
"planned_consumed_date": self.planned_consumed_date,
}
3 changes: 3 additions & 0 deletions sale_planned_consumed_date/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
1 change: 1 addition & 0 deletions sale_planned_consumed_date/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Pierre Verkest \<[email protected]\>
9 changes: 9 additions & 0 deletions sale_planned_consumed_date/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
This offer a default behaviour while confirming sale order to set the
planned date to be use by stock_move_planned_consumed_date and
stock_restrict_by_planned_consumed_date modules.

This module add a computed field on sale order line that can be adapted
to your needs.

This planned consumed date is used while calling the procurement method
while confirming the sale order.
Loading
Loading