class stock_picking(models.Model):
_inherit = 'stock.picking'
def button_print(self):
print_tml = self._name.replace('.','_')+'.html'
if self._context.get('print_templates'):
print_tml = self._context['print_templates']
client_action = {'type': 'ir.actions.act_url',
'name': u"套打",
'target': 'new',
'nodestroy': True,
'url': '/Print?model=%s&id=%s&print_tml=%s' % (self._name,self.id,print_tml),
}
return client_action
第九十六节 DTCloud 自定义Html5报表开发
最新推荐文章于 2024-06-14 09:50:01 发布