Skip to Content
Odoo เมนู
  • ลงชื่อเข้าใช้
  • ทดลองใช้ฟรี
  • แอป
    การเงิน
    • ระบบบัญชี
    • ระบบการออกใบแจ้งหนี้
    • ระบบบัญชีรายจ่าย
    • ระบบการจัดการข้อมูลผ่านสเปรดชีต (BI)
    • เอกสาร
    • ระบบลงลายเซ็น
    การขาย
    • ลูกค้าสัมพันธ์
    • การขาย
    • POS ร้านค้า
    • POS ร้านอาหาร
    • ระบบสมัครสมาชิก
    • การเช่า
    การจัดการเว็บไซต์
    • เครื่องมือสร้างเว็บไซต์
    • ระบบการขายออนไลน์
    • บล็อก
    • ฟอรั่ม
    • ไลฟ์แชท
    • ระบบการอบรมออนไลน์
    ซัพพลายเชน
    • คลังสินค้า
    • ระบบการผลิต
    • PLM
    • ระบบการจัดซื้อ
    • การซ่อมบำรุง
    • ระบบจัดการคุณภาพ
    ทรัพยากรบุคคล
    • ข้อมูลพนักงาน
    • ระบบสรรหาบุคลากร
    • ระบบการลา
    • การประเมิน
    • ระบบการแนะนำพนักงาน
    • ระบบจัดการยานพาหนะ
    การตลาด
    • โซเชียลมาร์เก็ตติ้ง
    • การตลาดผ่านอีเมล
    • ระบบการตลาดผ่าน SMS
    • ระบบการจัดงานอีเวนต์
    • การตลาดแบบอัตโนมัติ
    • ระบบแบบสำรวจ
    การบริการ
    • โปรเจกต์
    • ระบบบันทึกเวลา
    • ระบบการจัดการบริการภาคสนาม
    • ระบบดูแลช่วยเหลือ
    • การวางแผน
    • การนัดหมาย
    ประสิทธิผล
    • ระบบแสดงความคิดเห็น
    • ระบบการอนุมัติ
    • ไอโอที
    • VoIP
    • คลังข้อมูล
    • WhatsApp
    แอปพลิเคชันของบุคคลที่สาม Odoo สตูดิโอ แพลตฟอร์มคลาวด์ของ Odoo
  • อุตสาหกรรม
    การค้าปลีก
    • ร้านขายหนังสือ
    • ร้านขายเสื้อผ้า
    • ร้านขายเฟอร์นิเจอร์
    • ร้านขายของชำ
    • ร้านขายฮาร์ดแวร์
    • ร้านขายของเล่น
    Food & Hospitality
    • บาร์และผับ
    • ร้านอาหาร
    • อาหารฟาสต์ฟู้ด
    • Guest House
    • ตัวแทนจำหน่ายเครื่องดื่ม
    • Hotel
    อสังหาริมทรัพย์
    • Real Estate Agency
    • บริษัทสถาปัตยกรรม
    • บริษัทรับเหมา
    • การจัดการอสังหาริมทรัพย์
    • การจัดสวน
    • สมาคมเจ้าของอสังหาริมทรัพย์
    ปรึกษา
    • สำนักงานบัญชี
    • Odoo พาร์ทเนอร์
    • เอเจนซี่การตลาด
    • สำนักงานกฎหมาย
    • บริการสรรหาบุคลากร
    • การตรวจสอบและการรับรอง
    ระบบการผลิต
    • Textile
    • เหล็ก
    • เฟอร์นิเจอร์
    • อาหาร
    • Brewery
    • ของขวัญขององค์กร
    สุขภาพ & ฟิตเนส
    • ชมรมกีฬา
    • ร้านขายแว่นตา
    • ฟิตเนส
    • ผู้ประกอบวิชาชีพด้านสุขภาพ
    • ร้านขายยา
    • ร้านทำผม
    Trades
    • ช่างซ่อม
    • ฮาร์ดแวร์และการสนับสนุนด้านไอที
    • ระบบพลังงานแสงอาทิตย์
    • ช่างทำรองเท้า
    • บริการทำความสะอาด
    • HVAC Services
    อื่น ๆ
    • Nonprofit Organization
    • สำนักงานสิ่งแวดล้อม
    • ร้านเช่าป้ายโฆษณา
    • การถ่ายภาพ
    • ร้านเช่าจักรยาน
    • ตัวแทนจำหน่ายซอฟต์แวร์
    Browse all Industries
  • คอมมูนิตี้
    ศึกษา
    • บทเรียน
    • เอกสารกำกับโปรแกรม
    • การรับรอง
    • การฝึกอบรม
    • บล็อก
    • พอดแคสต์
    เพิ่มศักยภาพให้กับการศึกษา
    • โปรแกรมการศึกษา
    • Scale Up! Business Game
    • เยี่ยมชม Odoo
    รับซอฟต์แวร์
    • ดาวน์โหลด
    • เปรียบเทียบรุ่น
    • เผยแพร่
    ทำงานร่วมกัน
    • Github
    • ฟอรั่ม
    • ระบบการจัดงานอีเวนต์
    • การแปล
    • ร่วมเป็นพาร์ทเนอร์
    • Services for Partners
    • ลงทะเบียนเพื่อสร้างบัญชีบริษัทของคุณ
    รับบริการ
    • ค้นหาพาร์ทเนอร์
    • ค้นหานักบัญชี
    • พบกับที่ปรึกษา
    • บริการติดตั้งระบบเพื่อใช้งาน
    • ข้อมูลอ้างอิงลูกค้า
    • การสนับสนุน
    • อัปเกรด
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    รับการสาธิต
  • ราคา
  • ช่วยเหลือ

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • ลูกค้าสัมพันธ์
  • e-Commerce
  • ระบบบัญชี
  • สินค้าคงคลัง
  • PoS
  • โปรเจกต์
  • MRP
All apps
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
All Posts คน เหรียญรางวัล
แท็ก (View all)
odoo accounting v14 pos v15
เกี่ยวกับฟอรั่มนี้
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
All Posts คน เหรียญรางวัล
แท็ก (View all)
odoo accounting v14 pos v15
เกี่ยวกับฟอรั่มนี้
ช่วยเหลือ

Custom module installation error on XML that is commented out.

ติดตาม

รับการแจ้งเตือนเมื่อมีกิจกรรมในโพสต์นี้

คำถามนี้ถูกตั้งค่าสถานะ
xmlV13
4 ตอบกลับ
5406 มุมมอง
อวตาร
Jeff Mueller

Receiving an Odoo error on a block of XML that has been commented out.

0
อวตาร
ละทิ้ง
Jeff Mueller
ผู้เขียน

Thanks Ashish,

I did figure out my mistakes (multiple). The error message was throwing me off where the real problem was.

อวตาร
Ashish Singh
คำตอบที่ดีที่สุด

Hi, Jeff


Regarding above issue there can have two reasons,
    CASE 1: If both views (Action and Form view) are present inside the same extension

If this view is present inside the same extension ("szm_motraveler") then you need to check the sequence of views which are listed inside __manifest__.py. It seems view file which include that action is defined next to the above view file.

  • For example, I have two files,
    • abc_view.xml

    • abc_action_view.xml

  • So if first view file use action which is defined inside the "abc_action_view.xml" then sequence of files inside the __manifest__.py will be like,

    • 'data' : [
      'views/abc_action_view.xml',
      'views/abc_view.xml',
      ],


CASE 2: If both views (Action and Form view) are present inside the different extension
  • In that case dependency should be present inside the __manifest__.py file like below,

    • 'depends' : [
      'szm_motraveler',
      ],


Feel free to ask in case you have any confusion related to the above points.

Thanks,
Ashish Singh (Team Lead)
Webkul Software Private Limited
8
อวตาร
ละทิ้ง
อวตาร
Jeff Mueller
ผู้เขียน คำตอบที่ดีที่สุด

I'm still a noob, but have a situation where upon installation of a new module, I am receiving the following error. 

What is perplexing is that the error is referencing a block of XML that is commented out. What I have done is basically take an exact copy of  mrp.production.form (albeit renamed) and with sections removed. Obviously, not everything is quite to where I need it, but for the life of me, I cannot determine why this error is being presented.

Error:

Odoo Server Error


Traceback (most recent call last):

  File "/home/odoo/src/odoo/odoo/tools/cache.py", line 85, in lookup

    r = d[key]

  File "/home/odoo/src/odoo/odoo/tools/func.py", line 69, in wrapper

    return func(self, *args, **kwargs)

  File "/home/odoo/src/odoo/odoo/tools/lru.py", line 44, in __getitem__

    a = self.d[obj].me

KeyError: ('ir.model.data', <function IrModelData.xmlid_lookup at 0x7f703f51b268>, 'szm_motraveler.action_mrp_workorder_production_specific')


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/home/odoo/src/odoo/odoo/tools/convert.py", line 712, in parse

    self._tag_root(de)

  File "/home/odoo/src/odoo/odoo/tools/convert.py", line 674, in _tag_root

    f(rec)

  File "/home/odoo/src/odoo/odoo/tools/convert.py", line 674, in _tag_root

    f(rec)

  File "/home/odoo/src/odoo/odoo/tools/convert.py", line 563, in _tag_record

    f_val = _eval_xml(self, field, env)

  File "/home/odoo/src/odoo/odoo/tools/convert.py", line 143, in _eval_xml

    +_process("".join(etree.tostring(n, encoding='unicode') for n in node))

  File "/home/odoo/src/odoo/odoo/tools/convert.py", line 132, in _process

    self.idref[id] = self.id_get(id)

  File "/home/odoo/src/odoo/odoo/tools/convert.py", line 657, in id_get

    res = self.model_id_get(id_str, raise_if_not_found)

  File "/home/odoo/src/odoo/odoo/tools/convert.py", line 663, in model_id_get

    return self.env['ir.model.data'].xmlid_to_res_model_res_id(id_str, raise_if_not_found=raise_if_not_found)

  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_model.py", line 1666, in xmlid_to_res_model_res_id

    return self.xmlid_lookup(xmlid)[1:3]

  File "<decorator-gen-24>", line 2, in xmlid_lookup

  File "/home/odoo/src/odoo/odoo/tools/cache.py", line 90, in lookup

    value = d[key] = self.method(*args, **kwargs)

  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_model.py", line 1655, in xmlid_lookup

    raise ValueError('External ID not found in the system: %s' % xmlid)

ValueError: External ID not found in the system: szm_motraveler.action_mrp_workorder_production_specific


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/home/odoo/src/odoo/odoo/http.py", line 619, in _handle_exception

    return super(JsonRequest, self)._handle_exception(exception)

  File "/home/odoo/src/odoo/odoo/http.py", line 309, in _handle_exception

    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])

  File "/home/odoo/src/odoo/odoo/tools/pycompat.py", line 14, in reraise

    raise value

  File "/home/odoo/src/odoo/odoo/http.py", line 664, in dispatch

    result = self._call_function(**self.params)

  File "/home/odoo/src/odoo/odoo/http.py", line 345, in _call_function

    return checked_call(self.db, *args, **kwargs)

  File "/home/odoo/src/odoo/odoo/service/model.py", line 93, in wrapper

    return f(dbname, *args, **kwargs)

  File "/home/odoo/src/odoo/odoo/http.py", line 338, in checked_call

    result = self.endpoint(*a, **kw)

  File "/home/odoo/src/odoo/odoo/http.py", line 910, in __call__

    return self.method(*args, **kw)

  File "/home/odoo/src/odoo/odoo/http.py", line 510, in response_wrap

    response = f(*args, **kw)

  File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 1324, in call_button

    action = self._call_kw(model, method, args, kwargs)

  File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 1312, in _call_kw

    return call_kw(request.env[model], method, args, kwargs)

  File "/home/odoo/src/odoo/odoo/api.py", line 387, in call_kw

    result = _call_kw_multi(method, model, args, kwargs)

  File "/home/odoo/src/odoo/odoo/api.py", line 374, in _call_kw_multi

    result = method(recs, *args, **kwargs)

  File "<decorator-gen-58>", line 2, in button_immediate_install

  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_module.py", line 72, in check_and_log

    return method(self, *args, **kwargs)

  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_module.py", line 463, in button_immediate_install

    return self._button_immediate_function(type(self).button_install)

  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_module.py", line 573, in _button_immediate_function

    modules.registry.Registry.new(self._cr.dbname, update_module=True)

  File "/home/odoo/src/odoo/odoo/modules/registry.py", line 86, in new

    odoo.modules.load_modules(registry._db, force_demo, status, update_module)

  File "/home/odoo/src/odoo/odoo/modules/loading.py", line 423, in load_modules

    loaded_modules, update_module, models_to_check)

  File "/home/odoo/src/odoo/odoo/modules/loading.py", line 315, in load_marked_modules

    perform_checks=perform_checks, models_to_check=models_to_check

  File "/home/odoo/src/odoo/odoo/modules/loading.py", line 225, in load_module_graph

    load_data(cr, idref, mode, kind='data', package=package, report=report)

  File "/home/odoo/src/odoo/odoo/modules/loading.py", line 68, in load_data

    tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)

  File "/home/odoo/src/odoo/odoo/tools/convert.py", line 736, in convert_file

    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)

  File "/home/odoo/src/odoo/odoo/tools/convert.py", line 803, in convert_xml_import

    obj.parse(doc.getroot())

  File "/home/odoo/src/odoo/odoo/tools/convert.py", line 721, in parse

    exc_info[2]

  File "/home/odoo/src/odoo/odoo/tools/pycompat.py", line 13, in reraise

    raise value.with_traceback(tb)

  File "/home/odoo/src/odoo/odoo/tools/convert.py", line 712, in parse

    self._tag_root(de)

  File "/home/odoo/src/odoo/odoo/tools/convert.py", line 674, in _tag_root

    f(rec)

  File "/home/odoo/src/odoo/odoo/tools/convert.py", line 674, in _tag_root

    f(rec)

  File "/home/odoo/src/odoo/odoo/tools/convert.py", line 563, in _tag_record

    f_val = _eval_xml(self, field, env)

  File "/home/odoo/src/odoo/odoo/tools/convert.py", line 143, in _eval_xml

    +_process("".join(etree.tostring(n, encoding='unicode') for n in node))

  File "/home/odoo/src/odoo/odoo/tools/convert.py", line 132, in _process

    self.idref[id] = self.id_get(id)

  File "/home/odoo/src/odoo/odoo/tools/convert.py", line 657, in id_get

    res = self.model_id_get(id_str, raise_if_not_found)

  File "/home/odoo/src/odoo/odoo/tools/convert.py", line 663, in model_id_get

    return self.env['ir.model.data'].xmlid_to_res_model_res_id(id_str, raise_if_not_found=raise_if_not_found)

  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_model.py", line 1666, in xmlid_to_res_model_res_id

    return self.xmlid_lookup(xmlid)[1:3]

  File "<decorator-gen-24>", line 2, in xmlid_lookup

  File "/home/odoo/src/odoo/odoo/tools/cache.py", line 90, in lookup

    value = d[key] = self.method(*args, **kwargs)

  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_model.py", line 1655, in xmlid_lookup

    raise ValueError('External ID not found in the system: %s' % xmlid)

odoo.tools.convert.ParseError: "External ID not found in the system: szm_motraveler.action_mrp_workorder_production_specific" while parsing /home/odoo/src/user/szm_motraveler/views/mrp_production_views.xml:2, near

<odoo>

    <data>

        <record id="mrp_production_form_szm_view" model="ir.ui.view">

            <field name="name">mrp.production.szm.form</field>

            <field name="model">mrp.production</field>

            <field name="arch" type="xml">

                <form string="Manufacturing Orders SZM">

                <header>

                    <field name="confirm_cancel" invisible="1"/>

                    <button name="button_mark_done" attrs="{'invisible': [('state', '!=', 'to_close')]}" string="Mark as Done" type="object" class="oe_highlight"/>

                    <button name="action_confirm" attrs="{'invisible': ['|', ('state', '!=', 'draft'), ('is_locked', '=', False)]}" string="Mark as Todo" type="object" class="oe_highlight"/>

                    <button name="action_assign" attrs="{'invisible': ['|', '|', ('is_locked', '=', False), ('state', 'in', ('draft', 'done', 'cancel')), ('reservation_state', '=', 'assigned')]}" string="Check availability" type="object" class="oe_highlight"/>

                    <button name="button_plan" attrs="{'invisible': ['|', ('state', '!=', 'confirmed'), ('routing_id', '=', False)]}" type="object" string="Plan" class="oe_highlight"/>

                    <button name="button_unplan" type="object" string="Unplan" attrs="{'invisible': ['|', '|', ('state', '!=', 'planned'), ('date_planned_start', '=', False), ('date_planned_finished', '=', False)]}"/>

                    <button name="open_produce_product" attrs="{'invisible': ['|', '|', '|', ('state', '=', 'to_close'), ('is_locked', '=', False), ('reservation_state', '!=', 'assigned'), ('routing_id', '!=', False)]}" string="Produce" type="object" class="oe_highlight"/>

                    <button name="open_produce_product" attrs="{'invisible': ['|', '|', '|', ('state', '=', 'to_close'), ('is_locked', '=', False), ('reservation_state', 'not in', ('confirmed', 'waiting')), ('routing_id', '!=', False)]}" string="Produce" type="object"/>

                    <button name="post_inventory" string="Post Inventory" type="object" attrs="{'invisible': [('post_visible', '=', False)]}" groups="base.group_no_one"/>

                    <button name="button_scrap" type="object" string="Scrap" attrs="{'invisible': ['|', ('state', 'in', ('cancel', 'draft')), ('is_locked', '=', False)]}"/>

                    <button name="button_unreserve" type="object" string="Unreserve" attrs="{'invisible': [('unreserve_visible', '=', False)]}"/>

                    <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done"/>

                    <button name="action_toggle_is_locked" attrs="{'invisible': ['|', '|', ('state', 'in', ('cancel', 'draft')), ('id', '=', False), ('is_locked', '=', False)]}" string="Unlock" groups="mrp.group_mrp_manager" type="object" help="Unlock the manufacturing order to correct what has been consumed or produced."/>

                    <button name="action_toggle_is_locked" attrs="{'invisible': [('is_locked', '=', True)]}" string="Lock" class="oe_highlight" groups="mrp.group_mrp_manager" type="object"/>

                    <button name="action_cancel" type="object" string="Cancel" attrs="{'invisible': ['|', '|', '|', ('id', '=', False), ('is_locked', '=', False), ('state', 'in', ('done','cancel')), ('confirm_cancel', '=', True)]}"/>

                    <button name="action_cancel" type="object" string="Cancel" attrs="{'invisible': ['|', '|', '|', ('id', '=', False), ('is_locked', '=', False), ('state', 'in', ('done','cancel')), ('confirm_cancel', '=', False)]}" confirm="Some product moves have already been confirmed, this manufacturing order can't be completely cancelled. Are you still sure you want to process ?"/>

                </header>

                <sheet>

                    <field name="reservation_state" invisible="1"/>

                    <field name="is_locked" invisible="1"/>

                    <field name="post_visible" invisible="1"/>

                    <field name="unreserve_visible" invisible="1"/>

                    <div class="oe_button_box" name="button_box">

                        <button name="%(stock.action_stock_report)d" icon="fa-arrow-up" class="oe_stat_button" string="Traceability" type="action" states="done" groups="stock.group_production_lot"/>

                        <!-- <button name="%(action_mrp_workorder_production_specific)d" type="action" attrs="{'invisible': [('workorder_count', '=', 0)]}" class="oe_stat_button" icon="fa-play-circle-o">

                            <div class="o_field_widget o_stat_info">

                                <span class="o_stat_value"><field name="workorder_done_count" widget="statinfo" nolabel="1"/> / <field name="workorder_count" widget="statinfo" nolabel="1"/></span>

                                <span class="o_stat_text">Work Orders</span>

                            </div>

                        </button>  -->

                        <button name="%(action_mrp_production_moves)d" type="action" string="Product Moves" class="oe_stat_button" icon="fa-exchange" attrs="{'invisible': [('state', 'not in', ('progress', 'done'))]}"/>

                        <button type="object" name="action_view_mo_delivery" class="oe_stat_button" icon="fa-truck" groups="base.group_user" attrs="{'invisible': [('delivery_count', '=', 0)]}">

                            <field name="delivery_count" widget="statinfo" string="Transfers"/>

                        </button>

                        <button class="oe_stat_button" name="action_see_move_scrap" type="object" icon="fa-arrows-v" attrs="{'invisible': [('scrap_count', '=', 0)]}">

                            <div class="o_field_widget o_stat_info">

                                <span class="o_stat_value"><field name="scrap_count"/></span>

                                <span class="o_stat_text">Scraps</span>

                            </div>

                        </button>

                        <field name="workorder_ids" invisible="1"/>

                    </div>

                    <div class="oe_title">

                        <h1><field name="name" placeholder="Manufacturing Reference" nolabel="1"/></h1>

                    </div>

                    <group>

                        <group>

                            <field name="id" invisible="1"/>

                            <field name="product_id" attrs="{'readonly': [('state', '!=', 'draft')]}"/>

                            <field name="product_tmpl_id" invisible="1"/>

                            <label for="product_qty"/>

                            <div class="o_row no-gutters d-flex">

                                <div class="col">

                                    <field name="product_qty" class="mr-1" attrs="{'readonly': [('state', '!=', 'draft')]}"/>

                                    <field name="product_uom_id" options="{'no_open':True,'no_create':True}" force_save="1" groups="uom.group_uom" attrs="{'readonly': [('state', '!=', 'draft')]}"/>

                                    <button type="action" name="%(mrp.action_change_production_qty)d" context="{'default_mo_id': id}" string="Update" class="oe_link" attrs="{'invisible': ['|', ('state', 'in', ('draft', 'done','cancel')), ('id', '=', False)]}"/>

                                </div>

                            </div>

                            <field name="bom_id" context="{'default_product_tmpl_id': product_tmpl_id}" required="1" attrs="{'readonly': [('state', '!=', 'draft')]}"/>

                            <field name="routing_id" groups="mrp.group_mrp_routings"/>

                        </group>

                        <group>

                            <field name="date_deadline" attrs="{'readonly': [('state', 'in', ['done', 'cancel'])]}"/>

                            <field name="date_start_wo" attrs="{'invisible': [                                 '|',                                     '&amp;',                                         ('routing_id', '!=', False),                                         ('state', 'not in', ['draft', 'confirmed']),                                     ('routing_id', '=', False),                                 ], 'readonly': [                                     ('routing_id', '!=', False),                                     ('state', 'not in', ['draft', 'confirmed']),                                 ]}"/>

                            <div class="o_row o_td_label">

                                <label for="date_planned_start" string="Planned Date" attrs="{'invisible': [                                                 ('routing_id', '!=', False),                                                 ('state', 'in', ['draft', 'confirmed'])                                         ]}"/>

                            </div>

                            <div class="o_row">

                                <field name="date_planned_start" attrs="{'invisible': [                                             ('routing_id', '!=', False),                                             ('state', 'in', ['draft', 'confirmed']),                                         ], 'readonly': [                                        '|',                                         '&amp;',                                             ('routing_id', '=', False),                                             ('state', 'in', ['done', 'cancel']),                                         '&amp;',                                             ('routing_id', '!=', False),                                             ('state', 'not in', ['draft', 'confirmed'])]}"/>

                                <label for="date_planned_finished" string="to" attrs="{'invisible': [                                     '|',                                         ('id', '=', False),                                         '&amp;',                                             ('routing_id', '!=', False),                                             ('state', 'in', ['draft', 'confirmed'])                                 ]}"/>

                                <field name="date_planned_finished" required="1" attrs="{'readonly': [                                     '|',                                         '&amp;',                                             ('routing_id', '=', False),                                             ('state', 'in', ['done', 'cancel']),                                         ('routing_id', '!=', False)                                 ], 'invisible': [                                     ('routing_id', '!=', False),                                     ('state', 'in', ['draft', 'confirmed'])                                 ]}"/>

                            </div>

                            <field name="user_id"/>

                        </group>

                    </group>

                    <notebook>

                        <page string="Components">

                            <field name="move_raw_ids" context="{'final_lots': show_final_lots, 'tree_view_ref': 'mrp.view_stock_move_raw_tree', 'form_view_ref': 'mrp.view_stock_move_lots', 'default_location_id': location_src_id, 'default_location_dest_id': production_location_id, 'default_state': 'draft', 'default_raw_material_production_id': id, 'default_picking_type_id': picking_type_id}" attrs="{'readonly': ['&amp;', ('state', '!=', 'draft'), ('is_locked', '=', True)]}"/>

                        </page>

                        <page string="Finished Products">

                            <field name="finished_move_line_ids" context="{'form_view_ref': 'mrp.view_finisehd_move_line'}" attrs="{'readonly': [('is_locked', '=', True)], 'invisible': [('finished_move_line_ids', '=', [])]}">

                                 <tree default_order="done_move" editable="bottom" create="0" delete="0" decoration-muted="state in ('done', 'cancel')">

                                    <field name="product_id" readonly="1"/>

                                    <field name="company_id" invisible="1"/>

                                    <field name="lot_id" groups="stock.group_production_lot" context="{'default_product_id': product_id}" attrs="{'invisible': [('lots_visible', '=', False)]}"/>

                                    <field name="product_uom_id" groups="uom.group_uom"/>

                                    <field name="qty_done" string="Produced"/>

                                    <field name="lots_visible" invisible="1"/>

                                    <field name="done_move" invisible="1"/>

                                    <field name="state" invisible="1"/>

                                </tree>

                            </field>

                            <p attrs="{'invisible': [('finished_move_line_ids', '!=', [])]}">

                                Use the Produce button or process the work orders to create some finished products.

                            </p>

                        </page>

                    </notebook>

                </sheet>

                <div class="oe_chatter">

                    <field name="message_follower_ids" widget="mail_followers"/>

                    <field name="activity_ids" widget="mail_activity"/>

                    <field name="message_ids" widget="mail_thread"/>

                </div>

                </form>

            </field>

        </record>

        <!-- Action Window definition-->

        <record model="ir.actions.act_window" id="action_mrp_production_form_szm">

            <field name="name">SZM Production Entry</field>

            <field name="res_model">mrp.production</field>

            <field name="view_type">form</field>

            <field name="view_mode">form</field>

        </record>

        <!-- Action Menu Item -->

        <menuitem action="action_mrp_production_form_szm" id="action_menu_mrp_production_form_szm" name="Product Entry SZM" sequence="20"/>

    </data>

</odoo>



0
อวตาร
ละทิ้ง
Niyas Raphy (Walnut Software Solutions)

if you have commented out, it doesn't have to work, as a cross checking rather than commenting, can you try deleting that button line from the code and see whether you are getting same error or not

สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!

สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!

ลงชื่อ
Related Posts ตอบกลับ มุมมอง กิจกรรม
Enable Counters in odoo what is the use of it แก้ไขแล้ว
xml
อวตาร
อวตาร
1
มี.ค. 25
2685
uploading xml for invoicing tax not taken
xml
อวตาร
0
พ.ย. 24
2499
Thousand seperator
xml
อวตาร
0
มิ.ย. 24
2248
readonly to specific group and when the stage is in 2, 3, 4
xml
อวตาร
อวตาร
1
มิ.ย. 24
2847
how to export everything I invoiced between 2 periods in pdf and XML?
xml
อวตาร
0
ต.ค. 23
2912
คอมมูนิตี้
  • บทเรียน
  • เอกสารกำกับโปรแกรม
  • ฟอรั่ม
โอเพนซอร์ส
  • ดาวน์โหลด
  • Github
  • Runbot
  • การแปล
บริการ
  • โฮสติ้ง odoo.sh เซิร์ฟเวอร์
  • การสนับสนุน
  • อัปเกรด
  • การพัฒนาที่กำหนดเอง
  • การศึกษา
  • ค้นหานักบัญชี
  • ค้นหาพาร์ทเนอร์
  • ร่วมเป็นพาร์ทเนอร์
เกี่ยวกับเรา
  • บริษัทของเรา
  • ทรัพย์สินในรูปของเครื่องหมายการค้า
  • ติดต่อเรา
  • งาน
  • ระบบการจัดงานอีเวนต์
  • พอดแคสต์
  • บล็อก
  • ลูกค้า
  • กฎหมาย • ความเป็นส่วนตัว
  • ความปลอดภัย
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo เป็นชุดแอปธุรกิจแบบเปิดที่ครอบคลุมทุกความต้องการของบริษัทของคุณ อาธิ CRM eCommerce ระบบบัญชี ระบบสินค้าคงคลัง ระบบการขายหน้าร้าน โปรเจกต์ และ อีกมากมาย

ความเหนือกว่าอันเป็นเอกลักษณ์ของ Odoo คือการใช้งานที่ง่ายดายและผสานการทำงานอย่างสมบูรณ์แบบในเวลาเดียวกัน

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now