1、序列号模型添加二维码字段,添加自动根据序列号名称生成二维码的功能,新增打印二维码功能;

This commit is contained in:
yuxianghui
2024-02-20 15:59:58 +08:00
parent bb519b8ab8
commit cf3ec1b6ae
5 changed files with 75 additions and 32 deletions

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="stock_production_lot_form_generate_qr_code" model="ir.ui.view">
<field name="name">stock.lot.form.quality</field>
<field name="model">stock.lot</field>
<field name="inherit_id" ref="stock.view_production_lot_form"/>
<field name="arch" type="xml">
<xpath expr="//form//sheet//group//group[2]" position="inside">
<field name="qr_code_image" widget="image"/>
</xpath>
<xpath expr="//sheet" position="before">
<header>
<button string="打印二维码" name="print_qr_code" type="object" class="btn-primary"/>
</header>
</xpath>
</field>
</record>
</odoo>