本文整理汇总了Python中stoqlib.domain.product.ProductHistory.add_transfered_item方法的典型用法代码示例。如果您正苦于以下问题:Python ProductHistory.add_transfered_item方法的具体用法?Python ProductHistory.add_transfered_item怎么用?Python ProductHistory.add_transfered_item使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类stoqlib.domain.product.ProductHistory
的用法示例。
在下文中一共展示了ProductHistory.add_transfered_item方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: send
# 需要导入模块: from stoqlib.domain.product import ProductHistory [as 别名]
# 或者: from stoqlib.domain.product.ProductHistory import add_transfered_item [as 别名]
def send(self):
"""Sends this item to it's destination |branch|"""
assert self.transfer_order.can_close()
storable = self.sellable.product_storable
storable.decrease_stock(self.quantity, self.transfer_order.source_branch,
StockTransactionHistory.TYPE_TRANSFER_TO,
self.id)
ProductHistory.add_transfered_item(self.store, self.transfer_order.source_branch, self)
示例2: send_item
# 需要导入模块: from stoqlib.domain.product import ProductHistory [as 别名]
# 或者: from stoqlib.domain.product.ProductHistory import add_transfered_item [as 别名]
def send_item(self, transfer_item):
"""Sends a |product| of this order to it's destination |branch|"""
assert self.can_close()
storable = transfer_item.sellable.product_storable
storable.decrease_stock(transfer_item.quantity, self.source_branch,
StockTransactionHistory.TYPE_TRANSFER_TO,
transfer_item.id)
store = self.store
ProductHistory.add_transfered_item(store, self.source_branch,
transfer_item)
示例3: send
# 需要导入模块: from stoqlib.domain.product import ProductHistory [as 别名]
# 或者: from stoqlib.domain.product.ProductHistory import add_transfered_item [as 别名]
def send(self):
"""Sends this item to it's destination |branch|.
This method should never be used directly, and to send a transfer you
should use TransferOrder.send().
"""
storable = self.sellable.product_storable
storable.decrease_stock(self.quantity,
self.transfer_order.source_branch,
StockTransactionHistory.TYPE_TRANSFER_TO,
self.id, batch=self.batch)
ProductHistory.add_transfered_item(self.store,
self.transfer_order.source_branch,
self)