Skip to content

Commit

Permalink
[FIX] stock_ux: bypassed allow picking cancelation when write PO
Browse files Browse the repository at this point in the history
Part-of: #385
  • Loading branch information
ALopez-Adhoc committed Jul 20, 2023
1 parent bf20efb commit 67417a5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion stock_ux/__manifest__.py
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Stock UX',
'version': "16.0.2.2.0",
'version': "16.0.2.3.0",
'category': 'Warehouse Management',
'sequence': 14,
'summary': '',
Expand All @@ -32,6 +32,7 @@
'sale_stock',
'report_aeroo',
'stock_voucher',
'purchase_stock',
],
'data': [
'security/stock_ux_security.xml',
Expand Down
1 change: 1 addition & 0 deletions stock_ux/models/__init__.py
Expand Up @@ -12,3 +12,4 @@
from . import stock_picking_type
from . import sale_order
from . import res_config_settings
from . import purchase_order
10 changes: 10 additions & 0 deletions stock_ux/models/purchase_order.py
@@ -0,0 +1,10 @@
from odoo import _, api, fields, models


class PurchaseOrder(models.Model):
_inherit = 'purchase.order'

def write(self, values):
self = self.with_context(cancel_from_order=True)
return super().write(values)

0 comments on commit 67417a5

Please sign in to comment.