Skip to content

Commit 86f1818

Browse files
IriaAlonsodalonsod
authored andcommitted
[ADD] stock_picking_deliveryslip_sol_unique
By default, when some moves are exactly the same on a picking, they are merged. Merging is now prevented only on picking from sale orders.
1 parent c8dc23c commit 86f1818

9 files changed

Lines changed: 518 additions & 0 deletions

File tree

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
=================================================
2+
Stock Picking Deliveryslip Sale Order Line Unique
3+
=================================================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:636e234fe705057f4651e35b7818cf13d438ad2d9b56f370683ce9cf3de77772
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
18+
:alt: License: LGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-solvosci%2Fslv--sale-lightgray.png?logo=github
20+
:target: https://github.com/solvosci/slv-sale/tree/17.0/stock_picking_deliveryslip_sol_unique
21+
:alt: solvosci/slv-sale
22+
23+
|badge1| |badge2| |badge3|
24+
25+
By default, when some moves are exactly the same on a picking, they are merged.
26+
Merging is now prevented only on picking from sale orders.
27+
28+
**Table of contents**
29+
30+
.. contents::
31+
:local:
32+
33+
Bug Tracker
34+
===========
35+
36+
Bugs are tracked on `GitHub Issues <https://github.com/solvosci/slv-sale/issues>`_.
37+
In case of trouble, please check there if your issue has already been reported.
38+
If you spotted it first, help us to smash it by providing a detailed and welcomed
39+
`feedback <https://github.com/solvosci/slv-sale/issues/new?body=module:%20stock_picking_deliveryslip_sol_unique%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
40+
41+
Do not contact contributors directly about support or help with technical issues.
42+
43+
Credits
44+
=======
45+
46+
Authors
47+
~~~~~~~
48+
49+
* Solvos
50+
51+
Contributors
52+
~~~~~~~~~~~~
53+
54+
* Iria Alonso <iria.alonso@solvos.es>
55+
56+
Maintainers
57+
~~~~~~~~~~~
58+
59+
This module is part of the `solvosci/slv-sale <https://github.com/solvosci/slv-sale/tree/17.0/stock_picking_deliveryslip_sol_unique>`_ project on GitHub.
60+
61+
You are welcome to contribute.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# © 2025 Solvos Consultoría Informática (<http://www.solvos.es>)
2+
# License LGPL-3 - See http://www.gnu.org/licenses/lgpl-3.0.html
3+
{
4+
"name": "Stock Picking Deliveryslip Sale Order Line Unique",
5+
"summary": """
6+
By default, when some moves are exactly the same on a picking, they are merged.
7+
Merging is now prevented only on picking from sale orders.
8+
""",
9+
"author": "Solvos",
10+
"license": "LGPL-3",
11+
"version": "17.0.1.0.0",
12+
"category": "Inventory/Stock",
13+
"website": "https://github.com/solvosci/slv-sale",
14+
"depends": [
15+
"sale_stock",
16+
],
17+
"installable": True,
18+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import stock_move_line
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# © 2025 Solvos Consultoría Informática (<http://www.solvos.es>)
2+
# License LGPL-3 - See http://www.gnu.org/licenses/lgpl-3.0.html
3+
4+
from odoo import models
5+
6+
7+
class StockMoveLine(models.Model):
8+
_inherit = "stock.move.line"
9+
10+
def _get_aggregated_properties(self, move_line=False, move=False):
11+
result = super()._get_aggregated_properties(move_line=move_line, move=move)
12+
move = result['move']
13+
if move.sale_line_id:
14+
sale_line_id = move.sale_line_id.id
15+
else:
16+
sale_line_id = 0
17+
result['line_key'] = f"{result['line_key']}_{sale_line_id}"
18+
return result
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* Iria Alonso <iria.alonso@solvos.es>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
By default, when some moves are exactly the same on a picking, they are merged.
2+
Merging is now prevented only on picking from sale orders.
21.6 KB
Loading

0 commit comments

Comments
 (0)