### Run Odoo Server Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/administration/install/install.rst Starts the Odoo server using the 'odoo-bin' command-line interface. This example shows navigating to the Odoo Community path before running the command. ```console $ cd /CommunityPath $ ./odoo-bin ``` -------------------------------- ### Fedora PostgreSQL Server Setup Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/administration/install/install.rst Installs and configures the PostgreSQL server on Fedora systems. This includes installing the server package, initializing the database, enabling the service, and starting it. ```console $ sudo dnf install -y postgresql-server $ sudo postgresql-setup --initdb --unit postgresql $ sudo systemctl enable postgresql $ sudo systemctl start postgresql ``` -------------------------------- ### Run Odoo Server Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/administration/install/install.rst Starts the Odoo server with specified database credentials and addons path. Assumes Odoo Community installation. ```doscon C:\> cd CommunityPath/ C:\> python odoo-bin -r dbuser -w dbpassword --addons-path=addons -d mydb ``` -------------------------------- ### Run Odoo Server Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/administration/install/install.rst This command starts the Odoo server. It specifies the addons path and the database to use. Ensure Odoo Community is installed in the specified path. ```bash python3 odoo-bin --addons-path=addons -d mydb ``` -------------------------------- ### Install Dependencies Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/contributing/documentation.rst Installs the project dependencies using pip. Ensure you have Python and pip installed. ```bash $ pip3 install -r requirements.txt ``` -------------------------------- ### Run Odoo Server Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/administration/install/install.rst Launches the Odoo server using the odoo-bin script. This example shows how to specify the addons path and the database name. It assumes the Odoo Community installation is in '/CommunityPath' and the database is named 'mydb'. ```console $ cd /CommunityPath $ python3 odoo-bin --addons-path=addons -d mydb ``` -------------------------------- ### Odoo Accounting Onboarding Steps Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/applications/finance/accounting/getting_started/initial_configuration/setup.rst This section details the step-by-step onboarding process for Odoo Accounting, guiding users through essential initial configurations. It lists the key stages involved in setting up the accounting module. ```text #. :ref:`accounting-setup-company` #. :ref:`accounting-setup-bank` #. :ref:`accounting-setup-periods` #. :ref:`accounting-setup-chart` ``` -------------------------------- ### Clone Petstore Module Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/developer/howtos/web.rst Command to download the example petstore module from GitHub. This module serves as a starting point for creating Odoo web client modules. ```console $ git clone http://github.com/odoo/petstore ``` -------------------------------- ### Odoo Live Chat Channel Join/Leave Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/applications/websites/livechat/overview/get_started.rst Instructions on how to join or leave a live chat channel within Odoo. ```APIDOC Website --> Configuration --> Settings Access your channel under 'Live Chat' and select 'Join Channel' or 'Leave Channel'. ``` -------------------------------- ### Odoo WSGI Application Setup Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/administration/install/deploy.rst This section describes how to mount Odoo as a WSGI application using a provided example script. It highlights limitations regarding cron and livechat workers and suggests solutions for handling these subsystems. ```python # odoo-wsgi.example.py # Customize this script to set Odoo configuration directly in odoo.tools.config # Example of how to set configuration: # from odoo.tools.config import config # config['db_name'] = 'your_database_name' # config['admin_passwd'] = 'your_admin_password' # ... other configurations # from odoo.service.wsgi import application # application = application ``` -------------------------------- ### Install Python Dependencies for Documentation Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/contributing/documentation.rst Installs the necessary Python packages required by the documentation build process using pip. ```console $ cd documentation/ $ pip install -r requirements.txt ``` -------------------------------- ### Odoo dbfilter Configuration Samples Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/administration/install/deploy.rst Demonstrates how to configure the Odoo dbfilter setting in the odoo.conf file to manage database selection based on hostnames. Includes examples for filtering by database name prefix and by subdomain. ```ini [options] dbfilter = ^mycompany.*$ ``` ```ini [options] dbfilter = ^%d$ ``` -------------------------------- ### Odoo Module Initialization Hooks Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/developer/reference/addons/module.rst Defines functions to be executed during module installation and uninstallation. 'pre_init_hook' runs before installation, 'post_init_hook' runs after installation, and 'uninstall_hook' runs after uninstallation. These hooks accept specific arguments (cursor, registry) and should be used for complex setup or cleanup tasks not achievable via the standard API. ```python pre_init_hook(cursor) post_init_hook(cursor, registry) uninstall_hook(cursor, registry) ``` -------------------------------- ### Start Odoo Server Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/developer/howtos/backend.rst Command to start the Odoo server. Ensure you are in the directory containing the odoo-bin executable. ```bash odoo-bin ``` -------------------------------- ### Fedora Odoo Repository Installation Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/administration/install/install.rst Installs Odoo Community Edition on Fedora by adding the official Odoo repository and then installing the 'odoo' package. It also enables and starts the Odoo service. ```console $ sudo dnf config-manager --add-repo=https://nightly.odoo.com/13.0/nightly/rpm/odoo.repo $ sudo dnf install -y odoo $ sudo systemctl enable odoo $ sudo systemctl start odoo ``` -------------------------------- ### Compile and Install Asterisk Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/applications/general/voip/asterisk.rst Commands to compile the Asterisk server and install it, along with optional commands to install sample configurations and the startup script. ```console make && make install make samples make config ``` -------------------------------- ### RST Example: Example Block Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/contributing/documentation/content_guidelines.rst Shows the '.. example::' directive in reStructuredText (RST) for providing concrete examples of titles and headings, demonstrating best practices for clarity and conciseness. ```rst .. example:: - **Titles** (H1) - Quotation templates - Lead mining - Resupply from another warehouse - Synchronize Google Calendar with Odoo - Batch payments: SEPA Direct Debit (SDD) - Digitize vendor bills with optical character recognition (OCR) - **Headings** (H2, H3) - Project stages - Email alias - Confirm the quotation - Generate SEPA Direct Debit XML files to submit payments ``` -------------------------------- ### Add Odoo Repository and Install Odoo Community Edition (Debian/Ubuntu) Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/administration/install/install.rst Adds the official Odoo repository to the system and installs the Odoo Community Edition. This involves fetching the GPG key, adding the repository source, updating the package list, and then installing the 'odoo' package. ```console # wget -O - https://nightly.odoo.com/odoo.key | apt-key add - # echo "deb http://nightly.odoo.com/13.0/nightly/deb/ ./" >> /etc/apt/sources.list.d/odoo.list # apt-get update && apt-get install odoo ``` -------------------------------- ### Odoo Installation Update Guide Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/administration/maintain/update.rst This section details the process of updating an Odoo installation to the latest version. It covers downloading the updated version, backing up the database, and installing the new version. It provides specific instructions for different installation methods like packaged installers and source tarballs. ```en .. _setup/update: ============== Bugfix updates ============== Introduction ============ In order to benefit from the latest improvements, security fixes, bug corrections and performance boosts, you may need to update your Odoo installation from time to time. This guide only applies when are using Odoo on your own hosting infrastructure. If you are using one of the Odoo Cloud solutions, updates are automatically performed for you. The terminology surrounding software updates is often confusing, so here are some preliminary definitions: Updating (an Odoo installation) Refers to the process of obtaining the latest revision of the source code for your current Odoo Edition. For example, updating your Odoo Enterprise 13.0 to the latest revision. This does not directly cause any change to the contents of your Odoo database, and can be undone by reinstalling the previous revision of the source code. Upgrading (an Odoo database) Refers to a complex data processing operation where the structure and contents of your database is permanently altered to make it compatible with a new release of Odoo. This operation is irreversible and typically accomplished via Odoo's `database upgrade service `_, when you decide to switch to a newer release of Odoo. Historically, this process has also been known as a "migration" because it involves moving data around inside the database, even though the database may end up at the same physical location after the upgrade. This page describes the typical steps needed to *update* an Odoo installation to the latest version. If you'd like more information about upgrading a database, please visit the `Odoo Upgrade page `_ instead. In a nutshell ============= Updating Odoo is accomplished by simply reinstalling the latest version of your Odoo Edition on top of your current installation. This will preserve your data without any alteration, as long as you do not uninstall PostgreSQL (the database engine that comes with Odoo). The main reference for updating is logically our :ref:`installation guide `, which explains the common installation methods. Updating is also most appropriately accomplished by the person who deployed Odoo initially, because the procedure is very similar. .. note:: We always recommend to download a complete new up-to-date Odoo version, rather than manually applying patches, such as the security patches that come with Security Advisories. The patches are mainly provided for installations that are heavily customized, or for technical personnel who prefer to apply minimal changes temporarily while testing a complete update. Step 1: Download an updated Odoo version ======================================== The central download page is https://www.odoo.com/page/download. If you see a "Buy" link for the Odoo Enterprise download, make sure you are logged into Odoo.com with the same login that is linked to your Odoo Enterprise subscription. Alternatively, you can use the unique download link that was included with your Odoo Enterprise purchase confirmation email. .. note:: Downloading an updated version is not necessary if you installed via Github (see below) Step 2: Make a backup of your database ====================================== The update procedure is quite safe and should not alter you data. However it's always best to take a full database backup before performing any change on your installation, and to store it somewhere safe, on a different computer. If you have not disabled the database manager screen (see :ref:`here ` why you should), you can use it (link at bottom of your database selection screen) to download a backup of your database(s). If you disabled it, use the same procedure than for your usual backups. Step 3: Install the updated version =================================== Choose the method that matches your current installation: Packaged Installers ------------------- If you installed Odoo with an installation package downloaded on our website (the recommended method), updating is very simple. All you have to do is download the installation package corresponding to your system (see step #1) and install it on your server. They are updated daily and include the latest security fixes. Usually, you can simply double-click the package to install it on top of the current installation. After installing the package, be sure to restart the Odoo service or reboot your server, and you're all set. Source Install (Tarball) ------------------------ If you have originally installed Odoo with the "tarball" version (source code archive), you have to replace the installation directory with a newer version. First download the latest tarball from Odoo.com. They are updated daily and include the latest security fixes (see step #1) ``` -------------------------------- ### Odoo Live Chat Configuration Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/applications/websites/livechat/overview/get_started.rst This section details the configuration settings for Odoo Live Chat. It covers adding operators, setting welcome messages, and defining channel rules based on URLs and countries. ```APIDOC Website --> Configuration --> Settings --> Live Chat Operators: - Add agents to respond to chat requests. - Operators inactive in Odoo for over 30 minutes are considered disconnected. Options: - Set default text for the live chat button. - Configure automated welcome messages for visitors. - Define text prompting users to initiate a chat. Channel Rules: - Define actions for specific URLs or countries. - Example: Automatically pop-up chat window 3 seconds after users land on a contact us page. - GeoIP must be installed for country-based rules. ``` -------------------------------- ### Start Odoo Server Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/developer/howtos/website.rst Command to start the Odoo server, specifying the path to custom modules. This is necessary to run and test Odoo applications. ```console $ ./odoo-bin --addons-path addons,my-modules ``` -------------------------------- ### Odoo Live Chat External Options Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/applications/websites/livechat/overview/get_started.rst Information on integrating Odoo Live Chat into external websites and providing a direct link for users to access a single chat page. ```APIDOC External Website Integration: - Find code to add to your website under the 'Widget' tab if the website was not created with Odoo. Direct Chat Link: - Odoo provides a URL to send to users for access to a single live chat page. ``` -------------------------------- ### Odoo Live Chat Management Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/applications/websites/livechat/overview/get_started.rst Details on how chat requests are managed within Odoo, including how conversations appear and how they are dispatched to operators. ```APIDOC Managing Chat Requests: - Conversations initiated by visitors appear as direct messages in the 'Discuss' application. - Inquiries can be answered from anywhere within Odoo. - Conversations are dispatched based on the current workload of online operators. ``` -------------------------------- ### Install Odoo Python Requirements Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/administration/install/install.rst Installs Odoo's Python dependencies from the requirements.txt file after navigating to the Odoo Community installation directory. It also installs setuptools and wheel. ```console $ cd /CommunityPath $ pip3 install setuptools wheel $ pip3 install -r requirements.txt ``` -------------------------------- ### Odoo Module __init__.py Example Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/developer/howtos/backend.rst Example of an __init__.py file for an Odoo module, demonstrating how to import Python files within the module. ```python from . import mymodule ``` -------------------------------- ### Odoo Bank Account Setup Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/applications/finance/accounting/getting_started/initial_configuration/setup.rst This section explains how to set up bank accounts in Odoo, either by automatically syncing bank statements or by manual configuration. It details the fields required for manual setup. ```text Manual Bank Account Configuration: - **Name**: Bank account name as displayed in Odoo. - **Account Number**: Your bank account number (e.g., IBAN). - **Bank**: Bank institution's name and Identifier Code (BIC or SWIFT). - **Code**: Journal's Short Code. - **Journal**: Select an existing Bank Journal or create a new one. ``` -------------------------------- ### Install PostgreSQL Server (Debian/Ubuntu) Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/administration/install/install.rst Installs the PostgreSQL server, which is a required dependency for Odoo to run properly. This command is executed on Debian-based systems like Ubuntu. ```console $ sudo apt install postgresql -y ``` -------------------------------- ### Install an Odoo Module Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/administration/odoo_sh/advanced/containers.rst Shows the command to install an Odoo module, specifically the 'sale' module, without demo data and with an immediate shutdown after initialization. ```bash $ odoo-bin -i sale --without-demo=all --stop-after-init ``` -------------------------------- ### Odoo Installation Methods Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/developer/cli.rst This section explains how to invoke the Odoo CLI based on the installation method. It covers running from source, from a distribution package, and using Docker. ```bash # Run Odoo from source ./odoo-bin # Odoo installed from a distribution package odoo ``` -------------------------------- ### Gantt View Example Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/developer/reference/addons/views.rst An example of a Gantt view in XML, demonstrating the use of date_start, date_stop, and thumbnails attributes for displaying user avatars. ```xml ``` -------------------------------- ### Install PostgreSQL on Debian/Ubuntu Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/administration/install/install.rst Installs PostgreSQL and its client on Debian or Ubuntu systems using the apt package manager. ```console $ sudo apt install postgresql postgresql-client ``` -------------------------------- ### Install Delivery Costs Module Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/applications/inventory_and_mrp/inventory/shipping/setup/delivery_method.rst Instructions to install the 'Delivery costs' module in Odoo, which is essential for managing delivery methods. It also mentions the 'eCommerce Delivery' module for e-commerce integration. ```rst .. image:: delivery_method/setup05.png :align: center .. note:: If you want to integrate delivery methods in your e-commerce, you'll have to install the **eCommerce Delivery** module. ``` -------------------------------- ### Install PJSIP Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/applications/general/voip/asterisk.rst Instructions for downloading, configuring, compiling, and installing the PJSIP library, a crucial dependency for Asterisk's SIP and WebRTC capabilities. ```console # cd pjproject # ./configure --prefix=/usr --enable-shared --disable-sound --disable-resample --disable-video --disable-opencore-amr CFLAGS='-O2 -DNDEBUG' # make dep # make # make install # ldconfig # ldconfig -p | grep pj ``` -------------------------------- ### Payment Term Configuration Example Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/applications/finance/accounting/receivables/customer_invoices/payment_terms.rst Illustrates a payment term setup where 30% is due immediately and the balance is due at the end of the following month. ```APIDOC Terms Configuration: - Rule 1: - Type: Percentage - Value: 30% - Due Date Computation: Day of issuance - Rule 2: - Type: Balance - Due Date Computation: End of the following month ``` -------------------------------- ### Fedora RPM Package Installation Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/administration/install/install.rst Installs Odoo Community or Enterprise Edition on Fedora using a downloaded RPM package. After installation, it enables and starts the Odoo service. ```console $ sudo dnf localinstall odoo_13.0.latest.noarch.rpm $ sudo systemctl enable odoo $ sudo systemctl start odoo ``` -------------------------------- ### Odoo.sh Project Creation Steps Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/administration/odoo_sh/getting_started/create.rst This section details the process of creating a new Odoo.sh project, from initial deployment to project submission. It includes steps like signing in with GitHub, authorizing Odoo.sh, and providing project-specific information such as Odoo version and subscription code. ```text 1. Go to Odoo.sh and click 'Deploy your platform'. 2. Sign in with your GitHub account. 3. Authorize Odoo.sh to access your GitHub account. 4. Submit your project details: - Choose to start from scratch or use an existing repository. - Select a name or repository. - Choose the Odoo version. - Enter your subscription code. 5. Your project is created and the first build is in progress. ``` -------------------------------- ### Example Widget Usage Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/developer/reference/javascript/javascript_reference.rst A simple JavaScript example demonstrating how to append a widget instance to a DOM element. ```javascript // Render and insert into DOM counter.appendTo(".some-div"); ``` -------------------------------- ### Install Debugger Temporarily Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/administration/odoo_sh/advanced/containers.rst Demonstrates how to install Python debuggers like pudb or ipdb temporarily within a build using pip. ```bash $ pip install pudb --user or $ pip install ipdb --user ``` -------------------------------- ### Odoo Chart of Accounts Setup Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/applications/finance/accounting/getting_started/initial_configuration/setup.rst This describes the process of setting up the Chart of Accounts in Odoo Accounting, including adding accounts and their initial opening balances. Users can access detailed settings for each account. ```text Functionality: Add accounts and their initial opening balances to the Chart of Accounts. Access: Click the *double arrow button* at the end of an account line for detailed settings. ``` -------------------------------- ### Verify Python and Pip Installation Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/contributing/documentation.rst Checks if Python 3 and pip 3 are installed and accessible in the system's PATH by displaying their version numbers. ```console $ python3 --version $ pip3 --version ``` -------------------------------- ### Install pyflame and FlameGraph Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/developer/howtos/profilecode.rst Instructions for installing `pyflame` and `FlameGraph` on Debian/Ubuntu systems. `pyflame` is used for recording code execution stacks, and `FlameGraph` generates visualizations from these recordings. ```bash # These instructions are given for Debian/Ubuntu distributions sudo apt install autoconf automake autotools-dev g++ pkg-config python-dev python3-dev libtool make git clone https://github.com/uber/pyflame.git git clone https://github.com/brendangregg/FlameGraph.git cd pyflame ./autogen.sh ./configure make sudo make install ``` -------------------------------- ### Navigate and Create Branch Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/contributing/documentation.rst Commands to navigate to the documentation directory, checkout the '13.0' branch, and create a new branch for contributions. ```bash $ cd documentation/ $ git checkout 13.0 $ git checkout -b 13.0-my_contribution ``` -------------------------------- ### Example Odoo Map View Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/developer/reference/addons/views.rst An example of an Odoo Map view definition in XML, demonstrating the usage of 'res_partner', 'default_order', 'routing' attributes, and the 'marker-popup' with a 'field' element. ```xml ``` -------------------------------- ### Create Basic Odoo Module Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/developer/howtos/website.rst Uses Odoo's scaffolding command to quickly set up a new module directory with a basic module structure. This is the starting point for customizing Odoo. ```console ./odoo-bin scaffold Academy my-modules ``` -------------------------------- ### Example Payment Terms Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/applications/finance/accounting/receivables/customer_invoices/payment_terms.rst Demonstrates common payment term configurations, including immediate payment, net terms, and terms with cash discounts. ```APIDOC Immediate Payment: - Full payment due on the day of invoice issuance. 15 Days (Net 15): - Full payment due 15 days after the invoice date. 21 MFI: - Full payment due by the 21st of the month following the invoice date. 2% 10, Net 30 EOM: - 2% cash discount if payment received within 10 days. - Otherwise, full payment due at the end of the month following the invoice date. ``` -------------------------------- ### Manage Delivery Method on Delivery Order Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/applications/inventory_and_mrp/inventory/shipping/setup/delivery_method.rst Describes how to add or change the delivery method directly on an Odoo delivery order and how to check the carrier information. ```rst You can add or change the delivery method on the delivery itself. .. image:: delivery_method/setup01.png :align: center On the delivery, check the **Carrier Information**. The carrier is the chosen delivery method. ``` -------------------------------- ### Select Delivery Method on Sale Order Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/applications/inventory_and_mrp/inventory/shipping/setup/delivery_method.rst Illustrates how to select a delivery method on an Odoo sale order and how to add the delivery charge as a line item. ```rst You can now choose the **Delivery Method** on your sale order. If you want to invoice the price of the delivery charge on the sale order, click on **Set price**, it will add a line with the name of the delivery method as a product. .. image:: delivery_method/setup07.png :align: center ``` -------------------------------- ### Odoo Window Action Example Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/developer/reference/addons/actions.rst Demonstrates how to define a window action in Odoo to display a list of partners with the 'customer' flag set, using both tree and form views. ```APIDOC { "type": "ir.actions.act_window", "res_model": "res.partner", "views": [[False, "tree"], [False, "form"]], "domain": [["customer", "=", true]], } ``` -------------------------------- ### Limit Delivery Method Destinations Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/applications/inventory_and_mrp/inventory/shipping/setup/delivery_method.rst Explains how to restrict delivery methods to specific countries, states, or zip codes, which affects availability on the e-commerce platform. ```rst Finally you can limit the delivery method to a few destinations. The limit can be applied to some countries, states or even zip codes. This feature limits the list of countries on your e-commerce. .. image:: delivery_method/setup02.png :align: center ``` -------------------------------- ### QWeb Widget Example Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/developer/howtos/web.rst A complete example demonstrating the creation of an Odoo widget using QWeb for rendering. It includes JavaScript for widget logic and QWeb templates for HTML structure, along with CSS for styling. ```javascript odoo.oepetstore = function(instance, local) { var _t = instance.web._t, _lt = instance.web._lt; var QWeb = instance.web.qweb; local.HomePage = instance.Widget.extend({ start: function() { var products = new local.ProductsWidget( this, ["cpu", "mouse", "keyboard", "graphic card", "screen"], "#00FF00"); products.appendTo(this.$el); }, }); local.ProductsWidget = instance.Widget.extend({ template: "ProductsWidget", init: function(parent, products, color) { this._super(parent); this.products = products; this.color = color; }, }); instance.web.client_actions.add( 'petstore.homepage', 'instance.oepetstore.HomePage'); } ``` ```xml

``` ```css .oe_products_item { display: inline-block; padding: 3px; margin: 5px; border: 1px solid black; } ``` -------------------------------- ### Odoo Controller for 'Hello, world' Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/developer/howtos/website.rst A simple Odoo controller that defines a route '/academy/academy/' and returns a 'Hello, world' string. It requires the 'odoo' library and is registered with '@http.route'. ```python # -*- coding: utf-8 -*- from odoo import http class Academy(http.Controller): @http.route('/academy/academy/', auth='public') def index(self, **kw): return "Hello, world" ``` -------------------------------- ### Alternative Odoo Page Creation using Template Source: https://github.com/suncombo/odoo-documentation/blob/13.0/content/developer/howtos/themes.rst This XML snippet presents an alternative method for creating Odoo pages using the `