解除装夹处打印成品二维码
This commit is contained in:
@@ -1093,6 +1093,16 @@ class ResMrpWorkOrder(models.Model):
|
||||
# logging.info('button_send_program_again error:%s' % e)
|
||||
# raise UserError("重新下发nc程序失败,请联系管理员")
|
||||
|
||||
def print_method(self):
|
||||
"""
|
||||
解除装夹处调用关联制造订单的关联序列号的打印方法
|
||||
"""
|
||||
if self.production_id:
|
||||
if self.production_id.lot_producing_id:
|
||||
self.production_id.lot_producing_id.print_single_method()
|
||||
else:
|
||||
raise UserError("无关联制造订单或关联序列号,无法打印。请检查!")
|
||||
|
||||
|
||||
class CNCprocessing(models.Model):
|
||||
_name = 'sf.cnc.processing'
|
||||
|
||||
@@ -404,6 +404,7 @@ class ProductionLot(models.Model):
|
||||
|
||||
def print_single_method(self):
|
||||
|
||||
print('self.name========== %s' % self.name)
|
||||
self.ensure_one()
|
||||
qr_code_data = self.qr_code_image
|
||||
if not qr_code_data:
|
||||
|
||||
@@ -165,6 +165,8 @@
|
||||
<!-- groups="sf_base.group_sf_order_user,sf_base.group_sf_equipment_user"-->
|
||||
<!-- attrs="{'invisible': ['|', '|', '|',('routing_type','!=','装夹预调'),('state','in',['done', 'cancel',-->
|
||||
<!-- 'progress']),('cnc_worksheet','=',False),('is_send_program_again','=',True)]}"/>-->
|
||||
<button name="print_method" type="object" string="打印二维码" class="btn-primary"
|
||||
attrs="{'invisible': ['|',('routing_type','!=','解除装夹'),('state','!=','done')]}"/>
|
||||
</xpath>
|
||||
<xpath expr="//page[1]" position="before">
|
||||
<page string="开料要求" attrs='{"invisible": [("routing_type","!=","切割")]}'>
|
||||
|
||||
Reference in New Issue
Block a user