Skip to Content
Odoo เมนู
  • ลงชื่อเข้าใช้
  • ทดลองใช้ฟรี
  • แอป
    การเงิน
    • ระบบบัญชี
    • ระบบการออกใบแจ้งหนี้
    • ระบบบัญชีรายจ่าย
    • ระบบการจัดการข้อมูลผ่านสเปรดชีต (BI)
    • เอกสาร
    • ระบบลงลายเซ็น
    การขาย
    • ลูกค้าสัมพันธ์
    • การขาย
    • POS ร้านค้า
    • POS ร้านอาหาร
    • ระบบสมัครสมาชิก
    • การเช่า
    การจัดการเว็บไซต์
    • เครื่องมือสร้างเว็บไซต์
    • ระบบการขายออนไลน์
    • บล็อก
    • ฟอรั่ม
    • ไลฟ์แชท
    • ระบบการอบรมออนไลน์
    ซัพพลายเชน
    • คลังสินค้า
    • ระบบการผลิต
    • PLM
    • ระบบการจัดซื้อ
    • การซ่อมบำรุง
    • ระบบจัดการคุณภาพ
    ทรัพยากรบุคคล
    • ข้อมูลพนักงาน
    • ระบบสรรหาบุคลากร
    • ระบบการลา
    • การประเมิน
    • ระบบการแนะนำพนักงาน
    • ระบบจัดการยานพาหนะ
    การตลาด
    • โซเชียลมาร์เก็ตติ้ง
    • การตลาดผ่านอีเมล
    • ระบบการตลาดผ่าน SMS
    • ระบบการจัดงานอีเวนต์
    • การตลาดแบบอัตโนมัติ
    • ระบบแบบสำรวจ
    การบริการ
    • โปรเจกต์
    • ระบบบันทึกเวลา
    • ระบบการจัดการบริการภาคสนาม
    • ระบบดูแลช่วยเหลือ
    • การวางแผน
    • การนัดหมาย
    ประสิทธิผล
    • ระบบแสดงความคิดเห็น
    • ระบบการอนุมัติ
    • ไอโอที
    • VoIP
    • คลังข้อมูล
    • WhatsApp
    แอปพลิเคชันของบุคคลที่สาม Odoo สตูดิโอ แพลตฟอร์มคลาวด์ของ Odoo
  • อุตสาหกรรม
    การค้าปลีก
    • ร้านขายหนังสือ
    • ร้านขายเสื้อผ้า
    • ร้านขายเฟอร์นิเจอร์
    • ร้านขายของชำ
    • ร้านขายฮาร์ดแวร์
    • ร้านขายของเล่น
    Food & Hospitality
    • บาร์และผับ
    • ร้านอาหาร
    • อาหารฟาสต์ฟู้ด
    • Guest House
    • ตัวแทนจำหน่ายเครื่องดื่ม
    • Hotel
    Real Estate
    • Real Estate Agency
    • บริษัทสถาปัตยกรรม
    • บริษัทรับเหมา
    • การจัดการอสังหาริมทรัพย์
    • การจัดสวน
    • สมาคมเจ้าของอสังหาริมทรัพย์
    Consulting
    • Accounting Firm
    • Odoo พาร์ทเนอร์
    • เอเจนซี่การตลาด
    • สำนักงานกฎหมาย
    • บริการสรรหาบุคลากร
    • การตรวจสอบและการรับรอง
    ระบบการผลิต
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • ของขวัญขององค์กร
    สุขภาพ & ฟิตเนส
    • ชมรมกีฬา
    • ร้านขายแว่นตา
    • ฟิตเนส
    • ผู้ประกอบวิชาชีพด้านสุขภาพ
    • ร้านขายยา
    • ร้านทำผม
    Trades
    • ช่างซ่อม
    • ฮาร์ดแวร์และการสนับสนุนด้านไอที
    • Solar Energy Systems
    • ช่างทำรองเท้า
    • บริการทำความสะอาด
    • HVAC Services
    Others
    • 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
เกี่ยวกับฟอรั่มนี้
ช่วยเหลือ

"'30' is not an integer or a virtual id" when updating a custom module setting

ติดตาม

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

คำถามนี้ถูกตั้งค่าสถานะ
settingsmoduleres.config
4 ตอบกลับ
7764 มุมมอง
อวตาร
Levi Bensley

I'm getting this error after I have set the setting for the first time. It happens whenever accessing the settings menu.

Full Error Log:
https://lbwebsites.me/web/static/src/js/fields/basic_fields.js:814
Traceback:
Error: "30" is not an integer or a virtual id
    at Class._formatValue (https://lbwebsites.me/web/static/src/js/fields/basic_fields.js:814:23)
    at Class.prototype.<computed> [as _formatValue] (https://lbwebsites.me/web/static/src/js/core/class.js:90:38)
    at Class._prepareInput (https://lbwebsites.me/web/static/src/js/fields/basic_fields.js:247:30)
    at Class._renderEdit (https://lbwebsites.me/web/static/src/js/fields/basic_fields.js:259:14)
    at Class._render (https://lbwebsites.me/web/static/src/js/fields/abstract_field.js:353:25)
    at https://lbwebsites.me/web/static/src/js/fields/abstract_field.js:187:25
    at https://lbwebsites.me/web/static/lib/jquery/jquery.js:3276:89
    at fire (https://lbwebsites.me/web/static/lib/jquery/jquery.js:3119:58)
    at Object.add [as done] (https://lbwebsites.me/web/static/lib/jquery/jquery.js:3165:49)
    at Array.<anonymous> (https://lbwebsites.me/web/static/lib/jquery/jquery.js:3275:77)
Model
default_quote_valid_to = fields.Integer(string="Default Quote Valid to Days")
get_values method (appears to be the issue)
@api.model
def get_values(self):
    res = super(ResConfigSettings, self).get_values()
    ICPSudo = self.env['ir.config_parameter'].sudo()
    res.update(
        default_quote_valid_to = ICPSudo.get_param('quote.default_quote_valid_to', default=30),
    )
    return res

Edit: also the view where the field is displayed:
<div class="row mt16 o_settings_container">
    <div class="col-12 col-lg-6 o_setting_box" id="quotes">
        <div class="o_setting_left_pane">
            <field name="default_quote_valid_to" widget="integer"/>
        </div>
        <div class="o_setting_right_pane">
            <label for="default_quote_valid_to"/>
            <div class="text-muted">
                Set the default value of the days a quote is available to.
            </div>
        </div>
    </div>
</div>


Edit 2: this is a bespoke quote module not the built in one

0
อวตาร
ละทิ้ง
อวตาร
Mital Vaghani
คำตอบที่ดีที่สุด

Please write as following because your field is integer so value must be integer. 

@api.model
def get_values(self):
    res = super(ResConfigSettings, self).get_values()
    ICPSudo = self.env['ir.config_parameter'].sudo()
    res.update(
        default_quote_valid_to = int(ICPSudo.get_param('quote.default_quote_valid_to', default=30)),
    )
    return res


1
อวตาร
ละทิ้ง
อวตาร
Maxim Burinov
คำตอบที่ดีที่สุด

Have the same issue. As a temporal solution I made all my settings fields Char.

0
อวตาร
ละทิ้ง
อวตาร
Paresh Wagh
คำตอบที่ดีที่สุด

Hi Levi: If you are interested in setting the number of days for which a Quotation is valid, you can set it in Settings > General Settings. The setting is also available in Quotation Templates if you need different validity periods.

0
อวตาร
ละทิ้ง
อวตาร
Levi Bensley
ผู้เขียน คำตอบที่ดีที่สุด

Thank you Paresh W however i forgot to mention that it is actually a bespoke quote module so using that will not work for me

Edit:

My only temporary fix was to change the JavaScript that handles the fields, as it was using regex to check if it was and Integer so i changed it to convert the string to int and check if it was NaN

0
อวตาร
ละทิ้ง
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!

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

ลงชื่อ
Related Posts ตอบกลับ มุมมอง กิจกรรม
[12.0] enable features in the res.config.settings แก้ไขแล้ว
settings xml res.config
อวตาร
อวตาร
อวตาร
อวตาร
6
มี.ค. 24
24707
How to change settings on module installation? แก้ไขแล้ว
settings module xml
อวตาร
อวตาร
อวตาร
2
ต.ค. 17
12480
How to show module path in settings? (V8)
v8 settings module
อวตาร
อวตาร
1
พ.ค. 16
6222
INSTALL A MODULE BASED ON CHECKBOX VALUE แก้ไขแล้ว
settings module res_config v15
อวตาร
อวตาร
1
ก.พ. 24
2952
How to remove default "Featured" filter for Apps/Modules list
settings module v7 app
อวตาร
อวตาร
1
มี.ค. 15
9301
คอมมูนิตี้
  • บทเรียน
  • เอกสารกำกับโปรแกรม
  • ฟอรั่ม
โอเพนซอร์ส
  • ดาวน์โหลด
  • 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