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: Migration to 18.0 #3518

Open
wants to merge 58 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
58 commits
Select commit Hold shift + click to select a range
4a99f7a
base module & sales_team
leemannd Jan 12, 2017
d91900a
Add action_manual_procurement_wizard
jcoux Feb 14, 2017
f2a4d41
flake8 & OCA standards
leemannd Feb 15, 2017
25c89b5
[IMP] report manual procurement on SO from sale team
jgrandguillaume Feb 15, 2017
7336fb7
[TYP] Change manual proc for manual delivery
jgrandguillaume Feb 15, 2017
593840f
[IMP] Toggle manual,standard as a button in SO + UI
jgrandguillaume Feb 15, 2017
fb8219a
[ADD] Tests on various use cases
jgrandguillaume Feb 15, 2017
aa2c956
Regroup picking per date_planned / carrier + correct wizard action fr…
mdietrichc2c Feb 20, 2017
c3f3a00
[FIX] picking split criteria
vrenaville Feb 28, 2017
8798c2d
add Delivery Address to wizard. by default selec SO partner address.
Sep 21, 2017
5b46260
[MIG][11] rm coding* + python 2to3
Tonow-c2c Aug 20, 2019
38ae845
[MIG][11] Run black to fix lint
Tonow-c2c Aug 21, 2019
755b1b5
[MIG][11] Fix tests for V11 stock.picking
Tonow-c2c Aug 23, 2019
9414f77
[FIX] can switch from manual on sent state + fix field name changed
vrenaville Sep 13, 2019
85a79eb
Remove unneeded calls to invalidate_cache
grindtildeath Nov 4, 2019
3d64358
[IMP]allow to manually deliver sale order lines from different sale o…
AaronHForgeFlow Nov 7, 2019
8605ff0
[MIG]sale_manual_delivery to v12
AaronHForgeFlow Nov 8, 2019
4016109
[FIX] Restore res_partner field in the view with respect to last chan…
mmequignon Feb 6, 2020
964b0bf
[FIX] Partner id will be retrive from wizard to procurement rule
Tonow-c2c Feb 20, 2020
1d6e659
[FIX] wizard float_compare product precision
Tonow-c2c Feb 21, 2020
47c999c
[FIX] to use the right product uom rounding
Tonow-c2c Feb 24, 2020
929a023
[UPD] Update sale_manual_delivery.pot
oca-travis Feb 22, 2021
24491b3
sale_manual_delivery 12.0.2.0.1
OCA-git-bot Feb 22, 2021
a077c09
Added translation using Weblate (Spanish)
danimv5 Mar 19, 2021
17811a9
Translated using Weblate (Spanish)
danimv5 Mar 19, 2021
4858253
[IMP] sale_manual_delivery: black, isort, prettier
ivantodorovich Apr 20, 2021
86f9f61
[MIG] sale_manual_delivery: Migration to 13.0
ivantodorovich Apr 20, 2021
31ed86e
[UPD] Update sale_manual_delivery.pot
oca-travis Apr 24, 2021
7d9eb65
[UPD] README.rst
OCA-git-bot Apr 24, 2021
15c221f
[13.0] Fix view_sales_order_undelivered_line_filter
santostelmo May 25, 2021
1d17d31
sale_manual_delivery 13.0.1.0.1
OCA-git-bot May 26, 2021
73c242a
[FIX] for drop shipping module
vrenaville May 25, 2021
c41fadf
sale_manual_delivery 13.0.1.0.2
OCA-git-bot Jul 6, 2021
b3a6e93
[IMP] sale_manual_delivery: black, isort, prettier
ChrisOForgeFlow Apr 14, 2022
e2e90fb
[14.0][MIG] sale_manual_delivery
ChrisOForgeFlow Apr 14, 2022
3a3023a
[ADD] init hook script for big databases
ChrisOForgeFlow Apr 14, 2022
c16cf93
[ADD] permissions on trasient models
ChrisOForgeFlow Apr 21, 2022
32e43dd
[IMP] added field to don't show button if not exists pending to deliver
ChrisOForgeFlow May 12, 2022
6aa0ce5
[FIX] user validation error, update definition act_window
ChrisOForgeFlow Aug 26, 2022
a573855
[MIG] sale_manual_delivery: Migration to 16.0
Mar 16, 2023
3a37af0
[UPD] Update sale_manual_delivery.pot
Jul 12, 2023
5174e5d
[UPD] README.rst
OCA-git-bot Jul 12, 2023
209c450
Update translation files
weblate Jul 12, 2023
904eed3
Translated using Weblate (Spanish)
Ivorra78 Jul 25, 2023
4f8a844
[UPD] README.rst
OCA-git-bot Sep 3, 2023
0a11074
Added translation using Weblate (Italian)
mymage Dec 1, 2023
f94c84f
Translated using Weblate (Italian)
mymage Dec 19, 2023
b750b24
[fix] sale_manual_delivery: wrong route_id model
dhp-denero Sep 28, 2023
13b2384
[BOT] post-merge updates
OCA-git-bot Jan 27, 2024
9590845
[17.0][MIG] sale_manual_delivery: pre-commit
astirpe Feb 22, 2024
1b1889b
[17.0][MIG] sale_manual_delivery: Migration to 17.0
astirpe Feb 22, 2024
b0802ad
[RM] sale_manual_delivery: remove checking state of lines
Mar 20, 2023
a386814
[IMP] sale_manual_delivery: test checking has_pending_delivery
Mar 20, 2023
6dd0cc4
[UPD] Update sale_manual_delivery.pot
May 3, 2024
7731da6
[BOT] post-merge updates
OCA-git-bot May 3, 2024
34e1dea
Update translation files
weblate May 3, 2024
095e73d
Translated using Weblate (Italian)
mymage Jun 5, 2024
8d4f1e5
[MIG] sale_manual_delivery: Migration to 18.0
bizzappdev Dec 23, 2024
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
111 changes: 111 additions & 0 deletions sale_manual_delivery/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
====================
Sale Manual Delivery
====================

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

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

|Field|

|Wizard|

.. |Field| image:: https://raw.githubusercontent.com/OCA/sale-workflow/18.0/sale_manual_delivery/static/description/field.png
.. |Wizard| image:: https://raw.githubusercontent.com/OCA/sale-workflow/18.0/sale_manual_delivery/static/description/wizard.png

**Table of contents**

.. contents::
:local:

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]>

- `Trobz <https://trobz.com>`__:

- nguyenhk <[email protected]>

- `360ERP <https://www.360erp.com>`__:

- Andrea Stirpe

Other credits
-------------

The migration of this module from 14.0 to 16.0 was financially supported
by Camptocamp

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",
}
65 changes: 65 additions & 0 deletions sale_manual_delivery/hook.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
def pre_init_hook(env):
cr = env.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