取消线上解决bug的改动

This commit is contained in:
胡尧
2025-04-23 14:22:50 +08:00
parent 7b77d846c3
commit 6767b693f5
2 changed files with 0 additions and 20 deletions

View File

@@ -28,10 +28,6 @@ class PurchaseRequest(models.Model):
origin_context.pop('search_default_draft')
action['context'] = origin_context
return action
def button_in_progress(self):
return self.write({"state": "in_progress"})
class PurchaseRequestLine(models.Model):
_inherit = 'purchase.request.line'

View File

@@ -101,22 +101,6 @@ class PurchaseRequestLineMakePurchaseOrder(models.TransientModel):
# 去掉合并必须同一采购组的限制
pass
def _post_process_po_line(self, item, po_line, new_pr_line):
self.ensure_one()
line = item.line_id
# TODO: Check propagate_uom compatibility:
new_qty = self.env["purchase.request.line"]._calc_new_qty(
line, po_line=po_line, new_pr_line=new_pr_line
)
po_line.product_qty = new_qty
# The quantity update triggers a compute method that alters the
# unit price (which is what we want, to honor graduate pricing)
# but also the scheduled date which is what we don't want.
date_required = line.date_required
po_line.date_planned = datetime(
date_required.year, date_required.month, date_required.day
)
class PurchaseRequestLineMakePurchaseOrderItem(models.TransientModel):