Skip to content

Commit

Permalink
[14.0][ADD] stock_move_line_description: When you change the descript…
Browse files Browse the repository at this point in the history
…ion of the sales order line, also change the description of its stock movements.
  • Loading branch information
alfredoavanzosc committed Nov 26, 2024
1 parent c340b27 commit 19138b2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stock_move_line_description/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Stock Move Line Description",
"version": "14.0.1.0.0",
"version": "14.0.1.1.0",
"author": "Avanzosc",
"category": "Sale",
"website": "https://github.com/avanzosc/odoo-addons",
Expand Down
1 change: 1 addition & 0 deletions stock_move_line_description/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
from . import account_move
from . import stock_move
from . import sale_order_line
13 changes: 13 additions & 0 deletions stock_move_line_description/models/sale_order_line.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from odoo import api, models


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

def write(self, values):
result = super(SaleOrderLine, self).write(values)
if "name" in values:
for line in self:
if line.move_ids:
line.move_ids.write({"name": line.name})
return result

0 comments on commit 19138b2

Please sign in to comment.