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

18.0 mig sale manual delivery #3530

Closed
wants to merge 49 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
11238f0
base module & sales_team
leemannd Jan 12, 2017
75397bb
Add action_manual_procurement_wizard
jcoux Feb 14, 2017
b2a62fe
flake8 & OCA standards
leemannd Feb 15, 2017
e57fe35
[IMP] report manual procurement on SO from sale team
jgrandguillaume Feb 15, 2017
4322b9f
[TYP] Change manual proc for manual delivery
jgrandguillaume Feb 15, 2017
ea99a5a
[IMP] Toggle manual,standard as a button in SO + UI
jgrandguillaume Feb 15, 2017
c9f9589
[ADD] Tests on various use cases
jgrandguillaume Feb 15, 2017
0b0dcb5
Regroup picking per date_planned / carrier + correct wizard action fr…
mdietrichc2c Feb 20, 2017
9da289e
[FIX] picking split criteria
vrenaville Feb 28, 2017
a8686e0
add Delivery Address to wizard. by default selec SO partner address.
Sep 21, 2017
870872d
[MIG][11] rm coding* + python 2to3
Tonow-c2c Aug 20, 2019
cf23c72
[MIG][11] Run black to fix lint
Tonow-c2c Aug 21, 2019
d475a76
[MIG][11] Fix tests for V11 stock.picking
Tonow-c2c Aug 23, 2019
373ca8c
[FIX] can switch from manual on sent state + fix field name changed
vrenaville Sep 13, 2019
5a11bd8
Remove unneeded calls to invalidate_cache
grindtildeath Nov 4, 2019
a8ed0e1
[IMP]allow to manually deliver sale order lines from different sale o…
AaronHForgeFlow Nov 7, 2019
832cb5a
[MIG]sale_manual_delivery to v12
AaronHForgeFlow Nov 8, 2019
a033ce2
[FIX] Restore res_partner field in the view with respect to last chan…
mmequignon Feb 6, 2020
24da85e
[FIX] Partner id will be retrive from wizard to procurement rule
Tonow-c2c Feb 20, 2020
88c847c
[FIX] wizard float_compare product precision
Tonow-c2c Feb 21, 2020
8cd4ab0
[FIX] to use the right product uom rounding
Tonow-c2c Feb 24, 2020
3036157
[UPD] Update sale_manual_delivery.pot
oca-travis Feb 22, 2021
53f7742
sale_manual_delivery 12.0.2.0.1
OCA-git-bot Feb 22, 2021
7c71edc
Added translation using Weblate (Spanish)
danimv5 Mar 19, 2021
5ce799e
Translated using Weblate (Spanish)
danimv5 Mar 19, 2021
c657bb6
[IMP] sale_manual_delivery: black, isort, prettier
ivantodorovich Apr 20, 2021
ced9017
[MIG] sale_manual_delivery: Migration to 13.0
ivantodorovich Apr 20, 2021
67c13f5
[UPD] Update sale_manual_delivery.pot
oca-travis Apr 24, 2021
9503f66
[UPD] README.rst
OCA-git-bot Apr 24, 2021
d4669d8
[13.0] Fix view_sales_order_undelivered_line_filter
santostelmo May 25, 2021
20f97ec
sale_manual_delivery 13.0.1.0.1
OCA-git-bot May 26, 2021
c06bb9a
[FIX] for drop shipping module
vrenaville May 25, 2021
d642d15
sale_manual_delivery 13.0.1.0.2
OCA-git-bot Jul 6, 2021
81a947c
[IMP] sale_manual_delivery: black, isort, prettier
ChrisOForgeFlow Apr 14, 2022
c8e41c1
[14.0][MIG] sale_manual_delivery
ChrisOForgeFlow Apr 14, 2022
4441020
[ADD] init hook script for big databases
ChrisOForgeFlow Apr 14, 2022
4f592d4
[ADD] permissions on trasient models
ChrisOForgeFlow Apr 21, 2022
4c55730
[IMP] added field to don't show button if not exists pending to deliver
ChrisOForgeFlow May 12, 2022
25d3815
[FIX] user validation error, update definition act_window
ChrisOForgeFlow Aug 26, 2022
ad31664
[RM] sale_manual_delivery: remove checking state of lines
Mar 20, 2023
80f2929
[IMP] sale_manual_delivery: test checking has_pending_delivery
Mar 20, 2023
de6722a
[UPD] Update sale_manual_delivery.pot
Jul 12, 2023
b3c6426
[UPD] README.rst
OCA-git-bot Jul 12, 2023
d7ee8bc
Update translation files
weblate Jul 12, 2023
fd9bc00
[UPD] README.rst
OCA-git-bot Sep 3, 2023
6752534
Translated using Weblate (Spanish)
Ivorra78 Jan 26, 2024
3594813
Added translation using Weblate (Italian)
mymage Dec 17, 2024
8aaf7d9
[IMP] sale_manual_delivery: pre-commit auto fixes
rdualsam Jan 9, 2025
5d307c2
[MIG] sale_manual_delivery: Migration to 18.0
rdualsam Jan 9, 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
92 changes: 92 additions & 0 deletions sale_manual_delivery/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
====================
Sale Manual Delivery
====================

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

.. |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_manual_delivery
: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_manual_delivery
: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|

The goal of this module is to allow the manual creation of delivery
slips. If activated, a sale order won't directly impact the stock. It
will not make a reservation on the stock. It allows the delivery and the
impact on stock to be done manually when needed. The goal is to be used
on long term projects where not all the material is shipped at once. As
you make many shipments, every time you make a new delivery, you can
choose an new carrier as well as a planned date. A wizard helps you to
chose what to deliver by showing you how much you already planned to
ship.

**Table of contents**

.. contents::
:local:

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

- Add Screenshots

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_manual_delivery%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
-------

* Camptocamp SA

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

- Denis Leemann <denis.leemann@camptocamp.com>
- Joel Grand-Guillaume <joel.grandguillaume@camptocamp.com>
- Phuc Tran Thanh <phuc@trobz.com>
- Iván Todorovich <ivan.todorovich@gmail.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_manual_delivery>`_ project on GitHub.

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

from . import models
from . import wizard
from .hook import pre_init_hook
22 changes: 22 additions & 0 deletions sale_manual_delivery/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2017 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Sale Manual Delivery",
"category": "Sale",
"author": "Camptocamp SA, Odoo Community Association (OCA)",
"license": "AGPL-3",
"version": "18.0.1.0.0",
"website": "https://github.com/OCA/sale-workflow",
"summary": "Create manually your deliveries",
"depends": ["delivery", "sale_stock", "sales_team"],
"data": [
"security/ir.model.access.csv",
"views/crm_team.xml",
"views/sale_order.xml",
"wizard/manual_delivery.xml",
],
"installable": True,
"application": False,
"auto_install": False,
"pre_init_hook": "pre_init_hook",
}
64 changes: 64 additions & 0 deletions sale_manual_delivery/hook.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
def pre_init_hook(cr):
cr.execute(
"""
ALTER TABLE sale_order_line ADD COLUMN IF NOT EXISTS qty_procured numeric;
COMMENT ON COLUMN sale_order_line.qty_procured IS 'Quantity Procured';
"""
)
cr.execute(
"""
ALTER TABLE sale_order_line ADD COLUMN IF NOT EXISTS qty_to_procure numeric;
COMMENT ON COLUMN sale_order_line.qty_to_procure IS 'Quantity to Procure"';
"""
)

cr.execute(
"""
update sale_order_line as sol set qty_procured = r.qty_procured,
qty_to_procure = sol.product_uom_qty - r.qty_procured
from (select sol.id, sum(
case
when (
sl.usage = 'customer'
and sm.origin_returned_move_id is null
or (
sm.origin_returned_move_id is not null and sm.to_refund
)) then
ROUND(
((sm.product_uom_qty / sm_product_uom.factor) * sol_product_uom.factor),
SCALE(sol_product_uom.rounding)
)
when (
sl.usage != 'customer'
and sm.to_refund
) then
ROUND(
((sm.product_uom_qty / sm_product_uom.factor) * sol_product_uom.factor),
SCALE(sol_product_uom.rounding)
) * -1
else 0
end)
AS qty_procured
from
sale_order_line as sol
inner join (
select sol.id, sm.id as move_id, sm.location_id, sm.location_dest_id
from sale_order_line as sol
left join stock_move as sm on (
sm.state != 'cancel'
and sm.scrapped = false
and sol.product_id = sm.product_id
and sm.sale_line_id = sol.id
)
) as q on q.id = sol.id
left join stock_move as sm on sm.id = q.move_id
left join product_product as pp on pp.id = sol.product_id
left join product_template as pt on pt.id = pp.product_tmpl_id
left join stock_location as sl on sl.id = q.location_dest_id
LEFT JOIN uom_uom sm_product_uom ON sm.product_uom = sm_product_uom.id
LEFT JOIN uom_uom sol_product_uom ON sol.product_uom = sol_product_uom.id
group by sol.id, sm.product_uom, sol.product_uom
) as r
where r.id = sol.id
"""
)
Loading
Loading