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
เกี่ยวกับฟอรั่มนี้
ช่วยเหลือ

Problems migrating from odoo 13 to 16

ติดตาม

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

คำถามนี้ถูกตั้งค่าสถานะ
javascriptmigrationodoo16features
1840 มุมมอง
อวตาร
Felix Reyes

I am migrating some Odoo modules 13 to 16 and in the process I have not been able to make this include of the KanbanProgressBar widget work.

This is the include code

console.log("Starting script...");
odoo.define('ipx_dual_sum_kanban_progressbar.KanbanColumnProgressBar', function (require) {
    'use strict';
   
   
    var KanbanColumnProgressBar = require('web.KanbanColumnProgressBar');
    const core = require('web.core');
    var session = require('web.session');
    var utils = require('web.utils');
    var Widget = require('web.Widget');
   
   
    const _t = core._t;
    // taking the instance of KanbanColumnProgressBar
   
       
    // extending the KanbanColumnProgressBar
    console.log("test")
    KanbanColumnProgressBar.include({
        init: function ( parent, options, columnState){
            this\._super\.apply\(this,\ arguments\);
 \  \  \  \  \  \ //\ Nueva\ lógica\ para\ sumFieldB
 \  \  \  \  \  \ console\.log\("init"\)
 \  \  \  \  \  \ this\.sumFieldB\ =\ columnState\.progressBarValues\.sum_fieldB;
 \  \  \  \  \  \ this\.isSumFieldB\ =\ !!this\.sumFieldB;

 \  \  \  \  \  \ var\ state\ =\ options\.progressBarStates\[this\.columnID\];
 \  \  \  \  \  \ if\ \(state\)\ \{
 \  \  \  \  \  \  \  \ //\ Maneja\ totalCounterValueB
 \  \  \  \  \  \  \  \ this\.totalCounterValueB\ =\ state\.totalCounterValueB;
 \  \  \  \  \  \ \}

 \  \  \  \  \  \ //\ Maneja\ currencyFieldB
 \  \  \  \  \  \ var\ sumFieldInfoB\ =\ this\.sumFieldB\ \&\&\ columnState\.fieldsInfo\.kanban\[this\.sumFieldB\];
 \  \  \  \  \  \ var\ currencyFieldB\ =\ sumFieldInfoB\ \&\&\ sumFieldInfoB\.options\ \&\&\ sumFieldInfoB\.options\.currency_field;
 \  \  \  \  \  \ if\ \(currencyFieldB\ \&\&\ columnState\.data\.length\)\ \{
 \  \  \  \  \  \  \  \ this\.currencyB\ =\ session\.currencies\[columnState\.data\[0\]\.data\[currencyFieldB\]\.res_id\];
 \  \  \  \  \  \ \}
 \  \
 \  \  \  \ \},
 \  \  \  \
 \  \  \  \ start:\ function\(\)\ \{
 \  \  \  \  \  \ console\.log\("Inside\ start\ function\.\.\."\);
 \  \  \  \  \  \ var\ self\ =\ this;
 \  \
 \  \  \  \  \  \ this\.\$counterB\ =\ this\.\$\('\.o_kanban_counter_side_b'\);
 \  \  \  \  \  \ this\.\$numberB\ =\ this\.\$counterB\.find\('b'\);
 \  \
 \  \  \  \  \  \ if\ \(this\.currencyB\)\ \{
 \  \  \  \  \  \  \  \ var\ \$currencyB\ =\ \$\('',\ \{
 \  \  \  \  \  \  \  \  \  \ text:\ this\.currencyB\.symbol,
 \  \  \  \  \  \  \  \ \}\);
 \  \  \  \  \  \  \  \ if\ \(this\.currencyB\.position\ ===\ 'before'\)\ \{
 \  \  \  \  \  \  \  \  \  \ \$currencyB\.prependTo\(this\.\$counterB\);
 \  \  \  \  \  \  \  \ \}\ else\ \{
 \  \  \  \  \  \  \  \  \  \ \$currencyB\.appendTo\(this\.\$counterB\);
 \  \  \  \  \  \  \  \ \}
 \  \  \  \  \  \ \}
 \  \
 \  \  \  \  \  \ self\.prevTotalCounterValueB\ =\ self\.totalCounterValueB;
 \  \  \  \  \  \ self\.totalCounterValueB\ =\ self\.sumFieldB\ \?\ \(self\.columnState\.aggregateValues\[self\.sumFieldB\]\ \|\|\ 0\)\ :\ 0;
 \  \  \  \  \  \
 \  \  \  \  \  \ //\ add\ console\ logs
 \  \  \  \  \  \

 \  \
 \  \  \  \  \  \ return\ this\._super\.apply\(this,\ arguments\)\.then\(function\ \(\)\ \{
 \  \  \  \  \  \  \  \ //\ This\ should\ be\ executed\ when\ the\ progressbar\ is\ fully\ rendered
 \  \  \  \  \  \  \  \ //\ and\ is\ in\ the\ DOM,\ this\ happens\ to\ be\ always\ the\ case\ with
 \  \  \  \  \  \  \  \ //\ current\ use\ of\ progressbars
 \  \
 \  \  \  \  \  \  \  \ var\ subgroupCounts\ =\ \{\};
 \  \  \  \  \  \  \  \ let\ allSubgroupCount\ =\ 0;
 \  \  \  \  \  \  \  \ _\.each\(self\.colors,\ function\ \(val,\ key\)\ \{
 \  \  \  \  \  \  \  \  \  \ var\ subgroupCount\ =\ self\.columnState\.progressBarValues\.counts\[key\]\ \|\|\ 0;
 \  \  \  \  \  \  \  \  \  \ if\ \(self\.activeFilter\ ===\ key\ \&\&\ subgroupCount\ ===\ 0\)\ \{
 \  \  \  \  \  \  \  \  \  \  \  \ self\.activeFilter\ =\ false;
 \  \  \  \  \  \  \  \  \  \ \}
 \  \  \  \  \  \  \  \  \  \ subgroupCounts\[key\]\ =\ subgroupCount;
 \  \  \  \  \  \  \  \  \  \ allSubgroupCount\ \+=\ subgroupCount;
 \  \  \  \  \  \  \  \ \}\);
 \  \  \  \  \  \  \  \ subgroupCounts\.__false\ =\ self\.columnState\.count\ \-\ allSubgroupCount;
 \  \
 \  \  \  \  \  \  \  \ self\.groupCount\ =\ self\.columnState\.count;
 \  \  \  \  \  \  \  \ self\.subgroupCounts\ =\ subgroupCounts;
 \  \  \  \  \  \  \  \ self\.prevTotalCounterValue\ =\ self\.totalCounterValue;
 \  \  \  \  \  \  \  \ self\.totalCounterValue\ =\ self\.sumField\ \?\ \(self\.columnState\.aggregateValues\[self\.sumField\]\ \|\|\ 0\)\ :\ self\.columnState\.count;
 \  \
 \  \  \  \  \  \  \  \ //MY\ EDIT\ START
 \  \  \  \  \  \  \  \ self\.prevTotalCounterValueB\ =\ self\.totalCounterValueB;
 \  \  \  \  \  \  \  \ self\.totalCounterValueB\ =\ self\.sumFieldB\ \?\ \(self\.columnState\.aggregateValues\[self\.sumFieldB\]\ \|\|\ 0\)\ :\ 0;
 \  \
 \  \  \  \  \  \  \  \ //MY\ EDIT\ END
 \  \  \  \  \  \  \  
 \  \  \  \  \  \  \  \ self\._notifyState\(\);
 \  \  \  \  \  \  \  \ self\._render\(\);
 \  \  \  \  \  \ \}\);
 \  \
 \  \  \  \ \},
 \  \  \  \ _render:\ function\ \(\)\ \{
 \  \  \  \  \  \ console\.log\("Inside\ _render\ function\.\.\."\);
 \  \  \  \  \  \  \  \ var\ self\ =\ this;
 \  \  \  \
 \  \  \  \  \  \  \  \ //\ Update\ column\ display\ according\ to\ active\ filter
 \  \  \  \  \  \  \  \ this\.trigger_up\('tweak_column',\ \{
 \  \  \  \  \  \  \  \  \  \ callback:\ function\ \(\$el\)\ \{
 \  \  \  \  \  \  \  \  \  \  \  \ \$el\.removeClass\('o_kanban_group_show'\);
 \  \  \  \  \  \  \  \  \  \  \  \ _\.each\(self\.colors,\ function\ \(val,\ key\)\ \{
 \  \  \  \  \  \  \  \  \  \  \  \  \  \ \$el\.removeClass\('o_kanban_group_show_'\ \+\ val\);
 \  \  \  \  \  \  \  \  \  \  \  \ \}\);
 \  \  \  \  \  \  \  \  \  \  \  \ if\ \(self\.activeFilter\)\ \{
 \  \  \  \  \  \  \  \  \  \  \  \  \  \ \$el\.addClass\('o_kanban_group_show\ o_kanban_group_show_'\ \+\ self\.colors\[self\.activeFilter\]\);
 \  \  \  \  \  \  \  \  \  \  \  \ \}
 \  \  \  \  \  \  \  \  \  \ \},
 \  \  \  \  \  \  \  \ \}\);
 \  \  \  \  \  \  \  \ this\.trigger_up\('tweak_column_records',\ \{
 \  \  \  \  \  \  \  \  \  \ callback:\ function\ \(\$el,\ recordData\)\ \{
 \  \  \  \  \  \  \  \  \  \  \  \ var\ categoryValue\ =\ recordData\[self\.fieldName\]\ \?\ recordData\[self\.fieldName\]\ :\ '__false';
 \  \  \  \  \  \  \  \  \  \  \  \ _\.each\(self\.colors,\ function\ \(val,\ key\)\ \{
 \  \  \  \  \  \  \  \  \  \  \  \  \  \ \$el\.removeClass\('oe_kanban_card_'\ \+\ val\);
 \  \  \  \  \  \  \  \  \  \  \  \ \}\);
 \  \  \  \  \  \  \  \  \  \  \  \ if\ \(self\.colors\[categoryValue\]\)\ \{
 \  \  \  \  \  \  \  \  \  \  \  \  \  \ \$el\.addClass\('oe_kanban_card_'\ \+\ self\.colors\[categoryValue\]\);
 \  \  \  \  \  \  \  \  \  \  \  \ \}
 \  \  \  \  \  \  \  \  \  \ \},
 \  \  \  \  \  \  \  \ \}\);
 \  \  \  \
 \  \  \  \  \  \  \  \ //\ Display\ and\ animate\ the\ progress\ bars
 \  \  \  \  \  \  \  \ var\ barNumber\ =\ 0;
 \  \  \  \  \  \  \  \ var\ barMinWidth\ =\ 6;\ //\ In\ %
 \  \  \  \  \  \  \  \ const\ selection\ =\ self\.columnState\.fields\[self\.fieldName\]\.selection;
 \  \  \  \  \  \  \  \ _\.each\(self\.colors,\ function\ \(val,\ key\)\ \{
 \  \  \  \  \  \  \  \  \  \ var\ \$bar\ =\ self\.\$bars\[key\];
 \  \  \  \  \  \  \  \  \  \ var\ count\ =\ self\.subgroupCounts\ \&\&\ self\.subgroupCounts\[key\]\ \|\|\ 0;
 \  \  \  \
 \  \  \  \  \  \  \  \  \  \ if\ \(!\$bar\)\ \{
 \  \  \  \  \  \  \  \  \  \  \  \ return;
 \  \  \  \  \  \  \  \  \  \ \}
 \  \  \  \
 \  \  \  \  \  \  \  \  \  \ //\ Adapt\ tooltip
 \  \  \  \  \  \  \  \  \  \ let\ value;
 \  \  \  \  \  \  \  \  \  \ if\ \(selection\)\ \{\ //\ progressbar\ on\ a\ field\ of\ type\ selection
 \  \  \  \  \  \  \  \  \  \  \  \ const\ option\ =\ selection\.find\(option\ =>\ option\[0\]\ ===\ key\);
 \  \  \  \  \  \  \  \  \  \  \  \ value\ =\ option\ \&\&\ option\[1\]\ \|\|\ _t\('Other'\);
 \  \  \  \  \  \  \  \  \  \ \}\ else\ \{
 \  \  \  \  \  \  \  \  \  \  \  \ value\ =\ key;
 \  \  \  \  \  \  \  \  \  \ \}
 \  \  \  \  \  \  \  \  \  \ \$bar\.attr\('data\-original\-title',\ count\ \+\ '\ '\ \+\ value\);
 \  \  \  \  \  \  \  \  \  \ \$bar\.tooltip\(\{
 \  \  \  \  \  \  \  \  \  \  \  \ delay:\ 0,
 \  \  \  \  \  \  \  \  \  \  \  \ trigger:\ 'hover',
 \  \  \  \  \  \  \  \  \  \ \}\);
 \  \  \  \
 \  \  \  \  \  \  \  \  \  \ //\ Adapt\ active\ state
 \  \  \  \  \  \  \  \  \  \ \$bar\.toggleClass\('progress\-bar\-animated\ progress\-bar\-striped',\ key\ ===\ self\.activeFilter\);
 \  \  \  \
 \  \  \  \  \  \  \  \  \  \ //\ Adapt\ width
 \  \  \  \  \  \  \  \  \  \ \$bar\.removeClass\('o_bar_has_records\ transition\-off'\);
 \  \  \  \  \  \  \  \  \  \ window\.getComputedStyle\(\$bar\[0\]\)\.getPropertyValue\('width'\);\ //\ Force\ reflow\ so\ that\ animations\ work
 \  \  \  \  \  \  \  \  \  \ if\ \(count\ >\ 0\)\ \{
 \  \  \  \  \  \  \  \  \  \  \  \ \$bar\.addClass\('o_bar_has_records'\);
 \  \  \  \  \  \  \  \  \  \  \  \ //\ Make\ sure\ every\ bar\ that\ has\ records\ has\ some\ space
 \  \  \  \  \  \  \  \  \  \  \  \ //\ and\ that\ everything\ adds\ up\ to\ 100%
 \  \  \  \  \  \  \  \  \  \  \  \ var\ maxWidth\ =\ 100\ \-\ barMinWidth\ \*\ barNumber;
 \  \  \  \  \  \  \  \  \  \  \  \ self\.\$\('\.progress\-bar\.o_bar_has_records'\)\.css\('max\-width',\ maxWidth\ \+\ '%'\);
 \  \  \  \  \  \  \  \  \  \  \  \ \$bar\.css\('width',\ \(count\ \*\ 100\ /\ self\.groupCount\)\ \+\ '%'\);
 \  \  \  \  \  \  \  \  \  \  \  \ barNumber\+\+;
 \  \  \  \  \  \  \  \  \  \  \  \ \$bar\.attr\('aria\-valuemin',\ 0\);
 \  \  \  \  \  \  \  \  \  \  \  \ \$bar\.attr\('aria\-valuemax',\ self\.groupCount\);
 \  \  \  \  \  \  \  \  \  \  \  \ \$bar\.attr\('aria\-valuenow',\ count\);
 \  \  \  \  \  \  \  \  \  \ \}\ else\ \{
 \  \  \  \  \  \  \  \  \  \  \  \ \$bar\.css\('width',\ ''\);
 \  \  \  \  \  \  \  \  \  \ \}
 \  \  \  \  \  \  \  \ \}\);
 \  \  \  \  \  \  \  \ this\.\$\('\.progress\-bar\.o_bar_has_records'\)\.css\('min\-width',\ barMinWidth\ \+\ '%'\);
 \  \  \  \
 \  \  \  \  \  \  \  \ //\ Display\ and\ animate\ the\ counter\ number
 \  \  \  \  \  \  \  \ var\ start\ =\ this\.prevTotalCounterValue;
 \  \  \  \  \  \  \  \ var\ end\ =\ this\.totalCounterValue;
 \  \  \  \
 \  \  \  \  \  \  \  \ if\ \(this\.activeFilter\)\ \{
 \  \  \  \  \  \  \  \  \  \ if\ \(this\.sumField\)\ \{
 \  \  \  \  \  \  \  \  \  \  \  \ end\ =\ 0;
 \  \  \  \  \  \  \  \  \  \  \  \ _\.each\(self\.columnState\.data,\ function\ \(record\)\ \{
 \  \  \  \  \  \  \  \  \  \  \  \  \  \ var\ recordData\ =\ record\.data;
 \  \  \  \  \  \  \  \  \  \  \  \  \  \ if\ \(self\.activeFilter\ ===\ recordData\[self\.fieldName\]\ \|\|
 \  \  \  \  \  \  \  \  \  \  \  \  \  \  \  \ \(self\.activeFilter\ ===\ '__false'\ \&\&\ !recordData\[self\.fieldName\]\)\)\ \{
 \  \  \  \  \  \  \  \  \  \  \  \  \  \  \  \ end\ \+=\ parseFloat\(recordData\[self\.sumField\]\);
 \  \  \  \  \  \  \  \  \  \  \  \  \  \ \}
 \  \  \  \  \  \  \  \  \  \  \  \ \}\);
 \  \  \  \  \  \  \  \  \  \ \}\ else\ \{
 \  \  \  \  \  \  \  \  \  \  \  \ end\ =\ this\.subgroupCounts\[this\.activeFilter\];
 \  \  \  \  \  \  \  \  \  \ \}
 \  \  \  \  \  \  \  \ \}
 \  \  \  \  \  \  \  \ this\.prevTotalCounterValue\ =\ end;
 \  \  \  \  \  \  \  \ var\ animationClass\ =\ start\ >\ 999\ \?\ 'o_kanban_grow'\ :\ 'o_kanban_grow_huge';
 \  \  \  \
 \  \  \  \  \  \  \  \ if\ \(start\ !==\ undefined\ \&\&\ \(end\ >\ start\ \|\|\ this\.activeFilter\)\ \&\&\ this\.ANIMATE\)\ \{
 \  \  \  \  \  \  \  \  \  \ \$\(\{currentValue:\ start\}\)\.animate\(\{currentValue:\ end\},\ \{
 \  \  \  \  \  \  \  \  \  \  \  \ duration:\ 1000,
 \  \  \  \  \  \  \  \  \  \  \  \ start:\ function\ \(\)\ \{
 \  \  \  \  \  \  \  \  \  \  \  \  \  \ self\.\$counter\.addClass\(animationClass\);
 \  \  \  \  \  \  \  \  \  \  \  \ \},
 \  \  \  \  \  \  \  \  \  \  \  \ step:\ function\ \(\)\ \{
 \  \  \  \  \  \  \  \  \  \  \  \  \  \ self\.\$number\.html\(_getCounterHTML\(this\.currentValue\)\);
 \  \  \  \  \  \  \  \  \  \  \  \ \},
 \  \  \  \  \  \  \  \  \  \  \  \ complete:\ function\ \(\)\ \{
 \  \  \  \  \  \  \  \  \  \  \  \  \  \ self\.\$number\.html\(_getCounterHTML\(this\.currentValue\)\);
 \  \  \  \  \  \  \  \  \  \  \  \  \  \ self\.\$counter\.removeClass\(animationClass\);
 \  \  \  \  \  \  \  \  \  \  \  \ \},
 \  \  \  \  \  \  \  \  \  \ \}\);
 \  \  \  \  \  \  \  \ \}\ else\ \{
 \  \  \  \  \  \  \  \  \  \ this\.\$number\.html\(_getCounterHTML\(end\)\);
 \  \  \  \  \  \  \  \ \}
 \  \  \  \  \  \  \  \
 \  \  \  \  \  \  \  \
 \  \  \  \  \  \  \  \ //=========================MY\ EDIT\ START
 \  \  \  \  \  \  \  \
 \  \  \  \  \  \  \  \ //\ Display\ and\ animate\ the\ counter\ number
 \  \  \  \  \  \  \  \ var\ startB\ =\ this\.prevTotalCounterValueB;
 \  \  \  \  \  \  \  \ var\ endB\ =\ this\.totalCounterValueB;
 \  \  \  \  \  \  \  \
 \  \  \  \  \  \  \  \ if\ \(this\.activeFilter\)\ \{
 \  \  \  \  \  \  \  \  \  \ if\ \(this\.sumFieldB\)\ \{
 \  \  \  \  \  \  \  \  \  \  \  \ endB\ =\ 0;
 \  \  \  \  \  \  \  \  \  \  \  \ _\.each\(self.columnState.data, function (record) {
                            var recordDataB = record.data;
                            if (self.activeFilter === recordDataB[self.fieldName] ||
                                (self.activeFilter === '__false' && !recordDataB[self.fieldName])) {
                                endB += parseFloat(recordDataB[self.sumFieldB]);
                            }
                        });
                    } else {
                        endB = this.subgroupCounts[this.activeFilter];
                    }
                }
                this.prevTotalCounterValueB = endB;
               
                var animationClassB = startB > 999 ? 'o_kanban_grow' : 'o_kanban_grow_huge';
       
                if (startB !== undefined && (endB > startB || this.activeFilter) && this.ANIMATE) {
                    $({currentValueB: startB}).animate({currentValueB: endB}, {
                        duration: 1000,
                        start: function () {
                            self.$counterB.addClass(animationClassB);
                        },
                        step: function () {
                            self.$numberB.html(_getCounterHTML(this.currentValueB));
                        },
                        complete: function () {
                            self.$numberB.html(_getCounterHTML(this.currentValueB));
                            self.$counterB.removeClass(animationClassB);
                        },
                    });
                } else {
                    this.$numberB.html(_getCounterHTML(endB));
                }
                this.$numberB.html(_getCounterHTML(endB));
               
                //========================MY EDIT END
                function _getCounterHTML(value) {
                    return utils.human_number(value, 0, 3);
                }
                           
            },
            _notifyState: function () {
                this.trigger_up('set_progress_bar_state', {
                    columnID: this.columnID,
                    values: {
                        groupCount: this.groupCount,
                        subgroupCounts: this.subgroupCounts,
                        totalCounterValue: this.totalCounterValue,
                        totalCounterValueB: this.totalCounterValueB,
                        isSumFieldB: this.isSumFieldB,
                        activeFilter: this.activeFilter,
                       
                    },
                });
            }
        });
        console.log("Fin script")
    });

This is how it looked in odoo 13 and that is what I want to achieve


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

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

ลงชื่อ
Related Posts ตอบกลับ มุมมอง กิจกรรม
Problems migrating a custom module from odoo 13 to 16
javascript migration 13 odoo16features
อวตาร
0
พ.ย. 23
1745
Field used in context is restricted to certain groups แก้ไขแล้ว
migration odoo16features
อวตาร
อวตาร
อวตาร
3
มิ.ย. 24
4100
Can't log the console inside the include javascript Odoo v16 แก้ไขแล้ว
javascript odoo16features
อวตาร
อวตาร
1
เม.ย. 24
3038
Odoo 16.0 CE - Missing widget: radio_reduce_selection for field of type selection
javascript odoo16features
อวตาร
0
ม.ค. 24
2557
What is the Best Practice for Integrating JavaScript in Odoo 16?
javascript odoo16features
อวตาร
อวตาร
1
ก.ย. 23
4130
คอมมูนิตี้
  • บทเรียน
  • เอกสารกำกับโปรแกรม
  • ฟอรั่ม
โอเพนซอร์ส
  • ดาวน์โหลด
  • 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