为什么我收到错误"未找到模型:product.print.zpl.barcode"当我尝试安装模块?

时间:2018-05-10 14:00:33

标签: python xml odoo odoo-9 odoo-view

我想安装自定义模块as.Date(paste(dt$mon,dt$day,dt$year,sep="-"),format = "%m-%d-%Y") ,但是当我按下按钮安装时会显示此错误:

product_print_zpl_barcode

ParseError: "Invalid view definition D\xe9tails de l'erreur : Mod\xe8le non trouv\xe9 : product.print.zpl.barcode Contexte de l'erreur : Vue `product_print_zpl_barcode.form` [view_id: 847, xml_id: n/a, model: product.print.zpl.barcode, parent_id: n/a] None" while parsing [...]/openerp/addons/product_print_zpl_barcode/views/product_print_zpl_barcode_view.xml:5, near

product_print_zpl_barcode_view.xml

我想创建一个新模型<record id="product_print_zpl_barcode_form" model="ir.ui.view"> <field name="name">product_print_zpl_barcode.form</field> <field name="model">product.print.zpl.barcode</field> <field name="arch" type="xml"> <form string="Generate and Print Product Barcode"> <group name="step1" string="Configuration"> <field name="state" invisible="1"/> <field name="currency_id" invisible="1"/> <field name="product_id"/> <field name="product_name" attrs="{'readonly': [('state', '=', 'step2')]}"/> <field name="pricelist_id" attrs="{'readonly': [('state', '=', 'step2')]}"/> <field name="price_uom"/> <field name="label_size" attrs="{'readonly': [('state', '=', 'step2')]}"/> <field name="nomenclature_id" attrs="{'readonly': [('state', '=', 'step2')]}"/> <field name="rule_id"/> <field name="barcode_type"/> <field name="barcode"/> <field name="copies" attrs="{'readonly': [('state', '=', 'step2')]}"/> </group> <group string="Enter Quantity" attrs="{'invisible': [('barcode_type', '=', 'product')]}"> <div name="qty_uom"> <field name="quantity" attrs="{'readonly': [('state', '=', 'step2')]}" class="oe_inline"/> <field name="uom_id" class="oe_inline"/> </div> </group> <group name="step2" states="step2" string="Label"> <field name="price"/> <field name="zpl_file" filename="zpl_filename"/> <field name="zpl_filename" invisible="1"/> <field name="zpl_printer_id" required="1"/> </group> <footer> <button name="generate" type="object" string="Generate Label" class="btn-primary" states="step1"/> <button special="cancel" string="Cancel" class="oe_link" states="step1"/> <button name="print_zpl" type="object" string="Print" class="btn-primary" states="step2"/> <button name="print_zpl" type="object" string="Print and New" class="btn-primary" context="{'print_and_new': True}" attrs="{'invisible': ['|', ('state', '!=', 'step2'), ('barcode_type', '=', 'product')]}"/> <button special="cancel" string="Close" class="oe_link" states="step2"/> </footer> </form> </field> </record> <record id="product_print_zpl_barcode_action" model="ir.actions.act_window"> <field name="name">Generate Barcode</field> <field name="res_model">product.print.zpl.barcode</field> <field name="view_mode">form</field> <field name="target">new</field> </record> ,但即使创建了动作,Odoo也无法识别新模型。 这是

的代码

0 个答案:

没有答案