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 #3531

Open
wants to merge 49 commits into
base: 18.0
Choose a base branch
from
Open
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
cd275b7
base module & sales_team
leemannd Jan 12, 2017
09a0d57
Add action_manual_procurement_wizard
jcoux Feb 14, 2017
f0e3101
flake8 & OCA standards
leemannd Feb 15, 2017
36f201a
[IMP] report manual procurement on SO from sale team
jgrandguillaume Feb 15, 2017
2a33791
[TYP] Change manual proc for manual delivery
jgrandguillaume Feb 15, 2017
6b7850a
[IMP] Toggle manual,standard as a button in SO + UI
jgrandguillaume Feb 15, 2017
72afcc6
[ADD] Tests on various use cases
jgrandguillaume Feb 15, 2017
ffc994b
Regroup picking per date_planned / carrier + correct wizard action fr…
mdietrichc2c Feb 20, 2017
4403c7a
[FIX] picking split criteria
vrenaville Feb 28, 2017
7953755
add Delivery Address to wizard. by default selec SO partner address.
Sep 21, 2017
0d82dcc
[MIG][11] rm coding* + python 2to3
Tonow-c2c Aug 20, 2019
f77a9e6
[MIG][11] Run black to fix lint
Tonow-c2c Aug 21, 2019
cb9c227
[MIG][11] Fix tests for V11 stock.picking
Tonow-c2c Aug 23, 2019
3e50499
[FIX] can switch from manual on sent state + fix field name changed
vrenaville Sep 13, 2019
bee806a
Remove unneeded calls to invalidate_cache
grindtildeath Nov 4, 2019
602369a
[IMP]allow to manually deliver sale order lines from different sale o…
AaronHForgeFlow Nov 7, 2019
a3b0135
[MIG]sale_manual_delivery to v12
AaronHForgeFlow Nov 8, 2019
b2c1771
[FIX] Restore res_partner field in the view with respect to last chan…
mmequignon Feb 6, 2020
4c601ed
[FIX] Partner id will be retrive from wizard to procurement rule
Tonow-c2c Feb 20, 2020
d3428b5
[FIX] wizard float_compare product precision
Tonow-c2c Feb 21, 2020
093930b
[FIX] to use the right product uom rounding
Tonow-c2c Feb 24, 2020
1e143f4
[UPD] Update sale_manual_delivery.pot
oca-travis Feb 22, 2021
1e1b028
sale_manual_delivery 12.0.2.0.1
OCA-git-bot Feb 22, 2021
0f27d28
Added translation using Weblate (Spanish)
danimv5 Mar 19, 2021
4970252
Translated using Weblate (Spanish)
danimv5 Mar 19, 2021
9fa75f1
[IMP] sale_manual_delivery: black, isort, prettier
ivantodorovich Apr 20, 2021
2c629a8
[MIG] sale_manual_delivery: Migration to 13.0
ivantodorovich Apr 20, 2021
4b45feb
[UPD] Update sale_manual_delivery.pot
oca-travis Apr 24, 2021
5b56fc4
[UPD] README.rst
OCA-git-bot Apr 24, 2021
d74db3d
[13.0] Fix view_sales_order_undelivered_line_filter
santostelmo May 25, 2021
ae64a14
sale_manual_delivery 13.0.1.0.1
OCA-git-bot May 26, 2021
194addc
[FIX] for drop shipping module
vrenaville May 25, 2021
5bc41ff
sale_manual_delivery 13.0.1.0.2
OCA-git-bot Jul 6, 2021
035ef0d
[IMP] sale_manual_delivery: black, isort, prettier
ChrisOForgeFlow Apr 14, 2022
230deb4
[14.0][MIG] sale_manual_delivery
ChrisOForgeFlow Apr 14, 2022
f2fa0ca
[ADD] init hook script for big databases
ChrisOForgeFlow Apr 14, 2022
cb286b7
[ADD] permissions on trasient models
ChrisOForgeFlow Apr 21, 2022
221f8c2
[IMP] added field to don't show button if not exists pending to deliver
ChrisOForgeFlow May 12, 2022
b9598b5
[FIX] user validation error, update definition act_window
ChrisOForgeFlow Aug 26, 2022
30a0df7
[RM] sale_manual_delivery: remove checking state of lines
Mar 20, 2023
5eeb129
[IMP] sale_manual_delivery: test checking has_pending_delivery
Mar 20, 2023
b8fb68e
[UPD] Update sale_manual_delivery.pot
Jul 12, 2023
b534711
[UPD] README.rst
OCA-git-bot Jul 12, 2023
4f69a9a
Update translation files
weblate Jul 12, 2023
325c7ab
[UPD] README.rst
OCA-git-bot Sep 3, 2023
7afb7ce
Translated using Weblate (Spanish)
Ivorra78 Jan 26, 2024
39154af
Added translation using Weblate (Italian)
mymage Dec 17, 2024
40a4b00
[IMP] sale_manual_delivery: pre-commit auto fixes
rdualsam Jan 9, 2025
275a618
[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 <[email protected]>
- Joel Grand-Guillaume <[email protected]>
- Phuc Tran Thanh <[email protected]>
- Iván Todorovich <[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/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": ["stock_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(env):
env.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';
"""
)
env.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"';
"""
)

env.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