تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1732 أدوات العرض

Greetings everyone,

As a newcomer to Odoo, I'm currently navigating the process of defining a 'saveBoard' function within my custom module's 'board_controller.js'. However, I've encountered a persistent error that I hope to resolve with your assistance.

The error message states: "The following modules are needed by other modules but have not been defined, they may not be present in the correct asset bundle:

  • web.core
  • board.board"

Below is the code snippet I've been working with:


/** @odoo-module **/


odoo.define('my_custom', ['web.core', 'board'], function (require) {

    "use strict";


    var core = require('web.core');

    var originalModule = require('board');


    var renderToString = core._lt;

    var blockDom = core._lt;

    var xmlSerializer = core._lt;


    originalModule.BoardController.include({

        saveBoard: function () {

            const templateFn = renderToString.app.getTemplate("board.arch");

            const bdom = templateFn(this.board, {});

            const root = document.createElement("rendertostring");

            blockDom.mount(bdom, root);

            const result = xmlSerializer.serializeToString(root);

            const arch = result.slice(result.indexOf(""));

            this.rpc("/web/view/edit_custom", {

                custom_id: this.board.customViewId != null ? customViewId : '',

                arch: arch,

            });

            this.env.bus.trigger("CLEAR-CACHES");

        }

    });

});


I would greatly appreciate any assistance or guidance you can provide to resolve this issue. Thank you for your time and support.

Warm regards,


الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
4
أكتوبر 24
1488
3
أبريل 24
3034
Assign groups تم الحل
1
يناير 25
3195
0
مارس 24
1978
1
أغسطس 25
1611