Accept Merge Request #2041: (feature/6684 -> develop)
Merge Request: 取消线上解决bug的改动 Created By: @胡尧 Accepted By: @胡尧 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/2041?initial=true
This commit is contained in:
@@ -28,10 +28,6 @@ class PurchaseRequest(models.Model):
|
|||||||
origin_context.pop('search_default_draft')
|
origin_context.pop('search_default_draft')
|
||||||
action['context'] = origin_context
|
action['context'] = origin_context
|
||||||
return action
|
return action
|
||||||
|
|
||||||
|
|
||||||
def button_in_progress(self):
|
|
||||||
return self.write({"state": "in_progress"})
|
|
||||||
|
|
||||||
class PurchaseRequestLine(models.Model):
|
class PurchaseRequestLine(models.Model):
|
||||||
_inherit = 'purchase.request.line'
|
_inherit = 'purchase.request.line'
|
||||||
|
|||||||
@@ -101,22 +101,6 @@ class PurchaseRequestLineMakePurchaseOrder(models.TransientModel):
|
|||||||
# 去掉合并必须同一采购组的限制
|
# 去掉合并必须同一采购组的限制
|
||||||
pass
|
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):
|
class PurchaseRequestLineMakePurchaseOrderItem(models.TransientModel):
|
||||||
|
|||||||
Reference in New Issue
Block a user