# SOME DESCRIPTIVE TITLE. # Copyright (C) Odoo S.A. # This file is distributed under the same license as the Odoo package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Odoo saas-15.2\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-07-25 12:50+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../content/developer.rst:9 msgid "Developer" msgstr "" #: ../../content/developer.rst:11 msgid "Learn through tutorials and get help using reference guides." msgstr "" #: ../../content/developer/glossary.rst:5 msgid "Glossary" msgstr "" #: ../../content/developer/glossary.rst:8 msgid "external id" msgstr "" #: ../../content/developer/glossary.rst:9 msgid "external identifier" msgstr "" #: ../../content/developer/glossary.rst:10 msgid "external identifiers" msgstr "" #: ../../content/developer/glossary.rst:12 msgid "string identifier stored in ``ir.model.data``, can be used to refer to a record regardless of its database identifier during data imports or export/import roundtrips." msgstr "" #: ../../content/developer/glossary.rst:16 msgid "External identifiers are in the form :samp:`{module}.{id}` (e.g. ``account.invoice_graph``). From within a module, the :samp:`{module}.` prefix can be left out." msgstr "" #: ../../content/developer/glossary.rst:20 msgid "Sometimes referred to as \"xml id\" or ``xml_id`` as XML-based :ref:`reference/data` make extensive use of them." msgstr "" #: ../../content/developer/glossary.rst:22 msgid "format string" msgstr "" #: ../../content/developer/glossary.rst:24 msgid "inspired by `jinja variables`_, format strings allow more easily mixing literal content and computed content (expressions): content between ``{{`` and ``}}`` is interpreted as an expression and evaluated, other content is interpreted as literal strings and displayed as-is" msgstr "" #: ../../content/developer/glossary.rst:29 msgid "GIS" msgstr "" #: ../../content/developer/glossary.rst:30 msgid "Geographic Information System" msgstr "" #: ../../content/developer/glossary.rst:32 msgid "any computer system or subsystem to capture, store, manipulate, analyze, manage or present spatial and geographical data." msgstr "" #: ../../content/developer/glossary.rst:34 msgid "minified" msgstr "" #: ../../content/developer/glossary.rst:35 msgid "minification" msgstr "" #: ../../content/developer/glossary.rst:37 msgid "process of removing extraneous/non-necessary sections of files (comments, whitespace) and possibly recompiling them using equivalent but shorter structures (`ternary operator`_ instead of ``if/else``) in order to reduce network traffic" msgstr "" #: ../../content/developer/howtos.rst:6 msgid "How-to guides" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:4 msgid "Accounting localization" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:8 msgid "This tutorial requires knowledge about how to build a module in Odoo (see :doc:`../tutorials/getting_started`)." msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:13 msgid "Installation procedure" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:15 msgid "On installing the `account `_ module, the localization module corresponding to the country code of the company is installed automatically. In case of no country code set or no localization module found, the `l10n_generic_coa `_ (US) localization module is installed by default. Check `post init hook `_ for details." msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:19 msgid "For example, `l10n_ch `_ will be installed if the company has ``Switzerland`` as country." msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:22 msgid "Building a localization module" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:24 msgid "The structure of a basic ``l10n_XX`` module may be described with the following :file:`__manifest__.py` file:" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:63 msgid "In the first file :file:`data/account_chart_template_data.xml`, we set the name for the chart of accounts along with some basic fields." msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:66 msgid ":ref:`Chart Template References `" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:69 msgid "`addons/l10n_ch/data/l10n_ch_chart_data.xml `_" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:80 msgid "Recommended **xmlid** for the record is `chart_template`. If you need many chart of accounts, you can add some suffixes, i.e. `chart_template_XXX`." msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:85 msgid "Chart of Accounts" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:88 msgid "Account tags" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:91 msgid ":ref:`Account Tag References `" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:93 msgid "Tags are a way to sort accounts. For example, imagine you want to create a financial report having multiple lines but you have no way to find a rule to dispatch the accounts according to their ``code``. The solution is the usage of tags, one for each report line, to filter accounts like you want." msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:97 msgid "Put the tags in the :file:`data/account_account_tag_data.xml` file." msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:100 msgid "`addons/l10n_lt/data/account.account.template.csv `_" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:108 #: ../../content/developer/howtos/accounting_localization.rst:138 msgid "`addons/l10n_at/data/account_account_template.xml `_" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:119 msgid "Accounts" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:122 msgid ":ref:`Account References `" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:123 msgid ":doc:`/applications/finance/accounting/get_started/chart_of_accounts`" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:125 msgid "Obviously, :guilabel:`Chart of Accounts` cannot exist without :guilabel:`Accounts`. You need to specify them in :file:`data/account.account.template.csv`." msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:128 msgid "`addons/l10n_ch/data/account.account.template.csv `_" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:135 msgid "CSV is prefered but you may use XML format instead." msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:148 msgid "Avoid the usage of liquidity ``account.account.type``! Indeed, the bank & cash accounts are created directly at the installation of the localization module and then, are linked to an ``account.journal``." msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:150 msgid "Only one account of type payable/receivable is enough for the generic case. We need to define a PoS receivable account as well however. (linked in the CoA)" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:151 msgid "Don't create too many accounts: 200-300 is enough. But mostly, we try to find a good balance where the CoA needs minimal adapting for most companies afterwards." msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:153 msgid "Next settings for the chart of accounts are set in a separate file, because we need to provide a :ref:`list of accounts ` first. In :file:`data/account_chart_post_data.xml`, we set some default accounts:" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:158 msgid "`addons/l10n_ch/data/l10n_ch_chart_post_data.xml `_" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:168 msgid "Account groups" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:171 msgid ":ref:`Account Group References `" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:173 msgid "Account groups allow describing the hierarchical structure of the chart of accounts. The filter needs to be activated in the report and then when you decollapse into journal entries it will show the parents of the account." msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:175 msgid "It works with the prefix *start*/*end*, so every account where the code starts with something between *start* and *end* will have this account.group as the parent group. Furthermore, the account groups can have a parent account group as well to form the hierarchy." msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:179 msgid "`addons/l10n_il/data/account.group.template.csv `_" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:188 #: ../../content/developer/reference/standard_modules/account/account_tax.rst:5 msgid "Taxes" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:191 msgid ":ref:`Tax References `" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:192 msgid ":doc:`/applications/finance/accounting/taxes/`" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:194 msgid "To add taxes you first need to specify tax groups. You normally need just one tax group for every tax rate, except for the 0% as you need to often distinguish between exempt, 0%, not subject, ... taxes. This model only has two required fields: *name* and *country*. Create the file :file:`data/account_tax_group_data.xml` and list the groups:" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:211 msgid "`addons/l10n_ch/data/account_tax_group_data.xml `_" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:220 msgid "`addons/l10n_uk/data/account.tax.group.csv `_" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:227 msgid "Now you can add the taxes via :file:`data/account_tax_template_data.xml` file. The first tax you define that is purchase/sale also becomes the default purchase/sale tax for your products." msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:231 msgid "`addons/l10n_ae/data/account_tax_template_data.xml `_" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:239 msgid "If some accounts should use default taxes, you can set them up in :file:`data/account_account_template_post_data.xml`" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:242 msgid "Tax Report" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:248 msgid "The tax report is declared in the :guilabel:`Invoicing` (`account`) app, but the report is only accessible when :guilabel:`Accounting` (`account_accountant`) is installed." msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:251 msgid ":ref:`Tax Report Line References `" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:252 msgid ":doc:`/applications/finance/accounting/reporting/tax_returns`" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:254 msgid "In the previous section, you noticed the fields `invoice_repartition_line_ids` or `refund_repartition_line_ids` and probably understood nothing about them. Good news: you are not alone on this incomprehension. Bad news: you have to figure it out a bit. The topic is complicated. Indeed:" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:259 msgid "The simple version is that, in the tax template, you indicate in the invoice/refund repartition lines whether the base or a percentage of the tax needs to be reported in which report line (through the *minus/plus_report_line_ids* fields). It becomes clear also when you check the tax configuration in the Odoo interface (or check the docs :ref:`Tax References `, :ref:`Tax Repartition References `). And fortunately we have a presentation explaining the tax reports (as in version 13.0) in details:" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:268 msgid "So, once you have properly configured taxes, you just need to add the :file:`data/account_tax_report_data.xml` file with a record for your `account.tax.report` at the beginning:" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:281 msgid "... followed by the declaration of its lines, as `account.tax.report.line` records." msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:284 msgid "`addons/l10n_au/data/account_tax_report_data.xml `_" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:295 msgid "Fiscal positions" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:298 msgid ":ref:`Fiscal Position References `" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:299 msgid ":doc:`/applications/finance/accounting/taxes/fiscal_positions`" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:301 msgid "Specify fiscal positions in the :file:`data/account_fiscal_position_template_data.xml` file." msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:304 msgid "`addons/l10n_es/data/account_fiscal_position_template_data.xml `_" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:313 msgid "Final steps" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:315 msgid "The last step when installing a localization module is to try to apply its chart of accounts to the current company (if it does not already have one). The file :file:`data/account_chart_template_try_loading.xml` is responsible for that." msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:319 msgid "`addons/l10n_ch/data/account_chart_template_data.xml `_" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:327 msgid "Finally, you may add a demo company, so the localization can easily be tested in demo mode." msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:330 msgid "`addons/l10n_ch/demo/demo_company.xml `_" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:339 msgid "Accounting reports" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:346 msgid ":doc:`/applications/finance/accounting/reporting`" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:348 msgid "Accounting reports should be added via a separate module `l10n_XX_reports` that should go to the `enterprise repository `_." msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:350 msgid "Basic :file:`__manifest__.py` file for such a module looks as following:" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:370 msgid "Functional overview of financial reports is here: :doc:`/applications/finance/accounting/reporting`." msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:372 msgid "Some good examples:" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:374 msgid "`l10n_ch_reports/data/account_financial_html_report_data.xml `_" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:375 msgid "`l10n_be_reports/data/account_financial_html_report_data.xml `_" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:377 msgid "For the fields' meaning, dive directly to the source:" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:379 msgid "`account.financial.html.report (v15) `_" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:380 msgid "`account.financial.html.report.line (v15) `_" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:382 msgid "The menu for the new report is created automatically. By default, it is located under :menuselection:`Accounting -> Reporting`. To create a dedicated section in the :guilabel:`Reporting` menu, you need to create a new `ir.ui.menu` record (usually in the main `l10n_XX` module) and set it as `parent_id` field in the `account.financial.html.report` model. Example for the Belgian localization:" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:385 msgid "`ir.ui.menu record in l10n_be `_" msgstr "" #: ../../content/developer/howtos/accounting_localization.rst:386 msgid "`parent_id field in l10n_be_reports (v15) `_" msgstr "" #: ../../content/developer/howtos/company.rst:6 msgid "Multi-company Guidelines" msgstr "" #: ../../content/developer/howtos/company.rst:10 msgid "This tutorial requires good knowledge of Odoo. Please refer to the :ref:`basic tutorial ` first if needed." msgstr "" #: ../../content/developer/howtos/company.rst:13 msgid "As of version 13.0, a user can be logged in to multiple companies at once. This allows the user to access information from multiple companies, but also to create/edit records in a multi-company environment." msgstr "" #: ../../content/developer/howtos/company.rst:17 msgid "If not managed correctly, it may be the source of a lot of inconsistent multi-company behaviors. For instance, a user logged in to both companies A and B could create a sales order in company A and add products belonging to company B to it. It is only when the user logs out from company B that access errors will occur for the sales order." msgstr "" #: ../../content/developer/howtos/company.rst:22 msgid "To correctly manage multi-company behaviors, Odoo's ORM provides multiple features:" msgstr "" #: ../../content/developer/howtos/company.rst:24 msgid ":ref:`Company-dependent fields `" msgstr "" #: ../../content/developer/howtos/company.rst:25 msgid ":ref:`Multi-company consistency `" msgstr "" #: ../../content/developer/howtos/company.rst:26 msgid ":ref:`Default company `" msgstr "" #: ../../content/developer/howtos/company.rst:27 msgid ":ref:`Views `" msgstr "" #: ../../content/developer/howtos/company.rst:28 msgid ":ref:`Security rules `" msgstr "" #: ../../content/developer/howtos/company.rst:33 msgid "Company-dependent fields" msgstr "" #: ../../content/developer/howtos/company.rst:35 msgid "When a record is available from multiple companies, we must expect that different values will be assigned to a given field depending on the company from which the value is set." msgstr "" #: ../../content/developer/howtos/company.rst:38 msgid "For the field of the same record to support several values, it must be defined with the attribute `company_dependent` set to `True`." msgstr "" #: ../../content/developer/howtos/company.rst:57 msgid "The `_compute_display_info` method is decorated with `depends_context('company')` (see :attr:`~odoo.api.depends_context`) to ensure that the computed field is recomputed depending on the current company (`self.env.company`)." msgstr "" #: ../../content/developer/howtos/company.rst:61 msgid "When a company-dependent field is read, the current company is used to retrieve its value. In other words, if a user is logged in to companies A and B with A as the main company and creates a record for company B, the value of company-dependent fields will be that of company A." msgstr "" #: ../../content/developer/howtos/company.rst:65 msgid "To read the values of company-dependent fields set by another company than the current one, we need to ensure the company we are using is the correct one. This can be done with :meth:`~odoo.models.Model.with_company`, which updates the current company." msgstr "" #: ../../content/developer/howtos/company.rst:80 msgid "Whenever you are computing/creating/... things that may behave differently in different companies, you should make sure whatever you are doing is done in the right company. It doesn't cost much to always use `with_company` to avoid problems later." msgstr "" #: ../../content/developer/howtos/company.rst:101 msgid "Multi-company consistency" msgstr "" #: ../../content/developer/howtos/company.rst:103 msgid "When a record is made shareable between several companies by the means of a `company_id` field, we must take care that it cannot be linked to the record of another company through a relational field. For instance, we do not want to have a sales order and its invoice belonging to different companies." msgstr "" #: ../../content/developer/howtos/company.rst:107 msgid "To ensure this multi-company consistency, you must:" msgstr "" #: ../../content/developer/howtos/company.rst:109 msgid "Set the class attribute `_check_company_auto` to `True`." msgstr "" #: ../../content/developer/howtos/company.rst:110 msgid "Define relational fields with the attribute `check_company` set to `True` if their model has a `company_id` field." msgstr "" #: ../../content/developer/howtos/company.rst:113 msgid "On each :meth:`~odoo.models.Model.create` and :meth:`~odoo.models.Model.write`, automatic checks will be triggered to ensure the multi-company consistency of the record." msgstr "" #: ../../content/developer/howtos/company.rst:127 msgid "The field `company_id` must not be defined with `check_company=True`." msgstr "" #: ../../content/developer/howtos/company.rst:132 msgid "The `check_company` feature performs a strict check! It means that if a record has no `company_id` (i.e., the field is not required), it cannot be linked to a record whose `company_id` is set." msgstr "" #: ../../content/developer/howtos/company.rst:138 msgid "When no domain is defined on the field and `check_company` is set to `True`, a default domain is added: `['|', '('company_id', '=', False), ('company_id', '=', company_id)]`" msgstr "" #: ../../content/developer/howtos/company.rst:144 msgid "Default company" msgstr "" #: ../../content/developer/howtos/company.rst:146 msgid "When the field `company_id` is made required on a model, a good practice is to set a default company. It eases the setup flow for the user or even guarantees its validity when the company is hidden from view. Indeed, the company is usually hidden if the user does not have access to multiple companies (i.e., when the user does not have the group `base.group_multi_company`)." msgstr "" #: ../../content/developer/howtos/company.rst:168 #: ../../content/developer/howtos/website_themes/setup.rst:74 #: ../../content/developer/howtos/website_themes/theming.rst:496 #: ../../content/developer/reference/backend/views.rst:6 #: ../../content/developer/reference/frontend/javascript_reference.rst:1200 msgid "Views" msgstr "" #: ../../content/developer/howtos/company.rst:170 msgid "As stated in :ref:`above `, the company is usually hidden from view if the user does not have access to multiple companies. This is assessed with the group `base.group_multi_company`." msgstr "" #: ../../content/developer/howtos/company.rst:197 msgid "Security rules" msgstr "" #: ../../content/developer/howtos/company.rst:199 msgid "When working with records shared across companies or restricted to a single company, we must take care that a user does not have access to records belonging to other companies." msgstr "" #: ../../content/developer/howtos/company.rst:202 msgid "This is achieved with security rules based on `company_ids`, which contain the current companies of the user (the companies the user checked in the multi-company widget)." msgstr "" #: ../../content/developer/howtos/company.rst:229 #: ../../content/developer/howtos/provide_iap_services.rst:118 #: ../../content/developer/howtos/provide_iap_services.rst:222 #: ../../content/developer/howtos/provide_iap_services.rst:406 #: ../../content/developer/howtos/provide_iap_services.rst:408 #: ../../content/developer/howtos/provide_iap_services.rst:511 #: ../../content/developer/howtos/translations.rst:19 #: ../../content/developer/howtos/website_themes/building_blocks.rst:77 #: ../../content/developer/howtos/website_themes/building_blocks.rst:332 #: ../../content/developer/howtos/website_themes/layout.rst:547 #: ../../content/developer/howtos/website_themes/pages.rst:130 #: ../../content/developer/howtos/website_themes/pages.rst:194 #: ../../content/developer/howtos/website_themes/shapes.rst:125 #: ../../content/developer/reference/backend/actions.rst:176 #: ../../content/developer/reference/backend/orm.rst:630 #: ../../content/developer/reference/backend/orm.rst:632 #: ../../content/developer/reference/backend/orm.rst:747 #: ../../content/developer/reference/backend/orm.rst:904 #: ../../content/developer/reference/backend/security.rst:28 #: ../../content/developer/reference/backend/security.rst:186 #: ../../content/developer/reference/backend/views.rst:13 #: ../../content/developer/reference/backend/views.rst:70 #: ../../content/developer/reference/backend/views.rst:81 #: ../../content/developer/reference/backend/views.rst:179 #: ../../content/developer/reference/backend/views.rst:241 #: ../../content/developer/reference/backend/views.rst:869 #: ../../content/developer/reference/backend/views.rst:993 #: ../../content/developer/reference/backend/views.rst:995 #: ../../content/developer/reference/backend/views.rst:1551 #: ../../content/developer/reference/backend/views.rst:1646 #: ../../content/developer/reference/backend/views.rst:1664 #: ../../content/developer/reference/backend/views.rst:1793 #: ../../content/developer/reference/frontend/qweb.rst:412 #: ../../content/developer/reference/frontend/qweb.rst:413 #: ../../content/developer/reference/frontend/qweb.rst:475 #: ../../content/developer/reference/frontend/qweb.rst:560 #: ../../content/developer/tutorials/web.rst:134 #: ../../content/developer/tutorials/web.rst:1872 #: ../../content/developer/tutorials/website.rst:495 msgid "Todo" msgstr "" #: ../../content/developer/howtos/company.rst:229 msgid "check_company on company_dependent fields." msgstr "" #: ../../content/developer/howtos/connect_device.rst:3 msgid "Connect with a device" msgstr "" #: ../../content/developer/howtos/connect_device.rst:5 msgid "IoT Drivers allow any Odoo module to communicate in real-time with any device connected to the IoT Box. Communication with the IoT Box goes both ways, so the Odoo client can send commands to and receive information from any of the supported devices." msgstr "" #: ../../content/developer/howtos/connect_device.rst:10 msgid "To add support for a device, all we need is:" msgstr "" #: ../../content/developer/howtos/connect_device.rst:12 msgid "an `Interface`, to detect connected devices of a specific type" msgstr "" #: ../../content/developer/howtos/connect_device.rst:13 msgid "a `Driver`, to communicate with an individual device" msgstr "" #: ../../content/developer/howtos/connect_device.rst:15 msgid "At each boot, the IoT Box will load all of the Interfaces and Drivers that can be located on the connected Odoo instance. Each module can contain an `iot_handlers` directory that will be copied to the IoT Box. The structure of this directory is the following" msgstr "" #: ../../content/developer/howtos/connect_device.rst:34 msgid "Detect Devices" msgstr "" #: ../../content/developer/howtos/connect_device.rst:36 msgid "Devices connected to the IoT Box are detected through `Interfaces`. There is an Interface for each supported connection type (USB, Bluetooth, Video, Printers, Serial, etc.). The interface maintains a list of detected devices and associates them with the right Driver." msgstr "" #: ../../content/developer/howtos/connect_device.rst:41 msgid "Supported devices will appear both on the IoT Box Homepage that you can access through its IP address and in the IoT module of the connected Odoo instance." msgstr "" #: ../../content/developer/howtos/connect_device.rst:45 msgid "Interface" msgstr "" #: ../../content/developer/howtos/connect_device.rst:47 msgid "The role of the Interface is to maintain a list of devices connected through a determined connection type. Creating a new interface requires" msgstr "" #: ../../content/developer/howtos/connect_device.rst:50 msgid "Extending the `Interface` class" msgstr "" #: ../../content/developer/howtos/connect_device.rst:51 msgid "Setting the `connection_type` class attribute" msgstr "" #: ../../content/developer/howtos/connect_device.rst:52 msgid "Implementing the `get_devices` method, that should return a dictionary containing data about each detected device. This data will be given as argument to the constructors and `supported` method of the Drivers." msgstr "" #: ../../content/developer/howtos/connect_device.rst:57 msgid "Setting the `_loop_delay` attribute will modify the interval between calls to `get_devices`. By default, this interval is set to 3 seconds." msgstr "" #: ../../content/developer/howtos/connect_device.rst:74 msgid "Driver" msgstr "" #: ../../content/developer/howtos/connect_device.rst:76 msgid "Once the interface has retrieved the list of detected devices, it will loop through all of the Drivers that have the same `connection_type` attribute and test their respective `supported` method on all detected devices. If the supported method of a Driver returns `True`, an instance of this Driver will be created for the corresponding device." msgstr "" #: ../../content/developer/howtos/connect_device.rst:83 msgid "`supported` methods of drivers are given a priority order. The `supported` method of a child class will always be tested before the one of its parent. This priority can be adjusted by modifying the `priority` attribute of the Driver." msgstr "" #: ../../content/developer/howtos/connect_device.rst:88 msgid "Creating a new Driver requires:" msgstr "" #: ../../content/developer/howtos/connect_device.rst:90 msgid "Extending `Driver`" msgstr "" #: ../../content/developer/howtos/connect_device.rst:91 msgid "Setting the `connection_type` class attribute." msgstr "" #: ../../content/developer/howtos/connect_device.rst:92 msgid "Setting the `device_type`, `device_connection` and `device_name` attributes." msgstr "" #: ../../content/developer/howtos/connect_device.rst:93 msgid "Defining the `supported` method" msgstr "" #: ../../content/developer/howtos/connect_device.rst:113 msgid "Communicate With Devices" msgstr "" #: ../../content/developer/howtos/connect_device.rst:115 msgid "Once your new device is detected and appears in the IoT module, the next step is to communicate with it. Since the box only has a local IP address, it can only be reached from the same local network. Communication, therefore, needs to happen on the browser-side, in JavaScript." msgstr "" #: ../../content/developer/howtos/connect_device.rst:120 msgid "The process depends on the direction of the communication: - From the browser to the box, through `Actions`_ - From the box to the browser, through `Longpolling`_" msgstr "" #: ../../content/developer/howtos/connect_device.rst:124 msgid "Both channels are accessed from the same JS object, the `DeviceProxy`, which is instantiated using the IP of the IoT Box and the device identifier." msgstr "" #: ../../content/developer/howtos/connect_device.rst:137 #: ../../content/developer/howtos/website_themes/forms.rst:33 #: ../../content/developer/reference/backend/actions.rst:6 #: ../../content/developer/tutorials/getting_started/06_firstui.rst:47 msgid "Actions" msgstr "" #: ../../content/developer/howtos/connect_device.rst:139 msgid "Actions are used to tell a selected device to execute a specific action, such as taking a picture, printing a receipt, etc." msgstr "" #: ../../content/developer/howtos/connect_device.rst:143 msgid "It must be noted that no “answer” will be sent by the box on this route, only the request status. The answer to the action, if any, has to be retrieved via the longpolling." msgstr "" #: ../../content/developer/howtos/connect_device.rst:147 msgid "An action can be performed on the DeviceProxy Object." msgstr "" #: ../../content/developer/howtos/connect_device.rst:153 msgid "In your driver, define an `action` method that will be executed when called from an Odoo module. It takes the data given during the call as argument." msgstr "" #: ../../content/developer/howtos/connect_device.rst:162 msgid "Longpolling" msgstr "" #: ../../content/developer/howtos/connect_device.rst:164 msgid "When any module in Odoo wants to read data from a specific device, it creates a listener identified by the IP/domain of the box and the device identifier and passes it a callback function to be called every time the device status changes. The callback is called with the new data as argument." msgstr "" #: ../../content/developer/howtos/connect_device.rst:177 msgid "In the Driver, an event is released by calling the `device_changed` function from the `event_manager`. All callbacks set on the listener will then be called with `self.data` as argument." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:3 msgid "Provide IAP services" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:5 msgid "In-App Purchase (IAP) allows providers of ongoing services through Odoo apps to be compensated for ongoing service use rather than — and possibly instead of — a sole initial purchase." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:9 msgid "In that context, Odoo acts mostly as a *broker* between a client and an Odoo App Developer:" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:12 msgid "Users purchase service tokens from Odoo." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:13 msgid "Service providers draw tokens from the user's Odoo account when service is requested." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:18 msgid "This document is intended for *service providers* and presents the latter, which can be done either via direct JSON-RPC2_ or if you are using Odoo using the convenience helpers it provides." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:23 #: ../../content/developer/reference/frontend/javascript_reference.rst:17 #: ../../content/developer/reference/frontend/services.rst:144 #: ../../content/developer/reference/frontend/services.rst:182 #: ../../content/developer/reference/frontend/services.rst:362 #: ../../content/developer/reference/frontend/services.rst:408 #: ../../content/developer/reference/frontend/services.rst:522 #: ../../content/developer/reference/frontend/services.rst:612 #: ../../content/developer/reference/frontend/services.rst:708 #: ../../content/developer/reference/frontend/services.rst:759 #: ../../content/developer/reference/frontend/services.rst:834 msgid "Overview" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:28 msgid "The Players" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:30 msgid "The Service Provider is (probably) you the reader, you will be providing value to the client in the form of a service paid per-use." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:32 msgid "The Client installed your Odoo App, and from there will request services." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:33 msgid "Odoo brokers crediting, the Client adds credit to their account, and you can draw credits from there to provide services." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:35 msgid "The External Service is an optional player: *you* can either provide a service directly, or you can delegate the actual service acting as a bridge/translator between an Odoo system and the actual service." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:43 msgid "The Credits" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:45 msgid "The credits went from integer to float value starting **October 2018**. Integer values are still supported." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:48 msgid "Every service provided through the IAP platform can be used by the clients with tokens or *credits*. The credits are an float unit and their monetary value depends on the service and is decided by the provider. This could be:" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:53 msgid "for an sms service: 1 credit = 1 sms;" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:54 msgid "for an ad service: 1 credit = 1 ad; or" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:55 msgid "for a postage service: 1 credit = 1 post stamp." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:57 msgid "A credit can also simply be associated with a fixed amount of money to palliate the variations of price (e.g. the prices of sms and stamps may vary following the countries)." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:61 msgid "The value of the credits is fixed with the help of prepaid credit packs that the clients can buy on https://iap.odoo.com (see :ref:`Packs `)." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:64 msgid "In the following explanations we will ignore the External Service, they are just a detail of the service you provide." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:70 msgid "'Normal' service flow" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:72 msgid "If everything goes well, the normal flow is the following:" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:74 msgid "The Client requests a service of some sort." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:75 msgid "The Service Provider asks Odoo if there are enough credits for the service in the Client's account, and creates a transaction over that amount." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:78 msgid "The Service Provider provides the service (either on their own or calling to External Services)." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:80 msgid "The Service Provider goes back to Odoo to capture (if the service could be provided) or cancel (if the service could not be provided) the transaction created at step 2." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:83 msgid "Finally, the Service Provider notifies the Client that the service has been rendered, possibly (depending on the service) displaying or storing its results in the client's system." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:90 msgid "Insufficient credits" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:92 msgid "However, if the Client's account lacks credits for the service, the flow will be as follows:" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:94 msgid "The Client requests a service as previously." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:95 msgid "The Service Provider asks Odoo if there are enough credits on the Client's account and gets a negative reply." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:97 msgid "This is signaled back to the Client." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:98 msgid "Who is redirected to their Odoo account to credit it and re-try." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:102 msgid "Building your service" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:104 msgid "For this example, the service we will provide is ~~mining dogecoins~~ burning 10 seconds of CPU for a credit. For your own services, you could, for example:" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:107 msgid "provide an online service yourself (e.g. convert quotations to faxes for business in Japan);" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:109 msgid "provide an *offline* service yourself (e.g. provide accountancy service); or" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:110 msgid "act as intermediary to an other service provider (e.g. bridge to an MMS gateway)." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:116 msgid "Register the service on Odoo" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:118 msgid "complete this part with screenshots" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:120 msgid "The first step is to register your service on the IAP endpoint (production and/or test) before you can actually query user accounts. To create a service, go to your *Portal Account* on the IAP endpoint (https://iap.odoo.com for production, https://iap-sandbox.odoo.com for testing, the endpoints are *independent* and *not synchronized*). Alternatively, you can go to your portal on Odoo (https://iap.odoo.com/my/home) and select *In-App Services*." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:129 msgid "On production, there is a manual validation step before the service can be used to manage real transactions. This step is automatically passed when on sandbox to ease the tests." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:133 msgid "Log in then go to :menuselection:`My Account --> Your In-App Services`, click Create and provide the information of your service." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:137 msgid "The service has *seven* important fields:" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:139 msgid ":samp:`name` - :class:`ServiceName`: This is the string you will need to provide inside the client's :ref:`app ` when requesting a transaction from Odoo. (e.g. :class:`self.env['iap.account].get(name)`). As good practice, this should match the technical name of your app." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:144 msgid ":samp:`label` - :class:`Label`: The name displayed on the shopping portal for the client." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:149 msgid "Both the :class:`ServiceName` and :class:`Label` are unique. As good practice, the :class:`ServiceName` should usually match the name of your Odoo Client App." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:152 msgid ":samp:`icon` - :class:`Icon`: A generic icon that will serve as default for your :ref:`packs `." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:155 msgid ":samp:`key` - :class:`ServiceKey`: The developer key that identifies you in IAP (see :ref:`your service `) and allows to draw credits from the client's account. It will be shown only once upon creation of the service and can be regenerated at will." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:161 msgid "Your :class:`ServiceKey` *is a secret*, leaking your service key allows other application developers to draw credits bought for your service(s)." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:165 msgid ":samp:`trial credits` - :class:`Float`: This corresponds to the credits you are ready to offer upon first use to your app users. Note that such service will only be available to clients that have an active enterprise contract." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:169 msgid ":samp:`privacy policy` - :class:`PrivacyPolicy`: This is an url to the privacy policy of your service. This should explicitly mention the **information you collect**, how you **use it, its relevance** to make your service work and inform the client on how they can **access, update or delete their personal information**." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:186 msgid "You can then create *credit packs* which clients can purchase in order to use your service." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:192 msgid "Packs" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:194 msgid "A credit pack is essentially a product with five characteristics:" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:196 msgid "Name: name of the pack," msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:197 msgid "Icon: specific icon for the pack (if not provided, it will fallback on the service icon)," msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:198 msgid "Description: details on the pack that will appear on the shop page as well as the invoice," msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:200 msgid "Amount: amount of credits the client is entitled to when buying the pack," msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:201 msgid "Price: price in EUR (for the time being, USD support is planned)." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:205 msgid "Odoo takes a 25% commission on all pack sales. Adjust your selling price accordingly." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:210 msgid "Depending on the strategy, the price per credit may vary from one pack to another." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:220 msgid "Odoo App" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:222 msgid "does this actually require apps?" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:224 msgid "The second step is to develop an `Odoo App`_ which clients can install in their Odoo instance and through which they can *request* the services you provide. Our app will just add a button to the Partners form which lets a user request burning some CPU time on the server." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:229 msgid "First, we will create an *odoo module* depending on ``iap``. IAP is a standard V11 module and the dependency ensures a local account is properly set up and we will have access to some necessary views and useful helpers." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:233 #: ../../content/developer/howtos/provide_iap_services.rst:248 msgid "`coalroller/__manifest__.py`" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:243 msgid "Second, the \"local\" side of the integration. Here we will only be adding an action button to the partners view, but you can of course provide significant local value via your application and additional parts via a remote service." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:261 msgid "`coalroller/views/res_partner_views.xml`" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:286 msgid "We can now implement the action method/callback. This will *call our own server*." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:289 msgid "There are no requirements when it comes to the server or the communication protocol between the app and our server, but ``iap`` provides a :func:`~odoo.addons.iap.tools.iap_tools.iap_jsonrpc` helper to call a JSON-RPC2_ endpoint on an other Odoo instance and transparently re-raise relevant Odoo exceptions (:class:`~odoo.addons.iap.tools.iap_tools.InsufficientCreditError`, :class:`odoo.exceptions.AccessError` and :class:`odoo.exceptions.UserError`)." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:296 msgid "In that call, we will need to provide:" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:298 msgid "any relevant client parameter (none here)," msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:299 msgid "the :class:`token ` of the current client that is provided by the ``iap.account`` model's ``account_token`` field. You can retrieve the account for your service by calling :samp:`env['iap.account'].get({service_name})` where :class:`service_name ` is the name of the service registered on IAP endpoint." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:305 msgid "`coalroller/models/res_partner.py`" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:333 msgid "``iap`` automatically handles :class:`~odoo.addons.iap.tools.iap_tools.InsufficientCreditError` coming from the action and prompts the user to add credits to their account." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:337 msgid ":func:`~odoo.addons.iap.tools.iap_tools.iap_jsonrpc` takes care of re-raising :class:`~odoo.addons.iap.models.iap.InsufficientCreditError` for you." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:342 msgid "If you are not using :func:`~odoo.addons.iap.tools.iap_tools.iap_jsonrpc` you *must* be careful to re-raise :class:`~odoo.addons.iap.tools.iap_tools.InsufficientCreditError` in your handler otherwise the user will not be prompted to credit their account, and the next call will fail the same way." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:351 #: ../../content/developer/reference/frontend/javascript_reference.rst:876 msgid "Service" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:353 msgid "Though that is not *required*, since ``iap`` provides both a client helper for JSON-RPC2_ calls (:func:`~odoo.addons.iap.tools.iap_tools.iap_jsonrpc`) and a service helper for transactions (:class:`~odoo.addons.iap.tools.iap_tools.iap_charge`) we will also be implementing the service side as an Odoo module:" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:358 #: ../../content/developer/howtos/provide_iap_services.rst:448 msgid "`coalroller_service/__manifest__.py`" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:368 msgid "Since the query from the client comes as JSON-RPC2_ we will need the corresponding controller which can call :class:`~odoo.addons.iap.tools.iap_tools.iap_charge` and perform the service within:" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:372 #: ../../content/developer/howtos/provide_iap_services.rst:461 msgid "`coalroller_service/controllers/main.py`" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:406 msgid "for the actual IAP will the \"portal\" page be on odoo.com or iap.odoo.com?" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:408 msgid "\"My Account\" > \"Your InApp Services\"?" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:411 msgid "The :class:`~odoo.addons.iap.tools.iap_tools.iap_charge` helper will:" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:413 msgid "authorize (create) a transaction with the specified number of credits, if the account does not have enough credits it will raise the relevant error" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:416 msgid "execute the body of the ``with`` statement" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:417 msgid "if the body of the ``with`` executes successfully, update the price of the transaction if needed" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:419 msgid "capture (confirm) the transaction" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:420 msgid "otherwise, if an error is raised from the body of the ``with``, cancel the transaction (and release the hold on the credits)" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:425 msgid "By default, :class:`~odoo.addons.iap.tools.iap_tools.iap_charge` contacts the *production* IAP endpoint, https://iap.odoo.com. While developing and testing your service you may want to point it towards the *development* IAP endpoint https://iap-sandbox.odoo.com." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:430 msgid "To do so, set the ``iap.endpoint`` config parameter in your service Odoo: in debug/developer mode, :menuselection:`Setting --> Technical --> Parameters --> System Parameters`, just define an entry for the key ``iap.endpoint`` if none already exists)." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:435 msgid "The :class:`~odoo.addons.iap.tools.iap_tools.iap_charge` helper has two additional optional parameters we can use to make things clearer to the end-user." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:440 #: ../../content/developer/reference/backend/reports.rst:198 msgid "``description``" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:439 msgid "is a message which will be associated with the transaction and will be displayed in the user's dashboard, it is useful to remind the user why the charge exists." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:446 msgid "``credit_template``" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:443 msgid "is the name of a :ref:`reference/qweb` template which will be rendered and shown to the user if their account has less credit available than the service provider is requesting, its purpose is to tell your users why they should be interested in your IAP offers." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:488 msgid "`coalroller_service/views/no-credit.xml`" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:511 msgid "how do you test your service?" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:514 msgid "JSON-RPC2_ Transaction API" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:519 msgid "The IAP transaction API does not require using Odoo when implementing your server gateway, calls are standard JSON-RPC2_." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:521 msgid "Calls use different *endpoints* but the same *method* on all endpoints (``call``)." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:523 msgid "Exceptions are returned as JSON-RPC2_ errors, the formal exception name is available on ``data.name`` for programmatic manipulation." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:526 msgid "`iap.odoo.com documentation`_ for additional information." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:529 #: ../../content/developer/howtos/provide_iap_services.rst:775 msgid "Authorize" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:533 msgid "Verifies that the user's account has at least as ``credit`` available *and creates a hold (pending transaction) on that amount*." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:536 msgid "Any amount currently on hold by a pending transaction is considered unavailable to further authorize calls." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:539 msgid "Returns a :class:`TransactionToken` identifying the pending transaction which can be used to capture (confirm) or cancel said transaction (`iap.odoo.com documentation`_)." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:0 #: ../../content/developer/reference/backend/mixins.rst:0 #: ../../content/developer/reference/frontend/framework_overview.rst:0 #: ../../content/developer/reference/frontend/qweb.rst:0 msgid "Parameters" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:545 msgid "optional, helps users identify the reason for charges on their account" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:547 msgid "optional, allows the user to benefit from trial credits if his database is eligible (see :ref:`Service registration `)" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:549 msgid "optional, transaction time to live in hours. If the credit are not captured when the transaction expires, the transaction is cancelled. The default value is set to 4320 hours (= 180 days)." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:0 #: ../../content/developer/reference/backend/mixins.rst:0 #: ../../content/developer/reference/frontend/assets.rst:0 #: ../../content/developer/reference/frontend/framework_overview.rst:0 #: ../../content/developer/reference/frontend/javascript_reference.rst:0 #: ../../content/developer/reference/frontend/mobile.rst:0 #: ../../content/developer/reference/frontend/qweb.rst:0 #: ../../content/developer/reference/frontend/registries.rst:0 #: ../../content/developer/reference/frontend/services.rst:0 msgid "Returns" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:551 msgid ":class:`TransactionToken` if the authorization succeeded" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:0 msgid "raises" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:552 msgid ":class:`~odoo.exceptions.AccessError` if the service token is invalid" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:553 msgid ":class:`~odoo.addons.iap.models.iap.InsufficientCreditError` if the account does not have enough credits" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:554 msgid "``TypeError`` if the ``credit`` value is not an integer or a float" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:577 #: ../../content/developer/howtos/provide_iap_services.rst:855 msgid "Capture" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:581 msgid "Confirms the specified transaction, transferring the reserved credits from the user's account to the service provider's." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:584 msgid "Capture calls are idempotent: performing capture calls on an already captured transaction has no further effect." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:589 msgid "optional parameter to capture a smaller amount of credits than authorized" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:590 #: ../../content/developer/howtos/provide_iap_services.rst:622 msgid ":class:`~odoo.exceptions.AccessError`" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:610 #: ../../content/developer/howtos/provide_iap_services.rst:817 msgid "Cancel" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:614 msgid "Cancels the specified transaction, releasing the hold on the user's credits." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:617 msgid "Cancel calls are idempotent: performing capture calls on an already cancelled transaction has no further effect." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:640 #: ../../content/developer/tutorials/getting_started/04_basicmodel.rst:134 msgid "Types" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:642 msgid "Exceptions aside, these are *abstract types* used for clarity, you should not care how they are implemented." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:647 msgid "String identifying your service on https://iap.odoo.com (production) as well as the account related to your service in the client's database." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:652 msgid "Identifier generated for the provider's service. Each key (and service) matches a token of a fixed value, as generated by the service provide." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:655 msgid "Multiple types of tokens correspond to multiple services. As an exampe, SMS and MMS could either be the same service (with an MMS being 'worth' multiple SMS) or could be separate services at separate price points." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:659 msgid "Your service key *is a secret*, leaking your service key allows other application developers to draw credits bought for your service(s)." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:665 msgid "Identifier for a user account." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:669 msgid "Transaction identifier, returned by the authorization process and consumed by either capturing or cancelling the transaction." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:674 msgid "Raised during transaction authorization if the credits requested are not currently available on the account (either not enough credits or too many pending transactions/existing holds)." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:681 msgid "Raised by:" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:683 msgid "any operation to which a service token is required, if the service token is invalid; or" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:684 msgid "any failure in an inter-server call. (typically, in :func:`~odoo.addons.iap.tools.iap_tools.iap_jsonrpc`)." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:689 msgid "Raised by any unexpected behaviour at the discretion of the App developer (*you*)." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:693 msgid "Test the API" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:695 msgid "In order to test the developed app, we propose a sandbox platform that allows you to:" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:697 msgid "Test the whole flow from the client's point of view - Actual services and transactions that can be consulted. (again this requires to change the endpoint, see the danger note in :ref:`Service `)." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:700 msgid "Test the API." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:702 msgid "The latter consists in specific tokens that will work on **IAP-Sandbox only**." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:704 msgid "Token ``000000``: Represents a non-existing account. Returns an :class:`~odoo.addons.iap.tools.iap_tools.InsufficientCreditError` on authorize attempt." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:706 msgid "Token ``000111``: Represents an account without sufficient credits to perform any service. Returns an :class:`~odoo.addons.iap.tools.iap_tools.InsufficientCreditError` on authorize attempt." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:708 msgid "Token ``111111``: Represents an account with enough credits to perform any service. An authorize attempt will return a dummy transaction token that is processed by the capture and cancel routes." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:714 msgid "Those tokens are only active on the IAP-Sanbox server." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:715 msgid "The service key is completely ignored with this flow, If you want to run a robust test of your service, you should ignore these tokens." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:719 msgid "Odoo Helpers" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:721 msgid "For convenience, if you are implementing your service using Odoo the ``iap`` module provides a few helpers to make IAP flow even simpler." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:727 msgid "Charging" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:731 msgid "A *context manager* for authorizing and automatically capturing or cancelling transactions for use in the backend/proxy." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:734 msgid "Works much like e.g. a cursor context manager:" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:736 msgid "immediately authorizes a transaction with the specified parameters;" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:737 msgid "executes the ``with`` body;" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:738 msgid "if the body executes in full without error, captures the transaction;" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:739 msgid "otherwise cancels it." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:741 #: ../../content/developer/howtos/provide_iap_services.rst:781 #: ../../content/developer/howtos/provide_iap_services.rst:823 #: ../../content/developer/howtos/provide_iap_services.rst:861 msgid "used to retrieve the ``iap.endpoint`` configuration key" msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:779 msgid "Will authorize everything." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:821 msgid "Will cancel an authorized transaction." msgstr "" #: ../../content/developer/howtos/provide_iap_services.rst:859 msgid "Will capture the amount ``credit`` on the given transaction." msgstr "" #: ../../content/developer/howtos/translations.rst:5 msgid "Translating Modules" msgstr "" #: ../../content/developer/howtos/translations.rst:7 msgid "This section explains how to provide translation abilities to your module." msgstr "" #: ../../content/developer/howtos/translations.rst:9 msgid "If you want to contribute to the translation of Odoo itself, please refer to the `Odoo Wiki page `_." msgstr "" #: ../../content/developer/howtos/translations.rst:13 msgid "Exporting translatable term" msgstr "" #: ../../content/developer/howtos/translations.rst:15 msgid "A number of terms in your modules are \"implicitly translatable\" as a result, even if you haven't done any specific work towards translation you can export your module's translatable terms and may find content to work with." msgstr "" #: ../../content/developer/howtos/translations.rst:19 msgid "needs technical features" msgstr "" #: ../../content/developer/howtos/translations.rst:21 msgid "Translations export is performed via the administration interface by logging into the backend interface and opening :menuselection:`Settings --> Translations --> Import / Export --> Export Translations`" msgstr "" #: ../../content/developer/howtos/translations.rst:25 msgid "leave the language to the default (new language/empty template)" msgstr "" #: ../../content/developer/howtos/translations.rst:26 msgid "select the `PO File`_ format" msgstr "" #: ../../content/developer/howtos/translations.rst:27 msgid "select your module" msgstr "" #: ../../content/developer/howtos/translations.rst:28 msgid "click :guilabel:`Export` and download the file" msgstr "" #: ../../content/developer/howtos/translations.rst:34 msgid "This gives you a file called :file:`{yourmodule}.pot` which should be moved to the :file:`{yourmodule}/i18n/` directory. The file is a *PO Template* which simply lists translatable strings and from which actual translations (PO files) can be created. PO files can be created using msginit_, with a dedicated translation tool like POEdit_ or by simply copying the template to a new file called :file:`{language}.po`. Translation files should be put in :file:`{yourmodule}/i18n/`, next to :file:`{yourmodule}.pot`, and will be automatically loaded by Odoo when the corresponding language is installed (via :menuselection:`Settings --> Translations --> Languages`)" msgstr "" #: ../../content/developer/howtos/translations.rst:44 msgid "translations for all loaded languages are also installed or updated when installing or updating a module" msgstr "" #: ../../content/developer/howtos/translations.rst:48 msgid "Implicit exports" msgstr "" #: ../../content/developer/howtos/translations.rst:50 msgid "Odoo automatically exports translatable strings from \"data\"-type content:" msgstr "" #: ../../content/developer/howtos/translations.rst:52 msgid "in non-QWeb views, all text nodes are exported as well as the content of the ``string``, ``help``, ``sum``, ``confirm`` and ``placeholder`` attributes" msgstr "" #: ../../content/developer/howtos/translations.rst:55 msgid "QWeb templates (both server-side and client-side), all text nodes are exported except inside ``t-translation=\"off\"`` blocks, the content of the ``title``, ``alt``, ``label`` and ``placeholder`` attributes are also exported" msgstr "" #: ../../content/developer/howtos/translations.rst:59 msgid "for :class:`~odoo.fields.Field`, unless their model is marked with ``_translate = False``:" msgstr "" #: ../../content/developer/howtos/translations.rst:62 msgid "their ``string`` and ``help`` attributes are exported" msgstr "" #: ../../content/developer/howtos/translations.rst:63 msgid "if ``selection`` is present and a list (or tuple), it's exported" msgstr "" #: ../../content/developer/howtos/translations.rst:64 msgid "if their ``translate`` attribute is set to ``True``, all of their existing values (across all records) are exported" msgstr "" #: ../../content/developer/howtos/translations.rst:66 msgid "help/error messages of :attr:`~odoo.models.Model._constraints` and :attr:`~odoo.models.Model._sql_constraints` are exported" msgstr "" #: ../../content/developer/howtos/translations.rst:70 msgid "Explicit exports" msgstr "" #: ../../content/developer/howtos/translations.rst:72 msgid "When it comes to more \"imperative\" situations in Python code or Javascript code, Odoo cannot automatically export translatable terms so they must be marked explicitly for export. This is done by wrapping a literal string in a function call." msgstr "" #: ../../content/developer/howtos/translations.rst:77 msgid "In Python, the wrapping function is :func:`odoo._`::" msgstr "" #: ../../content/developer/howtos/translations.rst:81 msgid "In JavaScript, the wrapping function is generally :js:func:`odoo.web._t`:" msgstr "" #: ../../content/developer/howtos/translations.rst:89 msgid "Only literal strings can be marked for exports, not expressions or variables. For situations where strings are formatted, this means the format string must be marked, not the formatted string" msgstr "" #: ../../content/developer/howtos/translations.rst:93 msgid "The lazy version of `_` and `_t` is :func:`odoo._lt` in python and :js:func:`odoo.web._lt` in javascript. The translation lookup is executed only at rendering and can be used to declare translatable properties in class methods of global variables." msgstr "" #: ../../content/developer/howtos/translations.rst:100 msgid "Translations of a module are **not** exposed to the front end by default and thus are not accessible from JavaScript. In order to achieve that, the module name has to be either prefixed with `website` (just like `website_sale`, `website_event` etc.) or explicitly register by implementing :func:`_get_translation_frontend_modules_name` for the `ir.http` model." msgstr "" #: ../../content/developer/howtos/translations.rst:106 msgid "This could look like the following::" msgstr "" #: ../../content/developer/howtos/translations.rst:119 msgid "Variables" msgstr "" #: ../../content/developer/howtos/translations.rst:121 msgid "**Don't** the extract may work but it will not translate the text correctly::" msgstr "" #: ../../content/developer/howtos/translations.rst:125 msgid "**Do** set the dynamic variables as a parameter of the translation lookup (this will fallback on source in case of missing placeholder in the translation)::" msgstr "" #: ../../content/developer/howtos/translations.rst:132 msgid "Blocks" msgstr "" #: ../../content/developer/howtos/translations.rst:134 msgid "**Don't** split your translation in several blocks or multiples lines::" msgstr "" #: ../../content/developer/howtos/translations.rst:144 msgid "**Do** keep in one block, giving the full context to translators::" msgstr "" #: ../../content/developer/howtos/translations.rst:155 msgid "Plural" msgstr "" #: ../../content/developer/howtos/translations.rst:157 msgid "**Don't** pluralize terms the English-way::" msgstr "" #: ../../content/developer/howtos/translations.rst:163 msgid "**Do** keep in mind every language has different plural forms::" msgstr "" #: ../../content/developer/howtos/translations.rst:171 msgid "Read vs Run Time" msgstr "" #: ../../content/developer/howtos/translations.rst:173 msgid "**Don't** invoke translation lookup at server launch::" msgstr "" #: ../../content/developer/howtos/translations.rst:186 msgid "**Don't** invoke translation lookup when the javascript file is read::" msgstr "" #: ../../content/developer/howtos/translations.rst:197 msgid "**Do** use lazy translation lookup method::" msgstr "" #: ../../content/developer/howtos/translations.rst:211 msgid "or **do** evaluate dynamically the translatable content::" msgstr "" #: ../../content/developer/howtos/translations.rst:220 msgid "**Do** in the case where the translation lookup is done when the JS file is *read*, use `_lt` instead of `_t` to translate the term when it is *used*::" msgstr "" #: ../../content/developer/howtos/web_services.rst:3 msgid "Web Services" msgstr "" #: ../../content/developer/howtos/web_services.rst:5 msgid "The web-service module offers a common interface for all web services:" msgstr "" #: ../../content/developer/howtos/web_services.rst:7 msgid "XML-RPC" msgstr "" #: ../../content/developer/howtos/web_services.rst:8 msgid "JSON-RPC" msgstr "" #: ../../content/developer/howtos/web_services.rst:10 msgid "Business objects can also be accessed via the distributed object mechanism. They can all be modified via the client interface with contextual views." msgstr "" #: ../../content/developer/howtos/web_services.rst:14 msgid "Odoo is accessible through XML-RPC/JSON-RPC interfaces, for which libraries exist in many languages." msgstr "" #: ../../content/developer/howtos/web_services.rst:18 msgid "XML-RPC Library" msgstr "" #: ../../content/developer/howtos/web_services.rst:20 msgid "The following example is a Python 3 program that interacts with an Odoo server with the library ``xmlrpc.client``::" msgstr "" #: ../../content/developer/howtos/web_services.rst:39 msgid "Add a new service to the client" msgstr "" #: ../../content/developer/howtos/web_services.rst:41 msgid "Write a Python program able to send XML-RPC requests to a PC running Odoo (yours, or your instructor's). This program should display all the sessions, and their corresponding number of seats. It should also create a new session for one of the courses." msgstr "" #: ../../content/developer/howtos/web_services.rst:77 msgid "Instead of using a hard-coded course id, the code can look up a course by name::" msgstr "" #: ../../content/developer/howtos/web_services.rst:88 msgid ":doc:`../reference/external_api`: The in-depth tutorial on XML-RPC, with examples spanning multiple programming languages." msgstr "" #: ../../content/developer/howtos/web_services.rst:91 msgid "JSON-RPC Library" msgstr "" #: ../../content/developer/howtos/web_services.rst:93 msgid "The following example is a Python 3 program that interacts with an Odoo server with the standard Python libraries ``urllib.request`` and ``json``. This example assumes the **Productivity** app (``note``) is installed::" msgstr "" #: ../../content/developer/howtos/web_services.rst:137 msgid "Examples can be easily adapted from XML-RPC to JSON-RPC." msgstr "" #: ../../content/developer/howtos/web_services.rst:141 msgid "There are a number of high-level APIs in various languages to access Odoo systems without *explicitly* going through XML-RPC or JSON-RPC, such as:" msgstr "" #: ../../content/developer/howtos/web_services.rst:144 msgid "https://github.com/akretion/ooor" msgstr "" #: ../../content/developer/howtos/web_services.rst:145 msgid "https://github.com/OCA/odoorpc" msgstr "" #: ../../content/developer/howtos/web_services.rst:146 msgid "https://github.com/nicolas-van/openerp-client-lib" msgstr "" #: ../../content/developer/howtos/web_services.rst:147 msgid "http://pythonhosted.org/OdooRPC" msgstr "" #: ../../content/developer/howtos/web_services.rst:148 msgid "https://github.com/abhishek-jaiswal/php-openerp-lib" msgstr "" #: ../../content/developer/howtos/website_themes.rst:7 msgid "Website themes" msgstr "" #: ../../content/developer/howtos/website_themes.rst:-1 msgid "Artistic illustration of \"Web design\"" msgstr "" #: ../../content/developer/howtos/website_themes.rst:13 msgid "The Odoo Website Builder is an excellent tool for creating a website fully integrated with other Odoo apps. Using the theme's options and building blocks is easy and allows you to personalize your web presence the way you want. However, you can take things even further." msgstr "" #: ../../content/developer/howtos/website_themes.rst:17 msgid "In this documentation, you will learn to completely customize your website without touching Odoo's core files, and this way, preserve the editing options of the Website Builder." msgstr "" #: ../../content/developer/howtos/website_themes.rst:20 msgid "The information compiled in this documentation is based on our past experiences - both failures and successes. We invite you to use it as a base to build your own website and adapt it to your needs." msgstr "" #: ../../content/developer/howtos/website_themes/animations.rst:3 msgid "Animations" msgstr "" #: ../../content/developer/howtos/website_themes/animations.rst:5 msgid "Eye-catching animations can bring your website to life." msgstr "" #: ../../content/developer/howtos/website_themes/animations.rst:8 msgid "On appearance" msgstr "" #: ../../content/developer/howtos/website_themes/animations.rst:10 msgid "In standard, you can add animations to columns when they appear, thanks to the Website Builder. Odoo detects when your element is in the viewport and launches the animation. A large selection of animations is available:" msgstr "" #: ../../content/developer/howtos/website_themes/animations.rst:14 msgid "Fade in" msgstr "" #: ../../content/developer/howtos/website_themes/animations.rst:15 msgid "Bounce in" msgstr "" #: ../../content/developer/howtos/website_themes/animations.rst:16 msgid "Rotate in" msgstr "" #: ../../content/developer/howtos/website_themes/animations.rst:17 msgid "Zoom in" msgstr "" #: ../../content/developer/howtos/website_themes/animations.rst:18 #: ../../content/developer/howtos/website_themes/setup.rst:54 msgid "…" msgstr "" #: ../../content/developer/howtos/website_themes/animations.rst:20 msgid "You can easily define an animation on a column in your custom theme. You need to add two classes: `o_animate` and `o_anim_fade_in`. The second class changes depending on the type of animation you want to use." msgstr "" #: ../../content/developer/howtos/website_themes/animations.rst:24 msgid "Add the `o_animate_both_scroll` class to launch the animation every time the column appears on the screen. The animation is only launched once by default." msgstr "" #: ../../content/developer/howtos/website_themes/animations.rst:27 msgid "You can also define an `animation-duration` and an `animation-delay` directly in the `style` attribute." msgstr "" #: ../../content/developer/howtos/website_themes/animations.rst:30 #: ../../content/developer/howtos/website_themes/gradients.rst:16 #: ../../content/developer/howtos/website_themes/shapes.rst:20 #: ../../content/developer/howtos/website_themes/shapes.rst:208 #: ../../content/developer/howtos/website_themes/theming.rst:246 #: ../../content/developer/howtos/website_themes/theming.rst:370 #: ../../content/developer/howtos/website_themes/theming.rst:463 msgid "**Use**" msgstr "" #: ../../content/developer/howtos/website_themes/animations.rst:-1 msgid "Animation options" msgstr "" #: ../../content/developer/howtos/website_themes/animations.rst:43 msgid "`Website Animate `_" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:3 msgid "Building blocks" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:5 msgid "Building blocks, also known as snippets, are how users design and layout pages. They are important XML elements of your design." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:8 msgid "The building blocks are classified into four categories:" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:10 msgid "**Structure blocks**: to give a basic structure to the website" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:11 msgid "**Feature blocks**: to describe the features of a product or service" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:12 msgid "**Dynamic Content blocks**: blocks that are animated or interact with the backend" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:13 msgid "**Inner Content blocks**: blocks used inside other building blocks" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:15 msgid "In this chapter, you will learn how to create custom building blocks and options." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:18 #: ../../content/developer/howtos/website_themes/theming.rst:37 msgid "File structure" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:20 msgid "The layout's file structure is the following." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:29 msgid "The styles' file structure is the following." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:44 #: ../../content/developer/howtos/website_themes/building_blocks.rst:373 msgid "`XML templates of the different snippets `_" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:47 #: ../../content/developer/howtos/website_themes/theming.rst:434 #: ../../content/developer/howtos/website_themes/theming.rst:491 msgid "Demo page" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:49 msgid "http://localhost:8069/website/demo/snippets" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:52 #: ../../content/developer/howtos/website_themes/layout.rst:3 msgid "Layout" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:54 msgid "Snippets are editable by the user using the Website Builder. Some Bootstrap classes are important as **they trigger some Website Builder options**." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:58 msgid "Wrapper" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:60 msgid "The standard main container of any snippet is a `section`. Any section element can be edited like a block of content that you can move or duplicate." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:69 msgid "For inner content snippets, any other HTML tag can be used." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:77 #: ../../content/developer/howtos/website_themes/layout.rst:547 #: ../../content/developer/howtos/website_themes/pages.rst:130 #: ../../content/developer/howtos/website_themes/pages.rst:194 #: ../../content/developer/howtos/website_themes/shapes.rst:125 msgid "Missing description in table ..." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:84 #: ../../content/developer/howtos/website_themes/building_blocks.rst:298 #: ../../content/developer/howtos/website_themes/building_blocks.rst:442 #: ../../content/developer/howtos/website_themes/building_blocks.rst:467 #: ../../content/developer/howtos/website_themes/building_blocks.rst:498 #: ../../content/developer/howtos/website_themes/layout.rst:69 #: ../../content/developer/howtos/website_themes/layout.rst:306 #: ../../content/developer/howtos/website_themes/pages.rst:251 #: ../../content/developer/howtos/website_themes/pages.rst:274 #: ../../content/developer/howtos/website_themes/shapes.rst:224 #: ../../content/developer/reference/frontend/javascript_reference.rst:1814 #: ../../content/developer/tutorials/getting_started/04_basicmodel.rst:260 msgid "Attribute" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:85 #: ../../content/developer/howtos/website_themes/building_blocks.rst:299 #: ../../content/developer/howtos/website_themes/building_blocks.rst:399 #: ../../content/developer/howtos/website_themes/building_blocks.rst:443 #: ../../content/developer/howtos/website_themes/building_blocks.rst:468 #: ../../content/developer/howtos/website_themes/building_blocks.rst:499 #: ../../content/developer/howtos/website_themes/layout.rst:70 #: ../../content/developer/howtos/website_themes/layout.rst:114 #: ../../content/developer/howtos/website_themes/layout.rst:127 #: ../../content/developer/howtos/website_themes/layout.rst:152 #: ../../content/developer/howtos/website_themes/layout.rst:307 #: ../../content/developer/howtos/website_themes/layout.rst:555 #: ../../content/developer/howtos/website_themes/navigation.rst:57 #: ../../content/developer/howtos/website_themes/navigation.rst:137 #: ../../content/developer/howtos/website_themes/navigation.rst:173 #: ../../content/developer/howtos/website_themes/pages.rst:138 #: ../../content/developer/howtos/website_themes/pages.rst:202 #: ../../content/developer/howtos/website_themes/pages.rst:252 #: ../../content/developer/howtos/website_themes/pages.rst:275 #: ../../content/developer/howtos/website_themes/setup.rst:212 #: ../../content/developer/howtos/website_themes/shapes.rst:133 #: ../../content/developer/howtos/website_themes/shapes.rst:165 #: ../../content/developer/howtos/website_themes/shapes.rst:225 #: ../../content/developer/howtos/website_themes/theming.rst:70 #: ../../content/developer/howtos/website_themes/theming.rst:120 #: ../../content/developer/howtos/website_themes/theming.rst:331 #: ../../content/developer/reference/extract_api.rst:43 #: ../../content/developer/reference/extract_api.rst:147 #: ../../content/developer/reference/extract_api.rst:362 #: ../../content/developer/reference/frontend/assets.rst:301 #: ../../content/developer/reference/frontend/framework_overview.rst:263 #: ../../content/developer/reference/frontend/hooks.rst:43 #: ../../content/developer/reference/frontend/hooks.rst:59 #: ../../content/developer/reference/frontend/hooks.rst:96 #: ../../content/developer/reference/frontend/hooks.rst:142 #: ../../content/developer/reference/frontend/hooks.rst:182 #: ../../content/developer/reference/frontend/owl_components.rst:175 #: ../../content/developer/reference/frontend/owl_components.rst:238 #: ../../content/developer/reference/frontend/owl_components.rst:297 #: ../../content/developer/reference/frontend/owl_components.rst:317 #: ../../content/developer/reference/frontend/owl_components.rst:336 #: ../../content/developer/reference/frontend/owl_components.rst:384 #: ../../content/developer/reference/frontend/owl_components.rst:428 #: ../../content/developer/reference/frontend/owl_components.rst:612 #: ../../content/developer/reference/frontend/owl_components.rst:632 #: ../../content/developer/reference/frontend/patching_code.rst:17 #: ../../content/developer/reference/frontend/services.rst:247 #: ../../content/developer/reference/frontend/services.rst:439 #: ../../content/developer/reference/frontend/services.rst:467 #: ../../content/developer/reference/frontend/services.rst:737 #: ../../content/developer/reference/frontend/services.rst:852 msgid "Description" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:86 msgid "class" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:87 msgid "Unique class name for this snippet" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:88 msgid "data-name" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:89 msgid "Displayed in the right panel as the name of the snippet. If not found, it will fall back to *Block*." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:91 msgid "data-snippet" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:92 msgid "Used by the system to identify the snippet" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:94 msgid "The system automatically adds the `data-name` and `data-snippet` attributes during the drag and drop based on the template's name." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:98 msgid "Those attributes should be specifically added when a snippet is declared on a theme page." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:101 msgid "Avoid adding a `section` tag inside another `section` tag: this will trigger twice the Website Builder's options. You can use inner content snippets instead." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:105 msgid "Columns" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:107 msgid "Any large Bootstrap columns directly descending from a `.row` element (respecting Bootstrap structure) will be triggered by the Website Builder to make them resizable." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:114 msgid "Add padding on columns and sections." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:120 msgid "Add a background based on the color palette for columns and sections." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:126 msgid "Make an element not editable." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:132 msgid "Enable the columns selector." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:138 msgid "Disable the columns option." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:144 msgid "Disable the size option of all child columns." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:150 msgid "Disable the size option for one column." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:156 msgid "Disable the background color option for all columns." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:162 msgid "Disable the background color option of one column." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:168 msgid "Add parallax effect." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:179 msgid "Add a black color filter with an opacity of 50%." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:190 msgid "Add a white color filter with an opacity of 85%." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:201 msgid "Add a custom color filter." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:212 msgid "Add a custom gradient filter." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:224 #: ../../content/developer/howtos/website_themes/theming.rst:552 msgid "Styles" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:227 msgid "Compatibility system" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:229 msgid "When a snippet has a `data-vcss` or `data-vjs` attribute, it means it is an updated version, not the original one." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:238 msgid "The `data-vcss` and `data-js` attributes indicate to the system which file version to load for that snippet (e.g., :file:`001.js`, :file:`002.scss`)." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:242 #: ../../content/developer/howtos/website_themes/gradients.rst:33 #: ../../content/developer/howtos/website_themes/layout.rst:279 #: ../../content/developer/howtos/website_themes/layout.rst:466 #: ../../content/developer/howtos/website_themes/shapes.rst:88 msgid "Custom" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:244 msgid "Create the snippet's content." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:246 #: ../../content/developer/howtos/website_themes/layout.rst:485 #: ../../content/developer/howtos/website_themes/navigation.rst:36 #: ../../content/developer/howtos/website_themes/navigation.rst:105 #: ../../content/developer/howtos/website_themes/navigation.rst:147 #: ../../content/developer/howtos/website_themes/pages.rst:104 #: ../../content/developer/howtos/website_themes/pages.rst:182 #: ../../content/developer/howtos/website_themes/theming.rst:174 #: ../../content/developer/howtos/website_themes/theming.rst:200 #: ../../content/developer/howtos/website_themes/theming.rst:228 #: ../../content/developer/howtos/website_themes/theming.rst:347 #: ../../content/developer/howtos/website_themes/theming.rst:452 #: ../../content/developer/howtos/website_themes/theming.rst:558 #: ../../content/developer/howtos/website_themes/theming.rst:604 msgid "**Declaration**" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:248 msgid "``/website_airproof/views/snippets/s_airproof_snippet.xml``" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:263 msgid "`data-name` and `data-snippet` attributes have to be specified when a snippet is declared on a theme page." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:267 msgid "Use Bootstrap native classes as much as possible." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:268 msgid "Prefix all your custom classes." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:269 msgid "Use underscore lowercase notation to name classes, e.g., `.x_nav`, `.x_nav_item`." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:270 msgid "Avoid using ID tag." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:272 msgid "Add your custom snippet to the list of default snippets, so the user can drag and drop it on the page, directly from the edit panel." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:275 #: ../../content/developer/howtos/website_themes/building_blocks.rst:355 #: ../../content/developer/howtos/website_themes/building_blocks.rst:427 #: ../../content/developer/howtos/website_themes/building_blocks.rst:452 #: ../../content/developer/howtos/website_themes/building_blocks.rst:483 #: ../../content/developer/howtos/website_themes/shapes.rst:184 msgid "``/website_airproof/views/snippets/options.xml``" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:300 msgid "t-snippet" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:301 msgid "The template to use" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:302 msgid "t-thumbnail" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:303 msgid "The path to the snippet thumbnail" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:306 msgid "Options" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:308 msgid "Options allow users to edit a snippet's appearance using the Website Builder. You can create snippet options easily and automatically add them to the Website Builder." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:312 msgid "Groups properties" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:314 msgid "Options are wrapped in groups. Groups can have properties that define how the included options interact with the user interface." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:317 msgid "`data-selector` binds all the options included in the group to a particular element. It can be used in combination with `data-target` and `data-exclude`." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:324 msgid "`data-js` binds custom JavaScript methods." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:330 msgid "`data-drop-in` defines the list of elements where the snippet can be dropped into." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:332 msgid "no css selector ..." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:338 msgid "`data-drop-near` defines the list of elements where the snippet can be dropped beside." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:345 msgid "SCSS options" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:347 msgid "Options can apply standard or custom CSS classes to the snippet. Depending on the method that you choose, the user interface will behave differently." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:350 msgid "`data-select-class=\"...\"`" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:352 msgid "More `data-select-class` in the same group defines a list of classes the user can apply. Only one option can be enabled at a time." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:377 msgid "JavaScript options" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:379 msgid "The `data-js` attribute can be assigned to an options group in order to define a custom method." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:391 msgid "The Website Builder provides several events you can use to trigger your custom functions." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:398 msgid "Event" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:400 msgid "start" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:401 msgid "Occurs when the publisher selects the snippet for the first time in an editing session or when the snippet is drag-and-dropped on the page." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:403 msgid "onFocus" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:404 msgid "Occurs each time the snippet is selected by the user or when the snippet is drag-and-dropped on the page." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:406 msgid "onBlur" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:407 msgid "Occurs when a snippet loses focus." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:408 msgid "onClone" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:409 msgid "Occurs just after a snippet is duplicated." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:410 msgid "onRemove" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:411 msgid "Occurs just before the snippet is removed." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:412 msgid "onBuilt" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:413 msgid "Occurs just after the snippet is drag-and-dropped on a drop zone. When this event is triggered, the content is already inserted in the page." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:415 msgid "cleanForSave" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:416 msgid "Occurs before the publisher saves the page." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:419 msgid "Dynamic Content templates" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:421 msgid "By default, Dynamic Content blocks have a selection of templates available in the Website Builder. You can also add your own template to the list." msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:425 msgid "Blog posts" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:444 #: ../../content/developer/howtos/website_themes/building_blocks.rst:469 #: ../../content/developer/howtos/website_themes/building_blocks.rst:500 #: ../../content/developer/howtos/website_themes/layout.rst:71 #: ../../content/developer/tutorials/dashboards.rst:302 #: ../../content/developer/reference/backend/data/res.country.state.csv:1 msgid "id" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:445 msgid "The ID of the template. Has to start with `dynamic_filter_template_blog_post_`" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:446 #: ../../content/developer/howtos/website_themes/building_blocks.rst:471 #: ../../content/developer/howtos/website_themes/building_blocks.rst:502 #: ../../content/developer/howtos/website_themes/layout.rst:75 #: ../../content/developer/howtos/website_themes/navigation.rst:58 #: ../../content/developer/howtos/website_themes/pages.rst:139 #: ../../content/developer/howtos/website_themes/pages.rst:203 #: ../../content/developer/howtos/website_themes/shapes.rst:134 #: ../../content/developer/howtos/website_themes/theming.rst:121 #: ../../content/developer/tutorials/define_module_data.rst:176 #: ../../content/developer/tutorials/getting_started/04_basicmodel.rst:189 #: ../../content/developer/tutorials/getting_started/04_basicmodel.rst:262 #: ../../content/developer/tutorials/getting_started/08_relations.rst:73 #: ../../content/developer/tutorials/getting_started/08_relations.rst:180 #: ../../content/developer/reference/backend/data/res.country.state.csv:1 msgid "name" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:447 #: ../../content/developer/howtos/website_themes/building_blocks.rst:472 #: ../../content/developer/howtos/website_themes/building_blocks.rst:503 msgid "Human-readable name of the template" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:450 msgid "Products" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:470 msgid "The ID of the template. Has to start with `dynamic_filter_template_product_product_`" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:473 msgid "data-number-of-elements" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:474 msgid "Number of products per slide on desktop" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:475 msgid "data-number-of-elements-sm" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:476 msgid "Number of products per slide on mobile" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:477 msgid "data-number-of-elements-fetch" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:478 msgid "The total amount of fetched products" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:481 #: ../../content/developer/tutorials/web.rst:1003 msgid "Events" msgstr "" #: ../../content/developer/howtos/website_themes/building_blocks.rst:501 msgid "The ID of the template. Has to start with `dynamic_filter_template_event_event_`" msgstr "" #: ../../content/developer/howtos/website_themes/forms.rst:3 msgid "Forms" msgstr "" #: ../../content/developer/howtos/website_themes/forms.rst:5 msgid "Forms in Odoo are very powerful. They are directly integrated with other applications and can be used for many different purposes." msgstr "" #: ../../content/developer/howtos/website_themes/forms.rst:8 #: ../../content/developer/howtos/website_themes/gradients.rst:5 msgid "In this chapter, you will discover how to:" msgstr "" #: ../../content/developer/howtos/website_themes/forms.rst:10 msgid "Add a form in your custom theme." msgstr "" #: ../../content/developer/howtos/website_themes/forms.rst:11 msgid "Change the action of the form." msgstr "" #: ../../content/developer/howtos/website_themes/forms.rst:12 msgid "Stylize the form thanks to Bootstrap variables." msgstr "" #: ../../content/developer/howtos/website_themes/forms.rst:15 msgid "Default form" msgstr "" #: ../../content/developer/howtos/website_themes/forms.rst:17 msgid "To add a form to your page, you can simply copy and paste the code generated by the Website Builder in your view." msgstr "" #: ../../content/developer/howtos/website_themes/forms.rst:20 msgid "It should look something like the following." msgstr "" #: ../../content/developer/howtos/website_themes/forms.rst:35 msgid "There is a `data-model_name` in the form tag. It enables you to define different actions for your form." msgstr "" #: ../../content/developer/howtos/website_themes/forms.rst:38 msgid "Send an email (this action is used by default)." msgstr "" #: ../../content/developer/howtos/website_themes/forms.rst:44 msgid "Apply for a job." msgstr "" #: ../../content/developer/howtos/website_themes/forms.rst:50 msgid "Create a customer." msgstr "" #: ../../content/developer/howtos/website_themes/forms.rst:56 msgid "Create a ticket." msgstr "" #: ../../content/developer/howtos/website_themes/forms.rst:62 msgid "Create an opportunity." msgstr "" #: ../../content/developer/howtos/website_themes/forms.rst:68 msgid "Create a task." msgstr "" #: ../../content/developer/howtos/website_themes/forms.rst:75 #: ../../content/developer/reference/extract_api.rst:121 #: ../../content/developer/reference/extract_api.rst:201 #: ../../content/developer/reference/extract_api.rst:484 msgid "Success" msgstr "" #: ../../content/developer/howtos/website_themes/forms.rst:77 msgid "You can also define what happens once the form is submitted thanks to the `data-success-mode`." msgstr "" #: ../../content/developer/howtos/website_themes/forms.rst:79 msgid "Redirect the user to a page defined in the `data-success-page`." msgstr "" #: ../../content/developer/howtos/website_themes/forms.rst:85 msgid "Show a message (on the same page)." msgstr "" #: ../../content/developer/howtos/website_themes/forms.rst:91 msgid "You can add your success message directly under the form tag. Always add the `d-none` class to make sure that your success message is hidden if the form hasn't been submitted." msgstr "" #: ../../content/developer/howtos/website_themes/forms.rst:107 #: ../../content/developer/howtos/website_themes/theming.rst:440 msgid "Bootstrap variables" msgstr "" #: ../../content/developer/howtos/website_themes/forms.rst:109 msgid "As you already know, the Website Builder creates content based on Bootstrap. This is also true for forms. Below you can find a selection of Bootstrap variables, or check out the `full list of variables `_." msgstr "" #: ../../content/developer/howtos/website_themes/forms.rst:113 #: ../../content/developer/howtos/website_themes/theming.rst:465 msgid "``/website_airproof/static/src/scss/bootstrap_overridden.scss``" msgstr "" #: ../../content/developer/howtos/website_themes/going_live.rst:3 msgid "Going live" msgstr "" #: ../../content/developer/howtos/website_themes/going_live.rst:5 msgid "Once you have finished all the web design and development work, it's time to deploy it on a development or production database." msgstr "" #: ../../content/developer/howtos/website_themes/going_live.rst:9 msgid "Module import" msgstr "" #: ../../content/developer/howtos/website_themes/going_live.rst:12 #: ../../content/developer/howtos/website_themes/setup.rst:115 msgid "Odoo SaaS" msgstr "" #: ../../content/developer/howtos/website_themes/going_live.rst:14 msgid "Follow these steps the first time you import a module:" msgstr "" #: ../../content/developer/howtos/website_themes/going_live.rst:16 msgid "Create a ZIP file of your module." msgstr "" #: ../../content/developer/howtos/website_themes/going_live.rst:17 msgid "Connect to the project database." msgstr "" #: ../../content/developer/howtos/website_themes/going_live.rst:18 msgid "Enable the :ref:`developer mode `." msgstr "" #: ../../content/developer/howtos/website_themes/going_live.rst:19 msgid "Go to :guilabel:`Apps`, search for `base_import_module`, and install it if necessary." msgstr "" #: ../../content/developer/howtos/website_themes/going_live.rst:20 msgid "Click on :guilabel:`Import Module` in the menu." msgstr "" #: ../../content/developer/howtos/website_themes/going_live.rst:21 msgid "Upload your ZIP file, tick :guilabel:`Force init`, and click the :guilabel:`Import App` button." msgstr "" #: ../../content/developer/howtos/website_themes/going_live.rst:23 msgid "If you need to re-import a module after making some changes, follow the same steps, but before importing the module, open the developer menu and select :guilabel:`Become Superuser`. To leave the Superuser mode, log out and log back in." msgstr "" #: ../../content/developer/howtos/website_themes/going_live.rst:28 msgid "The ZIP file size must be less than 50 MB." msgstr "" #: ../../content/developer/howtos/website_themes/going_live.rst:31 msgid "`Odoo eLearning: Register a Free Domain Name `_" msgstr "" #: ../../content/developer/howtos/website_themes/going_live.rst:34 #: ../../content/developer/howtos/website_themes/setup.rst:120 msgid "Odoo.sh" msgstr "" #: ../../content/developer/howtos/website_themes/going_live.rst:36 msgid "Go to :guilabel:`Apps` and click on :guilabel:`Update Apps List` in the menu. Search for your module in the list and install it." msgstr "" #: ../../content/developer/howtos/website_themes/going_live.rst:40 msgid ":doc:`Introduction to Odoo.sh <../../../administration/odoo_sh/overview/introduction>`" msgstr "" #: ../../content/developer/howtos/website_themes/gradients.rst:3 msgid "Gradients" msgstr "" #: ../../content/developer/howtos/website_themes/gradients.rst:7 msgid "Add a gradient to a section or a title." msgstr "" #: ../../content/developer/howtos/website_themes/gradients.rst:8 msgid "Add your own gradient to the Website Builder palette." msgstr "" #: ../../content/developer/howtos/website_themes/gradients.rst:11 #: ../../content/developer/howtos/website_themes/layout.rst:255 #: ../../content/developer/howtos/website_themes/layout.rst:444 #: ../../content/developer/howtos/website_themes/shapes.rst:16 #: ../../content/developer/howtos/website_themes/shapes.rst:204 msgid "Standard" msgstr "" #: ../../content/developer/howtos/website_themes/gradients.rst:13 msgid "In standard, you can select several gradients directly from the Website Builder. However, for custom themes, you must add the gradients directly in the section tag with a style attribute." msgstr "" #: ../../content/developer/howtos/website_themes/gradients.rst:24 msgid "To apply a gradient to text, use a font tag with the `text-gradient` class." msgstr "" #: ../../content/developer/howtos/website_themes/gradients.rst:35 msgid "You can also add your own custom gradients to the Website Builder. This way, the user can easily use them without manually recreating them." msgstr "" #: ../../content/developer/howtos/website_themes/gradients.rst:38 #: ../../content/developer/howtos/website_themes/layout.rst:271 #: ../../content/developer/howtos/website_themes/layout.rst:290 #: ../../content/developer/howtos/website_themes/layout.rst:458 #: ../../content/developer/howtos/website_themes/layout.rst:473 #: ../../content/developer/howtos/website_themes/navigation.rst:201 #: ../../content/developer/howtos/website_themes/theming.rst:519 msgid "``/website_airproof/data/presets.xml``" msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:5 #: ../../content/developer/howtos/website_themes/navigation.rst:7 #: ../../content/developer/howtos/website_themes/translations.rst:7 msgid "In this chapter, you will learn how to:" msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:7 msgid "Create a custom header." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:8 msgid "Create a custom footer." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:9 msgid "Modify a standard template." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:10 msgid "Add a copyright section." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:11 msgid "Improve your website's responsiveness." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:14 #: ../../content/developer/howtos/website_themes/navigation.rst:14 #: ../../content/developer/tutorials/getting_started/09_compute_onchange.rst:173 msgid "Default" msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:16 msgid "An Odoo page combines cross-page and unique elements. Cross-page elements are the same on every page, while unique elements are only related to a specific page. By default, a page has two cross-page elements, the header and the footer, and a unique main element that contains the specific content of that page." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:33 msgid "Any Odoo XML file starts with encoding specifications. After that, you must write your code inside an `` tag." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:44 msgid "Using precise file names is important to find information through all modules quickly. File names should only contain lowercase alphanumerics and underscores." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:47 msgid "Always add an empty line at the end of your file. This can be done automatically by configuring your IDE." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:51 msgid "XPath" msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:53 msgid "XPath (XML Path Language) is an expression language that enables you to navigate through elements and attributes in an XML document easily. XPath is used to extend standard Odoo templates." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:56 msgid "A view is coded the following way." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:72 msgid "ID of the modified view" msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:73 msgid "inherited_id" msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:74 msgid "ID of the standard view" msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:76 msgid "Human-readable name of the modified view" msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:78 msgid "For each XPath, you modify two attributes: **expression** and **position**." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:81 #: ../../content/developer/howtos/website_themes/layout.rst:329 #: ../../content/developer/howtos/website_themes/layout.rst:498 #: ../../content/developer/howtos/website_themes/layout.rst:523 #: ../../content/developer/howtos/website_themes/navigation.rst:188 msgid "``/website_airproof/views/website_templates.xml``" msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:90 msgid "This XPath adds a welcome message right before the page content." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:93 msgid "Be careful when replacing default elements' attributes. As your theme extends the default one, your changes will take priority over any future Odoo update." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:97 msgid "You should update your module every time you create a new template or record." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:98 msgid "*XML IDs* of inheriting views should use the same *ID* as the original record. It helps to find all inheritance at a glance. As final *XML IDs* are prefixed by the module that creates them, there is no overlap." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:103 msgid "Expressions" msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:105 msgid "XPath uses path expressions to select nodes in an XML document. Selectors are used inside the expression to target the right element. The most useful ones are listed below." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:113 msgid "Descendent selectors" msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:115 msgid "/" msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:116 msgid "Selects from the root node." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:117 msgid "//" msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:118 msgid "Selects nodes in the document from the current node that matches the selection no matter where they are." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:126 msgid "Attribute selectors" msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:128 msgid "\\*" msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:129 msgid "Selects any XML tag. `*` can be replaced by a specific tag if the selection needs to be more precise." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:131 msgid "\\*[@id=\"id\"]" msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:132 msgid "Selects a specific ID." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:133 msgid "\\*[hasclass(\"class\")]" msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:134 msgid "Selects a specific class." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:135 msgid "\\*[@name=\"name\"]" msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:136 msgid "Selects a tag with a specific name." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:137 msgid "\\*[@t-call=\"t-call\"]" msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:138 msgid "Selects a specific t-call." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:141 #: ../../content/developer/howtos/website_themes/layout.rst:151 msgid "Position" msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:143 msgid "The position defines where the code is placed inside the template. The possible values are listed below:" msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:153 msgid "replace" msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:154 msgid "Replaces the targeted node with the XPath content." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:155 msgid "inside" msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:156 msgid "Adds the XPath content inside the targeted node." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:157 msgid "before" msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:158 msgid "Adds the XPath content before the targeted node." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:159 msgid "after" msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:160 msgid "Adds the XPath content after the targeted node." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:161 #: ../../content/developer/reference/frontend/qweb.rst:197 msgid "attributes" msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:162 msgid "Adds the XPath content inside an attribute." msgstr "" #: ../../content/developer/howtos/website_themes/layout.rst:165 msgid "This XPath adds a `
` before the `