Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
cdbc24a
[8.0][ADD] sale_delivery_split_date module (#620)
tafaRU Apr 13, 2018
aae1f77
[MIG] sale_delivery_split_date: Migration to 10.0
tafaRU May 22, 2018
7114c7b
[FIX] sale_delivery_split_date: fix incompatible modules urls in READ…
tafaRU Jun 19, 2018
21158fa
[MIG] sale_delivery_split_date: Migration to 12.0
SimoRubi Aug 31, 2020
6ff1fd9
Added translation using Weblate (Catalan)
danimv5 Mar 10, 2021
3d585d1
Added translation using Weblate (Spanish)
danimv5 Mar 10, 2021
44eadc9
Added translation using Weblate (Portuguese (Portugal))
educasilva Apr 21, 2021
387b3c2
[IMP] sale_delivery_split_date: black, isort, prettier
fredzamoabg Aug 5, 2021
cf4cef5
[MIG] sale_delivery_split_date: Migration to 14.0
fredzamoabg Jan 18, 2022
9623308
Update translation files
weblate Dec 28, 2022
9a44a6e
[MIG] sale_delivery_split_date: Migration to 15.0
yankinmax Mar 2, 2023
778de3f
[MIG] sale_delivery_split_date: Migration to 16.0
Mar 7, 2023
06f83a4
Update translation files
weblate Nov 17, 2023
70d6d9d
Translated using Weblate (Italian)
mymage Nov 21, 2023
c821dc3
[IMP] sale_delivery_split_date: use security lead time
LauraCForgeFlow Aug 13, 2024
bf57b55
[IMP] sale_delivery_split_date: pre-commit stuff
siemenv Feb 19, 2024
c25f4e7
[MIG] sale_delivery_split_date: Migration to 17.0
siemenv Feb 19, 2024
f0f3b8e
[UPD] Update sale_delivery_split_date.pot
Nov 18, 2024
bfd851e
[BOT] post-merge updates
OCA-git-bot Nov 18, 2024
eebc829
[IMP] sale_delivery_split_date: pre-commit auto fixes
jaydeep32 Mar 5, 2025
f2b49de
[MIG] sale_delivery_split_date: Migration to 18.0
jaydeep32 Mar 5, 2025
fc5a424
[IMP] sale_delivery_split_date: pre-commit auto fixes
jaydeep32 Mar 5, 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
88 changes: 88 additions & 0 deletions sale_delivery_split_date/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
========================
Sale Delivery Split Date
========================

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

.. |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/18.0/sale_delivery_split_date
: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-18-0/sale-workflow-18-0-sale_delivery_split_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/sale-workflow&target_branch=18.0
:alt: Try me on Runboat

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

When this module is installed, each sale order you confirm will generate
one delivery order per requested date indicated in the sale order lines.

Furthermore, the delivery orders can be searched by selecting the
scheduled date, which is now displayed in the delivery tree view.

**Table of contents**

.. contents::
:local:

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

- Incompatible with
`sale_procurement_group_by_commitment_date <https://github.com/OCA/sale-workflow/tree/12.0/sale_procurement_group_by_commitment_date>`__

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 to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_delivery_split_date%0Aversion:%2018.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
-------

* Agile Business Group

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

- Alex Comba <alex.comba@agilebg.com> (https://www.agilebg.com/)
- Carmen Rondon Regalado <crondon@archeti.com>
(https://odoo.archeti.com/)

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/18.0/sale_delivery_split_date>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions sale_delivery_split_date/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
20 changes: 20 additions & 0 deletions sale_delivery_split_date/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2018 Alex Comba - Agile Business Group
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Sale Delivery Split Date",
"version": "18.0.1.0.0",
"summary": "Sale Deliveries split by date",
"category": "Sales Management",
"license": "AGPL-3",
"author": "Agile Business Group, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/sale-workflow",
"depends": [
"sale_order_line_date",
"sale_procurement_group_by_line",
],
"data": [
"views/stock_picking.xml",
],
"installable": True,
}
36 changes: 36 additions & 0 deletions sale_delivery_split_date/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_delivery_split_date
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2021-03-10 10:45+0000\n"
"Last-Translator: Daniel Martinez Vila <daniel.martinez@qubiq.es>\n"
"Language-Team: none\n"
"Language: ca\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.3.2\n"

#. module: sale_delivery_split_date
#: model:ir.model,name:sale_delivery_split_date.model_sale_order_line
msgid "Sales Order Line"
msgstr "Línia de comandes de vendes"

#. module: sale_delivery_split_date
#: model_terms:ir.ui.view,arch_db:sale_delivery_split_date.view_picking_internal_search
msgid "Scheduled Date"
msgstr "Data prevista"

#~ msgid "Sale Order"
#~ msgstr "Comanda de venda"

#~ msgid "Scheduled Date (for filter purpose only)"
#~ msgstr "Data programada (només per al filtre)"

#~ msgid "Transfer"
#~ msgstr "Transferència"
36 changes: 36 additions & 0 deletions sale_delivery_split_date/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_delivery_split_date
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2021-03-10 10:45+0000\n"
"Last-Translator: Daniel Martinez Vila <daniel.martinez@qubiq.es>\n"
"Language-Team: none\n"
"Language: es\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.3.2\n"

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

#. module: sale_delivery_split_date
#: model_terms:ir.ui.view,arch_db:sale_delivery_split_date.view_picking_internal_search
msgid "Scheduled Date"
msgstr "Fecha prevista"

#~ msgid "Sale Order"
#~ msgstr "Pedido de venta"

#~ msgid "Scheduled Date (for filter purpose only)"
#~ msgstr "Fecha programada (solo para fines de filtrado)"

#~ msgid "Transfer"
#~ msgstr "Transferir"
37 changes: 37 additions & 0 deletions sale_delivery_split_date/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_delivery_split_date
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-31 14:57+0000\n"
"PO-Revision-Date: 2024-01-25 15:34+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: \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: sale_delivery_split_date
#: model:ir.model,name:sale_delivery_split_date.model_sale_order_line
msgid "Sales Order Line"
msgstr "Riga ordine di vendita"

#. module: sale_delivery_split_date
#: model_terms:ir.ui.view,arch_db:sale_delivery_split_date.view_picking_internal_search
msgid "Scheduled Date"
msgstr "Data schedulata"

#~ msgid "Sale Order"
#~ msgstr "Ordine di vendita"

#~ msgid "Scheduled Date (for filter purpose only)"
#~ msgstr "Data pianificata (solo per i filtri)"

#~ msgid "Transfer"
#~ msgstr "Trasferimento"
36 changes: 36 additions & 0 deletions sale_delivery_split_date/i18n/pt_PT.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_delivery_split_date
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2021-04-21 20:47+0000\n"
"Last-Translator: educasilva <eduardo.silva@exo.pt>\n"
"Language-Team: none\n"
"Language: pt_PT\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.3.2\n"

#. module: sale_delivery_split_date
#: model:ir.model,name:sale_delivery_split_date.model_sale_order_line
msgid "Sales Order Line"
msgstr "Linha de encomendas de venda"

#. module: sale_delivery_split_date
#: model_terms:ir.ui.view,arch_db:sale_delivery_split_date.view_picking_internal_search
msgid "Scheduled Date"
msgstr "Data programada"

#~ msgid "Sale Order"
#~ msgstr "Ordem de venda"

#~ msgid "Scheduled Date (for filter purpose only)"
#~ msgstr "Data programada (apenas para fins de filtragem)"

#~ msgid "Transfer"
#~ msgstr "Transferir"
24 changes: 24 additions & 0 deletions sale_delivery_split_date/i18n/sale_delivery_split_date.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_delivery_split_date
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.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: sale_delivery_split_date
#: model:ir.model,name:sale_delivery_split_date.model_sale_order_line
msgid "Sales Order Line"
msgstr ""

#. module: sale_delivery_split_date
#: model_terms:ir.ui.view,arch_db:sale_delivery_split_date.view_picking_internal_search
msgid "Scheduled Date"
msgstr ""
3 changes: 3 additions & 0 deletions sale_delivery_split_date/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import sale_order_line
46 changes: 46 additions & 0 deletions sale_delivery_split_date/models/sale_order_line.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Copyright 2018 Alex Comba - Agile Business Group
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from datetime import timedelta

from odoo import models
from odoo.tools import format_date


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

def _prepare_procurement_group_vals(self):
vals = super()._prepare_procurement_group_vals()
if self._get_procurement_group_key()[0] == 24:
if self.commitment_date:
comm_date = self._get_security_lead_time_commitment_date()
vals["name"] += "/" + format_date(self.env, comm_date.date())
return vals

def _get_procurement_group_key(self):
"""Return a key with priority to be used to regroup lines in multiple
procurement groups
"""
priority = 24
key = super()._get_procurement_group_key()
# Check priority
if key[0] < priority:
if self.commitment_date:
# group by date instead of datetime
comm_date = self._get_security_lead_time_commitment_date()
return (priority, comm_date.date())
return key

def _prepare_procurement_values(self, group_id=False):
vals = super()._prepare_procurement_values(group_id=group_id)
if self.commitment_date:
comm_date = self._get_security_lead_time_commitment_date()
vals.update({"date_planned": comm_date})
return vals

def _get_security_lead_time_commitment_date(self):
"""Return the commitment date with security lead time"""
return self.commitment_date - timedelta(
days=self.order_id.company_id.security_lead
)
3 changes: 3 additions & 0 deletions sale_delivery_split_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"
3 changes: 3 additions & 0 deletions sale_delivery_split_date/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Alex Comba \<<alex.comba@agilebg.com>\> (<https://www.agilebg.com/>)
- Carmen Rondon Regalado \<<crondon@archeti.com>\>
(<https://odoo.archeti.com/>)
5 changes: 5 additions & 0 deletions sale_delivery_split_date/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
When this module is installed, each sale order you confirm will generate
one delivery order per requested date indicated in the sale order lines.

Furthermore, the delivery orders can be searched by selecting the
scheduled date, which is now displayed in the delivery tree view.
2 changes: 2 additions & 0 deletions sale_delivery_split_date/readme/ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Incompatible with
[sale_procurement_group_by_commitment_date](https://github.com/OCA/sale-workflow/tree/12.0/sale_procurement_group_by_commitment_date)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading