Git Product home page Git Product logo

Comments (14)

flotho avatar flotho commented on July 26, 2024 1

as recommended for v17, use mountcomponent instead, it will work easier

from owl.

fdardenne avatar fdardenne commented on July 26, 2024

Hello 👋 ,

Your error message is quite generic and does not provide the full details of the error.
Therefore, I cannot provide you with a precise solution. However, I believe that the error may be due to the fact that you need to start the services with await startServices(env); before mounting the Owl app. You can refer to an example of how I did this in a standalone app at https://github.com/fdardenne/owlybook/blob/main/static/src/js/main.js.

PS: you don't need to call super.setup() in the setup() method. The Component class does not implement any logic in this method.

I hope this helps!

from owl.

flotho avatar flotho commented on July 26, 2024

hi @jujuna
maybe the answer is ther #1564

from owl.

flotho avatar flotho commented on July 26, 2024

@jujuna which Odoo version are you working with ?
I personnaly struggling on v16 odoo/odoo#151490

from owl.

jujuna avatar jujuna commented on July 26, 2024

@fdardenne Hello, your link doesn't work

from owl.

jujuna avatar jujuna commented on July 26, 2024

@flotho I am working on 17 version, I will see your link if it helps me, thank you!

from owl.

jujuna avatar jujuna commented on July 26, 2024

@flotho @fdardenne
This is my main.js file

/** @odoo-module **/

import { mount, whenReady } from "@odoo/owl";
import { WebClient } from "./webclient/web_client";
import { templates } from "@web/core/assets";

// Mount the WebClient component when the document.body is ready
whenReady(() => {
  mount(WebClient, document.body, {
    templates,
    dev: true,
    name: "Library",
  });
});

from owl.

flotho avatar flotho commented on July 26, 2024

Hi @fdardenne does the code you shared woks with services ?

from owl.

fdardenne avatar fdardenne commented on July 26, 2024

Hi @fdardenne does the code you shared woks with services ?

Hello, yes it should

from owl.

flotho avatar flotho commented on July 26, 2024

I meant does your code effectively worked or did you expect it to work ?

from owl.

jujuna avatar jujuna commented on July 26, 2024

@flotho Thank you! I used mountComponent and it works.

from owl.

flotho avatar flotho commented on July 26, 2024

is it a standalone component ?

from owl.

jujuna avatar jujuna commented on July 26, 2024

@flotho Yes

from owl.

flotho avatar flotho commented on July 26, 2024

perfect, everything is clear.
MAybe this issue could be closed ?

from owl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.