admin管理员组

文章数量:1402226

Working locally with a migrated database from odoo16 to odoo18, i can get my website but the css style are not loaded correctly (messed display). I get this error in the browser console:

Could not get content for /_custom/web.assets_frontend/website/static/src/scss/options/user_values.scss. web.assets_frontend_lazy.min.js:3966:395

and the corresponding js lines in web.assets_frontend_lazy.min.js:3966:395:

translationIsReady.then(
          () => {
            for (const asset of assets) {
              let cssRules;
              try {
                cssRules = asset.cssRules;
              } catch {
                continue;
              }
              const lastRule = cssRules?.[cssRules?.length - 1];
              if (lastRule?.selectorText === 'css_error_message') {
                const message = _t(
                  'The style compilation failed. This is an administrator or developer error that must be fixed for the entire database before continuing working. See browser console or server logs for details.'
                );
                notification.add(message, {
                  title: _t('Style error'),
                  sticky: true,
                  type: 'danger',
                });
                console.log(
                  lastRule.style.content.replaceAll('\\a', '\n').replaceAll('\\*', '*').replaceAll(`\\"`, `"`)
                );
              }
            }
          }
        );
      },
    };

I have found that the concerned file: user_values.scss is located in my local directory: /Odoo18-virtualenv/src/community/addons/website/static/src/scss/options

本文标签: javascriptodoo18 migration how to solved messed css style css websiteStack Overflow