diff --git a/.tx/config b/.tx/config index 5f3504359..a0ec1e17e 100644 --- a/.tx/config +++ b/.tx/config @@ -2,62 +2,62 @@ host = https://www.transifex.com type = PO -[odoo-14-doc.applications] +[odoo-16-doc.applications] file_filter = locale//LC_MESSAGES/applications.po source_file = locale/sources/applications.pot source_lang = en -[odoo-14-doc.finance] +[odoo-16-doc.finance] file_filter = locale//LC_MESSAGES/finance.po source_file = locale/sources/finance.pot source_lang = en -[odoo-14-doc.general] +[odoo-16-doc.general] file_filter = locale//LC_MESSAGES/general.po source_file = locale/sources/general.pot source_lang = en -[odoo-14-doc.index] +[odoo-16-doc.index] file_filter = locale//LC_MESSAGES/index.po source_file = locale/sources/index.pot source_lang = en -[odoo-14-doc.inventory_and_mrp] +[odoo-16-doc.inventory_and_mrp] file_filter = locale//LC_MESSAGES/inventory_and_mrp.po source_file = locale/sources/inventory_and_mrp.pot source_lang = en -[odoo-14-doc.marketing] +[odoo-16-doc.marketing] file_filter = locale//LC_MESSAGES/marketing.po source_file = locale/sources/marketing.pot source_lang = en -[odoo-14-doc.productivity] +[odoo-16-doc.productivity] file_filter = locale//LC_MESSAGES/productivity.po source_file = locale/sources/productivity.pot source_lang = en -[odoo-14-doc.sales] +[odoo-16-doc.sales] file_filter = locale//LC_MESSAGES/sales.po source_file = locale/sources/sales.pot source_lang = en -[odoo-14-doc.services] +[odoo-16-doc.services] file_filter = locale//LC_MESSAGES/services.po source_file = locale/sources/services.pot source_lang = en -[odoo-14-doc.theme] +[odoo-16-doc.theme] file_filter = locale//LC_MESSAGES/sphinx.po source_file = locale/sources/sphinx.pot source_lang = en -[odoo-14-doc.user_settings] +[odoo-16-doc.user_settings] file_filter = locale//LC_MESSAGES/settings.po source_file = locale/sources/settings.pot source_lang = en -[odoo-14-doc.websites] +[odoo-16-doc.websites] file_filter = locale//LC_MESSAGES/websites.po source_file = locale/sources/websites.pot source_lang = en \ No newline at end of file diff --git a/locale/sources/administration.pot b/locale/sources/administration.pot index e1683ca40..b3fc7a7f2 100644 --- a/locale/sources/administration.pot +++ b/locale/sources/administration.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Odoo 14.0\n" +"Project-Id-Version: Odoo 16.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-18 07:12+0200\n" +"POT-Creation-Date: 2022-10-04 12:47+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,516 +16,3147 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../../content/administration.rst:3 -msgid "Administration" +#: ../../content/administration.rst:8 +msgid "Install and Maintain" msgstr "" -#: ../../content/administration/db_management.rst:3 -msgid "Database Management" +#: ../../content/administration.rst:10 +msgid "These guides provide instructions on how to install, maintain and upgrade Odoo databases." msgstr "" -#: ../../content/administration/db_management/db_online.rst:6 -msgid "Online Database management" +#: ../../content/administration.rst:13 +msgid ":doc:`History of Versions `" msgstr "" -#: ../../content/administration/db_management/db_online.rst:8 -msgid "To manage your databases, access the `database management page `__ (you will have to sign in). Then click on the `Manage Your Databases `__ button." +#: ../../content/administration/install.rst:5 +msgid "Install" msgstr "" -#: ../../content/administration/db_management/db_online.rst:16 -msgid "Make sure you are connected as the administrator of the database you want to manage - many operations depends on indentifying you remotely to that database." +#: ../../content/administration/install/cdn.rst:3 +msgid "Setting up a Content Delivery Network (CDN)" msgstr "" -#: ../../content/administration/db_management/db_online.rst:20 -msgid "Several actions are available:" +#: ../../content/administration/install/cdn.rst:8 +msgid "Deploying with KeyCDN_" msgstr "" -#: ../../content/administration/db_management/db_online.rst:26 -msgid ":ref:`Upgrade `" +#: ../../content/administration/install/cdn.rst:12 +msgid "This document will guide you through the setup of a KeyCDN_ account with your Odoo powered website." msgstr "" -#: ../../content/administration/db_management/db_online.rst:26 -msgid "Upgrade your database to the latest Odoo version to enjoy cutting-edge features" +#: ../../content/administration/install/cdn.rst:16 +msgid "Step 1: Create a pull zone in the KeyCDN dashboard" msgstr "" -#: ../../content/administration/db_management/db_online.rst:30 -msgid ":ref:`Duplicate `" +#: ../../content/administration/install/cdn.rst:21 +msgid "When creating the zone, enable the CORS option in the :guilabel:`advanced features` submenu. (more on that later)" msgstr "" -#: ../../content/administration/db_management/db_online.rst:29 -msgid "Make an exact copy of your database, if you want to try out new apps or new flows without compromising your daily operations" +#: ../../content/administration/install/cdn.rst:27 +msgid "Once done, you'll have to wait a bit while KeyCDN_ is crawling your website." msgstr "" -#: ../../content/administration/db_management/db_online.rst:32 -msgid ":ref:`Rename `" +#: ../../content/administration/install/cdn.rst:32 +msgid "a new URL has been generated for your Zone, in this case it is ``http://pulltest-b49.kxcdn.com``" msgstr "" -#: ../../content/administration/db_management/db_online.rst:33 -msgid "Rename your database (and its URL)" +#: ../../content/administration/install/cdn.rst:36 +msgid "Step 2: Configure the odoo instance with your zone" msgstr "" -#: ../../content/administration/db_management/db_online.rst:35 -msgid "**Backup**" +#: ../../content/administration/install/cdn.rst:38 +msgid "In the Odoo back end, go to the :guilabel:`Website Settings`: menu, then activate the CDN support and copy/paste your zone URL in the :guilabel:`CDN Base URL` field. This field is only visible and configurable if you have developer mode activated." msgstr "" -#: ../../content/administration/db_management/db_online.rst:35 -msgid "Download an instant backup of your database; note that we back up databases daily according to our Odoo Cloud SLA" +#: ../../content/administration/install/cdn.rst:46 +msgid "Now your website is using the CDN for the resources matching the :guilabel:`CDN filters` regular expressions." msgstr "" -#: ../../content/administration/db_management/db_online.rst:38 -msgid ":ref:`Domains `" +#: ../../content/administration/install/cdn.rst:49 +msgid "You can have a look to the HTML of your website in order to check if the CDN integration is properly working." msgstr "" -#: ../../content/administration/db_management/db_online.rst:38 -msgid "Configure custom domains to access your database via another URL" +#: ../../content/administration/install/cdn.rst:57 +msgid "Why should I activate CORS?" msgstr "" -#: ../../content/administration/db_management/db_online.rst:40 -msgid ":ref:`Delete `" +#: ../../content/administration/install/cdn.rst:59 +msgid "A security restriction in some browsers (Firefox and Chrome at time of writing) prevents a remotely linked CSS file to fetch relative resources on this same external server." msgstr "" -#: ../../content/administration/db_management/db_online.rst:41 -msgid "Delete a database instantly" +#: ../../content/administration/install/cdn.rst:63 +msgid "If you don't activate the CORS option in the CDN zone, the more obvious resulting problem on a default Odoo website will be the lack of font-awesome icons because the font file declared in the font-awesome CSS won't be loaded on the remote server." msgstr "" -#: ../../content/administration/db_management/db_online.rst:44 -msgid "Contact Support" +#: ../../content/administration/install/cdn.rst:68 +msgid "Here's what you would see on your homepage in such a case:" msgstr "" -#: ../../content/administration/db_management/db_online.rst:43 -msgid "Access our `support page `__ with the correct database already selected" +#: ../../content/administration/install/cdn.rst:73 +msgid "A security error message will also appear in the browser's console:" msgstr "" -#: ../../content/administration/db_management/db_online.rst:49 -#: ../../content/administration/db_upgrade.rst:11 -msgid "Upgrade" +#: ../../content/administration/install/cdn.rst:78 +msgid "Enabling the CORS option in the CDN fixes this issue." msgstr "" -#: ../../content/administration/db_management/db_online.rst:51 -msgid "Upgrading your database to a newer version of Odoo is a complex operation that require time and caution. It is extremely important that you fully test the process before upgrading your production database." +#: ../../content/administration/install/deploy.rst:3 +msgid "System configuration" msgstr "" -#: ../../content/administration/db_management/db_online.rst:55 -msgid "Odoo releases new versions regularly (at least once a year), and upgrading your database to enjoy new Odoo features is part of the Odoo Online experience." +#: ../../content/administration/install/deploy.rst:5 +msgid "This document describes basic steps to set up Odoo in production or on an internet-facing server. It follows :ref:`installation `, and is not generally necessary for a development systems that is not exposed on the internet." msgstr "" -#: ../../content/administration/db_management/db_online.rst:58 -msgid "The upgrade process can take some time, especially if you use multiple apps or apps that manage sensitive data (e.g. Accounting, Inventory, etc.). In general, the 'smaller' the database, the quickest the upgrade. A single-user database that uses only CRM will be processed faster than a multi-company, multi-user database that uses Accounting, Sales, Purchase and Manufacturing." +#: ../../content/administration/install/deploy.rst:10 +msgid "If you are setting up a public server, be sure to check our :ref:`security` recommendations!" msgstr "" -#: ../../content/administration/db_management/db_online.rst:64 -msgid "Unfortunately, it is impossible to give time estimates for every upgrade request, since Odoo.com will test manually every database upgrade at least once and will need to correct/adapt changes made to the standard Odoo Apps (e.g. through Studio or through a Success Pack) on a case-by-case basis. This can make the process slower, since requests are treated in the order they arrive. This is especially true in the months following the release of a new major version, which can lengthen the upgrade delay significantly." +#: ../../content/administration/install/deploy.rst:15 +msgid "dbfilter" msgstr "" -#: ../../content/administration/db_management/db_online.rst:72 -msgid "The upgrade process is quite simple from your point of view:" +#: ../../content/administration/install/deploy.rst:17 +msgid "Odoo is a multi-tenant system: a single Odoo system may run and serve a number of database instances. It is also highly customizable, with customizations (starting from the modules being loaded) depending on the \"current database\"." msgstr "" -#: ../../content/administration/db_management/db_online.rst:74 -msgid "You request a test upgrade" +#: ../../content/administration/install/deploy.rst:21 +msgid "This is not an issue when working with the backend (web client) as a logged-in company user: the database can be selected when logging in, and customizations loaded afterwards." msgstr "" -#: ../../content/administration/db_management/db_online.rst:75 -msgid "Once all tests have been validated **by you**, you upgrade your actual database" +#: ../../content/administration/install/deploy.rst:25 +msgid "However it is an issue for non-logged users (portal, website) which aren't bound to a database: Odoo needs to know which database should be used to load the website page or perform the operation. If multi-tenancy is not used that is not an issue, there's only one database to use, but if there are multiple databases accessible Odoo needs a rule to know which one it should use." msgstr "" -#: ../../content/administration/db_management/db_online.rst:77 -msgid "The process to request a test or a production (*actual*) upgrade is the same." +#: ../../content/administration/install/deploy.rst:31 +msgid "That is one of the purposes of :option:`--db-filter `: it specifies how the database should be selected based on the hostname (domain) that is being requested. The value is a `regular expression`_, possibly including the dynamically injected hostname (``%h``) or the first subdomain (``%d``) through which the system is being accessed." msgstr "" -#: ../../content/administration/db_management/db_online.rst:79 -msgid "First, make sure to be connected to the database you want to upgrade and access the `database management page `__." +#: ../../content/administration/install/deploy.rst:37 +msgid "For servers hosting multiple databases in production, especially if ``website`` is used, dbfilter **must** be set, otherwise a number of features will not work correctly." msgstr "" -#: ../../content/administration/db_management/db_online.rst:82 -msgid "You have to have an active session with access to the Settings app in the database you want to upgrade for the button to be visible." +#: ../../content/administration/install/deploy.rst:42 +msgid "Configuration samples" msgstr "" -#: ../../content/administration/db_management/db_online.rst:85 -msgid "On the line of the database you want to upgrade, click on the \"Cog\" menu. If an newer version of Odoo is available, you will see an 'Upgrade' button." +#: ../../content/administration/install/deploy.rst:44 +msgid "Show only databases with names beginning with 'mycompany'" msgstr "" -#: ../../content/administration/db_management/db_online.rst:92 -msgid "You have the possibility to choose the target version of the upgrade. By default, we select the highest available version available for your database; if you were already in the process of testing an upgrade, we will automatically select the version you were already testing (even if we released a more recent version during your tests)." +#: ../../content/administration/install/deploy.rst:46 +#: ../../content/administration/install/deploy.rst:58 +#: ../../content/administration/install/deploy.rst:153 +#: ../../content/administration/install/deploy.rst:276 +msgid "in ``/etc/odoo.conf`` set:" msgstr "" -#: ../../content/administration/db_management/db_online.rst:101 -msgid "By clicking on the \"Test upgrade\" button, an upgrade request will be generated. Only one request can be made at time for each database; if a request has already been made, you will see an 'Upgrade Queued' note instead and asking another request will not be possible." +#: ../../content/administration/install/deploy.rst:53 +msgid "Show only databases matching the first subdomain after ``www``: for example the database \"mycompany\" will be shown if the incoming request was sent to ``www.mycompany.com`` or ``mycompany.co.uk``, but not for ``www2.mycompany.com`` or ``helpdesk.mycompany.com``." msgstr "" -#: ../../content/administration/db_management/db_online.rst:106 -msgid "A test upgrade will create a copy of your database, upgrade it and make it available to you automatically once successful. If this is the first test you request for this particular database, a manual testing phase will be done by Odoo.com - this could take time (up to several weeks). Subsequent requests will not go through that manual testing step and will usually be made available in a few hours. Once the test database is available, you should receive an e-mail with the URL of the test database." +#: ../../content/administration/install/deploy.rst:67 +msgid "Setting a proper :option:`--db-filter ` is an important part of securing your deployment. Once it is correctly working and only matching a single database per hostname, it is strongly recommended to block access to the database manager screens, and to use the ``--no-database-list`` startup parameter to prevent listing your databases, and to block access to the database management screens. See also security_." msgstr "" -#: ../../content/administration/db_management/db_online.rst:114 -msgid "**Testing your database is the most important step of the upgrade process!** Even though we test all upgrades manually, we do not know your work processes. A change in standard worfklows of Odoo in new versions might require you to change internal processes, or some of the customizations you made through Odoo Studio might not work properly. *It is up to you to make sure that everything works as it should!* You can report issues with your test database through our `Support page `__." +#: ../../content/administration/install/deploy.rst:76 +#: ../../content/administration/install/install.rst:428 +msgid "PostgreSQL" msgstr "" -#: ../../content/administration/db_management/db_online.rst:122 -msgid "Make sure to do one last test of your upgrade right before the final upgrade (e.g. the day before) to ensure everything will run smoothly. Downgrading is not possible and post-poning an upgrade is always easier than being prevented to work by an upgrade issue after the fact!" +#: ../../content/administration/install/deploy.rst:78 +msgid "By default, PostgreSQL only allows connection over UNIX sockets and loopback connections (from \"localhost\", the same machine the PostgreSQL server is installed on)." msgstr "" -#: ../../content/administration/db_management/db_online.rst:127 -msgid "Once you are ready and you have validated all your tests, you can click again on the Upgrade button and confirm by clicking on Upgrade (the button with the little rocket!) to switch your production database to the new version. Your database will then be taken offline within the next 10 minutes and will be upgraded automatically; you receive a confirmation e-mail once the process is completed." +#: ../../content/administration/install/deploy.rst:82 +msgid "UNIX socket is fine if you want Odoo and PostgreSQL to execute on the same machine, and is the default when no host is provided, but if you want Odoo and PostgreSQL to execute on different machines [#different-machines]_ it will need to `listen to network interfaces`_ [#remote-socket]_, either:" msgstr "" -#: ../../content/administration/db_management/db_online.rst:138 -msgid "Your database will be taken offline during the upgrade (usually between 30min up to several hours for big databases), so make sure to plan your migration during non-business hours." +#: ../../content/administration/install/deploy.rst:87 +msgid "Only accept loopback connections and `use an SSH tunnel`_ between the machine on which Odoo runs and the one on which PostgreSQL runs, then configure Odoo to connect to its end of the tunnel" msgstr "" -#: ../../content/administration/db_management/db_online.rst:144 -msgid "Duplicating a database" +#: ../../content/administration/install/deploy.rst:90 +msgid "Accept connections to the machine on which Odoo is installed, possibly over ssl (see `PostgreSQL connection settings`_ for details), then configure Odoo to connect over the network" msgstr "" -#: ../../content/administration/db_management/db_online.rst:146 -msgid "Database duplication, renaming, custom DNS, etc. is not available for trial databases on our Online platform. Paid Databases and \"One App Free\" database can duplicate without problem." +#: ../../content/administration/install/deploy.rst:95 +#: ../../content/administration/install/deploy.rst:145 +#: ../../content/administration/install/deploy.rst:231 +#: ../../content/administration/install/deploy.rst:271 +msgid "Configuration sample" msgstr "" -#: ../../content/administration/db_management/db_online.rst:151 -msgid "In the line of the database you want to duplicate, you will have a few buttons. To duplicate your database, just click **Duplicate**. You will have to give a name to your duplicate, then click **Duplicate Database**." +#: ../../content/administration/install/deploy.rst:97 +msgid "Allow tcp connection on localhost" msgstr "" -#: ../../content/administration/db_management/db_online.rst:158 -msgid "If you do not check the \"For testing purposes\" checkbox when duplicating a database, all external communication will remain active:" +#: ../../content/administration/install/deploy.rst:98 +msgid "Allow tcp connection from 192.168.1.x network" msgstr "" -#: ../../content/administration/db_management/db_online.rst:161 -msgid "Emails are sent" +#: ../../content/administration/install/deploy.rst:100 +msgid "in ``/etc/postgresql/9.5/main/pg_hba.conf`` set:" msgstr "" -#: ../../content/administration/db_management/db_online.rst:163 -msgid "Payments are processed (in the e-commerce or Subscriptions apps, for example)" +#: ../../content/administration/install/deploy.rst:108 +msgid "in ``/etc/postgresql/9.5/main/postgresql.conf`` set:" msgstr "" -#: ../../content/administration/db_management/db_online.rst:166 -msgid "Delivery orders (shipping providers) are sent" +#: ../../content/administration/install/deploy.rst:119 +msgid "Configuring Odoo" msgstr "" -#: ../../content/administration/db_management/db_online.rst:168 -msgid "Etc." +#: ../../content/administration/install/deploy.rst:121 +msgid "Out of the box, Odoo connects to a local postgres over UNIX socket via port 5432. This can be overridden using :ref:`the database options ` when your Postgres deployment is not local and/or does not use the installation defaults." msgstr "" -#: ../../content/administration/db_management/db_online.rst:170 -msgid "Make sure to check the checkbox \"For testing purposes\" if you want these behaviours to be disabled." +#: ../../content/administration/install/deploy.rst:126 +msgid "The :ref:`packaged installers ` will automatically create a new user (``odoo``) and set it as the database user." msgstr "" -#: ../../content/administration/db_management/db_online.rst:173 -msgid "After a few seconds, you will be logged in your duplicated database. Notice that the url uses the name you chose for your duplicated database." +#: ../../content/administration/install/deploy.rst:129 +msgid "The database management screens are protected by the ``admin_passwd`` setting. This setting can only be set using configuration files, and is simply checked before performing database alterations. It should be set to a randomly generated value to ensure third parties can not use this interface." msgstr "" -#: ../../content/administration/db_management/db_online.rst:178 -msgid "Duplicate databases expire automatically after 15 days." +#: ../../content/administration/install/deploy.rst:134 +msgid "All database operations use the :ref:`database options `, including the database management screen. For the database management screen to work requires that the PostgreSQL user have ``createdb`` right." msgstr "" -#: ../../content/administration/db_management/db_online.rst:186 -msgid "Rename a Database" +#: ../../content/administration/install/deploy.rst:138 +msgid "Users can always drop databases they own. For the database management screen to be completely non-functional, the PostgreSQL user needs to be created with ``no-createdb`` and the database must be owned by a different PostgreSQL user." msgstr "" -#: ../../content/administration/db_management/db_online.rst:188 -msgid "To rename your database, make sure you are connected to the database you want to rename, access the `database management page `__ and click **Rename**. You will have to give a new name to your database, then click **Rename Database**." +#: ../../content/administration/install/deploy.rst:142 +msgid "the PostgreSQL user *must not* be a superuser" msgstr "" -#: ../../content/administration/db_management/db_online.rst:199 -msgid "Deleting a Database" +#: ../../content/administration/install/deploy.rst:147 +msgid "connect to a PostgreSQL server on 192.168.1.2" msgstr "" -#: ../../content/administration/db_management/db_online.rst:201 -msgid "You can only delete databases of which you are the administrator." +#: ../../content/administration/install/deploy.rst:148 +msgid "port 5432" msgstr "" -#: ../../content/administration/db_management/db_online.rst:203 -msgid "When you delete your database all the data will be permanently lost. The deletion is instant and for all the Users. We advise you to do an instant backup of your database before deleting it, since the last automated daily backup may be several hours old at that point." +#: ../../content/administration/install/deploy.rst:149 +msgid "using an 'odoo' user account," msgstr "" -#: ../../content/administration/db_management/db_online.rst:209 -msgid "From the `database management page `__, on the line of the database you want to delete, click on the \"Delete\" button." +#: ../../content/administration/install/deploy.rst:150 +msgid "with 'pwd' as a password" msgstr "" -#: ../../content/administration/db_management/db_online.rst:216 -msgid "Read carefully the warning message that will appear and proceed only if you fully understand the implications of deleting a database:" +#: ../../content/administration/install/deploy.rst:151 +msgid "filtering only db with a name beginning with 'mycompany'" msgstr "" -#: ../../content/administration/db_management/db_online.rst:222 -msgid "After a few seconds, the database will be deleted and the page will reload automatically." +#: ../../content/administration/install/deploy.rst:168 +msgid "SSL Between Odoo and PostgreSQL" msgstr "" -#: ../../content/administration/db_management/db_online.rst:226 -msgid "If you need to re-use this database name, it will be immediately available." +#: ../../content/administration/install/deploy.rst:170 +msgid "Since Odoo 11.0, you can enforce ssl connection between Odoo and PostgreSQL. in Odoo the db_sslmode control the ssl security of the connection with value chosen out of 'disable', 'allow', 'prefer', 'require', 'verify-ca' or 'verify-full'" msgstr "" -#: ../../content/administration/db_management/db_online.rst:228 -msgid "It is not possible to delete a database if it is expired or linked to a Subscription. In these cases contact `Odoo Support `__" +#: ../../content/administration/install/deploy.rst:175 +msgid "`PostgreSQL Doc `_" msgstr "" -#: ../../content/administration/db_management/db_online.rst:232 -msgid "If you want to delete your Account, please contact `Odoo Support `__" +#: ../../content/administration/install/deploy.rst:180 +msgid "Builtin server" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:6 -msgid "On-premises Database management" +#: ../../content/administration/install/deploy.rst:182 +msgid "Odoo includes built-in HTTP servers, using either multithreading or multiprocessing." msgstr "" -#: ../../content/administration/db_management/db_premise.rst:9 -msgid "Register a database" +#: ../../content/administration/install/deploy.rst:185 +msgid "For production use, it is recommended to use the multiprocessing server as it increases stability, makes somewhat better use of computing resources and can be better monitored and resource-restricted." msgstr "" -#: ../../content/administration/db_management/db_premise.rst:11 -msgid "To register your database, you just need to enter your Subscription Code in the banner in the App Switcher. Make sure you do not add extra spaces before or after your subscription code. If the registration is successful, it will turn green and will provide you with the Expiration Date of your freshly-registered database. You can check this Epiration Date in the About menu (Odoo 9) or in the Settings Dashboard (Odoo 10)." +#: ../../content/administration/install/deploy.rst:189 +msgid "Multiprocessing is enabled by configuring :option:`a non-zero number of worker processes `, the number of workers should be based on the number of cores in the machine (possibly with some room for cron workers depending on how much cron work is predicted)" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:19 -msgid "Registration Error Message" +#: ../../content/administration/install/deploy.rst:193 +msgid "Worker limits can be configured based on the hardware configuration to avoid resources exhaustion" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:21 -msgid "If you are unable to register your database, you will likely encounter this message:" +#: ../../content/administration/install/deploy.rst:196 +msgid "multiprocessing mode currently isn't available on Windows" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:30 -#: ../../content/administration/db_management/db_premise.rst:109 -#: ../../content/administration/db_management/db_premise.rst:137 -msgid "Solutions" +#: ../../content/administration/install/deploy.rst:199 +msgid "Worker number calculation" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:32 -msgid "Do you have a valid Enterprise subscription?" +#: ../../content/administration/install/deploy.rst:201 +msgid "Rule of thumb : (#CPU * 2) + 1" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:34 -msgid "Check if your subscription details get the tag \"In Progress\" on your `Odoo Account `__ or with your Account Manager" +#: ../../content/administration/install/deploy.rst:202 +msgid "Cron workers need CPU" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:38 -msgid "Have you already linked a database with your subscription reference?" +#: ../../content/administration/install/deploy.rst:203 +msgid "1 worker ~= 6 concurrent users" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:40 -msgid "You can link only one database per subscription. (Need a test or a development database? `Find a partner `__)" +#: ../../content/administration/install/deploy.rst:206 +msgid "memory size calculation" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:44 -msgid "You can unlink the old database yourself on your `Odoo Contract `__ with the button \"Unlink database\"" +#: ../../content/administration/install/deploy.rst:208 +msgid "We consider 20% of the requests are heavy requests, while 80% are simpler ones" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:51 -msgid "A confirmation message will appear; make sure this is the correct database as it will be deactivated shortly:" +#: ../../content/administration/install/deploy.rst:209 +msgid "A heavy worker, when all computed field are well designed, SQL requests are well designed, ... is estimated to consume around 1GB of RAM" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:58 -msgid "Do you have the updated version of Odoo 9?" +#: ../../content/administration/install/deploy.rst:210 +msgid "A lighter worker, in the same scenario, is estimated to consume around 150MB of RAM" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:60 -#: ../../content/administration/db_management/db_premise.rst:170 -msgid "From July 2016 onward, Odoo 9 now automatically change the uuid of a duplicated database; a manual operation is no longer required." +#: ../../content/administration/install/deploy.rst:212 +msgid "Needed RAM = #worker * ( (light_worker_ratio * light_worker_ram_estimation) + (heavy_worker_ratio * heavy_worker_ram_estimation) )" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:63 -msgid "If it's not the case, you may have multiple databases sharing the same UUID. Please check on your `Odoo Contract `__, a short message will appear specifying which database is problematic:" +#: ../../content/administration/install/deploy.rst:215 +#: ../../content/administration/install/deploy.rst:375 +msgid "LiveChat" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:72 -msgid "In this case, you need to change the UUID on your test databases to solve this issue. You will find more information about this in :ref:`this section `." +#: ../../content/administration/install/deploy.rst:217 +msgid "In multiprocessing, a dedicated LiveChat worker is automatically started and listening on :option:`the gevent port ` but the client will not connect to it." msgstr "" -#: ../../content/administration/db_management/db_premise.rst:75 -msgid "For your information, we identify database with UUID. Therefore, each database should have a distinct UUID to ensure that registration and invoicing proceed effortlessly for your and for us." +#: ../../content/administration/install/deploy.rst:221 +msgid "Instead you must have a proxy redirecting requests whose URL starts with ``/websocket/`` to the gevent port. Other request should be proxied to the :option:`normal HTTP port `" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:79 -msgid "Check your network and firewall settings" +#: ../../content/administration/install/deploy.rst:225 +msgid "To achieve such a thing, you'll need to deploy a reverse proxy in front of Odoo, like nginx or apache. When doing so, you'll need to forward some more http Headers to Odoo, and activate the proxy_mode in Odoo configuration to have Odoo read those headers." msgstr "" -#: ../../content/administration/db_management/db_premise.rst:81 -msgid "The Update notification must be able to reach Odoo's subscription validation servers. In other words, make sure that the Odoo server is able to open outgoing connections towards:" +#: ../../content/administration/install/deploy.rst:233 +msgid "Server with 4 CPU, 8 Thread" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:85 -msgid "services.odoo.com on port 443 (or 80)" +#: ../../content/administration/install/deploy.rst:234 +msgid "60 concurrent users" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:86 -msgid "services.openerp.com on port 443 (or 80) for older deployments" +#: ../../content/administration/install/deploy.rst:236 +msgid "60 users / 6 = 10 <- theoretical number of worker needed" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:88 -msgid "Once you activated your database, you must keep these ports open, as the Update notification runs once a week." +#: ../../content/administration/install/deploy.rst:237 +msgid "(4 * 2) + 1 = 9 <- theoretical maximal number of worker" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:94 -msgid "Error message due to too many users" +#: ../../content/administration/install/deploy.rst:238 +msgid "We'll use 8 workers + 1 for cron. We'll also use a monitoring system to measure cpu load, and check if it's between 7 and 7.5 ." msgstr "" -#: ../../content/administration/db_management/db_premise.rst:96 -msgid "If you have more users in your local database than provisionned in your Odoo Enterprise subscription, you may encounter this message:" +#: ../../content/administration/install/deploy.rst:239 +msgid "RAM = 9 * ((0.8*150) + (0.2*1024)) ~= 3Go RAM for Odoo" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:105 -msgid "When the message appears you have 30 days before the expiration. The countdown is updated everyday." +#: ../../content/administration/install/deploy.rst:241 +msgid "in ``/etc/odoo.conf``:" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:111 -msgid "**Add more users** on your subscription: follow the link and Validate the upsell quotation and pay for the extra users." +#: ../../content/administration/install/deploy.rst:257 +msgid "HTTPS" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:113 -msgid "**Deactivate users** as explained in this `documentation `_ and **Reject** the upsell quotation." +#: ../../content/administration/install/deploy.rst:259 +msgid "Whether it's accessed via website/web client or web service, Odoo transmits authentication information in cleartext. This means a secure deployment of Odoo must use HTTPS\\ [#switching]_. SSL termination can be implemented via just about any SSL termination proxy, but requires the following setup:" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:116 -msgid "Once your database has the correct number of users, the expiration message will disappear automatically after a few days, when the next verification occurs. We understand that it can be a bit frightening to see the countdown, so you can :ref:`force an Update Notification ` to make the message disappear right away." +#: ../../content/administration/install/deploy.rst:264 +msgid "Enable Odoo's :option:`proxy mode `. This should only be enabled when Odoo is behind a reverse proxy" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:123 -msgid "Database expired error message" +#: ../../content/administration/install/deploy.rst:265 +msgid "Set up the SSL termination proxy (`Nginx termination example`_)" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:125 -msgid "If your database reaches its expiration date before your renew your subscription, you will encounter this message:" +#: ../../content/administration/install/deploy.rst:266 +msgid "Set up the proxying itself (`Nginx proxying example`_)" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:133 -msgid "This **blocking** message appears after a non-blocking message that lasts 30 days. If you fail to take action before the end of the countdown, the database is expired." +#: ../../content/administration/install/deploy.rst:267 +msgid "Your SSL termination proxy should also automatically redirect non-secure connections to the secure port" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:141 -msgid "Renew your subscription: follow the link and renew your subscription - note that" +#: ../../content/administration/install/deploy.rst:273 +msgid "Redirect http requests to https" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:140 -msgid "if you wish to pay by Wire Transfer, your subscription will effectively be renewed only when the payment arrives, which can take a few days. Credit card payments are processed immediately." +#: ../../content/administration/install/deploy.rst:274 +msgid "Proxy requests to odoo" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:143 -msgid "Contact our `Support `__" +#: ../../content/administration/install/deploy.rst:282 +msgid "in ``/etc/nginx/sites-enabled/odoo.conf`` set:" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:145 -msgid "None of those solutions worked for you? Please contact our `Support `__" +#: ../../content/administration/install/deploy.rst:349 +msgid "Odoo as a WSGI Application" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:154 -msgid "Duplicate a database" +#: ../../content/administration/install/deploy.rst:351 +msgid "It is also possible to mount Odoo as a standard WSGI_ application. Odoo provides the base for a WSGI launcher script as ``odoo-wsgi.example.py``. That script should be customized (possibly after copying it from the setup directory) to correctly set the configuration directly in :mod:`odoo.tools.config` rather than through the command-line or a configuration file." msgstr "" -#: ../../content/administration/db_management/db_premise.rst:156 -msgid "You can duplicate your database by accessing the database manager on your server (/web/database/manager). In this page, you can easily duplicate your database (among other things)." +#: ../../content/administration/install/deploy.rst:357 +msgid "However the WSGI server will only expose the main HTTP endpoint for the web client, website and webservice API. Because Odoo does not control the creation of workers anymore it can not setup cron or livechat workers" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:164 -msgid "When you duplicate a local database, it is **strongly** advised to change the duplicated database's uuid (Unniversally Unique Identifier), since this uuid is how your database identifies itself with our servers. Having two databases with the same uuid could result in invoicing problems or registration problems down the line." +#: ../../content/administration/install/deploy.rst:362 +msgid "Cron Workers" msgstr "" -#: ../../content/administration/db_management/db_premise.rst:173 -msgid "The database uuid is currently accessible from the menu :menuselection:`Settings --> Technical --> System Parameters`, we advise you to use a `uuid generator `_ or to use the unix command ``uuidgen`` to generate a new uuid. You can then simply replace it like any other record by clicking on it and using the edit button." +#: ../../content/administration/install/deploy.rst:364 +msgid "To run cron jobs for an Odoo deployment as a WSGI application requires" msgstr "" -#: ../../content/administration/db_management/hosting_changes.rst:6 -msgid "Hosting Changes" +#: ../../content/administration/install/deploy.rst:366 +msgid "A classical Odoo (run via ``odoo-bin``)" msgstr "" -#: ../../content/administration/db_management/hosting_changes.rst:8 +#: ../../content/administration/install/deploy.rst:367 +msgid "Connected to the database in which cron jobs have to be run (via :option:`odoo-bin -d`)" +msgstr "" + +#: ../../content/administration/install/deploy.rst:369 +msgid "Which should not be exposed to the network. To ensure cron runners are not network-accessible, it is possible to disable the built-in HTTP server entirely with :option:`odoo-bin --no-http` or setting ``http_enable = False`` in the configuration file" +msgstr "" + +#: ../../content/administration/install/deploy.rst:377 +msgid "The second problematic subsystem for WSGI deployments is the LiveChat: where most HTTP connections are relatively short and quickly free up their worker process for the next request, LiveChat require a long-lived connection for each client in order to implement near-real-time notifications." +msgstr "" + +#: ../../content/administration/install/deploy.rst:382 +msgid "This is in conflict with the process-based worker model, as it will tie up worker processes and prevent new users from accessing the system. However, those long-lived connections do very little and mostly stay parked waiting for notifications." +msgstr "" + +#: ../../content/administration/install/deploy.rst:387 +msgid "The solutions to support livechat/motifications in a WSGI application are:" +msgstr "" + +#: ../../content/administration/install/deploy.rst:389 +msgid "Deploy a threaded version of Odoo (instead of a process-based preforking one) and redirect only requests to URLs starting with ``/websocket/`` to that Odoo, this is the simplest and the websocket URL can double up as the cron instance." +msgstr "" + +#: ../../content/administration/install/deploy.rst:393 +msgid "Deploy an evented Odoo via ``odoo-gevent`` and proxy requests starting with ``/websocket/`` to :option:`the gevent port `." +msgstr "" + +#: ../../content/administration/install/deploy.rst:400 +msgid "Serving static files and attachments" +msgstr "" + +#: ../../content/administration/install/deploy.rst:402 +msgid "For development convenience, Odoo directly serves all static files and attachments in its modules. This may not be ideal when it comes to performances, and static files should generally be served by a static HTTP server." +msgstr "" + +#: ../../content/administration/install/deploy.rst:407 +msgid "Serving static files" +msgstr "" + +#: ../../content/administration/install/deploy.rst:409 +msgid "Odoo static files are located in each module's :file:`static/` folder, so static files can be served by intercepting all requests to :samp:`/{MODULE}/static/{FILE}`, and looking up the right module (and file) in the various addons paths." +msgstr "" + +#: ../../content/administration/install/deploy.rst:414 +msgid "Say Odoo has been installed via the **debian packages** for Community and Enterprise, the addons paths is :file:`/usr/lib/python3/dist-packages/odoo/addons`. Using the above NGINX (https) configuration, the following location block should be added to serve static files via NGINX." +msgstr "" + +#: ../../content/administration/install/deploy.rst:432 +msgid "Say Odoo has been installed via the **source**, and the two git repositories for Community and Enterprise has been cloned in :file:`/opt/odoo` and :file:`/opt/odoo-enterprise` respectively. The addons paths is ``/opt/odoo/odoo,/opt/odoo/addons,/opt/odoo-enterprise``. Using the above NGINX (https) configuragion, the following location block should be added to serve static files via NGINX." +msgstr "" + +#: ../../content/administration/install/deploy.rst:466 +msgid "The actual NGINX configuration you need is highly dependent on your own installation. The two above snippets only highlight two possible configurations and may not be used as-is." +msgstr "" + +#: ../../content/administration/install/deploy.rst:470 +msgid "Serving attachments" +msgstr "" + +#: ../../content/administration/install/deploy.rst:472 +msgid "Attachments are files stored in the filestore which access is regulated by Odoo. They cannot be directly accessed via a static web server as accessing them requires multiple lookups in the database to determine where the files are stored and whether the current user can access them or not." +msgstr "" + +#: ../../content/administration/install/deploy.rst:477 +msgid "Nevertheless, once the file has been located and the access rights verified by Odoo, it is a good idea to serve the file using the static web server instead of Odoo. For Odoo to delegate serving files to the static web server, the `X-Sendfile `_ (apache) or `X-Accel `_ (nginx) extensions must be enabled and configured on the static web server. Once it is set up, start Odoo with the :option:`--x-sendfile ` CLI flag (this unique flag is used for both X-Sendfile and X-Accel)." +msgstr "" + +#: ../../content/administration/install/deploy.rst:487 +msgid "The X-Sendfile extension for apache (and compatible web servers) does not require any supplementary configuration." +msgstr "" + +#: ../../content/administration/install/deploy.rst:489 +msgid "The X-Accel extension for NGINX **does** require the following additionnal configuration:" +msgstr "" + +#: ../../content/administration/install/deploy.rst:498 +msgid "In case you don't know what is the path to your filestore, start Odoo with the :option:`--x-sendfile ` option and navigate to the ``/web/filestore`` URL directly via Odoo (don't navigate to the URL via NGINX). This logs a warnings, the message contains the configuration you need." +msgstr "" + +#: ../../content/administration/install/deploy.rst:507 +msgid "Security" +msgstr "" + +#: ../../content/administration/install/deploy.rst:509 +msgid "For starters, keep in mind that securing an information system is a continuous process, not a one-shot operation. At any moment, you will only be as secure as the weakest link in your environment." +msgstr "" + +#: ../../content/administration/install/deploy.rst:513 +msgid "So please do not take this section as the ultimate list of measures that will prevent all security problems. It's only intended as a summary of the first important things you should be sure to include in your security action plan. The rest will come from best security practices for your operating system and distribution, best practices in terms of users, passwords, and access control management, etc." +msgstr "" + +#: ../../content/administration/install/deploy.rst:519 +msgid "When deploying an internet-facing server, please be sure to consider the following security-related topics:" +msgstr "" + +#: ../../content/administration/install/deploy.rst:522 +msgid "Always set a strong super-admin admin password, and restrict access to the database management pages as soon as the system is set up. See :ref:`db_manager_security`." +msgstr "" + +#: ../../content/administration/install/deploy.rst:525 +msgid "Choose unique logins and strong passwords for all administrator accounts on all databases. Do not use 'admin' as the login. Do not use those logins for day-to-day operations, only for controlling/managing the installation. *Never* use any default passwords like admin/admin, even for test/staging databases." +msgstr "" + +#: ../../content/administration/install/deploy.rst:530 +msgid "Do **not** install demo data on internet-facing servers. Databases with demo data contain default logins and passwords that can be used to get into your systems and cause significant trouble, even on staging/dev systems." +msgstr "" + +#: ../../content/administration/install/deploy.rst:534 +msgid "Use appropriate database filters ( :option:`--db-filter `) to restrict the visibility of your databases according to the hostname. See :ref:`db_filter`. You may also use :option:`-d ` to provide your own (comma-separated) list of available databases to filter from, instead of letting the system fetch them all from the database backend." +msgstr "" + +#: ../../content/administration/install/deploy.rst:541 +msgid "Once your ``db_name`` and ``db_filter`` are configured and only match a single database per hostname, you should set ``list_db`` configuration option to ``False``, to prevent listing databases entirely, and to block access to the database management screens (this is also exposed as the :option:`--no-database-list ` command-line option)" +msgstr "" + +#: ../../content/administration/install/deploy.rst:547 +msgid "Make sure the PostgreSQL user (:option:`--db_user `) is *not* a super-user, and that your databases are owned by a different user. For example they could be owned by the ``postgres`` super-user if you are using a dedicated non-privileged ``db_user``. See also :ref:`setup/deploy/odoo`." +msgstr "" + +#: ../../content/administration/install/deploy.rst:552 +msgid "Keep installations updated by regularly installing the latest builds, either via GitHub or by downloading the latest version from https://www.odoo.com/page/download or http://nightly.odoo.com" +msgstr "" + +#: ../../content/administration/install/deploy.rst:556 +msgid "Configure your server in multi-process mode with proper limits matching your typical usage (memory/CPU/timeouts). See also :ref:`builtin_server`." +msgstr "" + +#: ../../content/administration/install/deploy.rst:559 +msgid "Run Odoo behind a web server providing HTTPS termination with a valid SSL certificate, in order to prevent eavesdropping on cleartext communications. SSL certificates are cheap, and many free options exist. Configure the web proxy to limit the size of requests, set appropriate timeouts, and then enable the :option:`proxy mode ` option. See also :ref:`https_proxy`." +msgstr "" + +#: ../../content/administration/install/deploy.rst:566 +msgid "If you need to allow remote SSH access to your servers, make sure to set a strong password for **all** accounts, not just `root`. It is strongly recommended to entirely disable password-based authentication, and only allow public key authentication. Also consider restricting access via a VPN, allowing only trusted IPs in the firewall, and/or running a brute-force detection system such as `fail2ban` or equivalent." +msgstr "" + +#: ../../content/administration/install/deploy.rst:572 +msgid "Consider installing appropriate rate-limiting on your proxy or firewall, to prevent brute-force attacks and denial of service attacks. See also :ref:`login_brute_force` for specific measures." +msgstr "" + +#: ../../content/administration/install/deploy.rst:576 +msgid "Many network providers provide automatic mitigation for Distributed Denial of Service attacks (DDOS), but this is often an optional service, so you should consult with them." +msgstr "" + +#: ../../content/administration/install/deploy.rst:580 +msgid "Whenever possible, host your public-facing demo/test/staging instances on different machines than the production ones. And apply the same security precautions as for production." +msgstr "" + +#: ../../content/administration/install/deploy.rst:584 +msgid "If your public-facing Odoo server has access to sensitive internal network resources or services (e.g. via a private VLAN), implement appropriate firewall rules to protect those internal resources. This will ensure that the Odoo server cannot be used accidentally (or as a result of malicious user actions) to access or disrupt those internal resources. Typically this can be done by applying an outbound default DENY rule on the firewall, then only explicitly authorizing access to internal resources that the Odoo server needs to access. `Systemd IP traffic access control `_ may also be useful to implement per-process network access control." +msgstr "" + +#: ../../content/administration/install/deploy.rst:595 +msgid "If your public-facing Odoo server is behind a Web Application Firewall, a load-balancer, a transparent DDoS protection service (like CloudFlare) or a similar network-level device, you may wish to avoid direct access to the Odoo system. It is generally difficult to keep the endpoint IP addresses of your Odoo servers secret. For example they can appear in web server logs when querying public systems, or in the headers of emails posted from Odoo. In such a situation you may want to configure your firewall so that the endpoints are not accessible publicly except from the specific IP addresses of your WAF, load-balancer or proxy service. Service providers like CloudFlare usually maintain a public list of their IP address ranges for this purpose." +msgstr "" + +#: ../../content/administration/install/deploy.rst:606 +msgid "If you are hosting multiple customers, isolate customer data and files from each other using containers or appropriate \"jail\" techniques." +msgstr "" + +#: ../../content/administration/install/deploy.rst:609 +msgid "Setup daily backups of your databases and filestore data, and copy them to a remote archiving server that is not accessible from the server itself." +msgstr "" + +#: ../../content/administration/install/deploy.rst:616 +msgid "Blocking Brute Force Attacks" +msgstr "" + +#: ../../content/administration/install/deploy.rst:617 +msgid "For internet-facing deployments, brute force attacks on user passwords are very common, and this threat should not be neglected for Odoo servers. Odoo emits a log entry whenever a login attempt is performed, and reports the result: success or failure, along with the target login and source IP." +msgstr "" + +#: ../../content/administration/install/deploy.rst:621 +msgid "The log entries will have the following form." +msgstr "" + +#: ../../content/administration/install/deploy.rst:623 +msgid "Failed login::" +msgstr "" + +#: ../../content/administration/install/deploy.rst:627 +msgid "Successful login::" +msgstr "" + +#: ../../content/administration/install/deploy.rst:632 +msgid "These logs can be easily analyzed by an intrusion prevention system such as `fail2ban`." +msgstr "" + +#: ../../content/administration/install/deploy.rst:634 +msgid "For example, the following fail2ban filter definition should match a failed login::" +msgstr "" + +#: ../../content/administration/install/deploy.rst:641 +msgid "This could be used with a jail definition to block the attacking IP on HTTP(S)." +msgstr "" + +#: ../../content/administration/install/deploy.rst:643 +msgid "Here is what it could look like for blocking the IP for 15 minutes when 10 failed login attempts are detected from the same IP within 1 minute::" +msgstr "" + +#: ../../content/administration/install/deploy.rst:657 +msgid "Database Manager Security" +msgstr "" + +#: ../../content/administration/install/deploy.rst:659 +msgid ":ref:`setup/deploy/odoo` mentioned ``admin_passwd`` in passing." +msgstr "" + +#: ../../content/administration/install/deploy.rst:661 +msgid "This setting is used on all database management screens (to create, delete, dump or restore databases)." +msgstr "" + +#: ../../content/administration/install/deploy.rst:664 +msgid "If the management screens must not be accessible at all, you should set ``list_db`` configuration option to ``False``, to block access to all the database selection and management screens." +msgstr "" + +#: ../../content/administration/install/deploy.rst:670 +msgid "It is strongly recommended to disable the Database Manager for any internet-facing system! It is meant as a development/demo tool, to make it easy to quickly create and manage databases. It is not designed for use in production, and may even expose dangerous features to attackers. It is also not designed to handle large databases, and may trigger memory limits." +msgstr "" + +#: ../../content/administration/install/deploy.rst:676 +msgid "On production systems, database management operations should always be performed by the system administrator, including provisioning of new databases and automated backups." +msgstr "" + +#: ../../content/administration/install/deploy.rst:679 +msgid "Be sure to setup an appropriate ``db_name`` parameter (and optionally, ``db_filter`` too) so that the system can determine the target database for each request, otherwise users will be blocked as they won't be allowed to choose the database themselves." +msgstr "" + +#: ../../content/administration/install/deploy.rst:684 +msgid "If the management screens must only be accessible from a selected set of machines, use the proxy server's features to block access to all routes starting with ``/web/database`` except (maybe) ``/web/database/selector`` which displays the database-selection screen." +msgstr "" + +#: ../../content/administration/install/deploy.rst:688 +msgid "If the database-management screen should be left accessible, the ``admin_passwd`` setting must be changed from its ``admin`` default: this password is checked before allowing database-alteration operations." +msgstr "" + +#: ../../content/administration/install/deploy.rst:692 +msgid "It should be stored securely, and should be generated randomly e.g." +msgstr "" + +#: ../../content/administration/install/deploy.rst:698 +msgid "which will generate a 32 characters pseudorandom printable string." +msgstr "" + +#: ../../content/administration/install/deploy.rst:701 +msgid "Supported Browsers" +msgstr "" + +#: ../../content/administration/install/deploy.rst:703 +msgid "Odoo supports all the major desktop and mobile browsers available on the market, as long as they are supported by their publishers." +msgstr "" + +#: ../../content/administration/install/deploy.rst:706 +msgid "Here are the supported browsers:" +msgstr "" + +#: ../../content/administration/install/deploy.rst:708 +msgid "Google Chrome" +msgstr "" + +#: ../../content/administration/install/deploy.rst:709 +msgid "Mozilla Firefox" +msgstr "" + +#: ../../content/administration/install/deploy.rst:710 +msgid "Microsoft Edge" +msgstr "" + +#: ../../content/administration/install/deploy.rst:711 +msgid "Apple Safari" +msgstr "" + +#: ../../content/administration/install/deploy.rst:713 +msgid "Please make sure your browser is up-to-date and still supported by its publisher before filing a bug report." +msgstr "" + +#: ../../content/administration/install/deploy.rst:718 +msgid "Since Odoo 13.0, ES6 is supported. Therefore, IE support is dropped." +msgstr "" + +#: ../../content/administration/install/deploy.rst:721 +msgid "to have multiple Odoo installations use the same PostgreSQL database, or to provide more computing resources to both software." +msgstr "" + +#: ../../content/administration/install/deploy.rst:724 +msgid "technically a tool like socat_ can be used to proxy UNIX sockets across networks, but that is mostly for software which can only be used over UNIX sockets" +msgstr "" + +#: ../../content/administration/install/deploy.rst:728 +msgid "or be accessible only over an internal packet-switched network, but that requires secured switches, protections against `ARP spoofing`_ and precludes usage of WiFi. Even over secure packet-switched networks, deployment over HTTPS is recommended, and possible costs are lowered as \"self-signed\" certificates are easier to deploy on a controlled environment than over the internet." +msgstr "" + +#: ../../content/administration/install/email_gateway.rst:3 +msgid "Email gateway" +msgstr "" + +#: ../../content/administration/install/email_gateway.rst:5 +msgid "The Odoo mail gateway allows you to inject directly all the received emails in Odoo." +msgstr "" + +#: ../../content/administration/install/email_gateway.rst:7 +msgid "Its principle is straightforward: your SMTP server executes the \"mailgate\" script for every new incoming email." +msgstr "" + +#: ../../content/administration/install/email_gateway.rst:9 +msgid "The script takes care of connecting to your Odoo database through XML-RPC, and send the emails via the `MailThread.message_process()` feature." +msgstr "" + +#: ../../content/administration/install/email_gateway.rst:13 +msgid "Prerequisites" +msgstr "" + +#: ../../content/administration/install/email_gateway.rst:14 +msgid "Administrator access to the Odoo database." +msgstr "" + +#: ../../content/administration/install/email_gateway.rst:15 +msgid "Your own mail server such as Postfix or Exim." +msgstr "" + +#: ../../content/administration/install/email_gateway.rst:16 +msgid "Technical knowledge on how to configure an email server." +msgstr "" + +#: ../../content/administration/install/email_gateway.rst:19 +msgid "For Postfix" +msgstr "" + +#: ../../content/administration/install/email_gateway.rst:20 +msgid "In you alias config (:file:`/etc/aliases`):" +msgstr "" + +#: ../../content/administration/install/email_gateway.rst:27 +#: ../../content/administration/install/email_gateway.rst:41 +msgid "Resources" +msgstr "" + +#: ../../content/administration/install/email_gateway.rst:29 +msgid "`Postfix `_" +msgstr "" + +#: ../../content/administration/install/email_gateway.rst:30 +msgid "`Postfix aliases `_" +msgstr "" + +#: ../../content/administration/install/email_gateway.rst:31 +msgid "`Postfix virtual `_" +msgstr "" + +#: ../../content/administration/install/email_gateway.rst:35 +msgid "For Exim" +msgstr "" + +#: ../../content/administration/install/email_gateway.rst:43 +msgid "`Exim `_" +msgstr "" + +#: ../../content/administration/install/email_gateway.rst:46 +msgid "If you don't have access/manage your email server, use :ref:`inbound messages `." +msgstr "" + +#: ../../content/administration/install/install.rst:6 +msgid "Installing Odoo" +msgstr "" + +#: ../../content/administration/install/install.rst:8 +msgid "There are multiple ways to install Odoo, or not install it at all, depending on the intended use case." +msgstr "" + +#: ../../content/administration/install/install.rst:11 +msgid "This documents attempts to describe most of the installation options." +msgstr "" + +#: ../../content/administration/install/install.rst:14 +msgid ":ref:`setup/install/online`" +msgstr "" + +#: ../../content/administration/install/install.rst:14 +msgid "The easiest way to use Odoo in production or to try it." +msgstr "" + +#: ../../content/administration/install/install.rst:18 +msgid ":ref:`setup/install/packaged`" +msgstr "" + +#: ../../content/administration/install/install.rst:17 +msgid "Suitable for testing Odoo, developing modules and can be used for long-term production use with additional deployment and maintenance work." +msgstr "" + +#: ../../content/administration/install/install.rst:23 +msgid ":ref:`setup/install/source`" +msgstr "" + +#: ../../content/administration/install/install.rst:21 +msgid "Provides greater flexibility: e.g. allow multiple running Odoo versions on the same system. Good for developing modules, can be used as base for production deployment." +msgstr "" + +#: ../../content/administration/install/install.rst:28 +msgid ":ref:`setup/install/docker`" +msgstr "" + +#: ../../content/administration/install/install.rst:26 +msgid "If you usually use docker_ for development or deployment, an official docker_ base image is available." +msgstr "" + +#: ../../content/administration/install/install.rst:33 +msgid "Editions" +msgstr "" + +#: ../../content/administration/install/install.rst:35 +msgid "There are two different Editions_ of Odoo: the Community and Enterprise versions. Using the Enterprise version is possible on our SaaS_ and accessing the code is restricted to Enterprise customers and partners. The Community version is freely available to anyone." +msgstr "" + +#: ../../content/administration/install/install.rst:40 +msgid "If you already use the Community version and wish to upgrade to Enterprise, please refer to :ref:`setup/enterprise` (except for :ref:`setup/install/source`)." +msgstr "" + +#: ../../content/administration/install/install.rst:47 +msgid "Online" +msgstr "" + +#: ../../content/administration/install/install.rst:50 +msgid "Demo" +msgstr "" + +#: ../../content/administration/install/install.rst:52 +msgid "To simply get a quick idea of Odoo, demo_ instances are available. They are shared instances which only live for a few hours, and can be used to browse around and try things out with no commitment." +msgstr "" + +#: ../../content/administration/install/install.rst:56 +msgid "Demo_ instances require no local installation, just a web browser." +msgstr "" + +#: ../../content/administration/install/install.rst:59 +msgid "SaaS" +msgstr "" + +#: ../../content/administration/install/install.rst:61 +msgid "Trivial to start with, fully managed and migrated by Odoo S.A., Odoo's SaaS_ provides private instances and starts out free. It can be used to discover and test Odoo and do non-code customizations (i.e. incompatible with custom modules or the Odoo Apps Store) without having to install it locally." +msgstr "" + +#: ../../content/administration/install/install.rst:66 +msgid "Can be used for both testing Odoo and long-term production use." +msgstr "" + +#: ../../content/administration/install/install.rst:68 +msgid "Like demo_ instances, SaaS_ instances require no local installation, a web browser is sufficient." +msgstr "" + +#: ../../content/administration/install/install.rst:75 +msgid "Packaged installers" +msgstr "" + +#: ../../content/administration/install/install.rst:77 +msgid "Odoo provides packaged installers for Windows, deb-based distributions (Debian, Ubuntu, …) and RPM-based distributions (Fedora, CentOS, RHEL, …) for both the Community and Enterprise versions." +msgstr "" + +#: ../../content/administration/install/install.rst:81 +msgid "These packages automatically set up all dependencies (for the Community version), but may be difficult to keep up-to-date." +msgstr "" + +#: ../../content/administration/install/install.rst:84 +msgid "Official Community packages with all relevant dependency requirements are available on our nightly_ server. Both Community and Enterprise packages can be downloaded from our download_ page (you must to be logged in as a paying customer or partner to download the Enterprise packages)." +msgstr "" + +#: ../../content/administration/install/install.rst:90 +#: ../../content/administration/install/install.rst:296 +#: ../../content/administration/install/install.rst:367 +#: ../../content/administration/install/install.rst:432 +#: ../../content/administration/install/install.rst:505 +#: ../../content/administration/install/install.rst:672 +msgid "Windows" +msgstr "" + +#: ../../content/administration/install/install.rst:92 +msgid "Download the installer from our nightly_ server (Community only) or the Windows installer from the download_ page (any edition)." +msgstr "" + +#: ../../content/administration/install/install.rst:94 +msgid "Execute the downloaded file." +msgstr "" + +#: ../../content/administration/install/install.rst:0 +msgid "On Windows 8 and later you may see a warning titled \"Windows protected your PC\"." +msgstr "" + +#: ../../content/administration/install/install.rst:0 +msgid "Click on **More Info** and then on **Run anyway**." +msgstr "" + +#: ../../content/administration/install/install.rst:100 +msgid "Accept the UAC_ prompt." +msgstr "" + +#: ../../content/administration/install/install.rst:101 +msgid "Go through the various installation steps." +msgstr "" + +#: ../../content/administration/install/install.rst:103 +msgid "Odoo will automatically be started at the end of the installation." +msgstr "" + +#: ../../content/administration/install/install.rst:106 +#: ../../content/administration/install/install.rst:314 +#: ../../content/administration/install/install.rst:389 +#: ../../content/administration/install/install.rst:452 +#: ../../content/administration/install/install.rst:540 +#: ../../content/administration/install/install.rst:683 +msgid "Linux" +msgstr "" + +#: ../../content/administration/install/install.rst:109 +#: ../../content/administration/install/install.rst:360 +msgid "Prepare" +msgstr "" + +#: ../../content/administration/install/install.rst:113 +#: ../../content/administration/install/install.rst:146 +#: ../../content/administration/install/install.rst:179 +#: ../../content/administration/install/install.rst:547 +msgid "Debian/Ubuntu" +msgstr "" + +#: ../../content/administration/install/install.rst:115 +msgid "Odoo needs a `PostgreSQL`_ server to run properly. The default configuration for the Odoo 'deb' package is to use the PostgreSQL server on the same host as your Odoo instance. Execute the following command in order to install the PostgreSQL server:" +msgstr "" + +#: ../../content/administration/install/install.rst:123 +#: ../../content/administration/install/install.rst:159 +#: ../../content/administration/install/install.rst:220 +msgid "Fedora" +msgstr "" + +#: ../../content/administration/install/install.rst:125 +msgid "Odoo needs a `PostgreSQL`_ server to run properly. Make sure that the `sudo` command is available and well configured and, only then, execute the following command in order to install the PostgreSQL server:" +msgstr "" + +#: ../../content/administration/install/install.rst:137 +#: ../../content/administration/install/install.rst:645 +msgid "`wkhtmltopdf` is not installed through **pip** and must be installed manually in version `0.12.5 `_ for it to support headers and footers. See our `wiki `_ for more details on the various versions." +msgstr "" + +#: ../../content/administration/install/install.rst:142 +msgid "Repository" +msgstr "" + +#: ../../content/administration/install/install.rst:148 +msgid "Odoo S.A. provides a repository that can be used with Debian and Ubuntu distributions. It can be used to install *Odoo Community Edition* by executing the following commands **as root**:" +msgstr "" + +#: ../../content/administration/install/install.rst:157 +msgid "You can then use the usual `apt-get upgrade` command to keep your installation up-to-date." +msgstr "" + +#: ../../content/administration/install/install.rst:161 +msgid "Odoo S.A. provides a repository that can be used with the Fedora distributions. It can be used to install *Odoo Community Edition* by executing the following commands:" +msgstr "" + +#: ../../content/administration/install/install.rst:172 +msgid "At this moment, there is no nightly repository for the Enterprise Edition." +msgstr "" + +#: ../../content/administration/install/install.rst:175 +msgid "Distribution package" +msgstr "" + +#: ../../content/administration/install/install.rst:181 +msgid "Instead of using the repository as described above, the 'deb' packages for both the *Community* and *Enterprise* editions can be downloaded from the `official download page `_." +msgstr "" + +#: ../../content/administration/install/install.rst:186 +msgid "Odoo 15.0 'deb' package currently supports `Debian 11 (Bullseye)`_, `Ubuntu 20.04 (Focal)`_ or above." +msgstr "" + +#: ../../content/administration/install/install.rst:189 +msgid "Next, execute the following commands **as root**:" +msgstr "" + +#: ../../content/administration/install/install.rst:197 +msgid "This will install Odoo as a service, create the necessary PostgreSQL_ user and automatically start the server." +msgstr "" + +#: ../../content/administration/install/install.rst:201 +msgid "The `python3-xlwt` Debian package does not exists in Debian Buster nor Ubuntu 18.04. This python module is needed to export into xls format." +msgstr "" + +#: ../../content/administration/install/install.rst:204 +msgid "If you need the feature, you can install it manually with:" +msgstr "" + +#: ../../content/administration/install/install.rst:210 +msgid "The `num2words` python package does not exists in Debian Buster nor Ubuntu 18.04. Textual amounts will not be rendered by Odoo and this could cause problems with the `l10n_mx_edi` module." +msgstr "" + +#: ../../content/administration/install/install.rst:214 +msgid "If you need this feature, you can install manually with:" +msgstr "" + +#: ../../content/administration/install/install.rst:222 +msgid "Instead of using the repository as described above, the 'rpm' packages for both the *Community* and *Enterprise* editions can be downloaded from the `official download page `_." +msgstr "" + +#: ../../content/administration/install/install.rst:227 +msgid "Odoo 15.0 'rpm' package supports Fedora 34." +msgstr "" + +#: ../../content/administration/install/install.rst:229 +msgid "Once downloaded, the package can be installed using the 'dnf' package manager:" +msgstr "" + +#: ../../content/administration/install/install.rst:240 +msgid "Source install" +msgstr "" + +#: ../../content/administration/install/install.rst:242 +msgid "The source \"installation\" is really about not installing Odoo, and running it directly from source instead." +msgstr "" + +#: ../../content/administration/install/install.rst:245 +msgid "This can be more convenient for module developers as the Odoo source is more easily accessible than using packaged installation (for information or to build this documentation and have it available offline)." +msgstr "" + +#: ../../content/administration/install/install.rst:249 +msgid "It also makes starting and stopping Odoo more flexible and explicit than the services set up by the packaged installations, and allows overriding settings using :ref:`command-line parameters ` without needing to edit a configuration file." +msgstr "" + +#: ../../content/administration/install/install.rst:253 +msgid "Finally it provides greater control over the system's set up, and allows to more easily keep (and run) multiple versions of Odoo side-by-side." +msgstr "" + +#: ../../content/administration/install/install.rst:257 +msgid "Fetch the sources" +msgstr "" + +#: ../../content/administration/install/install.rst:259 +msgid "There are two ways to obtain the source code of Odoo: as a zip **archive** or through **git**." +msgstr "" + +#: ../../content/administration/install/install.rst:262 +msgid "Archive" +msgstr "" + +#: ../../content/administration/install/install.rst:264 +msgid "Community Edition:" +msgstr "" + +#: ../../content/administration/install/install.rst:266 +#: ../../content/administration/install/install.rst:272 +msgid "`Official download page `_" +msgstr "" + +#: ../../content/administration/install/install.rst:267 +msgid "`GitHub repository `_" +msgstr "" + +#: ../../content/administration/install/install.rst:268 +msgid "`Nightly server `_" +msgstr "" + +#: ../../content/administration/install/install.rst:270 +msgid "Enterprise Edition:" +msgstr "" + +#: ../../content/administration/install/install.rst:273 +msgid "`GitHub repository `_" +msgstr "" + +#: ../../content/administration/install/install.rst:278 +msgid "Git" +msgstr "" + +#: ../../content/administration/install/install.rst:280 +msgid "The following requires `Git `_ to be installed on your machine and that you have basic knowledge of Git commands. To clone a Git repository, you must choose between cloning with HTTPS or SSH. If you do not know the difference between the two, the best option is most likely HTTPS. If you are following the :doc:`Getting started ` developer tutorial, or plan on contributing to Odoo source code, choose SSH." +msgstr "" + +#: ../../content/administration/install/install.rst:287 +msgid "**The Enterprise Git repository does not contain the full Odoo source code**. It is only a collection of extra add-ons. The main server code is in the Community version. Running the Enterprise version actually means running the server from the Community version with the addons-path option set to the folder with the Enterprise version. You need to clone both the Community and Enterprise repository to have a working Odoo Enterprise installation. See :ref:`setup/install/editions` to get access to the Enterprise repository." +msgstr "" + +#: ../../content/administration/install/install.rst:300 +#: ../../content/administration/install/install.rst:318 +#: ../../content/administration/install/install.rst:336 +msgid "Clone with HTTPS" +msgstr "" + +#: ../../content/administration/install/install.rst:307 +#: ../../content/administration/install/install.rst:325 +#: ../../content/administration/install/install.rst:343 +msgid "Clone with SSH" +msgstr "" + +#: ../../content/administration/install/install.rst:332 +#: ../../content/administration/install/install.rst:408 +#: ../../content/administration/install/install.rst:475 +#: ../../content/administration/install/install.rst:604 +#: ../../content/administration/install/install.rst:693 +msgid "Mac OS" +msgstr "" + +#: ../../content/administration/install/install.rst:351 +msgid "**The Enterprise git repository does not contain the full Odoo source code**. It is only a collection of extra add-ons. The main server code is in the Community version. Running the Enterprise version actually means running the server from the Community version with the addons-path option set to the folder with the Enterprise version. You need to clone both the Community and Enterprise repository to have a working Odoo Enterprise installation." +msgstr "" + +#: ../../content/administration/install/install.rst:363 +msgid "Python" +msgstr "" + +#: ../../content/administration/install/install.rst:369 +msgid "Odoo requires Python 3.7 or later to run. Visit `Python's download page `_ to download and install the latest version of Python 3 on your machine." +msgstr "" + +#: ../../content/administration/install/install.rst:372 +msgid "During installation, check **Add Python 3 to PATH**, then click **Customize Installation** and make sure that **pip** is checked." +msgstr "" + +#: ../../content/administration/install/install.rst:376 +#: ../../content/administration/install/install.rst:395 +#: ../../content/administration/install/install.rst:414 +msgid "If Python 3 is already installed, make sure that the version is 3.7 or above, as previous versions are not compatible with Odoo." +msgstr "" + +#: ../../content/administration/install/install.rst:383 +#: ../../content/administration/install/install.rst:402 +#: ../../content/administration/install/install.rst:421 +msgid "Verify also that pip_ is installed for this version." +msgstr "" + +#: ../../content/administration/install/install.rst:391 +msgid "Odoo requires Python 3.7 or later to run. Use your package manager to download and install Python 3 on your machine if it is not already done." +msgstr "" + +#: ../../content/administration/install/install.rst:410 +msgid "Odoo requires Python 3.7 or later to run. Use your preferred package manager (homebrew_, macports_) to download and install Python 3 on your machine if it is not already done." +msgstr "" + +#: ../../content/administration/install/install.rst:434 +msgid "Odoo uses PostgreSQL as database management system. `Download and install PostgreSQL `_ (supported version: 10.0 and later)." +msgstr "" + +#: ../../content/administration/install/install.rst:437 +#: ../../content/administration/install/install.rst:463 +#: ../../content/administration/install/install.rst:486 +msgid "By default, the only user is `postgres` but Odoo forbids connecting as `postgres`, so you need to create a new PostgreSQL user:" +msgstr "" + +#: ../../content/administration/install/install.rst:440 +msgid "Add PostgreSQL's `bin` directory (by default: :file:`C:\\\\Program Files\\\\PostgreSQL\\\\\\\\bin`) to your `PATH`." +msgstr "" + +#: ../../content/administration/install/install.rst:442 +msgid "Create a postgres user with a password using the pg admin gui:" +msgstr "" + +#: ../../content/administration/install/install.rst:444 +msgid "Open **pgAdmin**." +msgstr "" + +#: ../../content/administration/install/install.rst:445 +msgid "Double-click the server to create a connection." +msgstr "" + +#: ../../content/administration/install/install.rst:446 +msgid "Select :menuselection:`Object --> Create --> Login/Group Role`." +msgstr "" + +#: ../../content/administration/install/install.rst:447 +msgid "Enter the username in the **Role Name** field (e.g. `odoo`)." +msgstr "" + +#: ../../content/administration/install/install.rst:448 +msgid "Open the **Definition** tab and enter the password (e.g. `odoo`), then click **Save**." +msgstr "" + +#: ../../content/administration/install/install.rst:449 +msgid "Open the **Privileges** tab and switch **Can login?** to `Yes` and **Create database?** to `Yes`." +msgstr "" + +#: ../../content/administration/install/install.rst:454 +msgid "Odoo uses PostgreSQL as database management system. Use your package manager to download and install PostgreSQL (supported version: 10.0 and later)." +msgstr "" + +#: ../../content/administration/install/install.rst:457 +msgid "It can be achieved by executing the following:" +msgstr "" + +#: ../../content/administration/install/install.rst:472 +#: ../../content/administration/install/install.rst:495 +msgid "Because your PostgreSQL user has the same name as your Unix login, you will be able to connect to the database without password." +msgstr "" + +#: ../../content/administration/install/install.rst:477 +msgid "Odoo uses PostgreSQL as database management system. Use `postgres.app `_ to download and install PostgreSQL (supported version: 10.0 and later)." +msgstr "" + +#: ../../content/administration/install/install.rst:482 +msgid "To make the command line tools bundled with `postgres.app` available, make sure to setup your `$PATH` variable by following the `Postgres.app CLI Tools Instructions `_." +msgstr "" + +#: ../../content/administration/install/install.rst:501 +msgid "Dependencies" +msgstr "" + +#: ../../content/administration/install/install.rst:507 +msgid "Before installing the dependencies, you must download and install the `Build Tools for Visual Studio `_. When prompted, select **C++ build tools** in the **Workloads** tab and install them." +msgstr "" + +#: ../../content/administration/install/install.rst:511 +#: ../../content/administration/install/install.rst:606 +msgid "Odoo dependencies are listed in the `requirements.txt` file located at the root of the Odoo community directory." +msgstr "" + +#: ../../content/administration/install/install.rst:515 +#: ../../content/administration/install/install.rst:582 +#: ../../content/administration/install/install.rst:610 +msgid "It can be preferable to not mix python modules packages between different instances of Odoo or with your system. You can use virtualenv_ to create isolated Python environments." +msgstr "" + +#: ../../content/administration/install/install.rst:518 +msgid "Navigate to the path of your Odoo Community installation (`CommunityPath`) and run **pip** on the requirements file in a terminal **with Administrator privileges**:" +msgstr "" + +#: ../../content/administration/install/install.rst:527 +#: ../../content/administration/install/install.rst:594 +#: ../../content/administration/install/install.rst:634 +msgid "For languages with right-to-left interface (such as Arabic or Hebrew), the package `rtlcss` is needed:" +msgstr "" + +#: ../../content/administration/install/install.rst:530 +msgid "Download and install `nodejs `_." +msgstr "" + +#: ../../content/administration/install/install.rst:531 +#: ../../content/administration/install/install.rst:598 +#: ../../content/administration/install/install.rst:638 +msgid "Install `rtlcss`:" +msgstr "" + +#: ../../content/administration/install/install.rst:537 +msgid "Edit the System Environment's variable `PATH` to add the folder where `rtlcss.cmd` is located (typically: :file:`C:\\\\Users\\\\\\\\AppData\\\\Roaming\\\\npm\\\\`)." +msgstr "" + +#: ../../content/administration/install/install.rst:542 +msgid "Using your **distribution packages** is the preferred way of installing dependencies. Alternatively, you can install the python dependencies with **pip**." +msgstr "" + +#: ../../content/administration/install/install.rst:549 +msgid "For Debian-based systems, the packages are listed in the `debian/control `_ file of the Odoo sources." +msgstr "" + +#: ../../content/administration/install/install.rst:552 +msgid "On Debian/Ubuntu, the following commands should install the required packages:" +msgstr "" + +#: ../../content/administration/install/install.rst:559 +msgid "Install with pip" +msgstr "" + +#: ../../content/administration/install/install.rst:561 +msgid "As some of the python packages need a compilation step, they require system libraries to be installed." +msgstr "" + +#: ../../content/administration/install/install.rst:564 +msgid "On Debian/Ubuntu-based systems, the following command should install these required libraries:" +msgstr "" + +#: ../../content/administration/install/install.rst:571 +msgid "Odoo dependencies are listed in the :file:`requirements.txt` file located at the root of the Odoo community directory." +msgstr "" + +#: ../../content/administration/install/install.rst:0 +msgid "The python packages in :file:`requirements.txt` are based on their stable/LTS Debian/Ubuntu corresponding version at the moment of the Odoo release." +msgstr "" + +#: ../../content/administration/install/install.rst:0 +msgid "E.g., for Odoo 15.0, the `python3-babel` package version is 2.8.0 in Debian Bullseye and 2.6.0 in Ubuntu Focal. The lowest version is then chosen in the :file:`requirements.txt`." +msgstr "" + +#: ../../content/administration/install/install.rst:586 +msgid "Navigate to the path of your Odoo Community installation (:file:`CommunityPath`) and run **pip** on the requirements file to install the requirements for the current user." +msgstr "" + +#: ../../content/administration/install/install.rst:597 +msgid "Download and install **nodejs** and **npm** with your package manager." +msgstr "" + +#: ../../content/administration/install/install.rst:613 +msgid "Navigate to the path of your Odoo Community installation (`CommunityPath`) and run **pip** on the requirements file:" +msgstr "" + +#: ../../content/administration/install/install.rst:623 +msgid "Non-Python dependencies need to be installed with a package manager:" +msgstr "" + +#: ../../content/administration/install/install.rst:625 +msgid "Download and install the **Command Line Tools**:" +msgstr "" + +#: ../../content/administration/install/install.rst:631 +msgid "Download and install the package manager of your choice (homebrew_, macports_)." +msgstr "" + +#: ../../content/administration/install/install.rst:632 +msgid "Install non-python dependencies." +msgstr "" + +#: ../../content/administration/install/install.rst:637 +msgid "Download and install **nodejs** with your preferred package manager (homebrew_, macports_)." +msgstr "" + +#: ../../content/administration/install/install.rst:650 +msgid "Running Odoo" +msgstr "" + +#: ../../content/administration/install/install.rst:652 +msgid "Once all dependencies are set up, Odoo can be launched by running `odoo-bin`, the command-line interface of the server. It is located at the root of the Odoo Community directory." +msgstr "" + +#: ../../content/administration/install/install.rst:655 +msgid "To configure the server, you can either specify :ref:`command-line arguments ` or a :ref:`configuration file `." +msgstr "" + +#: ../../content/administration/install/install.rst:659 +msgid "For the Enterprise edition, you must add the path to the `enterprise` addons to the `addons-path` argument. Note that it must come before the other paths in `addons-path` for addons to be loaded correctly." +msgstr "" + +#: ../../content/administration/install/install.rst:663 +msgid "Common necessary configurations are:" +msgstr "" + +#: ../../content/administration/install/install.rst:665 +msgid "PostgreSQL user and password." +msgstr "" + +#: ../../content/administration/install/install.rst:666 +msgid "Custom addon paths beyond the defaults, to load your own modules." +msgstr "" + +#: ../../content/administration/install/install.rst:668 +msgid "A typical way to run the server would be:" +msgstr "" + +#: ../../content/administration/install/install.rst:679 +msgid "Where `CommunityPath` is the path of the Odoo Community installation, `dbuser` is the PostgreSQL login, `dbpassword` is the PostgreSQL password, and `mydb` is the name of the PostgreSQL database." +msgstr "" + +#: ../../content/administration/install/install.rst:690 +#: ../../content/administration/install/install.rst:700 +msgid "Where `CommunityPath` is the path of the Odoo Community installation, and `mydb` is the name of the PostgreSQL database." +msgstr "" + +#: ../../content/administration/install/install.rst:703 +msgid "After the server has started (the INFO log `odoo.modules.loading: Modules loaded.` is printed), open http://localhost:8069 in your web browser and log in with the base administrator account: Use `admin` for the :guilabel:`Email` and, again, `admin` for the :guilabel:`Password`. That's it, you just logged into your own Odoo database!" +msgstr "" + +#: ../../content/administration/install/install.rst:709 +msgid "From there, you can create and manage new :doc:`users `." +msgstr "" + +#: ../../content/administration/install/install.rst:711 +msgid "The user account you use to log into Odoo's web interface differs from the :option:`--db_user ` CLI argument." +msgstr "" + +#: ../../content/administration/install/install.rst:715 +msgid ":doc:`The exhaustive list of CLI arguments for odoo-bin `." +msgstr "" + +#: ../../content/administration/install/install.rst:720 +#: ../../content/administration/maintain/update.rst:147 +msgid "Docker" +msgstr "" + +#: ../../content/administration/install/install.rst:722 +msgid "The full documentation on how to use Odoo with Docker can be found on the official Odoo `docker image `_ page." +msgstr "" + +#: ../../content/administration/maintain.rst:5 +msgid "Maintain" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:3 +msgid "Domain names" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:5 +msgid "A **domain name** works as an address for your website. It makes the Internet much more accessible as it allows users to type a meaningful web address, such as ``www.odoo.com``, rather than its server's IP address with a series of numbers." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:9 +msgid "You can use a custom domain name to access your Odoo database and websites:" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:11 +msgid "By :ref:`registering a free domain name with Odoo ` (for Odoo Online databases)" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:13 +msgid "By :ref:`configuring a custom domain that you already own `." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:16 +msgid "Odoo Online and Odoo.sh databases, including their websites, use by default a subdomain of ``odoo.com`` for both the URL and the emails (e.g., ``https://example.odoo.com``)." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:20 +msgid "Odoo offers a :ref:`free custom domain name ` to all Odoo Online databases for one year. Visitors can then access your website with an address such as ``www.example.com`` rather than the default ``example.odoo.com``." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:25 +msgid "`Odoo Tutorials: Register a Free Domain Name `_" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:27 +msgid "`Odoo Quick Tips: Get a free domain name! `_" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:32 +msgid "About domain names" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:34 +msgid "Having a **good domain name** is as important to your branding as the name of your business or organization as it is the first thing your visitors will notice. We recommend you keep them *simple, short, easy to remember and spell*." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:38 +msgid "A **subdomain** is a domain that is a part of another domain. It often refers to the additional part that comes before the main domain name. Traditionally, most websites use the ``www.`` subdomain, but any string of letters can be used as well. You can use subdomains to direct your visitors to other websites than your main website or to specific pages (e.g., ``experience.odoo.com`` points to a specific page.)" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:44 +msgid "All domain names are referenced in the **Domain Name System**, or **DNS**, which works as a giant directory for the Internet. There are many DNS servers, so any modification to the DNS can take up to 72 hours to propagate worldwide on all servers." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:51 +msgid "Register a free domain name with Odoo" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:53 +msgid "You can register a domain name for your Odoo Online database directly from Odoo Website or your database manager." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:57 +msgid "Your domain name is **free for one year** if you register it with Odoo!" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:58 +msgid "The domain name is registered with `Gandi `_, the domain name registrar." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:60 +msgid "You are the owner of the domain name and can use it for other purposes." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:61 +msgid "Odoo manages payment and technical support for you." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:62 +msgid "This offer doesn't include any mailbox. However, you can :ref:`configure your MX records ` to use your own email server or solution such as Google Workspace." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:65 +msgid "To do so, go to :menuselection:`Website --> Domain Name`. Alternatively, open your `database manager `_, click on the :guilabel:`settings` button next to your database, then on :guilabel:`Domain names`." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:None +msgid "Clicking on Domain Names from an Odoo website" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:73 +msgid "Search for the domain name of your choice to check its availability, then select the one you want to register for your website." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:None +msgid "The search of the domain name example.com shows which associated domains are available." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:80 +msgid "Next, fill in the form with your information to become the domain name owner." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:82 +msgid "Your domain name is directly linked to your database, but you still have to :ref:`map your domain name with your website `." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:86 +msgid "Free domain names are also available for free Odoo Online databases (if you installed one app only, for example). In this case, Odoo reviews your request and your website to avoid abuse. This process may take up to three days." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:89 +msgid "This is not available for Odoo.sh databases yet." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:94 +msgid "Manage your domain name registered with Odoo" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:96 +msgid "To manage the DNS records of your domain name registered with Odoo or to visualize the contacts associated with it, open your `database manager `_, click on the :guilabel:`settings` button next to your database, on :guilabel:`Domain names`, and then on :guilabel:`Contacts` or :guilabel:`DNS`." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:None +msgid "Management of the domain names linked to an Odoo database" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:106 +msgid "Please `submit a support ticket `_ if you need further assistance to manage your domain name." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:112 +msgid "Configure your existing domain name" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:114 +msgid "If you already own a domain name, you can use it to point to your website." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:116 +msgid "To avoid any issue with the :ref:`SSL certificate validation `, we highly recommend that you proceed with the following actions in this order:" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:119 +msgid ":ref:`Add a CNAME record ` on your domain name's DNS zone." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:120 +msgid ":ref:`Map your domain name with your Odoo database `." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:121 +msgid ":ref:`Map your domain name with your Odoo website `." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:126 +msgid "Add a CNAME record" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:128 +msgid "A **CNAME record** is a type of DNS record that points to the IP address of another website rather than to directly to an IP address." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:131 +msgid "You need a CNAME record that points to your Odoo database. The requirements are detailed in your database manager." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:136 +#: ../../content/administration/maintain/domain_names.rst:206 +#: ../../content/administration/maintain/supported_versions.rst:26 +msgid "Odoo Online" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:138 +msgid "The target address is the current address of your database, as defined at its creation (e.g., ``example.odoo.com``)" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:141 +#: ../../content/administration/maintain/domain_names.rst:220 +#: ../../content/administration/maintain/supported_versions.rst:26 +#: ../../content/administration/odoo_sh.rst:5 +#: ../../content/administration/upgrade/odoo_sh.rst:3 +msgid "Odoo.sh" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:143 +msgid "Your project's main address is defined in :menuselection:`Settings --> Project Name`." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:145 +msgid "If you want to target a specific branch (production, staging or development), go to :menuselection:`Branches --> select your branch --> Settings --> Custom domains`, and click on :guilabel:`How to set up my domain?`. A message indicates which address your CNAME record should target." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:150 +#: ../../content/administration/maintain/domain_names.rst:192 +msgid "Open your domain name's manager dashboard." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:151 +msgid "Open the **DNS zone** management page for the domain name you want to configure." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:152 +msgid "Create a **CNAME record** pointing to the address of your database." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:154 +msgid "While Odoo suggests creating a CNAME record for your ``www.`` subdomain (``www.example.com``, you can of course use any domain name of your choice, with any subdomain (e.g., ``anything.example.com``)." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:159 +msgid "You own the domain name ``example.com``, and you have an Odoo Online database at the address ``example.odoo.com``. You want to access your Odoo database primarily with the domain ``www.example.com`` but also with the :ref:`naked domain ` ``example.com``." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:164 +msgid "To do so, you create a CNAME record for the ``www`` subdomain, with ``example.odoo.com`` as the target. The DNS zone manager generates the following rule and adds it to your DNS zone: ``www IN CNAME example.odoo.com.``" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:168 +msgid "You also create a redirection from ``example.com`` to ``wwww.example.com``." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:170 +msgid "Your new DNS records are propagated to all DNS servers." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:173 +msgid "Here are some specific guidelines to create a CNAME record:" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:175 +msgid "`GoDaddy `_" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:176 +msgid "`Namecheap `_" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:177 +msgid "`OVH `_" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:178 +msgid "`CloudFlare `_" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:179 +msgid "`Google Domains `_" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:184 +msgid "Naked domain" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:186 +msgid "A **naked domain** is a domain name that doesn't have any subdomain at the beginning of the address (e.g., ``odoo.com`` instead of ``www.odoo.com``)." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:189 +msgid "You may want your naked domain to redirect to your website as some visitors may not type the full domain name to access your website." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:193 +msgid "Create a **redirection** from the naked domain (``example.com``) to your main domain name (``www.example.com``)." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:197 +msgid "Depending on your domain name registrar, this redirection may be already pre-configured." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:202 +msgid "Map your domain name with your Odoo database" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:208 +msgid "Open your `database manager `_, click on the :guilabel:`settings` button next to your database, on :guilabel:`Domain names`, and then on :guilabel:`Use my own domain` at the bottom of the right column." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:212 +msgid "Type the domain name you want to add to this database, then click on :guilabel:`Verify` to check if the CNAME record is correctly configured. Once done, click on :guilabel:`I confirm, it's done`." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:0 +msgid "Verification of the CNAME records of a domain name before mapping it with a database" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:222 +msgid "Go to :menuselection:`Branches --> select your branch --> Settings --> Custom domains`, type the domain name you want to add to this database, then click on :guilabel:`Add domain`." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:0 +msgid "Mapping a domain name with an Odoo.sh branch" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:230 +msgid ":ref:`Odoo.sh branches: settings tab `" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:233 +msgid "Make sure to :ref:`add a CNAME record ` to your domain name's DNS **before** mapping your domain name with your Odoo database." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:236 +msgid "Failing to do so may impede the validation of the :ref:`SSL certificate ` and would result in a *certificate name mismatch* error. This is often displayed by web browsers as a warning such as *\"Your connection is not private\"*." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:240 +msgid "If this is the case and you have added the domain name to your database's settings less than five days ago, wait 24 hours as the validation may still happen. Otherwise, please `submit a support ticket `_ including screenshots of your CNAME records." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:247 +msgid "SSL encryption (HTTPS protocol)" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:249 +msgid "**SSL encryption** is an encryption-based Internet security protocol. It allows your visitors to navigate your website through a secure connection, which appears as an ``https://`` protocol at the beginning of your web address, rather than a non-secure ``http://`` protocol." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:253 +msgid "Odoo generates a separate SSL certificate for each domain :ref:`mapped in the database manager `, using integration with `Let's Encrypt Certificate Authority and ACME protocol `_." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:258 +msgid "The certificate generation may take up to 24h." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:259 +msgid "Several attempts to validate your certificate are made during the five days following the moment you add your domain name in your database's settings." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:261 +msgid "If you already use another service, you can keep using it or simply change for Odoo." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:266 +msgid "Web base URL of a database" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:269 +msgid "If you have Odoo Website, you can disregard this part and directly :ref:`map your domain name with your website `." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:272 +msgid "The **web base URL** of a database, or **root URL** affects your main website address and all the links sent to your customers (e.g., quotations, portal links, etc.)." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:275 +msgid "To configure it, access your Odoo database with your custom address, then log in as an administrator of your database (any user in the *Settings* group) from the login screen." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:279 +msgid "Connecting to your database with the original Odoo subdomain address (e.g., ``example.odoo.com`` also updates the web base URL of your database. See below to prevent these automatic updates." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:282 +msgid "Alternatively, you can do it manually. To do so, activate the :ref:`developer mode `, then go to :menuselection:`Settings --> Technical --> System Parameters`." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:285 +msgid "Find the key called ``web.base.url`` (or create it if it does not exist) and enter the full address of your website as value, such as ``https://www.example.com``." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:289 +msgid "The URL must include the protocol ``https://`` (or ``http://``) and must not end with a slash (``/``)." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:292 +msgid "To prevent the automatic update of the web base URL when an administrator logs in the database, you can create the following System Parameter:" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:295 +msgid "key: ``web.base.url.freeze``" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:296 +msgid "value: ``True``" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:301 +msgid "Map your domain name with your website" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:303 +msgid "Mapping your domain name to your website isn't the same as mapping it with your database:" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:305 +msgid "It defines your domain name as the main one for your website, helping search engines to index your website properly." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:307 +msgid "It defines your domain name as the base URL for your database, including the portal links sent by email to your customers." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:309 +msgid "If you have multiple websites, it maps your domain name with the appropriate website." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:311 +msgid "Go to :menuselection:`Website --> Configuration --> Settings --> Website Info`. If you have multiple websites, select the one you want to configure." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:314 +msgid "In the :guilabel:`Domain` field, fill in the web address of your website (e.g., ``https://www.example.com``) and click on :guilabel:`Save`." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:None +msgid "Configuring https://www.example.com as the Domain of the website" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:322 +msgid "Mapping your domain name with your Odoo website prevents Google from indexing both your custom domain name ``www.example.com`` and your original odoo database address ``example.odoo.com``." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:325 +msgid "If both addresses are already indexed, it may take some time before Google removes the indexation of the second address. You may also try using the `Google Search Console `_ to fix this." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:330 +msgid "If you have multiple websites and companies on your database, make sure that you select the right :guilabel:`Company` in the website settings, next to the :guilabel:`Domain` settings. Doing so indicates Odoo which URL to use as the :ref:`base URL ` according to the company in use." +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:336 +msgid ":doc:`/applications/general/email_communication/email_servers`" +msgstr "" + +#: ../../content/administration/maintain/enterprise.rst:6 +msgid "Upgrade Community to Enterprise" +msgstr "" + +#: ../../content/administration/maintain/enterprise.rst:8 +msgid "Depending on your current installation, there are multiple ways to upgrade your community version. In any case the basic guidelines are:" +msgstr "" + +#: ../../content/administration/maintain/enterprise.rst:12 +#: ../../content/administration/maintain/enterprise.rst:31 +#: ../../content/administration/maintain/enterprise.rst:63 +#: ../../content/administration/maintain/enterprise.rst:80 +msgid "Backup your community database" +msgstr "" + +#: ../../content/administration/maintain/enterprise.rst:17 +#: ../../content/administration/maintain/enterprise.rst:62 +msgid "Shutdown your server" +msgstr "" + +#: ../../content/administration/maintain/enterprise.rst:19 +msgid "Install the web_enterprise module" +msgstr "" + +#: ../../content/administration/maintain/enterprise.rst:21 +msgid "Restart your server" +msgstr "" + +#: ../../content/administration/maintain/enterprise.rst:23 +msgid "Enter your Odoo Enterprise Subscription code" +msgstr "" + +#: ../../content/administration/maintain/enterprise.rst:29 +msgid "On Linux, using an installer" +msgstr "" + +#: ../../content/administration/maintain/enterprise.rst:33 +msgid "Stop the odoo service" +msgstr "" + +#: ../../content/administration/maintain/enterprise.rst:39 +msgid "Install the enterprise .deb (it should install over the community package)" +msgstr "" + +#: ../../content/administration/maintain/enterprise.rst:45 +msgid "Update your database to the enterprise packages using" +msgstr "" + +#: ../../content/administration/maintain/enterprise.rst:51 +msgid "You should be able to connect to your Odoo Enterprise instance using your usual mean of identification. You can then link your database with your Odoo Enterprise Subscription by entering the code you received by e-mail in the form input" +msgstr "" + +#: ../../content/administration/maintain/enterprise.rst:57 +msgid "On Linux, using the source code" +msgstr "" + +#: ../../content/administration/maintain/enterprise.rst:59 +msgid "There are many ways to launch your server when using sources, and you probably have your own favourite. You may need to adapt sections to your usual workflow." +msgstr "" + +#: ../../content/administration/maintain/enterprise.rst:64 +msgid "Update the ``--addons-path`` parameter of your launch command (see :ref:`setup/install/source`)" +msgstr "" + +#: ../../content/administration/maintain/enterprise.rst:65 +msgid "Install the web_enterprise module by using" +msgstr "" + +#: ../../content/administration/maintain/enterprise.rst:71 +msgid "Depending on the size of your database, this may take some time." +msgstr "" + +#: ../../content/administration/maintain/enterprise.rst:73 +msgid "Restart your server with the updated addons path of point 3. You should be able to connect to your instance. You can then link your database with your Odoo Enterprise Subscription by entering the code you received by e-mail in the form input" +msgstr "" + +#: ../../content/administration/maintain/enterprise.rst:78 +msgid "On Windows" +msgstr "" + +#: ../../content/administration/maintain/enterprise.rst:82 +msgid "Uninstall Odoo Community (using the Uninstall executable in the installation folder) - PostgreSQL will remain installed" +msgstr "" + +#: ../../content/administration/maintain/enterprise.rst:88 +msgid "Launch the Odoo Enterprise Installer and follow the steps normally. When choosing the installation path, you can set the folder of the Community installation (this folder still contains the PostgreSQL installation). Uncheck ``Start Odoo`` at the end of the installation" +msgstr "" + +#: ../../content/administration/maintain/enterprise.rst:96 +msgid "Using a command window, update your Odoo Database using this command (from the Odoo installation path, in the server subfolder)" +msgstr "" + +#: ../../content/administration/maintain/enterprise.rst:103 +msgid "No need to manually launch the server, the service is running. You should be able to connect to your Odoo Enterprise instance using your usual mean of identification. You can then link your database with your Odoo Enterprise Subscription by entering the code you received by e-mail in the form input" +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:3 +msgid "Connect Gmail to Odoo using Google OAuth" +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:5 +msgid "Odoo is compatible with Google's OAuth for Gmail. In order to send secure emails from a custom domain, all that is required is to configure a few settings on Google's *Workspace* platform, as well as on the back end of the Odoo database. This configuration works by using either a personal email address or an address created by a custom domain." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:11 +msgid "For more information, visit `Google's documentation `_ on setting up OAuth." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:15 +msgid "Setup in Google" +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:18 +msgid "Create a new project" +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:20 +msgid "To get started, go to the `Google API Platform `_. Log in with your *Google Workspace* account if you have one, otherwise log in with your personal Gmail account (this should match the email address you want to configure in Odoo)." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:25 +msgid "After that, click on :guilabel:`Create Project`, located on the far right of the OAuth consent screen. If a project has already been created in this account, then the :guilabel:`New Project` option will be located on the top left under the :guilabel:`Select a project` drop-down menu." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:29 +msgid "On the :guilabel:`New Project` screen, rename the :guilabel:`Project name` to `Odoo` and browse for the :guilabel:`Location`. Set the :guilabel:`Location` as the `Google Workspace` organization. If you are using a personal Gmail account, then leave the :guilabel:`Location` as `No Organization`." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:None +msgid "Project Name and Location for Google Oauth." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:37 +msgid "Click on :guilabel:`Create` to finish this step. On the next screen, :guilabel:`User Type` options, select the :guilabel:`External` option, and then click on :guilabel:`Create` again, which will finally navigate to the :guilabel:`Edit app registration` page." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:42 +msgid "Edit app registration" +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:44 +msgid "On the :guilabel:`Oauth consent screen` step, under the :guilabel:`App information` section, enter `Odoo` in the :guilabel:`App name` field. Select the organization's email address under the :guilabel:`User support` email field." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:47 +msgid "Next, under :menuselection:`App Domain --> Authorized domains`, click on :guilabel:`Add Domain` and enter `odoo.com`." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:49 +msgid "After that, under the :guilabel:`Developer contact information` section, enter the organization's email address. Google uses this email address to notify the organization about any changes to your project." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:52 +msgid "Next, click on the :guilabel:`Save and Continue` button." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:53 +msgid "Then, skip the :guilabel:`Scopes` page by scrolling to the bottom and clicking on :guilabel:`Save and Continue`." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:55 +msgid "Next, add the email being configured under the :guilabel:`Test users` step by clicking on :guilabel:`Add Users` and then the :guilabel:`Save and Continue` button. A summary of the :guilabel:`App registration` appears." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:58 +msgid "Finally, scroll to the bottom and click on :guilabel:`Back to Dashboard`." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:61 +msgid "Create Credentials" +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:63 +msgid "Now that you have set up the project, you need to create credentials, which includes the :guilabel:`Client ID` and :guilabel:`Client Secret`. First, click on :guilabel:`Credentials` in the left sidebar menu." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:67 +msgid "Then, click on :guilabel:`Create Credentials` in the top menu and select :guilabel:`OAuth client ID` from the dropdown menu." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:70 +msgid "Under :guilabel:`Application Type`, select :guilabel:`Web Application` from the dropdown menu." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:71 +msgid "In the :guilabel:`Client ID` field, enter `Odoo`." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:72 +msgid "Under the :guilabel:`Authorized redirect URIs` label, click the button :guilabel:`ADD URI`, and then input `https://yourdbname.odoo.com/google_gmail/confirm` in the :guilabel:`URIs 1` field. Be sure to replace the *yourdbname* part of the URL with your actual Odoo database name." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:75 +msgid "Next, click on :guilabel:`Create` to generate an OAuth :guilabel:`Client ID` and :guilabel:`Client Secret`. Finally, copy each generated value for later use when configuring in Odoo, and then navigate to the Odoo database." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:None +msgid "Client ID and Client Secret for Google OAuth." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:84 +msgid "Setup in Odoo" +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:87 +msgid "Enter Google Credentials" +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:89 +msgid "First, open Odoo and navigate to the :guilabel:`Apps` module. Then, remove the :guilabel:`Apps` filter from the search bar and type in `Google`. Install the module called :guilabel:`Google Gmail`." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:92 +msgid "Next, navigate to :menuselection:`Settings --> General Settings`, and under the :guilabel:`Discuss` section, ensure that the checkbox for :guilabel:`Custom Email Servers` is checked. This populates a new option for :guilabel:`Gmail Credentials`. Then, copy and paste the :guilabel:`Client ID` and :guilabel:`Client Secret` into the respective fields and :guilabel:`Save` the settings." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:98 +msgid "Configure outgoing email server" +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:100 +msgid "After that, on the :guilabel:`General Settings` page, under :guilabel:`Custom Email Servers`, click :guilabel:`Outgoing Email Servers` to configure the external Gmail account." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:None +#: ../../content/administration/maintain/google_oauth.rst:None +msgid "Configure Outgoing Email Servers in Odoo." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:107 +msgid "Then, :guilabel:`Create` a new email server and select the option for :guilabel:`Gmail`. Next, fill in the :guilabel:`Description` (can be anything) and the email :guilabel:`Username` and click on :guilabel:`Connect your Gmail account`." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:111 +msgid "A new window from :guilabel:`Google` opens to complete the authorization process. Select the appropriate email address that is being configured in Odoo." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:114 +msgid "If the email address is a personal account, an extra step pops up, click :guilabel:`Continue` to allow the verification and connect the Gmail account to Odoo." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:117 +msgid "Then, allow Odoo to access the Google account by clicking on :guilabel:`Continue` or :guilabel:`Allow`. After that, the page navigates back to the newly configured outgoing email server in Odoo. The configuration automatically loads the token in Odoo, and a tag stating :guilabel:`Gmail Token Valid` appears in green." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:126 +msgid "Finally, save the settings and :guilabel:`Test the Connection`. A confirmation message should appear. The Odoo database can now send safe, secure emails through Google using OAuth authentication." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:131 +msgid "Google OAuth FAQ" +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:134 +msgid "Production VS Testing Publishing Status" +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:136 +msgid "Choosing :guilabel:`Production` as the :guilabel:`Publishing Status` (instead of Testing) will display the following warning message:" +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:None +msgid "OAuth is Limited to 100 Sensitive Scope Logins." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:143 +msgid "To correct this warning, navigate to the `Google API Platform `_. If the :guilabel:`Publishing status` is :guilabel:`In Production`, click :guilabel:`Back to Testing` to correct the issue." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:148 +msgid "No Test Users Added" +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:150 +msgid "If no test users are added to the OAuth consent screen, then a 403 access denied error will populate." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:None +msgid "403 Access Denied Error." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:157 +msgid "To correct this error, return to the :guilabel:`OAuth consent screen` under :guilabel:`APIs & Services` and add test user(s) to the app. Add the email that you are configuring in Odoo." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:162 +msgid "Gmail Module not updated" +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:164 +msgid "If the :guilabel:`Gmail Module` in Odoo has not been updated to the latest version, then a :guilabel:`Forbidden` error message populates." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:None +msgid "Forbidden you don't have the permission to access the requested resource." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:171 +msgid "To correct this error, go to the :guilabel:`Apps` module and clear out the search terms. Then, search for `Gmail` or `Google` and upgrade the :guilabel:`Google Gmail` module. Finally, click on the three dots on the upper right of the module and select :guilabel:`Upgrade`." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:176 +msgid "Application Type" +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:178 +msgid "When creating the :guilabel:`Credentials` (OAuth Client ID and Client Secret), if :guilabel:`Desktop App` is selected for the :guilabel:`Application Type`, an :guilabel:`Authorization Error` appears." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:None +msgid "Error 400 Redirect URI Mismatch." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:186 +msgid "To correct this error, delete the credentials already created and create new credentials, selecting :guilabel:`Web Application` for the :guilabel:`Application Type`. Then, under :guilabel:`Authorized redirect URIs`, click :guilabel:`ADD URI` and type: `https://yourdbname.odoo.com/google_gmail/confirm` in the field." +msgstr "" + +#: ../../content/administration/maintain/google_oauth.rst:192 +msgid "Replace *yourdbname* in the URL with the Odoo database name." +msgstr "" + +#: ../../content/administration/maintain/hosting_changes.rst:6 +msgid "Change hosting solution" +msgstr "" + +#: ../../content/administration/maintain/hosting_changes.rst:8 msgid "You may want to move your Odoo database from one hosting solution to another. Depending on the platforms, you have to do it by yourself or contact our support team first." msgstr "" -#: ../../content/administration/db_management/hosting_changes.rst:12 +#: ../../content/administration/maintain/hosting_changes.rst:12 msgid "From on-premises to Odoo Online" msgstr "" -#: ../../content/administration/db_management/hosting_changes.rst:14 -#: ../../content/administration/db_management/hosting_changes.rst:48 -msgid "Odoo Online is not compatible with **non-standard apps**." -msgstr "" - -#: ../../content/administration/db_management/hosting_changes.rst:16 +#: ../../content/administration/maintain/hosting_changes.rst:14 msgid "Create a :ref:`duplicate ` of your database: in this duplicate, uninstall all the **non-standard apps**." msgstr "" -#: ../../content/administration/db_management/hosting_changes.rst:17 +#: ../../content/administration/maintain/hosting_changes.rst:15 msgid "Grab a \"dump with filestore\" of your database by using the Database Manager." msgstr "" -#: ../../content/administration/db_management/hosting_changes.rst:18 -#: ../../content/administration/db_management/hosting_changes.rst:51 +#: ../../content/administration/maintain/hosting_changes.rst:16 msgid "**If you have time constraints, contact us earlier to schedule the transfer.**" msgstr "" -#: ../../content/administration/db_management/hosting_changes.rst:19 -#: ../../content/administration/db_management/hosting_changes.rst:52 +#: ../../content/administration/maintain/hosting_changes.rst:17 msgid "`Create a support ticket `_ and attach the dump (if the file is too large, use any file transfer service and attach the link to your ticket). Also include your subscription number and the URL you want to use for your database (e.g.: my-company.odoo.com)." msgstr "" -#: ../../content/administration/db_management/hosting_changes.rst:20 -#: ../../content/administration/db_management/hosting_changes.rst:53 +#: ../../content/administration/maintain/hosting_changes.rst:18 +#: ../../content/administration/maintain/hosting_changes.rst:66 msgid "We will make sure your database is compatible and upload it to our cloud. In case of technical issues, we will get in touch with you." msgstr "" -#: ../../content/administration/db_management/hosting_changes.rst:21 -#: ../../content/administration/db_management/hosting_changes.rst:54 +#: ../../content/administration/maintain/hosting_changes.rst:19 msgid "It's done!" msgstr "" -#: ../../content/administration/db_management/hosting_changes.rst:24 +#: ../../content/administration/maintain/hosting_changes.rst:22 +#: ../../content/administration/maintain/hosting_changes.rst:71 +msgid "Odoo Online is not compatible with **non-standard apps**." +msgstr "" + +#: ../../content/administration/maintain/hosting_changes.rst:23 +msgid "The database you are moving to Odoo Online must be in a :doc:`supported version `." +msgstr "" + +#: ../../content/administration/maintain/hosting_changes.rst:27 msgid "From on-premises to Odoo.sh" msgstr "" -#: ../../content/administration/db_management/hosting_changes.rst:26 -#: ../../content/administration/db_management/hosting_changes.rst:43 +#: ../../content/administration/maintain/hosting_changes.rst:29 +#: ../../content/administration/maintain/hosting_changes.rst:46 msgid "Follow the :ref:`Import your database section of the Odoo.sh documentation `." msgstr "" -#: ../../content/administration/db_management/hosting_changes.rst:27 +#: ../../content/administration/maintain/hosting_changes.rst:30 msgid "...and voilà!" msgstr "" -#: ../../content/administration/db_management/hosting_changes.rst:30 +#: ../../content/administration/maintain/hosting_changes.rst:33 msgid "From Odoo Online to on-premises" msgstr "" -#: ../../content/administration/db_management/hosting_changes.rst:32 -#: ../../content/administration/db_management/hosting_changes.rst:40 +#: ../../content/administration/maintain/hosting_changes.rst:35 +#: ../../content/administration/maintain/hosting_changes.rst:43 msgid "Log into `your Odoo Online user portal `_ and look for the version number of your database." msgstr "" -#: ../../content/administration/db_management/hosting_changes.rst:33 +#: ../../content/administration/maintain/hosting_changes.rst:36 msgid "If your database does not run a :ref:`major version ` of Odoo, you cannot host it on-premises yet, you have to upgrade it first to a new major version. (*e.g.: If your database runs Odoo 12.3 which is not a major version, you have to upgrade it first to Odoo 13.0 or 14.0.*)" msgstr "" -#: ../../content/administration/db_management/hosting_changes.rst:34 -#: ../../content/administration/db_management/hosting_changes.rst:42 +#: ../../content/administration/maintain/hosting_changes.rst:37 +#: ../../content/administration/maintain/hosting_changes.rst:45 msgid "Download a backup of your database by clicking on the \"Gear\" icon next to your database name then :menuselection:`Download` (if the download fails due to your backup file being too large, contact `our support `_)" msgstr "" -#: ../../content/administration/db_management/hosting_changes.rst:35 -#: ../../content/administration/db_management/hosting_changes.rst:60 +#: ../../content/administration/maintain/hosting_changes.rst:38 +#: ../../content/administration/maintain/hosting_changes.rst:87 msgid "Restore it from the database manager on your local server." msgstr "" -#: ../../content/administration/db_management/hosting_changes.rst:38 +#: ../../content/administration/maintain/hosting_changes.rst:41 msgid "From Odoo Online to Odoo.sh" msgstr "" -#: ../../content/administration/db_management/hosting_changes.rst:41 +#: ../../content/administration/maintain/hosting_changes.rst:44 msgid "If your database does not run a :ref:`major version ` of Odoo, you cannot host it on Odoo.sh yet, you have to upgrade it first to a new major version. (*e.g.: If your database runs Odoo 12.3 which is not a major version, you have to upgrade it first to Odoo 13.0 or 14.0.*)" msgstr "" -#: ../../content/administration/db_management/hosting_changes.rst:46 +#: ../../content/administration/maintain/hosting_changes.rst:49 msgid "From Odoo.sh to Odoo Online" msgstr "" -#: ../../content/administration/db_management/hosting_changes.rst:50 -msgid "Uninstall all the **non-standard apps**: test it in a staging build first, then do it in your production build." +#: ../../content/administration/maintain/hosting_changes.rst:51 +msgid "Uninstall all the **non-standard apps**." msgstr "" -#: ../../content/administration/db_management/hosting_changes.rst:57 +#: ../../content/administration/maintain/hosting_changes.rst:52 +msgid "`Create a support ticket `_ and include the following:" +msgstr "" + +#: ../../content/administration/maintain/hosting_changes.rst:54 +msgid "Your subscription number" +msgstr "" + +#: ../../content/administration/maintain/hosting_changes.rst:55 +msgid "The URL you want to use for your database (e.g., `example.odoo.com`)" +msgstr "" + +#: ../../content/administration/maintain/hosting_changes.rst:56 +msgid "Which branch you want to migrate" +msgstr "" + +#: ../../content/administration/maintain/hosting_changes.rst:57 +msgid "In which region you want to be hosted:" +msgstr "" + +#: ../../content/administration/maintain/hosting_changes.rst:59 +msgid "Americas" +msgstr "" + +#: ../../content/administration/maintain/hosting_changes.rst:60 +msgid "Europe" +msgstr "" + +#: ../../content/administration/maintain/hosting_changes.rst:61 +msgid "Asia" +msgstr "" + +#: ../../content/administration/maintain/hosting_changes.rst:63 +msgid "Which user(s) will be the administrator(s)" +msgstr "" + +#: ../../content/administration/maintain/hosting_changes.rst:64 +msgid "When (and in which timezone) you want the database to be up and running" +msgstr "" + +#: ../../content/administration/maintain/hosting_changes.rst:68 +msgid "All done!" +msgstr "" + +#: ../../content/administration/maintain/hosting_changes.rst:72 +msgid "Make sure to uninstall all the **non-standard apps** in a staging build before doing it in your production build." +msgstr "" + +#: ../../content/administration/maintain/hosting_changes.rst:76 +msgid "Make sure you select the **region** that is closest to your users to reduce latency." +msgstr "" + +#: ../../content/administration/maintain/hosting_changes.rst:77 +msgid "The future **administrator(s)** must have an odoo.com account." +msgstr "" + +#: ../../content/administration/maintain/hosting_changes.rst:78 +msgid "The specific **date and time** at which you want the database to be up and running are mainly helpful to organize the switch from the odoo.sh server to the Odoo Online servers." +msgstr "" + +#: ../../content/administration/maintain/hosting_changes.rst:80 +msgid "Databases are **not reachable** during their migration." +msgstr "" + +#: ../../content/administration/maintain/hosting_changes.rst:81 +msgid "**If you have time constraints, contact us earlier to schedule the transfer**." +msgstr "" + +#: ../../content/administration/maintain/hosting_changes.rst:84 msgid "From Odoo.sh to on-premises" msgstr "" -#: ../../content/administration/db_management/hosting_changes.rst:59 +#: ../../content/administration/maintain/hosting_changes.rst:86 msgid "Grab a :ref:`backup of your Odoo.sh production database `." msgstr "" -#: ../../content/administration/db_upgrade.rst:16 +#: ../../content/administration/maintain/on_premise.rst:3 +msgid "On-premise database management" +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:6 +msgid "Register a database" +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:8 +msgid "To register your database, you just need to enter your Subscription Code in the banner in the App Switcher. Make sure you do not add extra spaces before or after your subscription code. If the registration is successful, it will turn green and will provide you with the Expiration Date of your freshly-registered database. You can check this Expiration Date in the About menu (Odoo 9) or in the Settings Dashboard (Odoo 10)." +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:16 +msgid "Registration Error Message" +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:18 +msgid "If you are unable to register your database, you will likely encounter this message:" +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:None +msgid "Something went wrong while registering your database,\n" +"you can try again or contact Odoo Help" +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:27 +#: ../../content/administration/maintain/on_premise.rst:106 +#: ../../content/administration/maintain/on_premise.rst:134 +msgid "Solutions" +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:29 +msgid "Do you have a valid Enterprise subscription?" +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:31 +msgid "Check if your subscription details get the tag \"In Progress\" on your `Odoo Account `__ or with your Account Manager" +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:35 +msgid "Have you already linked a database with your subscription reference?" +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:37 +msgid "You can link only one database per subscription. (Need a test or a development database? `Find a partner `__)" +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:41 +msgid "You can unlink the old database yourself on your `Odoo Contract `__ with the button \"Unlink database\"" +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:48 +msgid "A confirmation message will appear; make sure this is the correct database as it will be deactivated shortly:" +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:55 +msgid "Do you have the updated version of Odoo 9?" +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:57 +#: ../../content/administration/maintain/on_premise.rst:167 +msgid "From July 2016 onward, Odoo 9 now automatically change the uuid of a duplicated database; a manual operation is no longer required." +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:60 +msgid "If it's not the case, you may have multiple databases sharing the same UUID. Please check on your `Odoo Contract `__, a short message will appear specifying which database is problematic:" +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:69 +msgid "In this case, you need to change the UUID on your test databases to solve this issue. You will find more information about this in :ref:`this section `." +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:72 +msgid "For your information, we identify database with UUID. Therefore, each database should have a distinct UUID to ensure that registration and invoicing proceed effortlessly for your and for us." +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:76 +msgid "Check your network and firewall settings" +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:78 +msgid "The Update notification must be able to reach Odoo's subscription validation servers. In other words, make sure that the Odoo server is able to open outgoing connections towards:" +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:82 +msgid "services.odoo.com on port 443 (or 80)" +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:83 +msgid "services.openerp.com on port 443 (or 80) for older deployments" +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:85 +msgid "Once you activated your database, you must keep these ports open, as the Update notification runs once a week." +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:91 +msgid "Error message due to too many users" +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:93 +msgid "If you have more users in your local database than provisionned in your Odoo Enterprise subscription, you may encounter this message:" +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:None +msgid "This database will expire in X days, you\n" +"have more users than your subscription allows" +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:102 +msgid "When the message appears you have 30 days before the expiration. The countdown is updated everyday." +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:108 +msgid "**Add more users** on your subscription: follow the link and Validate the upsell quotation and pay for the extra users." +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:110 +msgid "**Deactivate users** as explained in this `documentation `_ and **Reject** the upsell quotation." +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:113 +msgid "Once your database has the correct number of users, the expiration message will disappear automatically after a few days, when the next verification occurs. We understand that it can be a bit frightening to see the countdown, so you can :ref:`force an Update Notification ` to make the message disappear right away." +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:120 +msgid "Database expired error message" +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:122 +msgid "If your database reaches its expiration date before your renew your subscription, you will encounter this message:" +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:None +msgid "This database has expired." +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:130 +msgid "This **blocking** message appears after a non-blocking message that lasts 30 days. If you fail to take action before the end of the countdown, the database is expired." +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:138 +msgid "Renew your subscription: follow the link and renew your subscription - note that" +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:137 +msgid "if you wish to pay by Wire Transfer, your subscription will effectively be renewed only when the payment arrives, which can take a few days. Credit card payments are processed immediately." +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:140 +msgid "Contact our `Support `__" +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:142 +msgid "None of those solutions worked for you? Please contact our `Support `__" +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:151 +msgid "Duplicate a database" +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:153 +msgid "You can duplicate your database by accessing the database manager on your server (/web/database/manager). In this page, you can easily duplicate your database (among other things)." +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:161 +msgid "When you duplicate a local database, it is **strongly** advised to change the duplicated database's uuid (Unniversally Unique Identifier), since this uuid is how your database identifies itself with our servers. Having two databases with the same uuid could result in invoicing problems or registration problems down the line." +msgstr "" + +#: ../../content/administration/maintain/on_premise.rst:170 +msgid "The database uuid is currently accessible from the menu :menuselection:`Settings --> Technical --> System Parameters`, we advise you to use a `uuid generator `_ or to use the unix command ``uuidgen`` to generate a new uuid. You can then simply replace it like any other record by clicking on it and using the edit button." +msgstr "" + +#: ../../content/administration/maintain/online.rst:3 +msgid "Online (SaaS) database management" +msgstr "" + +#: ../../content/administration/maintain/online.rst:5 +msgid "To manage a database, sign in to https://www.odoo.com and access the `database management page `_ by clicking on the user icon, then on *My Databases*." +msgstr "" + +#: ../../content/administration/maintain/online.rst:None +msgid "Clicking on the user icon opens a drop-down menu. \"My databases\" button is highlighted." +msgstr "" + +#: ../../content/administration/maintain/online.rst:13 +msgid "Make sure you are connected as the administrator of the database you want to manage." +msgstr "" + +#: ../../content/administration/maintain/online.rst:None +msgid "Clicking on the gear icon opens the drop-down menu." +msgstr "" + +#: ../../content/administration/maintain/online.rst:19 +msgid "Open the drop-down menu next to the database you want to manage by clicking on the gear icon." +msgstr "" + +#: ../../content/administration/maintain/online.rst:21 +msgid "Several actions are available:" +msgstr "" + +#: ../../content/administration/maintain/online.rst:23 +msgid ":ref:`online/upgrade`" +msgstr "" + +#: ../../content/administration/maintain/online.rst:24 +msgid ":ref:`online/duplicate`" +msgstr "" + +#: ../../content/administration/maintain/online.rst:25 +msgid ":ref:`online/rename`" +msgstr "" + +#: ../../content/administration/maintain/online.rst:26 +msgid ":ref:`online/download`" +msgstr "" + +#: ../../content/administration/maintain/online.rst:27 +msgid ":ref:`online/domains`" +msgstr "" + +#: ../../content/administration/maintain/online.rst:28 +msgid ":ref:`online/tags`" +msgstr "" + +#: ../../content/administration/maintain/online.rst:29 +msgid ":ref:`online/delete`" +msgstr "" + +#: ../../content/administration/maintain/online.rst:30 +msgid ":ref:`online/contact-support`" +msgstr "" + +#: ../../content/administration/maintain/online.rst:31 +msgid ":ref:`online/users`" +msgstr "" + +#: ../../content/administration/maintain/online.rst:36 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:285 +#: ../../content/administration/upgrade.rst:10 +msgid "Upgrade" +msgstr "" + +#: ../../content/administration/maintain/online.rst:38 +msgid "If you are *not* on the latest **Online version**, you should receive an invitation to :doc:`upgrade <../upgrade>` your database. A **Rolling Release button** on your database's main screen proposes an upgrade to the latest version (e.g., 13.0 to 15.1)." +msgstr "" + +#: ../../content/administration/maintain/online.rst:0 +msgid "**If your Odoo database's version is lower than the latest major release:**" +msgstr "" + +#: ../../content/administration/maintain/online.rst:0 +msgid "You must upgrade your database within two months. After these two months, an automatic upgrade is initiated." +msgstr "" + +#: ../../content/administration/maintain/online.rst:0 +msgid "**If your Odoo database's version is equal to or higher than the latest major release:**" +msgstr "" + +#: ../../content/administration/maintain/online.rst:0 +msgid "You can disregard the invitation to upgrade as you probably wouldn't benefit from new features every two months." +msgstr "" + +#: ../../content/administration/maintain/online.rst:51 +msgid "Versions that are not supported anymore become deprecated and need to be updated to avoid security issues. We recommend you initiate the upgrade of the database yourself, as this method allows you to request a test upgrade of your database to check for any discrepancies." +msgstr "" + +#: ../../content/administration/maintain/online.rst:56 +msgid ":doc:`../upgrade`" +msgstr "" + +#: ../../content/administration/maintain/online.rst:57 +msgid ":doc:`supported_versions`" +msgstr "" + +#: ../../content/administration/maintain/online.rst:62 +msgid "Duplicate" +msgstr "" + +#: ../../content/administration/maintain/online.rst:64 +msgid "Make an exact copy of the database to be able to perform testing without compromising the daily operations." +msgstr "" + +#: ../../content/administration/maintain/online.rst:68 +msgid "By checking *For testing purposes*, all external communication (emails, payments, delivery orders, etc.) are disabled by default on the duplicated database." +msgstr "" + +#: ../../content/administration/maintain/online.rst:70 +msgid "Duplicate databases expire automatically after 15 days." +msgstr "" + +#: ../../content/administration/maintain/online.rst:75 +msgid "Rename" +msgstr "" + +#: ../../content/administration/maintain/online.rst:77 +msgid "Rename the database and its URL." +msgstr "" + +#: ../../content/administration/maintain/online.rst:82 +msgid "Download" +msgstr "" + +#: ../../content/administration/maintain/online.rst:84 +msgid "Download instantly a ZIP file with a backup of the database." +msgstr "" + +#: ../../content/administration/maintain/online.rst:87 +msgid "Databases are backed up daily according to the `Odoo Cloud SLA `_." +msgstr "" + +#: ../../content/administration/maintain/online.rst:93 +msgid "Domains" +msgstr "" + +#: ../../content/administration/maintain/online.rst:95 +msgid "Configure custom domains to access the database via another URL." +msgstr "" + +#: ../../content/administration/maintain/online.rst:98 +msgid ":doc:`domain_names`" +msgstr "" + +#: ../../content/administration/maintain/online.rst:103 +msgid "Tags" +msgstr "" + +#: ../../content/administration/maintain/online.rst:105 +msgid "Add tags to sort your databases out. You can search the tags in the search bar." +msgstr "" + +#: ../../content/administration/maintain/online.rst:110 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:539 +msgid "Delete" +msgstr "" + +#: ../../content/administration/maintain/online.rst:112 +msgid "Delete a database instantly." +msgstr "" + +#: ../../content/administration/maintain/online.rst:115 +msgid "Deleting a database means that all data is permanently lost. The deletion is instant and for all users. It is recommended to create a backup of the database before deleting it." +msgstr "" + +#: ../../content/administration/maintain/online.rst:118 +msgid "Read carefully the warning message that pops up and proceed only if you fully understand the implications of deleting a database:" +msgstr "" + +#: ../../content/administration/maintain/online.rst:None +msgid "A warning message is prompted before deleting a database." +msgstr "" + +#: ../../content/administration/maintain/online.rst:126 +msgid "Only an administrator can delete a database." +msgstr "" + +#: ../../content/administration/maintain/online.rst:127 +msgid "The database name is immediately available for a new database." +msgstr "" + +#: ../../content/administration/maintain/online.rst:128 +msgid "It is not possible to delete a database if it is expired or linked to a subscription. If needed, please get in touch with `Odoo Support `_." +msgstr "" + +#: ../../content/administration/maintain/online.rst:130 +msgid "To delete your account, please get in touch with `Odoo Support `_." +msgstr "" + +#: ../../content/administration/maintain/online.rst:135 +msgid "Contact Support" +msgstr "" + +#: ../../content/administration/maintain/online.rst:137 +msgid "Access the Odoo `support page `_ with your database's details already pre-filled." +msgstr "" + +#: ../../content/administration/maintain/online.rst:143 +msgid "Invite / Remove Users" +msgstr "" + +#: ../../content/administration/maintain/online.rst:145 +msgid "To invite users, fill out the email address of the new user and click on *Invite*. To add multiple users, click on *Add more users*." +msgstr "" + +#: ../../content/administration/maintain/online.rst:None +msgid "Clicking on \"Add more users\" adds additional email fields." +msgstr "" + +#: ../../content/administration/maintain/online.rst:152 +msgid "To remove users, select the users to remove and click on *Remove*." +msgstr "" + +#: ../../content/administration/maintain/online.rst:155 +msgid ":doc:`/applications/general/users/manage_users`" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:6 +#: ../../content/administration/upgrade.rst:208 +msgid "Supported versions" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:8 +msgid "Odoo provides support and bug fixing **for the 3 last major versions** of Odoo." +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:11 +msgid "Odoo releases intermediary versions called **Online versions** on the :doc:`Odoo Online ` hosting every two months. Odoo Online users can then benefit from the latest features of Odoo." +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:14 +msgid "Admins of Odoo Online databases are invited to :doc:`upgrade <../upgrade>` them regularly." +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:15 +msgid "Online versions are *not* released for Odoo.sh and On-Premise installations." +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:16 +msgid "Online versions are listed below as *SaaS*." +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:19 +msgid "What's the support status of my Odoo?" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:21 +msgid "This matrix shows the support status of every version." +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:23 +msgid "**Major releases are in bold type.**" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:26 +#: ../../content/administration/upgrade/on_premise.rst:3 +msgid "On-Premise" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:26 +msgid "Release date" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:26 +msgid "End of support" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:28 +msgid "Odoo saas~15.2" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:28 +#: ../../content/administration/maintain/supported_versions.rst:32 +#: ../../content/administration/maintain/supported_versions.rst:32 +#: ../../content/administration/maintain/supported_versions.rst:32 +#: ../../content/administration/maintain/supported_versions.rst:34 +#: ../../content/administration/maintain/supported_versions.rst:34 +#: ../../content/administration/maintain/supported_versions.rst:34 +#: ../../content/administration/maintain/supported_versions.rst:36 +#: ../../content/administration/maintain/supported_versions.rst:36 +#: ../../content/administration/maintain/supported_versions.rst:36 +msgid "|green|" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:28 +#: ../../content/administration/maintain/supported_versions.rst:28 +#: ../../content/administration/maintain/supported_versions.rst:30 +#: ../../content/administration/maintain/supported_versions.rst:30 +#: ../../content/administration/maintain/supported_versions.rst:38 +#: ../../content/administration/maintain/supported_versions.rst:38 +#: ../../content/administration/maintain/supported_versions.rst:42 +#: ../../content/administration/maintain/supported_versions.rst:42 +#: ../../content/administration/maintain/supported_versions.rst:46 +#: ../../content/administration/maintain/supported_versions.rst:46 +#: ../../content/administration/maintain/supported_versions.rst:48 +#: ../../content/administration/maintain/supported_versions.rst:48 +#: ../../content/administration/maintain/supported_versions.rst:52 +#: ../../content/administration/maintain/supported_versions.rst:52 +#: ../../content/administration/maintain/supported_versions.rst:54 +#: ../../content/administration/maintain/supported_versions.rst:56 +#: ../../content/administration/maintain/supported_versions.rst:56 +#: ../../content/administration/maintain/supported_versions.rst:58 +msgid "N/A" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:28 +msgid "March 2022" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:30 +msgid "Odoo saas~15.1" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:30 +#: ../../content/administration/maintain/supported_versions.rst:38 +#: ../../content/administration/maintain/supported_versions.rst:40 +#: ../../content/administration/maintain/supported_versions.rst:40 +#: ../../content/administration/maintain/supported_versions.rst:40 +#: ../../content/administration/maintain/supported_versions.rst:42 +#: ../../content/administration/maintain/supported_versions.rst:44 +#: ../../content/administration/maintain/supported_versions.rst:44 +#: ../../content/administration/maintain/supported_versions.rst:44 +#: ../../content/administration/maintain/supported_versions.rst:46 +#: ../../content/administration/maintain/supported_versions.rst:48 +#: ../../content/administration/maintain/supported_versions.rst:50 +#: ../../content/administration/maintain/supported_versions.rst:50 +#: ../../content/administration/maintain/supported_versions.rst:50 +#: ../../content/administration/maintain/supported_versions.rst:52 +#: ../../content/administration/maintain/supported_versions.rst:54 +#: ../../content/administration/maintain/supported_versions.rst:54 +#: ../../content/administration/maintain/supported_versions.rst:56 +#: ../../content/administration/maintain/supported_versions.rst:58 +#: ../../content/administration/maintain/supported_versions.rst:58 +msgid "|red|" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:30 +msgid "February 2022" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:32 +msgid "**Odoo 15.0**" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:32 +#: ../../content/administration/maintain/supported_versions.rst:40 +msgid "October 2021" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:32 +msgid "October 2024 (planned)" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:34 +msgid "**Odoo 14.0**" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:34 +#: ../../content/administration/maintain/supported_versions.rst:44 +msgid "October 2020" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:34 +msgid "October 2023 (planned)" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:36 +msgid "**Odoo 13.0**" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:36 +#: ../../content/administration/maintain/supported_versions.rst:50 +msgid "October 2019" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:36 +msgid "October 2022 (planned)" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:38 +msgid "Odoo saas~12.3" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:38 +msgid "August 2019" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:40 +msgid "**Odoo 12.0**" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:40 +#: ../../content/administration/maintain/supported_versions.rst:54 +msgid "October 2018" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:42 +msgid "Odoo saas~11.3" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:42 +msgid "April 2018" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:44 +msgid "**Odoo 11.0**" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:44 +#: ../../content/administration/maintain/supported_versions.rst:58 +msgid "October 2017" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:46 +msgid "Odoo 10.saas~15" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:46 +msgid "March 2017" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:48 +msgid "Odoo 10.saas~14" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:48 +msgid "January 2017" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:50 +msgid "**Odoo 10.0**" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:50 +msgid "October 2016" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:52 +msgid "Odoo 9.saas~11" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:52 +msgid "May 2016" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:54 +msgid "**Odoo 9.0**" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:54 +msgid "October 2015" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:56 +msgid "Odoo 8.saas~6" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:56 +msgid "February 2015" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:58 +msgid "**Odoo 8.0**" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:58 +msgid "September 2014" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:63 +msgid "|green| Supported version" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:65 +msgid "|red| End-of-support" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:67 +msgid "N/A Never released for this platform" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:69 +msgid "🏁 Future version, not released yet" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:80 +msgid "I run an older version of Odoo/OpenERP/TinyERP" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:82 +msgid "OpenERP 7.0, 6.1, 6.0 and 5.0 is not supported anymore, on any platform." +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:84 +msgid "TinyERP 4.0, 3.0, 2.0 and 1.0 is not supported anymore, on any platform." +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:86 +msgid "Even though we don't support older versions, you can always `upgrade from any version `_." +msgstr "" + +#: ../../content/administration/maintain/update.rst:6 +msgid "Bugfix updates" +msgstr "" + +#: ../../content/administration/maintain/update.rst:9 +msgid "Introduction" +msgstr "" + +#: ../../content/administration/maintain/update.rst:11 +msgid "In order to benefit from the latest improvements, security fixes, bug corrections and performance boosts, you may need to update your Odoo installation from time to time." +msgstr "" + +#: ../../content/administration/maintain/update.rst:14 +msgid "This guide only applies when are using Odoo on your own hosting infrastructure. If you are using one of the Odoo Cloud solutions, updates are automatically performed for you." +msgstr "" + +#: ../../content/administration/maintain/update.rst:17 +msgid "The terminology surrounding software updates is often confusing, so here are some preliminary definitions:" +msgstr "" + +#: ../../content/administration/maintain/update.rst:25 +msgid "Updating (an Odoo installation)" +msgstr "" + +#: ../../content/administration/maintain/update.rst:21 +msgid "Refers to the process of obtaining the latest revision of the source code for your current Odoo Edition. For example, updating your Odoo Enterprise 13.0 to the latest revision. This does not directly cause any change to the contents of your Odoo database, and can be undone by reinstalling the previous revision of the source code." +msgstr "" + +#: ../../content/administration/maintain/update.rst:35 +msgid "Upgrading (an Odoo database)" +msgstr "" + +#: ../../content/administration/maintain/update.rst:28 +msgid "Refers to a complex data processing operation where the structure and contents of your database is permanently altered to make it compatible with a new release of Odoo. This operation is irreversible and typically accomplished via Odoo's `database upgrade service `_, when you decide to switch to a newer release of Odoo. Historically, this process has also been known as a \"migration\" because it involves moving data around inside the database, even though the database may end up at the same physical location after the upgrade." +msgstr "" + +#: ../../content/administration/maintain/update.rst:37 +msgid "This page describes the typical steps needed to *update* an Odoo installation to the latest version. If you'd like more information about upgrading a database, please visit the `Odoo Upgrade page `_ instead." +msgstr "" + +#: ../../content/administration/maintain/update.rst:43 +msgid "In a nutshell" +msgstr "" + +#: ../../content/administration/maintain/update.rst:45 +msgid "Updating Odoo is accomplished by simply reinstalling the latest version of your Odoo Edition on top of your current installation. This will preserve your data without any alteration, as long as you do not uninstall PostgreSQL (the database engine that comes with Odoo)." +msgstr "" + +#: ../../content/administration/maintain/update.rst:49 +msgid "The main reference for updating is logically our :ref:`installation guide `, which explains the common installation methods." +msgstr "" + +#: ../../content/administration/maintain/update.rst:52 +msgid "Updating is also most appropriately accomplished by the person who deployed Odoo initially, because the procedure is very similar." +msgstr "" + +#: ../../content/administration/maintain/update.rst:55 +msgid "We always recommend to download a complete new up-to-date Odoo version, rather than manually applying patches, such as the security patches that come with Security Advisories. The patches are mainly provided for installations that are heavily customized, or for technical personnel who prefer to apply minimal changes temporarily while testing a complete update." +msgstr "" + +#: ../../content/administration/maintain/update.rst:64 +msgid "Step 1: Download an updated Odoo version" +msgstr "" + +#: ../../content/administration/maintain/update.rst:66 +msgid "The central download page is https://www.odoo.com/page/download. If you see a \"Buy\" link for the Odoo Enterprise download, make sure you are logged into Odoo.com with the same login that is linked to your Odoo Enterprise subscription." +msgstr "" + +#: ../../content/administration/maintain/update.rst:70 +msgid "Alternatively, you can use the unique download link that was included with your Odoo Enterprise purchase confirmation email." +msgstr "" + +#: ../../content/administration/maintain/update.rst:73 +msgid "Downloading an updated version is not necessary if you installed via Github (see below)" +msgstr "" + +#: ../../content/administration/maintain/update.rst:77 +msgid "Step 2: Make a backup of your database" +msgstr "" + +#: ../../content/administration/maintain/update.rst:79 +msgid "The update procedure is quite safe and should not alter you data. However it's always best to take a full database backup before performing any change on your installation, and to store it somewhere safe, on a different computer." +msgstr "" + +#: ../../content/administration/maintain/update.rst:83 +msgid "If you have not disabled the database manager screen (see :ref:`here ` why you should), you can use it (link at bottom of your database selection screen) to download a backup of your database(s). If you disabled it, use the same procedure than for your usual backups." +msgstr "" + +#: ../../content/administration/maintain/update.rst:89 +msgid "Step 3: Install the updated version" +msgstr "" + +#: ../../content/administration/maintain/update.rst:91 +msgid "Choose the method that matches your current installation:" +msgstr "" + +#: ../../content/administration/maintain/update.rst:95 +msgid "Packaged Installers" +msgstr "" + +#: ../../content/administration/maintain/update.rst:97 +msgid "If you installed Odoo with an installation package downloaded on our website (the recommended method), updating is very simple. All you have to do is download the installation package corresponding to your system (see step #1) and install it on your server. They are updated daily and include the latest security fixes. Usually, you can simply double-click the package to install it on top of the current installation. After installing the package, be sure to restart the Odoo service or reboot your server, and you're all set." +msgstr "" + +#: ../../content/administration/maintain/update.rst:106 +msgid "Source Install (Tarball)" +msgstr "" + +#: ../../content/administration/maintain/update.rst:107 +msgid "If you have originally installed Odoo with the \"tarball\" version (source code archive), you have to replace the installation directory with a newer version. First download the latest tarball from Odoo.com. They are updated daily and include the latest security fixes (see step #1) After downloading the package, extract it to a temporary location on your server." +msgstr "" + +#: ../../content/administration/maintain/update.rst:112 +msgid "You will get a folder labelled with the version of the source code, for example \"odoo-13.0+e.20190719\", that contains a folder \"odoo.egg-info\" and the actual source code folder named \"odoo\" (for Odoo 10 and later) or \"openerp\" for older versions. You can ignore the odoo.egg-info folder. Locate the folder where your current installation is deployed, and replace it with the newer \"odoo\" or \"openerp\" folder that was in the archive you just extracted." +msgstr "" + +#: ../../content/administration/maintain/update.rst:118 +msgid "Be sure to match the folder layout, for example the new \"addons\" folder included in the source code should end up exactly at the same path it was before. Next, watch out for any specific configuration files that you may have manually copied or modified in the old folder, and copy them over to the new folder. Finally, restart the Odoo service or reboot the machine, and you are all set." +msgstr "" + +#: ../../content/administration/maintain/update.rst:125 +msgid "Source Install (Github)" +msgstr "" + +#: ../../content/administration/maintain/update.rst:126 +msgid "If you have originally installed Odoo with a full Github clone of the official repositories, the update procedure requires you to pull the latest source code via git. Change into the directory for each repository (the main Odoo repository, and the Enterprise repository), and run the following commands::" +msgstr "" + +#: ../../content/administration/maintain/update.rst:134 +msgid "The last command may encounter source code conflicts if you had edited the Odoo source code locally. The error message will give you the list of files with conflicts, and you will need to resolve the conflicts manually, by editing them and deciding which part of the code to keep." +msgstr "" + +#: ../../content/administration/maintain/update.rst:138 +msgid "Alternatively, if you prefer to simply discard the conflicting changes and restore the official version, you can use the following command::" +msgstr "" + +#: ../../content/administration/maintain/update.rst:143 +msgid "Finally, restart the Odoo service or reboot the machine, and you should be done." +msgstr "" + +#: ../../content/administration/maintain/update.rst:149 +msgid "Please refer to our `Docker image documentation `_ for specific update instructions." +msgstr "" + +#: ../../content/administration/odoo_sh/advanced.rst:5 +msgid "Advanced" +msgstr "" + +#: ../../content/administration/odoo_sh/advanced/containers.rst:4 +msgid "Containers" +msgstr "" + #: ../../content/administration/odoo_sh/advanced/containers.rst:7 #: ../../content/administration/odoo_sh/advanced/submodules.rst:9 #: ../../content/administration/odoo_sh/getting_started/branches.rst:7 @@ -534,1915 +3165,11 @@ msgstr "" #: ../../content/administration/odoo_sh/getting_started/online-editor.rst:9 #: ../../content/administration/odoo_sh/getting_started/settings.rst:7 #: ../../content/administration/odoo_sh/getting_started/status.rst:7 -#: ../../content/administration/odoo_sh/overview.rst:4 +#: ../../content/administration/odoo_sh/overview.rst:5 +#: ../../content/administration/upgrade/odoo_sh.rst:8 msgid "Overview" msgstr "" -#: ../../content/administration/db_upgrade.rst:21 -msgid "The upgrade process" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:23 -msgid "This documentation is for our *On-Premise* (self-hosted) and *Odoo.sh* customers. If you are hosted Online, please check our :ref:`instruction page for our Online (SaaS) customers `." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:29 -msgid "Definition" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:31 -msgid "An upgrade is switching to a newer version of Odoo (e.g., Odoo 13.0 to Odoo 14.0)" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:33 -msgid "An upgrade does not cover:" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:35 -msgid "changing :ref:`Editions ` (i.e., Community to Enterprise edition)" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:36 -msgid "switching :ref:`hosting type ` (i.e., On-Premise to Online or Odoo.sh)" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:38 -msgid "migration from another ERP to Odoo" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:40 -#: ../../content/administration/db_upgrade.rst:98 -#: ../../content/administration/db_upgrade.rst:230 -#: ../../content/administration/db_upgrade.rst:360 -#: ../../content/administration/db_upgrade.rst:369 -#: ../../content/administration/db_upgrade.rst:381 -msgid "|assistance-contact|" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:45 -msgid "Process workflow" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:47 -msgid "The upgrade process in a nutshell:" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:49 -msgid "You create a test upgrade request." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:0 -msgid "The request is processed by Odoo:" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:0 -msgid "This happens via an automated process that runs the database through an upgrade script and takes between 20 and 120 minutes. Only if an issue(s) arises will we have to intervene manually and adjust the script specifically to your database until the upgrade succeeds." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:54 -msgid "Odoo delivers a test database." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:55 -msgid "You test your database for possible discrepancies (see :ref:`db-upgrade/test-guidance`)" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:56 -msgid "If there are any discrepancies, you report them to the Upgrade support team via the :ref:`Help portal `." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:58 -msgid "We will fix the issues and send you a new test database." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:59 -msgid "Once you completed the testing and are happy with the result, you decide on a date and time when you stop users from accessing Odoo, freeze all data entries and create an upgrade request for the production upgrade." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:62 -msgid "Odoo delivers the production database through the automated process." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:63 -msgid "You restore it in your Production environment a few short hours later and continue working on the newly upgraded database." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:69 -msgid "Service Level Agreement" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:72 -msgid "What is covered by the Enterprise Licence?" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:74 -msgid "Databases hosted on Odoo’s Cloud platforms (Saas and Odoo.sh) or On-Premise (Self-Hosting) enjoy the following service at all times." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:77 -msgid "The upgrade of:" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:79 -msgid "standard applications" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:80 -msgid "Studio customization (as long as the Studio app is still active)" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:81 -msgid "customizations done by our consulting and developer services *if* they are covered by a ‘Maintenance of Customisations’ subscription" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:84 -msgid "The Upgrade Service is limited to the technical conversion and adaptation of your database (standard modules and data) to make it compatible with the targeted version." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:88 -msgid "What upgrading does NOT cover" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:90 -msgid "The cleaning of pre-existing data & configuration while upgrading" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:91 -msgid "Any new developments and/or upgrade of your own :ref:`custom modules `" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:93 -msgid "`Training `_ on the new version" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:95 -msgid "You can get more information about your Enterprise Licence on our :ref:`Odoo Enterprise Subscription Agreement ` page." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:103 -#: ../../content/administration/odoo_sh/getting_started.rst:4 -msgid "Get started" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:105 -msgid "The upgrade process varies depending on where your database is hosted." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:110 -msgid "Online (SaaS)" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:112 -msgid "If you are hosted Online, please check our :ref:`instruction page for our Online (SaaS) customers `." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:118 -msgid "Odoo.sh" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:120 -msgid "If you are Odoo.sh hosted, check our :doc:`specific instructions to be able to upgrade `." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:126 -msgid "On-Premise" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:128 -msgid "There are two possibilities:" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:130 -msgid "Via the interface of our `website form `_" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:0 -msgid "For technically-advanced users and partners, via the following command line (to be used on the machine where your database is hosted):" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:0 -msgid "``python <(curl -s beta.upgrade.odoo.com/upgrade) test -d -t 14.0``" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:136 -msgid "What does it do?" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:138 -msgid "The above command will dump your database to a file, then send it to the upgrade platform for upgrade, displaying you the live logs, then restore the upgraded database back on your server as a duplicate test database." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:145 -msgid "Steps" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:150 -msgid "The testing phase" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:155 -msgid "Test process" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:157 -msgid "Also referred to as the pre-production phase, the test phase allows you to review an upgraded version of your database without affecting your production database in any way." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:160 -msgid "We suggest that you run the test upgrade process at least once, but you can do it as often as you want (one at a time)." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:163 -msgid "Once you receive your upgraded test database, you should check that all data, processes and functionality are still correct and working as expected." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:166 -msgid "If you do find discrepancies, you'll be able to:" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:0 -msgid ":ref:`Report your issues `" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:0 -msgid "and/or" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:170 -msgid "Ask for a new :ref:`test request ` after the reported issues have been fixed in the upgrade script." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:173 -msgid "When you do not find any discrepancies, you'll be able to:" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:175 -msgid "Move on to the upgrade of your :ref:`production database `." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:180 -msgid "Request a test database" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:182 -msgid "When filling the `website form `_, select *Testing* purpose." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:191 -msgid "Test guidance" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:193 -msgid "Every business and organization has its own operational needs and will have to test its specific Odoo instance respectively. However, we recommend you look at `the test scenario `_ we created, a high-level idea of what you should test and look out for." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:198 -#: ../../content/administration/deployment/deploy.rst:408 -msgid "Todo" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:198 -msgid "change link \"test scenario\" once the related doc is published" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:203 -#: ../../content/administration/db_upgrade.rst:262 -#: ../../content/administration/db_upgrade.rst:394 -msgid "Assistance" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:205 -msgid "If you encounter issues or problems in the **test database**, please contact the Odoo Upgrade Support:" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:208 -#: ../../content/administration/db_upgrade.rst:267 -msgid "Connect to our `Odoo Support page `_." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:209 -msgid "Under the *Ticket Description* section, select *An issue related to my upgrade* ticket type." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:216 -msgid "If you choose another *Ticket Description* type, the request will be redirected to another team than the upgrade one and will slow down the processing and response time." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:219 -#: ../../content/administration/db_upgrade.rst:275 -msgid "Please provide as much detail as you can. Where applicable, illustrate the current and previous flows with videos and/or screenshots. This will avoid clarifying questions and speed up the resolution process significantly." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:228 -msgid "The purpose of the test phase is not to correct existing data or configurations in your database." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:235 -msgid "The production launch" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:240 -msgid "Production goes live" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:242 -msgid "The production upgrade request is when you decide to upgrade your current database with all your production data (invoices, VAT returns, inventories, current orders) to a new version of your choice." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:245 -msgid "After your :ref:`tests ` are completed to your satisfaction, submit the request to upgrade your production database via our `website form `_. Select *Production* purpose." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:254 -msgid "Going into production without first testing may lead to:" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:256 -msgid "business interruptions (e.g. no longer having the possibility to validate an action)" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:257 -msgid "poor customer experiences (e.g. an eCommerce website that does not work correctly)" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:264 -msgid "If you encounter issues or problems in the **production database**, please contact the **Odoo Support**:" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:268 -msgid "Under the *Ticket Description* section, select the appropriate type related to your issue but **do not select** the option *An issue related to my upgrade*." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:272 -msgid "After upgrading to production, the support will be provided by the Support team instead of the Upgrade team." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:284 -msgid "If you choose *An issue related to my upgrade* as ticket type, the request will be redirected to another team than the support one and will slow down the processing and response time." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:290 -msgid "FAQ" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:295 -msgid "Why upgrade?" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:297 -msgid "You benefit from the latest features of the :ref:`new major version ` released by Odoo." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:299 -msgid "If you are in an :ref:`unsupported version `, you get a new version with support." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:305 -msgid "When to upgrade?" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:307 -msgid "Whenever you want. You can make your upgrade request as soon as a new version is released on our `website form `_." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:313 -msgid "Availability of the new version" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:315 -msgid "Please kindly note that as soon as we announce the release of a new major version (usually at the end of year), the Upgrade Service team needs to adapt the upgrade scripts to it, which is why the new version is not immediately available for existing databases." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:322 -msgid "Finalization of the upgrade (:abbr:`ETA (Estimated Time of Arrival)`)" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:324 -msgid "Unfortunately, it is impossible to give time estimates for every upgrade request. Odoo offers so many possibilities (e.g. branding, workflows, customization, etc) that it can get tricky to upgrade, and translate to the new structure. If you use multiple apps managing sensitive data (e.g., Accounting, Inventory, etc.), some cases may still require a human intervention, making the process slower." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:330 -msgid "This is especially true during the first months following the release of a new major version, which can significantly lengthen the upgrade delay." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:333 -msgid "In general, the ‘smaller’ the database, the quickest the upgrade. A single-user database that uses only CRM will be processed faster than a multi-company, multi-user database that uses Accounting, Sales, Purchase, and Manufacturing." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:337 -msgid "So, in a nutshell, what can impact your upgrade lead time?" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:339 -msgid "Source & targeted versions" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:340 -msgid "Installed apps" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:341 -msgid "Volume of data" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:342 -msgid "Amount of customization (models, fields, methods, workflows, reports, website, etc.)" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:343 -msgid "Installation of new apps or configuration changes after the start of the test phase" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:345 -msgid "Usually, the delays experienced during the first request (waiting time between the time you submitted your first request for a test upgrade) can generally give you an idea of the time to wait for the production request." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:352 -msgid "Upgrade of the custom modules" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:354 -msgid "As stated in our :doc:`../legal/terms/enterprise`, section :ref:`charges_standard`, this optional service is subject to additional fees." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:357 -msgid "If you have a custom code, you can choose to have it upgraded by our services, by one of our `partners `_ or you can do it yourself." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:365 -msgid "Editions change (from Community to Enterprise)" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:367 -msgid "An upgrade does not cover a change of `Editions `_" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:374 -msgid "Switching the hosting types (Self-hosted vs Online vs Odoo.sh)" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:376 -msgid "An upgrade does not cover a change of `Hosting types `_." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:378 -msgid "Open the following link to get :doc:`more information about how to change your hosting type `." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:386 -msgid "Release Notes by version" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:388 -msgid "Open our `Release Note `_ page to get a summary of the new features and improvements made in each version." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:399 -msgid "Contact our Upgrade service support" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:401 -msgid "Should you have any more questions about the upgrade, do not hesitate to send a message to `Odoo Upgrade Team `_. We will be very pleased to answer it as soon as possible." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:407 -msgid "Supported versions" -msgstr "" - -#: ../../content/administration/db_upgrade.rst:409 -msgid "Please note that Odoo provides support and bug fixing only for the three last major versions of Odoo." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:411 -msgid "This is a factor to take into consideration before upgrading. If you are on an older version, we suggest you to prefer the most recent version to benefit from a longer support (before having to upgrade again)." -msgstr "" - -#: ../../content/administration/db_upgrade.rst:415 -msgid "You can get more information about our :doc:`supported versions <../services/support/supported_versions>`." -msgstr "" - -#: ../../content/administration/deployment.rst:3 -msgid "Deployment" -msgstr "" - -#: ../../content/administration/deployment/cdn.rst:4 -msgid "Deploying with Content Delivery Networks" -msgstr "" - -#: ../../content/administration/deployment/cdn.rst:9 -msgid "Deploying with KeyCDN_" -msgstr "" - -#: ../../content/administration/deployment/cdn.rst:13 -msgid "This document will guide you through the setup of a KeyCDN_ account with your Odoo powered website." -msgstr "" - -#: ../../content/administration/deployment/cdn.rst:17 -msgid "Step 1: Create a pull zone in the KeyCDN dashboard" -msgstr "" - -#: ../../content/administration/deployment/cdn.rst:22 -msgid "When creating the zone, enable the CORS option in the :guilabel:`advanced features` submenu. (more on that later)" -msgstr "" - -#: ../../content/administration/deployment/cdn.rst:28 -msgid "Once done, you'll have to wait a bit while KeyCDN_ is crawling your website." -msgstr "" - -#: ../../content/administration/deployment/cdn.rst:33 -msgid "a new URL has been generated for your Zone, in this case it is ``http://pulltest-b49.kxcdn.com``" -msgstr "" - -#: ../../content/administration/deployment/cdn.rst:37 -msgid "Step 2: Configure the odoo instance with your zone" -msgstr "" - -#: ../../content/administration/deployment/cdn.rst:39 -msgid "In the Odoo back end, go to the :guilabel:`Website Settings`: menu, then activate the CDN support and copy/paste your zone URL in the :guilabel:`CDN Base URL` field. This field is only visible and configurable if you have developer mode activated." -msgstr "" - -#: ../../content/administration/deployment/cdn.rst:47 -msgid "Now your website is using the CDN for the resources matching the :guilabel:`CDN filters` regular expressions." -msgstr "" - -#: ../../content/administration/deployment/cdn.rst:50 -msgid "You can have a look to the HTML of your website in order to check if the CDN integration is properly working." -msgstr "" - -#: ../../content/administration/deployment/cdn.rst:58 -msgid "Why should I activate CORS?" -msgstr "" - -#: ../../content/administration/deployment/cdn.rst:60 -msgid "A security restriction in some browsers (Firefox and Chrome at time of writing) prevents a remotely linked CSS file to fetch relative resources on this same external server." -msgstr "" - -#: ../../content/administration/deployment/cdn.rst:64 -msgid "If you don't activate the CORS option in the CDN zone, the more obvious resulting problem on a default Odoo website will be the lack of font-awesome icons because the font file declared in the font-awesome CSS won't be loaded on the remote server." -msgstr "" - -#: ../../content/administration/deployment/cdn.rst:69 -msgid "Here's what you would see on your homepage in such a case:" -msgstr "" - -#: ../../content/administration/deployment/cdn.rst:74 -msgid "A security error message will also appear in the browser's console:" -msgstr "" - -#: ../../content/administration/deployment/cdn.rst:79 -msgid "Enabling the CORS option in the CDN fixes this issue." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:4 -msgid "Deploying Odoo" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:6 -msgid "This document describes basic steps to set up Odoo in production or on an internet-facing server. It follows :ref:`installation `, and is not generally necessary for a development systems that is not exposed on the internet." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:11 -msgid "If you are setting up a public server, be sure to check our :ref:`security` recommandations!" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:17 -msgid "dbfilter" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:19 -msgid "Odoo is a multi-tenant system: a single Odoo system may run and serve a number of database instances. It is also highly customizable, with customizations (starting from the modules being loaded) depending on the \"current database\"." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:23 -msgid "This is not an issue when working with the backend (web client) as a logged-in company user: the database can be selected when logging in, and customizations loaded afterwards." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:27 -msgid "However it is an issue for non-logged users (portal, website) which aren't bound to a database: Odoo needs to know which database should be used to load the website page or perform the operation. If multi-tenancy is not used that is not an issue, there's only one database to use, but if there are multiple databases accessible Odoo needs a rule to know which one it should use." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:33 -msgid "That is one of the purposes of :option:`--db-filter `: it specifies how the database should be selected based on the hostname (domain) that is being requested. The value is a `regular expression`_, possibly including the dynamically injected hostname (``%h``) or the first subdomain (``%d``) through which the system is being accessed." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:39 -msgid "For servers hosting multiple databases in production, especially if ``website`` is used, dbfilter **must** be set, otherwise a number of features will not work correctly." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:44 -msgid "Configuration samples" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:46 -msgid "Show only databases with names beginning with 'mycompany'" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:48 -#: ../../content/administration/deployment/deploy.rst:60 -#: ../../content/administration/deployment/deploy.rst:155 -#: ../../content/administration/deployment/deploy.rst:281 -msgid "in ``/etc/odoo.conf`` set:" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:55 -msgid "Show only databases matching the first subdomain after ``www``: for example the database \"mycompany\" will be shown if the incoming request was sent to ``www.mycompany.com`` or ``mycompany.co.uk``, but not for ``www2.mycompany.com`` or ``helpdesk.mycompany.com``." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:68 -msgid "Setting a proper :option:`--db-filter ` is an important part of securing your deployment. Once it is correctly working and only matching a single database per hostname, it is strongly recommended to block access to the database manager screens, and to use the ``--no-database-list`` startup paramater to prevent listing your databases, and to block access to the database management screens. See also security_." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:78 -#: ../../content/administration/install.rst:299 -#: ../../content/administration/install.rst:460 -#: ../../content/administration/install.rst:629 -msgid "PostgreSQL" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:80 -msgid "By default, PostgreSQL only allows connection over UNIX sockets and loopback connections (from \"localhost\", the same machine the PostgreSQL server is installed on)." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:84 -msgid "UNIX socket is fine if you want Odoo and PostgreSQL to execute on the same machine, and is the default when no host is provided, but if you want Odoo and PostgreSQL to execute on different machines [#different-machines]_ it will need to `listen to network interfaces`_ [#remote-socket]_, either:" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:89 -msgid "Only accept loopback connections and `use an SSH tunnel`_ between the machine on which Odoo runs and the one on which PostgreSQL runs, then configure Odoo to connect to its end of the tunnel" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:92 -msgid "Accept connections to the machine on which Odoo is installed, possibly over ssl (see `PostgreSQL connection settings`_ for details), then configure Odoo to connect over the network" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:97 -#: ../../content/administration/deployment/deploy.rst:147 -#: ../../content/administration/deployment/deploy.rst:236 -#: ../../content/administration/deployment/deploy.rst:276 -msgid "Configuration sample" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:99 -msgid "Allow tcp connection on localhost" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:100 -msgid "Allow tcp connection from 192.168.1.x network" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:102 -msgid "in ``/etc/postgresql/9.5/main/pg_hba.conf`` set:" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:110 -msgid "in ``/etc/postgresql/9.5/main/postgresql.conf`` set:" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:121 -msgid "Configuring Odoo" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:123 -msgid "Out of the box, Odoo connects to a local postgres over UNIX socket via port 5432. This can be overridden using :ref:`the database options ` when your Postgres deployment is not local and/or does not use the installation defaults." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:128 -msgid "The :ref:`packaged installers ` will automatically create a new user (``odoo``) and set it as the database user." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:131 -msgid "The database management screens are protected by the ``admin_passwd`` setting. This setting can only be set using configuration files, and is simply checked before performing database alterations. It should be set to a randomly generated value to ensure third parties can not use this interface." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:136 -msgid "All database operations use the :ref:`database options `, including the database management screen. For the database management screen to work requires that the PostgreSQL user have ``createdb`` right." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:140 -msgid "Users can always drop databases they own. For the database management screen to be completely non-functional, the PostgreSQL user needs to be created with ``no-createdb`` and the database must be owned by a different PostgreSQL user." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:144 -msgid "the PostgreSQL user *must not* be a superuser" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:149 -msgid "connect to a PostgreSQL server on 192.168.1.2" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:150 -msgid "port 5432" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:151 -msgid "using an 'odoo' user account," -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:152 -msgid "with 'pwd' as a password" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:153 -msgid "filtering only db with a name beginning with 'mycompany'" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:170 -msgid "SSL Between Odoo and PostgreSQL" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:172 -msgid "Since Odoo 11.0, you can enforce ssl connection between Odoo and PostgreSQL. in Odoo the db_sslmode control the ssl security of the connection with value choosed out of 'disable', 'allow', 'prefer', 'require', 'verify-ca' or 'verify-full'" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:177 -msgid "`PostgreSQL Doc `_" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:182 -msgid "Builtin server" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:184 -msgid "Odoo includes built-in HTTP servers, using either multithreading or multiprocessing." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:187 -msgid "For production use, it is recommended to use the multiprocessing server as it increases stability, makes somewhat better use of computing resources and can be better monitored and resource-restricted." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:191 -msgid "Multiprocessing is enabled by configuring :option:`a non-zero number of worker processes `, the number of workers should be based on the number of cores in the machine (possibly with some room for cron workers depending on how much cron work is predicted)" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:195 -msgid "Worker limits can be configured based on the hardware configuration to avoid resources exhaustion" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:198 -msgid "multiprocessing mode currently isn't available on Windows" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:202 -msgid "Worker number calculation" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:204 -msgid "Rule of thumb : (#CPU * 2) + 1" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:205 -msgid "Cron workers need CPU" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:206 -msgid "1 worker ~= 6 concurrent users" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:209 -msgid "memory size calculation" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:211 -msgid "We consider 20% of the requests are heavy requests, while 80% are simpler ones" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:212 -msgid "A heavy worker, when all computed field are well designed, SQL requests are well designed, ... is estimated to consume around 1GB of RAM" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:213 -msgid "A lighter worker, in the same scenario, is estimated to consume around 150MB of RAM" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:215 -msgid "Needed RAM = #worker * ( (light_worker_ratio * light_worker_ram_estimation) + (heavy_worker_ratio * heavy_worker_ram_estimation) )" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:218 -#: ../../content/administration/deployment/deploy.rst:375 -msgid "LiveChat" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:220 -msgid "In multiprocessing, a dedicated LiveChat worker is automatically started and listening on :option:`the longpolling port ` but the client will not connect to it." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:224 -msgid "Instead you must have a proxy redirecting requests whose URL starts with ``/longpolling/`` to the longpolling port. Other request should be proxied to the :option:`normal HTTP port `" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:228 -msgid "To achieve such a thing, you'll need to deploy a reverse proxy in front of Odoo, like nginx or apache. When doing so, you'll need to forward some more http Headers to Odoo, and activate the proxy_mode in Odoo configuration to have Odoo read those headers." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:238 -msgid "Server with 4 CPU, 8 Thread" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:239 -msgid "60 concurrent users" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:241 -msgid "60 users / 6 = 10 <- theorical number of worker needed" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:242 -msgid "(4 * 2) + 1 = 9 <- theorical maximal number of worker" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:243 -msgid "We'll use 8 workers + 1 for cron. We'll also use a monitoring system to measure cpu load, and check if it's between 7 and 7.5 ." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:244 -msgid "RAM = 9 * ((0.8*150) + (0.2*1024)) ~= 3Go RAM for Odoo" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:246 -msgid "in ``/etc/odoo.conf``:" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:262 -msgid "HTTPS" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:264 -msgid "Whether it's accessed via website/web client or web service, Odoo transmits authentication information in cleartext. This means a secure deployment of Odoo must use HTTPS\\ [#switching]_. SSL termination can be implemented via just about any SSL termination proxy, but requires the following setup:" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:269 -msgid "Enable Odoo's :option:`proxy mode `. This should only be enabled when Odoo is behind a reverse proxy" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:270 -msgid "Set up the SSL termination proxy (`Nginx termination example`_)" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:271 -msgid "Set up the proxying itself (`Nginx proxying example`_)" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:272 -msgid "Your SSL termination proxy should also automatically redirect non-secure connections to the secure port" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:278 -msgid "Redirect http requests to https" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:279 -msgid "Proxy requests to odoo" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:287 -msgid "in ``/etc/nginx/sites-enabled/odoo.conf`` set:" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:349 -msgid "Odoo as a WSGI Application" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:351 -msgid "It is also possible to mount Odoo as a standard WSGI_ application. Odoo provides the base for a WSGI launcher script as ``odoo-wsgi.example.py``. That script should be customized (possibly after copying it from the setup directory) to correctly set the configuration directly in :mod:`odoo.tools.config` rather than through the command-line or a configuration file." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:357 -msgid "However the WSGI server will only expose the main HTTP endpoint for the web client, website and webservice API. Because Odoo does not control the creation of workers anymore it can not setup cron or livechat workers" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:362 -msgid "Cron Workers" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:364 -msgid "To run cron jobs for an Odoo deployment as a WSGI application requires" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:366 -msgid "A classical Odoo (run via ``odoo-bin``)" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:367 -msgid "Connected to the database in which cron jobs have to be run (via :option:`odoo-bin -d`)" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:369 -msgid "Which should not be exposed to the network. To ensure cron runners are not network-accessible, it is possible to disable the built-in HTTP server entirely with :option:`odoo-bin --no-http` or setting ``http_enable = False`` in the configuration file" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:377 -msgid "The second problematic subsystem for WSGI deployments is the LiveChat: where most HTTP connections are relatively short and quickly free up their worker process for the next request, LiveChat require a long-lived connection for each client in order to implement near-real-time notifications." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:382 -msgid "This is in conflict with the process-based worker model, as it will tie up worker processes and prevent new users from accessing the system. However, those long-lived connections do very little and mostly stay parked waiting for notifications." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:387 -msgid "The solutions to support livechat/motifications in a WSGI application are:" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:389 -msgid "Deploy a threaded version of Odoo (instread of a process-based preforking one) and redirect only requests to URLs starting with ``/longpolling/`` to that Odoo, this is the simplest and the longpolling URL can double up as the cron instance." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:393 -msgid "Deploy an evented Odoo via ``odoo-gevent`` and proxy requests starting with ``/longpolling/`` to :option:`the longpolling port `." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:398 -msgid "Serving Static Files" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:400 -msgid "For development convenience, Odoo directly serves all static files in its modules. This may not be ideal when it comes to performances, and static files should generally be served by a static HTTP server." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:404 -msgid "Odoo static files live in each module's ``static/`` folder, so static files can be served by intercepting all requests to :samp:`/{MODULE}/static/{FILE}`, and looking up the right module (and file) in the various addons paths." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:408 -msgid "test whether it would be interesting to serve filestored attachments via this, and how (e.g. possibility of mapping ir.attachment id to filestore hash in the database?)" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:415 -msgid "Security" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:417 -msgid "For starters, keep in mind that securing an information system is a continuous process, not a one-shot operation. At any moment, you will only be as secure as the weakest link in your environment." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:421 -msgid "So please do not take this section as the ultimate list of measures that will prevent all security problems. It's only intended as a summary of the first important things you should be sure to include in your security action plan. The rest will come from best security practices for your operating system and distribution, best practices in terms of users, passwords, and access control management, etc." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:427 -msgid "When deploying an internet-facing server, please be sure to consider the following security-related topics:" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:430 -msgid "Always set a strong super-admin admin password, and restrict access to the database management pages as soon as the system is set up. See :ref:`db_manager_security`." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:433 -msgid "Choose unique logins and strong passwords for all administrator accounts on all databases. Do not use 'admin' as the login. Do not use those logins for day-to-day operations, only for controlling/managing the installation. *Never* use any default passwords like admin/admin, even for test/staging databases." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:438 -msgid "Do **not** install demo data on internet-facing servers. Databases with demo data contain default logins and passwords that can be used to get into your systems and cause significant trouble, even on staging/dev systems." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:442 -msgid "Use appropriate database filters ( :option:`--db-filter `) to restrict the visibility of your databases according to the hostname. See :ref:`db_filter`. You may also use :option:`-d ` to provide your own (comma-separated) list of available databases to filter from, instead of letting the system fetch them all from the database backend." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:449 -msgid "Once your ``db_name`` and ``db_filter`` are configured and only match a single database per hostname, you should set ``list_db`` configuration option to ``False``, to prevent listing databases entirely, and to block access to the database management screens (this is also exposed as the :option:`--no-database-list ` command-line option)" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:455 -msgid "Make sure the PostgreSQL user (:option:`--db_user `) is *not* a super-user, and that your databases are owned by a different user. For example they could be owned by the ``postgres`` super-user if you are using a dedicated non-privileged ``db_user``. See also :ref:`setup/deploy/odoo`." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:460 -msgid "Keep installations updated by regularly installing the latest builds, either via GitHub or by downloading the latest version from https://www.odoo.com/page/download or http://nightly.odoo.com" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:464 -msgid "Configure your server in multi-process mode with proper limits matching your typical usage (memory/CPU/timeouts). See also :ref:`builtin_server`." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:467 -msgid "Run Odoo behind a web server providing HTTPS termination with a valid SSL certificate, in order to prevent eavesdropping on cleartext communications. SSL certificates are cheap, and many free options exist. Configure the web proxy to limit the size of requests, set appropriate timeouts, and then enable the :option:`proxy mode ` option. See also :ref:`https_proxy`." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:474 -msgid "If you need to allow remote SSH access to your servers, make sure to set a strong password for **all** accounts, not just `root`. It is strongly recommended to entirely disable password-based authentication, and only allow public key authentication. Also consider restricting access via a VPN, allowing only trusted IPs in the firewall, and/or running a brute-force detection system such as `fail2ban` or equivalent." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:480 -msgid "Consider installing appropriate rate-limiting on your proxy or firewall, to prevent brute-force attacks and denial of service attacks. See also :ref:`login_brute_force` for specific measures." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:484 -msgid "Many network providers provide automatic mitigation for Distributed Denial of Service attacks (DDOS), but this is often an optional service, so you should consult with them." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:488 -msgid "Whenever possible, host your public-facing demo/test/staging instances on different machines than the production ones. And apply the same security precautions as for production." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:492 -msgid "If your public-facing Odoo server has access to sensitive internal network resources or services (e.g. via a private VLAN), implement appropriate firewall rules to protect those internal resources. This will ensure that the Odoo server cannot be used accidentally (or as a result of malicious user actions) to access or disrupt those internal resources. Typically this can be done by applying an outbound default DENY rule on the firewall, then only explicitly authorizing access to internal resources that the Odoo server needs to access. `Systemd IP traffic access control `_ may also be useful to implement per-process network access control." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:503 -msgid "If your public-facing Odoo server is behind a Web Application Firewall, a load-balancer, a transparent DDoS protection service (like CloudFlare) or a similar network-level device, you may wish to avoid direct access to the Odoo system. It is generally difficult to keep the endpoint IP addresses of your Odoo servers secret. For example they can appear in web server logs when querying public systems, or in the headers of emails posted from Odoo. In such a situation you may want to configure your firewall so that the endpoints are not accessible publicly except from the specific IP addresses of your WAF, load-balancer or proxy service. Service providers like CloudFlare usually maintain a public list of their IP address ranges for this purpose." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:514 -msgid "If you are hosting multiple customers, isolate customer data and files from each other using containers or appropriate \"jail\" techniques." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:517 -msgid "Setup daily backups of your databases and filestore data, and copy them to a remote archiving server that is not accessible from the server itself." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:524 -msgid "Blocking Brute Force Attacks" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:525 -msgid "For internet-facing deployments, brute force attacks on user passwords are very common, and this threat should not be neglected for Odoo servers. Odoo emits a log entry whenever a login attempt is performed, and reports the result: success or failure, along with the target login and source IP." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:529 -msgid "The log entries will have the following form." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:531 -msgid "Failed login::" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:535 -msgid "Successful login::" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:540 -msgid "These logs can be easily analyzed by an intrusion prevention system such as `fail2ban`." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:542 -msgid "For example, the following fail2ban filter definition should match a failed login::" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:549 -msgid "This could be used with a jail definition to block the attacking IP on HTTP(S)." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:551 -msgid "Here is what it could look like for blocking the IP for 15 minutes when 10 failed login attempts are detected from the same IP within 1 minute::" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:568 -msgid "Database Manager Security" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:570 -msgid ":ref:`setup/deploy/odoo` mentioned ``admin_passwd`` in passing." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:572 -msgid "This setting is used on all database management screens (to create, delete, dump or restore databases)." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:575 -msgid "If the management screens must not be accessible at all, you should set ``list_db`` configuration option to ``False``, to block access to all the database selection and management screens." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:581 -msgid "It is strongly recommended to disable the Database Manager for any internet-facing system! It is meant as a development/demo tool, to make it easy to quickly create and manage databases. It is not designed for use in production, and may even expose dangerous features to attackers. It is also not designed to handle large databases, and may trigger memory limits." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:587 -msgid "On production systems, database management operations should always be performed by the system administrator, including provisioning of new databases and automated backups." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:590 -msgid "Be sure to setup an appropriate ``db_name`` parameter (and optionally, ``db_filter`` too) so that the system can determine the target database for each request, otherwise users will be blocked as they won't be allowed to choose the database themselves." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:595 -msgid "If the management screens must only be accessible from a selected set of machines, use the proxy server's features to block access to all routes starting with ``/web/database`` except (maybe) ``/web/database/selector`` which displays the database-selection screen." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:599 -msgid "If the database-management screen should be left accessible, the ``admin_passwd`` setting must be changed from its ``admin`` default: this password is checked before allowing database-alteration operations." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:603 -msgid "It should be stored securely, and should be generated randomly e.g." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:609 -msgid "which will generate a 32 characters pseudorandom printable string." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:612 -msgid "Supported Browsers" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:614 -msgid "Odoo supports all the major desktop and mobile browsers available on the market, as long as they are supported by their publishers." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:617 -msgid "Here are the supported browsers:" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:619 -msgid "Google Chrome" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:620 -msgid "Mozilla Firefox" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:621 -msgid "Microsoft Edge" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:622 -msgid "Apple Safari" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:624 -msgid "Please make sure your browser is up-to-date and still supported by its publisher before filing a bug report." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:630 -msgid "Since Odoo 13.0, ES6 is supported. Therefore, IE support is dropped." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:634 -msgid "to have multiple Odoo installations use the same PostgreSQL database, or to provide more computing resources to both software." -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:637 -msgid "technically a tool like socat_ can be used to proxy UNIX sockets across networks, but that is mostly for software which can only be used over UNIX sockets" -msgstr "" - -#: ../../content/administration/deployment/deploy.rst:641 -msgid "or be accessible only over an internal packet-switched network, but that requires secured switches, protections against `ARP spoofing`_ and precludes usage of WiFi. Even over secure packet-switched networks, deployment over HTTPS is recommended, and possible costs are lowered as \"self-signed\" certificates are easier to deploy on a controlled environment than over the internet." -msgstr "" - -#: ../../content/administration/deployment/email_gateway.rst:4 -msgid "Odoo email gateway" -msgstr "" - -#: ../../content/administration/deployment/email_gateway.rst:6 -msgid "The Odoo mail gateway allows you to inject directly all the received emails in Odoo." -msgstr "" - -#: ../../content/administration/deployment/email_gateway.rst:8 -msgid "Its principle is straightforward: your SMTP server executes the \"mailgate\" script for every new incoming email." -msgstr "" - -#: ../../content/administration/deployment/email_gateway.rst:10 -msgid "The script takes care of connecting to your Odoo database through XML-RPC, and send the emails via the `MailThread.message_process()` feature." -msgstr "" - -#: ../../content/administration/deployment/email_gateway.rst:14 -msgid "Prerequisites" -msgstr "" - -#: ../../content/administration/deployment/email_gateway.rst:15 -msgid "Administrator access to the Odoo database." -msgstr "" - -#: ../../content/administration/deployment/email_gateway.rst:16 -msgid "Your own mail server such as Postfix or Exim." -msgstr "" - -#: ../../content/administration/deployment/email_gateway.rst:17 -msgid "Technical knowledge on how to configure an email server." -msgstr "" - -#: ../../content/administration/deployment/email_gateway.rst:20 -msgid "For Postfix" -msgstr "" - -#: ../../content/administration/deployment/email_gateway.rst:21 -msgid "In you alias config (:file:`/etc/aliases`):" -msgstr "" - -#: ../../content/administration/deployment/email_gateway.rst:28 -#: ../../content/administration/deployment/email_gateway.rst:42 -msgid "Resources" -msgstr "" - -#: ../../content/administration/deployment/email_gateway.rst:30 -msgid "`Postfix `_" -msgstr "" - -#: ../../content/administration/deployment/email_gateway.rst:31 -msgid "`Postfix aliases `_" -msgstr "" - -#: ../../content/administration/deployment/email_gateway.rst:32 -msgid "`Postfix virtual `_" -msgstr "" - -#: ../../content/administration/deployment/email_gateway.rst:36 -msgid "For Exim" -msgstr "" - -#: ../../content/administration/deployment/email_gateway.rst:44 -msgid "`Exim `_" -msgstr "" - -#: ../../content/administration/deployment/email_gateway.rst:47 -msgid "If you don't have access/manage your email server, use :ref:`inbound messages `." -msgstr "" - -#: ../../content/administration/enterprise.rst:6 -msgid "From Community to Enterprise" -msgstr "" - -#: ../../content/administration/enterprise.rst:8 -msgid "Depending on your current installation, there are multiple ways to upgrade your community version. In any case the basic guidelines are:" -msgstr "" - -#: ../../content/administration/enterprise.rst:12 -#: ../../content/administration/enterprise.rst:31 -#: ../../content/administration/enterprise.rst:63 -#: ../../content/administration/enterprise.rst:80 -msgid "Backup your community database" -msgstr "" - -#: ../../content/administration/enterprise.rst:17 -#: ../../content/administration/enterprise.rst:62 -msgid "Shutdown your server" -msgstr "" - -#: ../../content/administration/enterprise.rst:19 -msgid "Install the web_enterprise module" -msgstr "" - -#: ../../content/administration/enterprise.rst:21 -msgid "Restart your server" -msgstr "" - -#: ../../content/administration/enterprise.rst:23 -msgid "Enter your Odoo Enterprise Subscription code" -msgstr "" - -#: ../../content/administration/enterprise.rst:29 -msgid "On Linux, using an installer" -msgstr "" - -#: ../../content/administration/enterprise.rst:33 -msgid "Stop the odoo service" -msgstr "" - -#: ../../content/administration/enterprise.rst:39 -msgid "Install the enterprise .deb (it should install over the community package)" -msgstr "" - -#: ../../content/administration/enterprise.rst:45 -msgid "Update your database to the enterprise packages using" -msgstr "" - -#: ../../content/administration/enterprise.rst:51 -msgid "You should be able to connect to your Odoo Enterprise instance using your usual mean of identification. You can then link your database with your Odoo Enterprise Subscription by entering the code you received by e-mail in the form input" -msgstr "" - -#: ../../content/administration/enterprise.rst:57 -msgid "On Linux, using the source code" -msgstr "" - -#: ../../content/administration/enterprise.rst:59 -msgid "There are many ways to launch your server when using sources, and you probably have your own favourite. You may need to adapt sections to your usual workflow." -msgstr "" - -#: ../../content/administration/enterprise.rst:64 -msgid "Update the ``--addons-path`` parameter of your launch command (see :ref:`setup/install/source`)" -msgstr "" - -#: ../../content/administration/enterprise.rst:65 -msgid "Install the web_enterprise module by using" -msgstr "" - -#: ../../content/administration/enterprise.rst:71 -msgid "Depending on the size of your database, this may take some time." -msgstr "" - -#: ../../content/administration/enterprise.rst:73 -msgid "Restart your server with the updated addons path of point 3. You should be able to connect to your instance. You can then link your database with your Odoo Enterprise Subscription by entering the code you received by e-mail in the form input" -msgstr "" - -#: ../../content/administration/enterprise.rst:78 -msgid "On Windows" -msgstr "" - -#: ../../content/administration/enterprise.rst:82 -msgid "Uninstall Odoo Community (using the Uninstall executable in the installation folder) - PostgreSQL will remain installed" -msgstr "" - -#: ../../content/administration/enterprise.rst:88 -msgid "Launch the Odoo Enterprise Installer and follow the steps normally. When choosing the installation path, you can set the folder of the Community installation (this folder still contains the PostgreSQL installation). Uncheck ``Start Odoo`` at the end of the installation" -msgstr "" - -#: ../../content/administration/enterprise.rst:96 -msgid "Using a command window, update your Odoo Database using this command (from the Odoo installation path, in the server subfolder)" -msgstr "" - -#: ../../content/administration/enterprise.rst:103 -msgid "No need to manually launch the server, the service is running. You should be able to connect to your Odoo Enterprise instance using your usual mean of identification. You can then link your database with your Odoo Enterprise Subscription by entering the code you received by e-mail in the form input" -msgstr "" - -#: ../../content/administration/install.rst:6 -msgid "Installing Odoo" -msgstr "" - -#: ../../content/administration/install.rst:8 -msgid "There are multiple ways to install Odoo, or not install it at all, depending on the intended use case." -msgstr "" - -#: ../../content/administration/install.rst:11 -msgid "This documents attempts to describe most of the installation options." -msgstr "" - -#: ../../content/administration/install.rst:14 -msgid ":ref:`setup/install/online`" -msgstr "" - -#: ../../content/administration/install.rst:14 -msgid "The easiest way to use Odoo in production or to try it." -msgstr "" - -#: ../../content/administration/install.rst:18 -msgid ":ref:`setup/install/packaged`" -msgstr "" - -#: ../../content/administration/install.rst:17 -msgid "Suitable for testing Odoo, developing modules and can be used for long-term production use with additional deployment and maintenance work." -msgstr "" - -#: ../../content/administration/install.rst:23 -msgid ":ref:`setup/install/source`" -msgstr "" - -#: ../../content/administration/install.rst:21 -msgid "Provides greater flexibility: e.g. allow multiple running Odoo versions on the same system. Good for developing modules, can be used as base for production deployment." -msgstr "" - -#: ../../content/administration/install.rst:28 -msgid ":ref:`setup/install/docker`" -msgstr "" - -#: ../../content/administration/install.rst:26 -msgid "If you usually use docker_ for development or deployment, an official docker_ base image is available." -msgstr "" - -#: ../../content/administration/install.rst:33 -msgid "Editions" -msgstr "" - -#: ../../content/administration/install.rst:35 -msgid "There are two different Editions_ of Odoo: the Community and Enterprise versions. Using the Enterprise version is possible on our SaaS_ and accessing the code is restricted to Enterprise customers and partners. The Community version is freely available to anyone." -msgstr "" - -#: ../../content/administration/install.rst:40 -msgid "If you already use the Community version and wish to upgrade to Enterprise, please refer to :ref:`setup/enterprise` (except for :ref:`setup/install/source`)." -msgstr "" - -#: ../../content/administration/install.rst:47 -msgid "Online" -msgstr "" - -#: ../../content/administration/install.rst:50 -msgid "Demo" -msgstr "" - -#: ../../content/administration/install.rst:52 -msgid "To simply get a quick idea of Odoo, demo_ instances are available. They are shared instances which only live for a few hours, and can be used to browse around and try things out with no commitment." -msgstr "" - -#: ../../content/administration/install.rst:56 -msgid "Demo_ instances require no local installation, just a web browser." -msgstr "" - -#: ../../content/administration/install.rst:59 -msgid "SaaS" -msgstr "" - -#: ../../content/administration/install.rst:61 -msgid "Trivial to start with, fully managed and migrated by Odoo S.A., Odoo's SaaS_ provides private instances and starts out free. It can be used to discover and test Odoo and do non-code customizations (i.e. incompatible with custom modules or the Odoo Apps Store) without having to install it locally." -msgstr "" - -#: ../../content/administration/install.rst:66 -msgid "Can be used for both testing Odoo and long-term production use." -msgstr "" - -#: ../../content/administration/install.rst:68 -msgid "Like demo_ instances, SaaS_ instances require no local installation, a web browser is sufficient." -msgstr "" - -#: ../../content/administration/install.rst:75 -msgid "Packaged installers" -msgstr "" - -#: ../../content/administration/install.rst:77 -msgid "Odoo provides packaged installers for Windows, deb-based distributions (Debian, Ubuntu, …) and RPM-based distributions (Fedora, CentOS, RHEL, …) for both the Community and Enterprise versions." -msgstr "" - -#: ../../content/administration/install.rst:81 -msgid "These packages automatically set up all dependencies (for the Community version), but may be difficult to keep up-to-date." -msgstr "" - -#: ../../content/administration/install.rst:84 -msgid "Official Community packages with all relevant dependency requirements are available on our nightly_ server. Both Communtiy and Enterprise packages can be downloaded from our download_ page (you must to be logged in as a paying customer or partner to download the Enterprise packages)." -msgstr "" - -#: ../../content/administration/install.rst:90 -#: ../../content/administration/install.rst:226 -msgid "Windows" -msgstr "" - -#: ../../content/administration/install.rst:92 -msgid "Download the installer from our nightly_ server (Community only) or the Windows installer from the download_ page (any edition)." -msgstr "" - -#: ../../content/administration/install.rst:94 -msgid "Execute the downloaded file." -msgstr "" - -#: ../../content/administration/install.rst:0 -msgid "On Windows 8 and later you may see a warning titled \"Windows protected your PC\"." -msgstr "" - -#: ../../content/administration/install.rst:0 -msgid "Click on **More Info** and then on **Run anyway**." -msgstr "" - -#: ../../content/administration/install.rst:99 -msgid "Accept the UAC_ prompt." -msgstr "" - -#: ../../content/administration/install.rst:100 -msgid "Go through the various installation steps." -msgstr "" - -#: ../../content/administration/install.rst:102 -msgid "Odoo will automatically be started at the end of the installation." -msgstr "" - -#: ../../content/administration/install.rst:105 -#: ../../content/administration/install.rst:390 -msgid "Linux" -msgstr "" - -#: ../../content/administration/install.rst:108 -msgid "Debian/Ubuntu" -msgstr "" - -#: ../../content/administration/install.rst:110 -msgid "Odoo 14.0 'deb' package currently supports `Debian Buster`_, `Ubuntu 20.04`_ or above." -msgstr "" - -#: ../../content/administration/install.rst:112 -#: ../../content/administration/install.rst:172 -#: ../../content/administration/install.rst:341 -#: ../../content/administration/install.rst:512 -#: ../../content/administration/install.rst:674 -msgid "`wkhtmltopdf` is not installed through **pip** and must be installed manually in version `0.12.5 `_ for it to support headers and footers. See our `wiki `_ for more details on the various versions." -msgstr "" - -#: ../../content/administration/install.rst:118 -#: ../../content/administration/install.rst:178 -msgid "Repository" -msgstr "" - -#: ../../content/administration/install.rst:120 -msgid "Odoo S.A. provides a repository that can be used with Debian and Ubuntu distributions. It can be used to install *Odoo Community Edition* by executing the following commands:" -msgstr "" - -#: ../../content/administration/install.rst:129 -msgid "You can then use the usual `apt-get upgrade` command to keep your installation up-to-date." -msgstr "" - -#: ../../content/administration/install.rst:131 -msgid "At this moment, there is no nightly repository for the Enterprise Edition." -msgstr "" - -#: ../../content/administration/install.rst:134 -msgid "Deb Package" -msgstr "" - -#: ../../content/administration/install.rst:136 -msgid "Instead of using the repository as described above, the 'deb' packages for both the *Community* and *Enterprise* editions can be downloaded from the `official download page `_." -msgstr "" - -#: ../../content/administration/install.rst:139 -msgid "Next, execute the following commands:" -msgstr "" - -#: ../../content/administration/install.rst:145 -msgid "This will install Odoo as a service, create the necessary PostgreSQL_ user and automatically start the server." -msgstr "" - -#: ../../content/administration/install.rst:148 -msgid "The recommended `postgresql-server` package will be installed by the Debian Odoo package. The `--no-install-recommends` argument of the `apt-get` tool should be used if you plan to install the Postgresql server on another machine." -msgstr "" - -#: ../../content/administration/install.rst:153 -msgid "Fedora" -msgstr "" - -#: ../../content/administration/install.rst:155 -msgid "Odoo 14.0 'rpm' package supports Fedora 32." -msgstr "" - -#: ../../content/administration/install.rst:157 -msgid "The Odoo 14.0 rpm package does not support Fedora 33 or above." -msgstr "" - -#: ../../content/administration/install.rst:160 -#: ../../content/administration/install.rst:274 -#: ../../content/administration/install.rst:438 -#: ../../content/administration/install.rst:607 -msgid "Prepare" -msgstr "" - -#: ../../content/administration/install.rst:161 -msgid "Odoo needs a `PostgreSQL`_ server to run properly. Make sure that the `sudo` command is available and well configured and, only then, execute the following command in order to install the PostgreSQL server:" -msgstr "" - -#: ../../content/administration/install.rst:180 -msgid "Odoo S.A. provides a repository that can be used with the Fedora distributions. It can be used to install *Odoo Community Edition* by executing the following commands:" -msgstr "" - -#: ../../content/administration/install.rst:192 -msgid "RPM package" -msgstr "" - -#: ../../content/administration/install.rst:194 -msgid "Instead of using the repository as described above, the 'rpm' packages for both the *Community* and *Enterprise* editions can be downloaded from the `official download page `_." -msgstr "" - -#: ../../content/administration/install.rst:197 -msgid "Once downloaded, the package can be installed using the 'dnf' package manager:" -msgstr "" - -#: ../../content/administration/install.rst:209 -msgid "Source Install" -msgstr "" - -#: ../../content/administration/install.rst:211 -msgid "The source \"installation\" is really about not installing Odoo, and running it directly from source instead." -msgstr "" - -#: ../../content/administration/install.rst:214 -msgid "This can be more convenient for module developers as the Odoo source is more easily accessible than using packaged installation (for information or to build this documentation and have it available offline)." -msgstr "" - -#: ../../content/administration/install.rst:218 -msgid "It also makes starting and stopping Odoo more flexible and explicit than the services set up by the packaged installations, and allows overriding settings using :ref:`command-line parameters ` without needing to edit a configuration file." -msgstr "" - -#: ../../content/administration/install.rst:222 -msgid "Finally it provides greater control over the system's set up, and allows to more easily keep (and run) multiple versions of Odoo side-by-side." -msgstr "" - -#: ../../content/administration/install.rst:229 -#: ../../content/administration/install.rst:393 -#: ../../content/administration/install.rst:562 -msgid "Fetch the sources" -msgstr "" - -#: ../../content/administration/install.rst:231 -#: ../../content/administration/install.rst:395 -#: ../../content/administration/install.rst:564 -msgid "There are two ways to obtain the source code of Odoo: as a zip **archive** or through **git**." -msgstr "" - -#: ../../content/administration/install.rst:234 -#: ../../content/administration/install.rst:398 -#: ../../content/administration/install.rst:567 -msgid "Archive" -msgstr "" - -#: ../../content/administration/install.rst:236 -#: ../../content/administration/install.rst:253 -#: ../../content/administration/install.rst:400 -#: ../../content/administration/install.rst:417 -#: ../../content/administration/install.rst:569 -#: ../../content/administration/install.rst:586 -msgid "Community Edition:" -msgstr "" - -#: ../../content/administration/install.rst:238 -#: ../../content/administration/install.rst:244 -#: ../../content/administration/install.rst:402 -#: ../../content/administration/install.rst:408 -#: ../../content/administration/install.rst:571 -#: ../../content/administration/install.rst:577 -msgid "`Official download page `_" -msgstr "" - -#: ../../content/administration/install.rst:239 -#: ../../content/administration/install.rst:403 -#: ../../content/administration/install.rst:572 -msgid "`GitHub repository `_" -msgstr "" - -#: ../../content/administration/install.rst:240 -#: ../../content/administration/install.rst:404 -#: ../../content/administration/install.rst:573 -msgid "`Nightly server `_" -msgstr "" - -#: ../../content/administration/install.rst:242 -#: ../../content/administration/install.rst:406 -#: ../../content/administration/install.rst:575 -msgid "Enterprise Edition:" -msgstr "" - -#: ../../content/administration/install.rst:245 -#: ../../content/administration/install.rst:409 -#: ../../content/administration/install.rst:578 -msgid "`GitHub repository `_" -msgstr "" - -#: ../../content/administration/install.rst:248 -#: ../../content/administration/install.rst:412 -#: ../../content/administration/install.rst:581 -msgid "Git" -msgstr "" - -#: ../../content/administration/install.rst:250 -#: ../../content/administration/install.rst:414 -#: ../../content/administration/install.rst:583 -msgid "The following requires git_ to be installed on your machine and that you have basic knowledge of git commands." -msgstr "" - -#: ../../content/administration/install.rst:260 -#: ../../content/administration/install.rst:424 -#: ../../content/administration/install.rst:593 -msgid "Enterprise Edition: (see :ref:`setup/install/editions` to get access)" -msgstr "" - -#: ../../content/administration/install.rst:266 -#: ../../content/administration/install.rst:430 -#: ../../content/administration/install.rst:599 -msgid "**The Enterprise git repository does not contain the full Odoo source code**. It is only a collection of extra add-ons. The main server code is in the Community version. Running the Enterprise version actually means running the server from the Community version with the addons-path option set to the folder with the Enterprise version. You need to clone both the Community and Enterprise repository to have a working Odoo Enterprise installation." -msgstr "" - -#: ../../content/administration/install.rst:277 -#: ../../content/administration/install.rst:441 -#: ../../content/administration/install.rst:610 -msgid "Python" -msgstr "" - -#: ../../content/administration/install.rst:279 -msgid "Odoo requires Python 3.6 or later to run. Visit `Python's download page `_ to download and install the latest version of Python 3 on your machine." -msgstr "" - -#: ../../content/administration/install.rst:282 -msgid "During installation, check **Add Python 3 to PATH**, then click **Customize Installation** and make sure that **pip** is checked." -msgstr "" - -#: ../../content/administration/install.rst:285 -#: ../../content/administration/install.rst:446 -#: ../../content/administration/install.rst:615 -msgid "If Python 3 is already installed, make sure that the version is 3.6 or above, as previous versions are not compatible with Odoo." -msgstr "" - -#: ../../content/administration/install.rst:292 -#: ../../content/administration/install.rst:453 -#: ../../content/administration/install.rst:622 -msgid "Verify also that pip_ is installed for this version." -msgstr "" - -#: ../../content/administration/install.rst:301 -msgid "Odoo uses PostgreSQL as database management system. `Download and install PostgreSQL `_ (supported version: 10.0 and later)." -msgstr "" - -#: ../../content/administration/install.rst:304 -#: ../../content/administration/install.rst:471 -#: ../../content/administration/install.rst:634 -msgid "By default, the only user is `postgres` but Odoo forbids connecting as `postgres`, so you need to create a new PostgreSQL user:" -msgstr "" - -#: ../../content/administration/install.rst:307 -msgid "Add PostgreSQL's `bin` directory (by default: `C:\\\\Program Files\\\\PostgreSQL\\\\\\\\bin`) to your `PATH`." -msgstr "" - -#: ../../content/administration/install.rst:309 -msgid "Create a postgres user with a password using the pg admin gui:" -msgstr "" - -#: ../../content/administration/install.rst:311 -msgid "Open **pgAdmin**." -msgstr "" - -#: ../../content/administration/install.rst:312 -msgid "Double-click the server to create a connection." -msgstr "" - -#: ../../content/administration/install.rst:313 -msgid "Select :menuselection:`Object --> Create --> Login/Group Role`." -msgstr "" - -#: ../../content/administration/install.rst:314 -msgid "Enter the username in the **Role Name** field (e.g. `odoo`)." -msgstr "" - -#: ../../content/administration/install.rst:315 -msgid "Open the **Definition** tab and enter the password (e.g. ``odoo``), then click **Save**." -msgstr "" - -#: ../../content/administration/install.rst:316 -msgid "Open the **Privileges** tab and switch **Can login?** to `Yes` and **Create database?** to `Yes`." -msgstr "" - -#: ../../content/administration/install.rst:320 -#: ../../content/administration/install.rst:483 -#: ../../content/administration/install.rst:646 -msgid "Dependencies" -msgstr "" - -#: ../../content/administration/install.rst:322 -msgid "Before installing the dependencies, you must download and install the `Build Tools for Visual Studio `_. When prompted, select **C++ build tools** in the **Workloads** tab and install them." -msgstr "" - -#: ../../content/administration/install.rst:326 -#: ../../content/administration/install.rst:497 -#: ../../content/administration/install.rst:648 -msgid "Odoo dependencies are listed in the `requirements.txt` file located at the root of the Odoo community directory." -msgstr "" - -#: ../../content/administration/install.rst:329 -#: ../../content/administration/install.rst:500 -#: ../../content/administration/install.rst:651 -msgid "It can be preferable to not mix python modules packages between different instances of Odoo or with your system. You can use virtualenv_ to create isolated Python environments." -msgstr "" - -#: ../../content/administration/install.rst:332 -msgid "Navigate to the path of your Odoo Community installation (`CommunityPath`) and run **pip** on the requirements file in a terminal **with Administrator privileges**:" -msgstr "" - -#: ../../content/administration/install.rst:346 -#: ../../content/administration/install.rst:517 -#: ../../content/administration/install.rst:679 -msgid "For languages with right-to-left interface (such as Arabic or Hebrew), the package `rtlcss` is needed:" -msgstr "" - -#: ../../content/administration/install.rst:349 -msgid "Download and install `nodejs `_." -msgstr "" - -#: ../../content/administration/install.rst:350 -#: ../../content/administration/install.rst:521 -#: ../../content/administration/install.rst:683 -msgid "Install `rtlcss`:" -msgstr "" - -#: ../../content/administration/install.rst:356 -msgid "Edit the System Environment's variable `PATH` to add the folder where `rtlcss.cmd` is located (typically: `C:\\\\Users\\\\\\\\AppData\\\\Roaming\\\\npm\\\\`)." -msgstr "" - -#: ../../content/administration/install.rst:360 -#: ../../content/administration/install.rst:528 -#: ../../content/administration/install.rst:690 -msgid "Running Odoo" -msgstr "" - -#: ../../content/administration/install.rst:362 -#: ../../content/administration/install.rst:530 -#: ../../content/administration/install.rst:692 -msgid "Once all dependencies are set up, Odoo can be launched by running `odoo-bin`, the command-line interface of the server. It is located at the root of the Odoo Community directory." -msgstr "" - -#: ../../content/administration/install.rst:365 -#: ../../content/administration/install.rst:533 -#: ../../content/administration/install.rst:695 -msgid "To configure the server, you can either specify :ref:`command-line arguments ` or a :ref:`configuration file `." -msgstr "" - -#: ../../content/administration/install.rst:368 -#: ../../content/administration/install.rst:536 -#: ../../content/administration/install.rst:698 -msgid "For the Enterprise edition, you must add the path to the `enterprise` addons to the `addons-path` argument. Note that it must come before the other paths in `addons-path` for addons to be loaded correctly." -msgstr "" - -#: ../../content/administration/install.rst:372 -#: ../../content/administration/install.rst:540 -#: ../../content/administration/install.rst:702 -msgid "Common necessary configurations are:" -msgstr "" - -#: ../../content/administration/install.rst:374 -msgid "PostgreSQL user and password." -msgstr "" - -#: ../../content/administration/install.rst:375 -#: ../../content/administration/install.rst:545 -#: ../../content/administration/install.rst:707 -msgid "Custom addon paths beyond the defaults, to load your own modules." -msgstr "" - -#: ../../content/administration/install.rst:377 -#: ../../content/administration/install.rst:547 -#: ../../content/administration/install.rst:709 -msgid "A typical way to run the server would be:" -msgstr "" - -#: ../../content/administration/install.rst:384 -msgid "Where `CommunityPath` is the path of the Odoo Community installation, `dbuser` is the PostgreSQL login, `dbpassword` is the PostgreSQL password and `mydb` is the default database to serve on `localhost:8069`. You can add other directory paths separated by a comma to ``addons`` at the end of the addons-path option." -msgstr "" - -#: ../../content/administration/install.rst:443 -msgid "Odoo requires Python 3.6 or later to run. Use your package manager to download and install Python 3 on your machine if it is not already done." -msgstr "" - -#: ../../content/administration/install.rst:462 -msgid "Odoo uses PostgreSQL as database management system. Use your package manager to download and install PostgreSQL (supported version: 10.0 and later)." -msgstr "" - -#: ../../content/administration/install.rst:465 -msgid "On Debian/Unbuntu, it can be achieved by executing the following:" -msgstr "" - -#: ../../content/administration/install.rst:479 -#: ../../content/administration/install.rst:642 -msgid "Because your PostgreSQL user has the same name as your Unix login, you will be able to connect to the database without password." -msgstr "" - -#: ../../content/administration/install.rst:485 -msgid "For libraries using native code, it is necessary to install development tools and native dependencies before the Python dependencies of Odoo. They are available in `-dev` or `-devel` packages for Python, PostgreSQL, libxml2, libxslt1, libevent, libsasl2 and libldap2." -msgstr "" - -#: ../../content/administration/install.rst:489 -msgid "On Debian/Unbuntu, the following command should install all the required libraries:" -msgstr "" - -#: ../../content/administration/install.rst:503 -#: ../../content/administration/install.rst:654 -msgid "Navigate to the path of your Odoo Community installation (`CommunityPath`) and run **pip** on the requirements file:" -msgstr "" - -#: ../../content/administration/install.rst:520 -msgid "Download and install **nodejs** and **npm** with your package manager." -msgstr "" - -#: ../../content/administration/install.rst:542 -#: ../../content/administration/install.rst:704 -msgid "PostgreSQL user and password. Odoo has no defaults beyond `psycopg2's defaults `_: connects over a UNIX socket on port `5432` with the current user and no password." -msgstr "" - -#: ../../content/administration/install.rst:554 -#: ../../content/administration/install.rst:716 -msgid "Where `CommunityPath` is the path of the Odoo Community installation and `mydb` is the default database to serve on `localhost:8069`. You can add other directory paths separated by a comma to ``addons`` at the end of the addons-path option." -msgstr "" - -#: ../../content/administration/install.rst:559 -msgid "Mac OS" -msgstr "" - -#: ../../content/administration/install.rst:612 -msgid "Odoo requires Python 3.6 or later to run. Use your preferred package manager (homebrew_, macports_) to download and install Python 3 on your machine if it is not already done." -msgstr "" - -#: ../../content/administration/install.rst:631 -msgid "Odoo uses PostgreSQL as database management system. Use `postgres.app `_ to download and install PostgreSQL (supported version: 10.0 and later)." -msgstr "" - -#: ../../content/administration/install.rst:663 -msgid "Non-Python dependencies need to be installed with a package manager:" -msgstr "" - -#: ../../content/administration/install.rst:665 -msgid "Download and install the **Command Line Tools**:" -msgstr "" - -#: ../../content/administration/install.rst:671 -msgid "Download and install the package manager of your choice (homebrew_, macports_)." -msgstr "" - -#: ../../content/administration/install.rst:672 -msgid "Install non-python dependencies." -msgstr "" - -#: ../../content/administration/install.rst:682 -msgid "Download and install **nodejs** with your preferred package manager (homebrew_, macports_)." -msgstr "" - -#: ../../content/administration/install.rst:724 -#: ../../content/administration/update.rst:147 -msgid "Docker" -msgstr "" - -#: ../../content/administration/install.rst:726 -msgid "The full documentation on how to use Odoo with Docker can be found on the official Odoo `docker image `_ page." -msgstr "" - -#: ../../content/administration/odoo_sh.rst:3 -msgid "Odoo sh" -msgstr "" - -#: ../../content/administration/odoo_sh/advanced.rst:4 -msgid "Advanced" -msgstr "" - -#: ../../content/administration/odoo_sh/advanced/containers.rst:4 -msgid "Containers" -msgstr "" - #: ../../content/administration/odoo_sh/advanced/containers.rst:9 msgid "Each build is isolated within its own container (Linux namespaced container)." msgstr "" @@ -2552,7 +3279,7 @@ msgid "``--stop-after-init`` will immediately shutdown the server instance after msgstr "" #: ../../content/administration/odoo_sh/advanced/containers.rst:169 -msgid "More options are available and detailed in the :doc:`CLI documentation `." +msgid "More options are available and detailed in the :doc:`CLI documentation `." msgstr "" #: ../../content/administration/odoo_sh/advanced/containers.rst:172 @@ -2619,6 +3346,10 @@ msgstr "" msgid "Finally, *via* the Odoo Shell, you can trigger the piece of code/function/method you want to debug." msgstr "" +#: ../../content/administration/odoo_sh/advanced/containers.rst:None +msgid "Console screenshot showing ``pdb`` running in an Odoo.sh shell." +msgstr "" + #: ../../content/administration/odoo_sh/advanced/frequent_technical_questions.rst:6 msgid "Frequent Technical Questions" msgstr "" @@ -2783,64 +3514,8 @@ msgstr "" msgid "If you're adding a repository that contains a lot of modules, you may want to ignore some of them in case there are any that are installed automatically. To do so, you can prefix your submodule folder with a :code:`.`. The platform will ignore this folder and you can hand pick your modules by creating symlinks to them from another folder." msgstr "" -#: ../../content/administration/odoo_sh/advanced/upgrade_your_database.rst:4 -msgid "Upgrade your database" -msgstr "" - -#: ../../content/administration/odoo_sh/advanced/upgrade_your_database.rst:9 -msgid "Download and Upload your database" -msgstr "" - -#: ../../content/administration/odoo_sh/advanced/upgrade_your_database.rst:11 -msgid "Download a dump of your database (from the :ref:`Builds view `), choose the exact copy and without filestore options. Upload the .sql.gz dump on https://upgrade.odoo.com/upload and select the Testing Purpose. If you have custom code, you can choose to have it upgraded by us, or do it yourself. Once it's processed, you'll get a dump of the database in return." -msgstr "" - -#: ../../content/administration/odoo_sh/advanced/upgrade_your_database.rst:17 -msgid "Do *not* upload *backups* of your production database (found in the Backups tab of the production branch) as these are incompatible with the Upgrade platform - they contain your complete sources, etc. that are not needed for the upgrade. Make sure to download a **Dump** instead - either through the Backups tab using the *Download Dump* button or through the Builds page by using the *Download Dump* entry of the contextual menu of your latest production build." -msgstr "" - -#: ../../content/administration/odoo_sh/advanced/upgrade_your_database.rst:23 -msgid "Test your upgraded database" -msgstr "" - -#: ../../content/administration/odoo_sh/advanced/upgrade_your_database.rst:25 -msgid "Create a staging branch that will run the upgraded database. Either make sure your production branch's code is compatible between the two Odoo versions and fork your production branch, or make a new staging branch containing the upgraded code." -msgstr "" - -#: ../../content/administration/odoo_sh/advanced/upgrade_your_database.rst:29 -msgid "Once the staging build is done (it doesn't matter if it failed due to the version incompatibility), import your upgraded dump in the backups tab of the branch. The platform will automatically detect the version of the dump and change the version of Odoo's source code to the corresponding version for the build." -msgstr "" - -#: ../../content/administration/odoo_sh/advanced/upgrade_your_database.rst:33 -msgid "Test the upgraded database and make sure everything runs as it's supposed to." -msgstr "" - -#: ../../content/administration/odoo_sh/advanced/upgrade_your_database.rst:36 -msgid "Replace your existing production database" -msgstr "" - -#: ../../content/administration/odoo_sh/advanced/upgrade_your_database.rst:38 -msgid "Once you've tested everything and you're satisfied, start the process over to get an up-to-date upgraded dump:" -msgstr "" - -#: ../../content/administration/odoo_sh/advanced/upgrade_your_database.rst:40 -msgid "Make a new dump of your production database (as described in step 1)" -msgstr "" - -#: ../../content/administration/odoo_sh/advanced/upgrade_your_database.rst:41 -msgid "Upload it on upgrade.odoo.com and select the Production purpose" -msgstr "" - -#: ../../content/administration/odoo_sh/advanced/upgrade_your_database.rst:42 -msgid "Receive the newly upgraded dump and import it in your production branch. The build might get marked as failed because the platform will run it with the upgraded databases' Odoo version together with the old custom code." -msgstr "" - -#: ../../content/administration/odoo_sh/advanced/upgrade_your_database.rst:44 -msgid "Merge or commit the upgraded custom code in the production branch" -msgstr "" - -#: ../../content/administration/odoo_sh/advanced/upgrade_your_database.rst:46 -msgid "If anything goes wrong, remember you can restore a backup. The platform will always make one before you make any Odoo.sh operation on the production database. If the restored backup comes from a previous version, the platform will detect it and change the project's Odoo version back if it needs to." +#: ../../content/administration/odoo_sh/getting_started.rst:5 +msgid "Get started" msgstr "" #: ../../content/administration/odoo_sh/getting_started/branches.rst:4 @@ -2882,7 +3557,7 @@ msgid "If your changes require the update of a module, such as a change in a for msgstr "" #: ../../content/administration/odoo_sh/getting_started/branches.rst:43 -msgid "This method is equivalent to perform an upgrade of the module through the Apps menu, or through the :code:`-u` switch of :doc:`the command line `." +msgid "This method is equivalent to perform an upgrade of the module through the Apps menu, or through the :code:`-u` switch of :doc:`the command line `." msgstr "" #: ../../content/administration/odoo_sh/getting_started/branches.rst:47 @@ -2919,7 +3594,7 @@ msgid "Disabling outgoing emails by intercepting them with a mailcatcher. An :re msgstr "" #: ../../content/administration/odoo_sh/getting_started/branches.rst:74 -msgid "Setting payment acquirers and shipping providers in test mode." +msgid "Setting payment providers and shipping providers in test mode." msgstr "" #: ../../content/administration/odoo_sh/getting_started/branches.rst:75 @@ -3082,102 +3757,110 @@ msgstr "" msgid "You can zoom, change the time range or select a specific metric on each graph. On the graphs, annotations help you relate to changes on the build (database import, git push, etc...)." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:217 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:219 #: ../../content/administration/odoo_sh/getting_started/settings.rst:56 #: ../../content/administration/odoo_sh/getting_started/settings.rst:68 msgid "Logs" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:218 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:220 msgid "A viewer to have a look to your server logs." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:223 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:225 msgid "Different logs are available:" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:225 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:227 msgid "install.log: The logs of the database installation. In a development branch, the logs of the tests are included." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:226 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:228 msgid "pip.log: The logs of the Python dependencies installation." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:227 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:229 msgid "odoo.log: The logs of the running server." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:228 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:230 msgid "update.log: The logs of the database updates." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:229 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:231 msgid "pg_long_queries.log: The logs of psql queries that take an unusual amount of time." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:231 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:233 msgid "If new lines are added in the logs, they will be displayed automatically. If you scroll to the bottom, the browser will scroll automatically each time a new line is added." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:234 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:236 msgid "You can pause the logs fetching by clicking on the according button in the upper right corner of the view. The fetching is automatically stopped after 5 minutes. You can restart it using the play button." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:240 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:242 #: ../../content/administration/odoo_sh/getting_started/settings.rst:76 msgid "Backups" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:241 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:243 msgid "A list of the backups available for download and restore, the ability to perform a manual backup and to import a database." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:247 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:249 msgid "Odoo.sh makes daily backups of the production database. It keeps 7 daily, 4 weekly and 3 monthly backups. Each backup includes the database dump, the filestore (attachments, binary fields), logs and sessions." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:250 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:252 msgid "Staging and development databases are not backed up. You nevertheless have the possibility to restore a backup of the production database in your staging branches, for testing purposes, or to manually recover data that has been deleted by accident from the production database." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:254 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:256 msgid "The list contains the backups kept on the server your production database is hosted on. This server only keeps one month of backups: 7 daily and 4 weekly backups." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:257 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:259 msgid "Dedicated backup servers keep the same backups, as well as 3 additional monthly backups. To restore or download one of these monthly backups, please `contact us `_." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:260 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:262 msgid "If you merge a commit updating the version of one or several modules (in :file:`__manifest__.py`), or their linked python dependencies (in :file:`requirements.txt`), then Odoo.sh performs a backup automatically (flagged with type Update in the list), as either the container will be changed by the installation of new pip packages, either the database itself will be changed with the module update triggered afterwards. In these two cases, we are doing a backup as it may potentially break things." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:266 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:268 msgid "If you merge a commit that only changes some code without the above-mentioned modifications, then no backup is done by Odoo.sh, as neither the container nor the database is modified so the platform considers this safe enough. Of course, as an extra precaution, you can make a backup manually before making big changes in your production sources in case something goes wrong (those manual backups are available for about one week). To avoid abuse, we limit manual backups to 5 per day." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:272 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:274 msgid "The *import database* feature accepts database archives in the format provided by:" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:274 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:276 msgid "the standard Odoo databases manager, (available for on-premise Odoo servers under :code:`/web/database/manager`)" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:276 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:278 msgid "the Odoo online databases manager," msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:277 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:279 msgid "the Odoo.sh backup download button of this *Backups* tab," msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:278 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:280 msgid "the Odoo.sh dump download button in the :ref:`Builds view `." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:283 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:287 +msgid "Available for production and staging branches for valid projects." +msgstr "" + +#: ../../content/administration/odoo_sh/getting_started/branches.rst:290 +msgid ":doc:`Upgrade - Odoo.sh <../../upgrade/odoo_sh>`" +msgstr "" + +#: ../../content/administration/odoo_sh/getting_started/branches.rst:295 #: ../../content/administration/odoo_sh/getting_started/settings.rst:4 #: ../../content/administration/odoo_sh/getting_started/settings.rst:62 #: ../../content/administration/odoo_sh/getting_started/settings.rst:78 @@ -3185,304 +3868,300 @@ msgstr "" msgid "Settings" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:284 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:297 msgid "Here you can find a couple of settings that only apply to the currently selected branch." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:289 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:302 msgid "**Behaviour upon new commit**" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:291 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:304 msgid "For development and staging branches, you can change the branch's behavior upon receiving a new commit. By default, a development branch will create a new build and a staging branch will update the previous build (see the :ref:`Production Stage `). This is especially useful should the feature you're working on require a particular setup or configuration, to avoid having to manually set it up again on every commit. If you choose new build for a staging branch, it will make a fresh copy from the production build every time a commit is pushed. A branch that is put back from staging to development will automatically be set to 'Do nothing'." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:299 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:312 msgid "**Modules installation**" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:301 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:314 msgid "Choose the modules to install automatically for your development builds." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:306 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:319 msgid "*Install only my modules* will install the modules of the branch only. This is the default option. The :ref:`submodules ` are excluded." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:308 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:321 msgid "*Full installation (all modules)* will install the modules of the branch, the modules included in the submodules and all standard modules of Odoo. When running the full installation, the test suite is disabled." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:310 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:323 msgid "*Install a list of modules* will install the modules specified in the input just below this option. The names are the technical name of the modules, and they must be comma-separated." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:313 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:326 msgid "If the tests are enabled, the standard Odoo modules suite can take up to 1 hour. This setting applies to development builds only. Staging builds duplicate the production build and the production build only installs base." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:318 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:331 msgid "**Test suite**" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:320 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:333 msgid "For development branches, you can choose to enable or disable the test suite. It's enabled by default. When the test suite is enabled, you can restrict them by specifying test tags :ref:`test tags `." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:324 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:337 msgid "**Odoo Version**" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:326 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:339 msgid "For development branches only, you can change the version of Odoo, should you want to test upgraded code or develop features while your production database is in the process of being upgraded to a newer version." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:329 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:342 msgid "In addition, for each version you have two options regarding the code update." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:331 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:344 msgid "You can choose to benefit from the latest bug, security and performance fixes automatically. The sources of your Odoo server will be updated weekly. This is the 'Latest' option." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:333 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:346 msgid "You can choose to pin the Odoo sources to a specific revision by selecting them from a list of dates. Revisions will expire after 3 months. You will be notified by mail when the expiration date approaches and if you don't take action afterwards, you will automatically be set to the latest revision." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:338 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:351 msgid "**Custom domains**" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:340 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:353 msgid "Here you can configure additional domains for the selected branch. It's possible to add other *.odoo.com* domains or your own custom domains. For the latter you have to:" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:343 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:356 msgid "own or purchase the domain name," msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:344 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:357 msgid "add the domain name in this list," msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:345 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:358 msgid "in your registrar's domain name manager, configure the domain name with a ``CNAME`` record set to your production database domain name." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:348 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:361 msgid "For instance, to associate *www.mycompany.com* to your database *mycompany.odoo.com*:" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:350 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:363 msgid "in Odoo.sh, add *www.mycompany.com* in the custom domains of your project settings," msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:351 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:364 msgid "in your domain name manager (e.g. *godaddy.com*, *gandi.net*, *ovh.com*), configure *www.mycompany.com* with a ``CNAME`` record with as value *mycompany.odoo.com*." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:354 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:367 msgid "Bare domains (e.g. *mycompany.com*) are not accepted:" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:356 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:369 msgid "they can only be configured using ``A`` records," msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:357 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:370 msgid "``A`` records only accept IP addresses as value," msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:358 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:371 msgid "the IP address of your database can change, following an upgrade, a hardware failure or your wish to host your database in another country or continent." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:361 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:374 msgid "Therefore, bare domains could suddenly no longer work because of this change of IP address." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:363 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:376 msgid "In addition, if you would like both *mycompany.com* and *www.mycompany.com* to work with your database, having the first redirecting to the second is amongst the `SEO best practices `_ (See *Provide one version of a URL to reach a document*) in order to have one dominant URL. You can therefore just configure *mycompany.com* to redirect to *www.mycompany.com*. Most domain managers have the feature to configure this redirection. This is commonly called a web redirection." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:370 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:383 msgid "**HTTPS/SSL**" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:372 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:385 msgid "If the redirection is correctly set up, the platform will automatically generate an SSL certificate with `Let's Encrypt `_ within the hour and your domain will be accessible through HTTPS." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:376 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:389 msgid "While it is currently not possible to configure your own SSL certificates on the Odoo.sh platform we are considering the feature if there is enough demand." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:380 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:393 msgid "**SPF and DKIM compliance**" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:382 -msgid "In case the domain of your users email addresses use SPF (Sender Policy Framework) or DKIM (DomainKeys Identified Mail), don't forget to authorize Odoo as a sending host in your domain name settings to increase the deliverability of your outgoing emails. The configuration steps are explained in the :ref:`Discuss app documentation `." +#: ../../content/administration/odoo_sh/getting_started/branches.rst:395 +msgid "In case the domain of your users email addresses use SPF (Sender Policy Framework) or DKIM (DomainKeys Identified Mail), don't forget to authorize Odoo as a sending host in your domain name settings to increase the deliverability of your outgoing emails. The configuration steps are explained in the documentation about :ref:`SPF ` and :ref:`DKIM `." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:388 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:403 msgid "Forgetting to configure your SPF or DKIM to authorize Odoo as a sending host can lead to the delivery of your emails as spam in your contacts inbox." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:393 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:408 msgid "Shell commands" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:394 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:409 msgid "In the top right-hand corner of the view, different shell commands are available." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:399 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:414 msgid "Each command can be copied in the clipboard to be used in a terminal, and some of them can be used directly from Odoo.sh by clicking the *run* button in such case a popup will prompt the user in order to define eventual placeholders such as ````, ````, ..." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:405 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:420 msgid "Clone" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:406 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:421 msgid "Download the Git repository." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:412 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:427 msgid "Clones the repository *odoo/odoo*." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:414 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:429 msgid ":code:`--recurse-submodules`: Downloads the submodules of your repository. Submodules included in the submodules are downloaded as well." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:415 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:430 msgid ":code:`--branch`: checks out a specific branch of the repository, in this case *master*." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:417 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:432 msgid "The *run* button is not available for this command, as it is meant to be used on your machines." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:420 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:435 msgid "Fork" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:421 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:436 msgid "Create a new branch based on the current branch." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:427 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:442 msgid "Creates a new branch called *feature-1* based on the branch *master*, and then checkouts it." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:433 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:448 msgid "Uploads the new branch *feature-1* on your remote repository." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:436 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:451 msgid "Merge" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:437 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:452 msgid "Merge the current branch in another branch." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:443 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:458 msgid "Merges the branch *staging-1* in the current branch." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:449 -#: ../../content/administration/odoo_sh/getting_started/branches.rst:521 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:464 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:536 msgid "Uploads the changes you just added in the *master* branch on your remote repository." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:452 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:467 msgid "SSH" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:454 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:469 msgid "Setup" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:455 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:470 msgid "In order to use SSH, you have to set up your profile SSH public key (if it is not already done). To do so, follow these steps:" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:458 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:473 msgid "`Generate a new SSH key `_" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:460 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:475 msgid "`Copy the SSH key to your clipboard `_ (only apply the step 1)" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:463 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:478 msgid "Paste the copied content to your profile SSH keys and press \"Add\"" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:468 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:483 msgid "The key should appear below" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:474 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:489 msgid "Connection" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:476 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:491 msgid "To connect to your builds using ssh use the following command in a terminal:" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:482 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:497 msgid "You will find a shortcut for this command into the SSH tab in the upper right corner." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:487 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:502 msgid "Provided you have the :ref:`correct access rights ` on the project, you'll be granted ssh access to the build." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:491 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:506 msgid "Long running ssh connections are not guaranteed. Idle connections will be disconnected in order to free up resources." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:496 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:511 msgid "Submodule" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:498 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:513 msgid "Add a branch from another repository in your current branch as a *submodule*." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:500 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:515 msgid "*Submodules* allows you to use modules from other repositories in your project." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:502 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:517 msgid "The submodules feature is detailed in the chapter :ref:`Submodules ` of this documentation." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:509 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:524 msgid "Adds the branch *master* of the repository ** as a submodule under the path ** in your current branch." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:515 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:530 msgid "Commits all your current changes." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:524 -msgid "Delete" -msgstr "" - -#: ../../content/administration/odoo_sh/getting_started/branches.rst:526 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:541 msgid "Delete a branch from your repository." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:532 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:547 msgid "Deletes the branch in your remote repository." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/branches.rst:538 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:553 msgid "Deletes the branch in your local copy of the repository." msgstr "" @@ -3711,123 +4390,123 @@ msgid "Import your database" msgstr "" #: ../../content/administration/odoo_sh/getting_started/create.rst:81 -msgid "You can import your database in your Odoo.sh project as long as this is an Odoo 10.0, 11.0 or above database." +msgid "You can import your database in your Odoo.sh project as long as it is in a :doc:`supported version ` of Odoo." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:84 +#: ../../content/administration/odoo_sh/getting_started/create.rst:85 msgid "Push your modules in production" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:86 +#: ../../content/administration/odoo_sh/getting_started/create.rst:87 msgid "If you use community or custom modules, add them in a branch in your Github repository. Databases hosted on the Odoo.com online platform do not have any custom modules. Users of these databases can therefore skip this step." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:90 +#: ../../content/administration/odoo_sh/getting_started/create.rst:91 msgid "You can structure your modules as you wish, Odoo.sh will automatically detect the folders containing Odoo addons. For instance, you can put all your modules folder in the root directory of your repository, or group the modules in folders by categories that you define (accounting, project, ...)." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:94 +#: ../../content/administration/odoo_sh/getting_started/create.rst:95 msgid "For community modules available in public Git repositories, you can also consider to add them using :ref:`Submodules `." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:97 +#: ../../content/administration/odoo_sh/getting_started/create.rst:98 msgid "Then, either :ref:`make this branch the production branch `, or :ref:`merge it into your production branch `." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:101 +#: ../../content/administration/odoo_sh/getting_started/create.rst:102 msgid "Download a backup" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:104 +#: ../../content/administration/odoo_sh/getting_started/create.rst:105 msgid "On-premise databases" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:106 +#: ../../content/administration/odoo_sh/getting_started/create.rst:107 msgid "Access the URL :file:`/web/database/manager` of your on-premise database and download a backup." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:110 +#: ../../content/administration/odoo_sh/getting_started/create.rst:111 msgid "If you cannot access the database manager, it may have been disabled by your system administrator. See the :ref:`database manager security documentation `." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:113 +#: ../../content/administration/odoo_sh/getting_started/create.rst:114 msgid "You will need the master password of your database server. If you do not have it, contact your system administrator." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:118 +#: ../../content/administration/odoo_sh/getting_started/create.rst:119 msgid "Choose a zip including the filestore as the backup format." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:124 +#: ../../content/administration/odoo_sh/getting_started/create.rst:125 msgid "Odoo Online databases" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:126 +#: ../../content/administration/odoo_sh/getting_started/create.rst:127 msgid "`Access your databases manager `_ and download a backup of your database." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:133 +#: ../../content/administration/odoo_sh/getting_started/create.rst:134 msgid "Saas releases (e.g. *saas-**) are not supported on Odoo.sh." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:136 +#: ../../content/administration/odoo_sh/getting_started/create.rst:137 msgid "Upload the backup" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:138 +#: ../../content/administration/odoo_sh/getting_started/create.rst:139 msgid "Then, in your Odoo.sh project, in the backups tab of your production branch, import the backup you just downloaded." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:143 +#: ../../content/administration/odoo_sh/getting_started/create.rst:144 msgid "Once the backup imported, you can access the database using the *Connect* button in the history of the branch." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:149 +#: ../../content/administration/odoo_sh/getting_started/create.rst:150 msgid "Check your outgoing email servers" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:151 -msgid "There is a default mail server provided with Odoo.sh. To use it, there must be no enabled outgoing mail server configured in your database in :menuselection:`Settings --> Technical --> Outgoing Mail Servers` (:doc:`Developer mode ` must be activated)." +#: ../../content/administration/odoo_sh/getting_started/create.rst:152 +msgid "There is a default mail server provided with Odoo.sh. To use it, there must be no enabled outgoing mail server configured in your database in :menuselection:`Settings --> Technical --> Outgoing Mail Servers` (:ref:`Developer mode ` must be activated)." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:156 +#: ../../content/administration/odoo_sh/getting_started/create.rst:157 msgid "After the import of your database, all outgoing email servers are disabled so you use the Odoo.sh email server provided by default." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:161 +#: ../../content/administration/odoo_sh/getting_started/create.rst:162 msgid "Port 25 is (and will stay) closed. If you want to connect to an external SMTP server, you should use ports 465 and 587." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:164 +#: ../../content/administration/odoo_sh/getting_started/create.rst:165 msgid "Check your scheduled actions" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:166 +#: ../../content/administration/odoo_sh/getting_started/create.rst:167 msgid "All scheduled actions are disabled after the import." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:168 +#: ../../content/administration/odoo_sh/getting_started/create.rst:169 msgid "This is to prevent your newly imported database to perform actions that could impact your running production, such as sending the mails remaining in the queue, processing mass mailings, or third-party services synchronization (Calendars, files hosting, ...)." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:172 +#: ../../content/administration/odoo_sh/getting_started/create.rst:173 msgid "If you plan to make the imported database your production, enable the scheduled actions you need. You can check what is enabled in the database of origin and enable the same actions in the imported database. Scheduled actions are located under :menuselection:`Settings --> Technical --> Automation --> Scheduled Actions`." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:177 +#: ../../content/administration/odoo_sh/getting_started/create.rst:178 msgid "Register your subscription" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:179 +#: ../../content/administration/odoo_sh/getting_started/create.rst:180 msgid "Your subscription is unlinked after the import." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:181 +#: ../../content/administration/odoo_sh/getting_started/create.rst:182 msgid "The imported database is considered a duplicate by default and the enterprise subscription is therefore removed, as you can only have one database linked per subscription." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/create.rst:184 -msgid "If you plan to make it your production, unlink your former database from the subscription, and register the newly imported database. Read the :ref:`database registration documentation ` for instructions." +#: ../../content/administration/odoo_sh/getting_started/create.rst:185 +msgid "If you plan to make it your production, unlink your former database from the subscription, and register the newly imported database. Read the :doc:`database registration documentation <../../maintain/on_premise>` for instructions." msgstr "" #: ../../content/administration/odoo_sh/getting_started/first_module.rst:4 @@ -3906,6 +4585,16 @@ msgstr "" msgid "|pic1| |pic2|" msgstr "" +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:40 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:40 +msgid "pic1" +msgstr "" + +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:43 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:43 +msgid "pic2" +msgstr "" + #: ../../content/administration/odoo_sh/getting_started/first_module.rst:47 msgid "Once the build created, you can access the editor and browse to the folder *~/src/user* to access to the code of your development branch." msgstr "" @@ -3943,7 +4632,7 @@ msgid "Or, from your computer, if you have an :ref:`installation of Odoo ` in which you replace every occurrences of *my_module* to the name of your choice." +msgid "If you do not want to bother installing Odoo on your computer, you can also :download:`download this module structure template ` in which you replace every occurrences of *my_module* to the name of your choice." msgstr "" #: ../../content/administration/odoo_sh/getting_started/first_module.rst:101 @@ -4101,7 +4790,7 @@ msgid "Your module may not appear directly in your apps to install either, you n msgstr "" #: ../../content/administration/odoo_sh/getting_started/first_module.rst:266 -msgid "activate the :doc:`Developer mode `" +msgid "Activate the :ref:`developer mode `" msgstr "" #: ../../content/administration/odoo_sh/getting_started/first_module.rst:267 @@ -4329,143 +5018,143 @@ msgstr "" msgid "The working directory is composed of the following folders:" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:50 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:49 msgid "You can edit the source code (files under */src*) in development and staging builds." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:53 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:52 msgid "Your changes won't be propagated to a new build, you must commit them in your source code if you want to make them persist." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:57 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:56 msgid "For production builds, the source code is read-only, because applying local changes on a production server is not a good practice." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:60 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:59 msgid "The source code of your Github repository is located under */src/user*," msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:61 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:60 msgid "The source code of Odoo is located under" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:63 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:62 msgid "*/src/odoo* (`odoo/odoo `_)," msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:64 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:63 msgid "*/src/enterprise* (`odoo/enterprise `_)," msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:65 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:64 msgid "*/src/themes* (`odoo/design-themes `_)." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:67 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:66 msgid "To open a file in the editor, just double-click on it in the file browser panel on the left." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:72 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:71 msgid "You can then begin to make your changes. You can save your changes with the menu :menuselection:`File --> Save .. File` or by hitting the :kbd:`Ctrl+S` shortcut." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:78 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:77 msgid "If you save a Python file which is under your Odoo server addons path, Odoo will detect it and reload automatically so your changes are reflected immediately, without having to restart the server manually." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:85 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:84 msgid "However, if the change is a data stored in database, such as the label of a field, or a view, you have to update the according module to apply the change. You can update the module of the currently opened file by using the menu :menuselection:`Odoo --> Update current module`. Note that the file considered as currently opened is the file focused in the text editor, not the file highlighted in the file browser." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:94 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:93 msgid "You can also open a terminal and execute the command:" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:103 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:102 msgid "Commit & Push your changes" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:105 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:104 msgid "You have the possibility to commit and push your changes to your Github repository." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:107 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:106 msgid "Open a terminal (:menuselection:`File --> New --> Terminal`)," msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:108 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:107 msgid "Change the directory to *~/src/user* using :code:`cd ~/src/user`," msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:109 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:108 msgid "Stage your changes using :code:`git add`," msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:110 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:109 msgid "Commit your changes using :code:`git commit`," msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:111 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:110 msgid "Push your changes using :code:`git push https HEAD:`." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:113 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:112 msgid "In this last command," msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:115 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:114 msgid "*https* is the name of your *HTTPS* Github remote repository (e.g. https://github.com/username/repository.git)," msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:117 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:116 msgid "HEAD is the reference to the latest revision you committed," msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:118 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:117 msgid " must be replaced by the name of the branch to which you want to push the changes, most-likely the current branch if you work in a development build." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:125 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:124 msgid "The SSH Github remote is not used because your SSH private key is not hosted in your build containers (for obvious security concerns) nor forwarded through an SSH Agent (as you access this editor through a web browser) and you therefore cannot authenticate yourself to Github using SSH. You have to use the HTTPS remote of your Github repository to push your changes, which is added automatically named as *https* in your Git remotes. You will be prompted to enter your Github username and password. If you activated the two-factor authentication on Github, you can create a `personal access token `_ and use it as password. Granting the ``repo`` permission suffices." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:139 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:138 msgid "The Git source folder *~/src/user* is not checked out on a branch but rather on a detached revision: This is because builds work on specific revisions rather than branches. In other words, this means you can have multiple builds on the same branch, but on different revisions." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:143 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:142 msgid "Once your changes are pushed, according to your :ref:`branch push behavior `, a new build may be created. You can continue to work in the editor you pushed from, as it will have the same revision as the new build that was created, but always make sure to be in an editor of a build using the latest revision of your branch." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:150 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:149 msgid "Consoles" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:152 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:151 msgid "You can open Python consoles, which are `IPython interactive shells `_. One of the most interesting addition to use a Python console rather than a IPython shell within a terminal is the `rich display `_ capabilities. Thanks to this, you will be able to display objects in HTML." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:160 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:159 msgid "You can for instance display cells of a CSV file using `pandas `_." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:166 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:165 msgid "You can also open an Odoo Shell console to play around with the Odoo registry and model methods of your database. You can also directly read or write on your records." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:171 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:170 msgid "In an Odoo Console, transactions are automatically committed. This means, for instance, that changes in records are applied effectively in the database. If you change the name of a user, the name of the user is changed in your database as well. You therefore should use Odoo consoles carefully on production databases." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:177 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:176 msgid "You can use *env* to invoke models of your database registry, e.g. :code:`env['res.users']`." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:187 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:186 msgid "The class :code:`Pretty` gives you the possibility to easily display lists and dicts in a pretty way, using the `rich display `_ mentioned above." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:195 +#: ../../content/administration/odoo_sh/getting_started/online-editor.rst:194 msgid "You can also use `pandas `_ to display graphs." msgstr "" @@ -4724,146 +5413,875 @@ msgstr "" msgid "The documentation will help you go live with your Odoo.sh project in no time." msgstr "" -#: ../../content/administration/update.rst:6 -msgid "Updating an Odoo installation" +#: ../../content/administration/upgrade.rst:20 +msgid "An upgrade is switching to a newer version of Odoo (e.g., Odoo 14.0 to Odoo 15.0)." msgstr "" -#: ../../content/administration/update.rst:9 -msgid "Introduction" +#: ../../content/administration/upgrade.rst:22 +msgid "An upgrade does not cover:" msgstr "" -#: ../../content/administration/update.rst:11 -msgid "In order to benefit from the latest improvements, security fixes, bug corrections and performance boosts, you may need to update your Odoo installation from time to time." +#: ../../content/administration/upgrade.rst:24 +msgid "Changing :ref:`editions ` (i.e., Community to Enterprise edition)" msgstr "" -#: ../../content/administration/update.rst:14 -msgid "This guide only applies when are using Odoo on your own hosting infrastructure. If you are using one of the Odoo Cloud solutions, updates are automatically performed for you." +#: ../../content/administration/upgrade.rst:25 +msgid "Switching :ref:`hosting type ` (i.e., On-Premise to Online or Odoo.sh)" msgstr "" -#: ../../content/administration/update.rst:17 -msgid "The terminology surrounding software updates is often confusing, so here are some preliminary definitions:" +#: ../../content/administration/upgrade.rst:27 +msgid "Migration from another ERP to Odoo" msgstr "" -#: ../../content/administration/update.rst:25 -msgid "Updating (an Odoo installation)" +#: ../../content/administration/upgrade.rst:29 +#: ../../content/administration/upgrade.rst:148 +#: ../../content/administration/upgrade.rst:252 +#: ../../content/administration/upgrade/faq.rst:81 +#: ../../content/administration/upgrade/faq.rst:92 +#: ../../content/administration/upgrade/faq.rst:119 +msgid "|assistance-contact|" msgstr "" -#: ../../content/administration/update.rst:21 -msgid "Refers to the process of obtaining the latest revision of the source code for your current Odoo Edition. For example, updating your Odoo Enterprise 13.0 to the latest revision. This does not directly cause any change to the contents of your Odoo database, and can be undone by reinstalling the previous revision of the source code." +#: ../../content/administration/upgrade.rst:32 +msgid ":ref:`upgrade/sla`" msgstr "" -#: ../../content/administration/update.rst:35 -msgid "Upgrading (an Odoo database)" +#: ../../content/administration/upgrade.rst:37 +msgid "Process workflow" msgstr "" -#: ../../content/administration/update.rst:28 -msgid "Refers to a complex data processing operation where the structure and contents of your database is permanently altered to make it compatible with a new release of Odoo. This operation is irreversible and typically accomplished via Odoo's `database upgrade service `_, when you decide to switch to a newer release of Odoo. Historically, this process has also been known as a \"migration\" because it involves moving data around inside the database, even though the database may end up at the same physical location after the upgrade." +#: ../../content/administration/upgrade.rst:39 +msgid "The upgrade process in a nutshell:" msgstr "" -#: ../../content/administration/update.rst:37 -msgid "This page describes the typical steps needed to *update* an Odoo installation to the latest version. If you'd like more information about upgrading a database, please visit the `Odoo Upgrade page `_ instead." +#: ../../content/administration/upgrade.rst:41 +msgid "You create a test upgrade request." msgstr "" -#: ../../content/administration/update.rst:43 -msgid "In a nutshell" +#: ../../content/administration/upgrade.rst:42 +msgid "Odoo processes the request automatically by running the database through an upgrade script, which takes between 20 and 120 minutes." msgstr "" -#: ../../content/administration/update.rst:45 -msgid "Updating Odoo is accomplished by simply reinstalling the latest version of your Odoo Edition on top of your current installation. This will preserve your data without any alteration, as long as you do not uninstall PostgreSQL (the database engine that comes with Odoo)." +#: ../../content/administration/upgrade.rst:44 +msgid "Odoo delivers a test database." msgstr "" -#: ../../content/administration/update.rst:49 -msgid "The main reference for updating is logically our :ref:`installation guide `, which explains the common installation methods." +#: ../../content/administration/upgrade.rst:45 +msgid "You test your database for possible discrepancies (see :ref:`upgrade/test-guidance`)." msgstr "" -#: ../../content/administration/update.rst:52 -msgid "Updating is also most appropriately accomplished by the person who deployed Odoo initially, because the procedure is very similar." +#: ../../content/administration/upgrade.rst:46 +msgid "If there are any discrepancies, you report them to the Upgrade support team via the help portal (see :ref:`upgrade/test-assistance`)." msgstr "" -#: ../../content/administration/update.rst:55 -msgid "We always recommend to download a complete new up-to-date Odoo version, rather than manually applying patches, such as the security patches that come with Security Advisories. The patches are mainly provided for installations that are heavily customized, or for technical personnel who prefer to apply minimal changes temporarily while testing a complete update." +#: ../../content/administration/upgrade.rst:48 +msgid "We fix the issues and send you a new test database." msgstr "" -#: ../../content/administration/update.rst:64 -msgid "Step 1: Download an updated Odoo version" +#: ../../content/administration/upgrade.rst:49 +msgid "Once you have completed the testing and are happy with the result, you decide on a date and time when you stop users from accessing Odoo, freeze all data entries, and create an upgrade request for the production upgrade." msgstr "" -#: ../../content/administration/update.rst:66 -msgid "The central download page is https://www.odoo.com/page/download. If you see a \"Buy\" link for the Odoo Enterprise download, make sure you are logged into Odoo.com with the same login that is linked to your Odoo Enterprise subscription." +#: ../../content/administration/upgrade.rst:52 +msgid "Odoo delivers the production database through the automated process." msgstr "" -#: ../../content/administration/update.rst:70 -msgid "Alternatively, you can use the unique download link that was included with your Odoo Enterprise purchase confirmation email." +#: ../../content/administration/upgrade.rst:53 +msgid "You restore it in your Production environment a few short hours later and continue working on the newly upgraded database (this is done automatically on Odoo Online)." msgstr "" -#: ../../content/administration/update.rst:73 -msgid "Downloading an updated version is not necessary if you installed via Github (see below)" +#: ../../content/administration/upgrade.rst:57 +msgid ":doc:`Upgrade process for Odoo Online (SaaS) `" msgstr "" -#: ../../content/administration/update.rst:77 -msgid "Step 2: Make a backup of your database" +#: ../../content/administration/upgrade.rst:58 +msgid ":doc:`Upgrade process for Odoo.sh `" msgstr "" -#: ../../content/administration/update.rst:79 -msgid "The update procedure is quite safe and should not alter you data. However it's always best to take a full database backup before performing any change on your installation, and to store it somewhere safe, on a different computer." +#: ../../content/administration/upgrade.rst:59 +msgid ":doc:`Upgrade process for On-Premise `" msgstr "" -#: ../../content/administration/update.rst:83 -msgid "If you have not disabled the database manager screen (see :ref:`here ` why you should), you can use it (link at bottom of your database selection screen) to download a backup of your database(s). If you disabled it, use the same procedure than for your usual backups." +#: ../../content/administration/upgrade.rst:64 +msgid "Testing" msgstr "" -#: ../../content/administration/update.rst:89 -msgid "Step 3: Install the updated version" +#: ../../content/administration/upgrade.rst:66 +msgid "This phase allows you to review an upgraded version of your database without affecting your production database in any way. We suggest that you run the test upgrade process at least once, but you can do it as many times as you need (one at a time)." msgstr "" -#: ../../content/administration/update.rst:91 -msgid "Choose the method that matches your current installation:" +#: ../../content/administration/upgrade.rst:70 +msgid "Once you receive your upgraded test database, check that all data, processes, and functionality are still correct and working as expected." msgstr "" -#: ../../content/administration/update.rst:95 -msgid "Packaged Installers" +#: ../../content/administration/upgrade.rst:73 +msgid "If you do find discrepancies, :ref:`report your issues ` and :ref:`request a new test database ` when the reported issues are fixed in the upgrade script." msgstr "" -#: ../../content/administration/update.rst:97 -msgid "If you installed Odoo with an installation package downloaded on our website (the recommended method), updating is very simple. All you have to do is download the installation package corresponding to your system (see step #1) and install it on your server. They are updated daily and include the latest security fixes. Usually, you can simply double-click the package to install it on top of the current installation. After installing the package, be sure to restart the Odoo service or reboot your server, and you're all set." +#: ../../content/administration/upgrade.rst:77 +msgid "If you do not find any discrepancies, you can move on to the upgrade of your production database." msgstr "" -#: ../../content/administration/update.rst:106 -msgid "Source Install (Tarball)" +#: ../../content/administration/upgrade.rst:80 +msgid "A test database is only intended for testing and remains completely unrelated to your present or future production database. Any data you add, or changes you make, will not be reflected in your upgraded production database." msgstr "" -#: ../../content/administration/update.rst:107 -msgid "If you have originally installed Odoo with the \"tarball\" version (source code archive), you have to replace the installation directory with a newer version. First download the latest tarball from Odoo.com. They are updated daily and include the latest security fixes (see step #1) After downloading the package, extract it to a temporary location on your server." +#: ../../content/administration/upgrade.rst:85 +msgid "Test databases are neutered and features are disabled to prevent them from having an impact on the production database:" msgstr "" -#: ../../content/administration/update.rst:112 -msgid "You will get a folder labelled with the version of the source code, for example \"odoo-13.0+e.20190719\", that contains a folder \"odoo.egg-info\" and the actual source code folder named \"odoo\" (for Odoo 10 and later) or \"openerp\" for older versions. You can ignore the odoo.egg-info folder. Locate the folder where your current installation is deployed, and replace it with the newer \"odoo\" or \"openerp\" folder that was in the archive you just extracted." +#: ../../content/administration/upgrade.rst:88 +msgid "The serial number of the database is modified (to prevent it from sending information as if it was the production database)." msgstr "" -#: ../../content/administration/update.rst:118 -msgid "Be sure to match the folder layout, for example the new \"addons\" folder included in the source code should end up exactly at the same path it was before. Next, watch out for any specific configuration files that you may have manually copied or modified in the old folder, and copy them over to the new folder. Finally, restart the Odoo service or reboot the machine, and you are all set." +#: ../../content/administration/upgrade.rst:90 +msgid "The :ref:`base URL of the database ` is reset to ``http://localhost:8069`` and the email domain to ``localhost``." msgstr "" -#: ../../content/administration/update.rst:125 -msgid "Source Install (Github)" +#: ../../content/administration/upgrade.rst:92 +msgid "Scheduled actions are disabled (the calendar synchronization, the bank statement synchronization, the planned automated actions, the fetching of incoming mail servers, etc.)." msgstr "" -#: ../../content/administration/update.rst:126 -msgid "If you have originally installed Odoo with a full Github clone of the official repositories, the update procedure requires you to pull the latest source code via git. Change into the directory for each repository (the main Odoo repository, and the Enterprise repository), and run the following commands::" +#: ../../content/administration/upgrade.rst:94 +msgid "Outgoing mail servers are disabled by archiving the existing ones and adding a fake/non-working one." msgstr "" -#: ../../content/administration/update.rst:134 -msgid "The last command may encounter source code conflicts if you had edited the Odoo source code locally. The error message will give you the list of files with conflicts, and you will need to resolve the conflicts manually, by editing them and deciding which part of the code to keep." +#: ../../content/administration/upgrade.rst:96 +msgid "Payment providers and delivery carriers are reset to test environment." msgstr "" -#: ../../content/administration/update.rst:138 -msgid "Alternatively, if you prefer to simply discard the conflicting changes and restore the official version, you can use the following command::" +#: ../../content/administration/upgrade.rst:97 +msgid "Accounting localization Electronic Data Interchange (EDI) services are disabled." msgstr "" -#: ../../content/administration/update.rst:143 -msgid "Finally, restart the Odoo service or reboot the machine, and you should be done." +#: ../../content/administration/upgrade.rst:98 +msgid "A system parameter is set to tell the database has been neutered." msgstr "" -#: ../../content/administration/update.rst:149 -msgid "Please refer to our `Docker image documentation `_ for specific update instructions." +#: ../../content/administration/upgrade.rst:103 +msgid "Request a test database" +msgstr "" + +#: ../../content/administration/upgrade.rst:105 +msgid "Follow the instructions available per hosting type on the `website form `_ and select *Testing* purpose." +msgstr "" + +#: ../../content/administration/upgrade.rst:None +msgid "Selection of the \"Testing\" purpose in the upgrade form on Odoo" +msgstr "" + +#: ../../content/administration/upgrade.rst:115 +msgid "Test guidance" +msgstr "" + +#: ../../content/administration/upgrade.rst:117 +msgid "Every business and organization has its own operational needs and has to test its specific Odoo database individually. We recommend you look at `the test scenario `_ for further information." +msgstr "" + +#: ../../content/administration/upgrade.rst:122 +msgid "Todo" +msgstr "" + +#: ../../content/administration/upgrade.rst:122 +msgid "change link \"test scenario\" once the related doc is published" +msgstr "" + +#: ../../content/administration/upgrade.rst:127 +#: ../../content/administration/upgrade.rst:172 +msgid "Assistance" +msgstr "" + +#: ../../content/administration/upgrade.rst:129 +msgid "If you encounter an issue in the **test database**, please get in touch with Odoo Upgrade Support via the `Odoo Support page `_." +msgstr "" + +#: ../../content/administration/upgrade.rst:132 +msgid "Under the *Ticket Description* section, select *An issue related to my upgrade* ticket type." +msgstr "" + +#: ../../content/administration/upgrade.rst:0 +msgid "Selection of \"An issue related to my upgrade\" as Ticket Type in the support form on Odoo" +msgstr "" + +#: ../../content/administration/upgrade.rst:139 +msgid "If you choose another *Ticket Description* type, the request will be redirected to another team. This will slow down the processing and response time." +msgstr "" + +#: ../../content/administration/upgrade.rst:142 +#: ../../content/administration/upgrade.rst:185 +msgid "Please provide as much detail as you can (i.e., videos and screenshots to illustrate your issue). This will avoid clarifying questions and speed up the resolution process significantly." +msgstr "" + +#: ../../content/administration/upgrade.rst:146 +msgid "The purpose of the test phase is not to correct existing data or configurations in your database." +msgstr "" + +#: ../../content/administration/upgrade.rst:153 +msgid "The production launch" +msgstr "" + +#: ../../content/administration/upgrade.rst:155 +msgid "The production upgrade request is when you decide to upgrade your current database with all your production data (invoices, VAT returns, inventories, current orders) to a new version of your choice." +msgstr "" + +#: ../../content/administration/upgrade.rst:159 +msgid "After your :ref:`tests ` are completed to your satisfaction, submit the request to upgrade your production database via our `website form `_. Select *Production* purpose." +msgstr "" + +#: ../../content/administration/upgrade.rst:164 +msgid "Going into production without first testing may lead to:" +msgstr "" + +#: ../../content/administration/upgrade.rst:166 +msgid "business interruptions (e.g., no longer having the possibility to validate an action)" +msgstr "" + +#: ../../content/administration/upgrade.rst:167 +msgid "poor customer experiences (e.g., an eCommerce website that does not work correctly)" +msgstr "" + +#: ../../content/administration/upgrade.rst:174 +msgid "If you encounter issues or problems in the **production database**, please get in touch with **Odoo Support**:" +msgstr "" + +#: ../../content/administration/upgrade.rst:177 +msgid "Connect to our `Odoo Support page `_." +msgstr "" + +#: ../../content/administration/upgrade.rst:178 +msgid "Under the *Ticket Description* section, select the appropriate type related to your issue but **do not select** the option *An issue related to my upgrade*." +msgstr "" + +#: ../../content/administration/upgrade.rst:182 +msgid "After upgrading to production, the support will be provided by the Support team instead of the Upgrade team." +msgstr "" + +#: ../../content/administration/upgrade.rst:189 +msgid "If you choose *An issue related to my upgrade* as ticket type, the request will be redirected to another team than the support one and will slow down the processing and response time." +msgstr "" + +#: ../../content/administration/upgrade.rst:195 +msgid "Help" +msgstr "" + +#: ../../content/administration/upgrade.rst:200 +msgid "Contact our Upgrade service support" +msgstr "" + +#: ../../content/administration/upgrade.rst:202 +msgid "Should you have any more questions about the upgrade, do not hesitate to send a message to `Odoo Upgrade Team `_. We will be happy to answer it as soon as possible." +msgstr "" + +#: ../../content/administration/upgrade.rst:210 +msgid "Please note that Odoo provides support and bug fixing only for the three last major versions of Odoo." +msgstr "" + +#: ../../content/administration/upgrade.rst:213 +msgid "This is a factor to take into consideration before upgrading. If you are on an older version, we suggest you to prefer the most recent version to benefit from longer support (before having to upgrade again)." +msgstr "" + +#: ../../content/administration/upgrade.rst:218 +#: ../../content/administration/upgrade.rst:257 +msgid ":doc:`maintain/supported_versions`" +msgstr "" + +#: ../../content/administration/upgrade.rst:223 +msgid "Service Level Agreement" +msgstr "" + +#: ../../content/administration/upgrade.rst:226 +msgid "What is covered by the Enterprise Licence?" +msgstr "" + +#: ../../content/administration/upgrade.rst:228 +msgid "Databases hosted on Odoo’s Cloud platforms (Saas and Odoo.sh) or On-Premise (Self-Hosting) enjoy the following services at all times." +msgstr "" + +#: ../../content/administration/upgrade.rst:231 +msgid "The upgrade of:" +msgstr "" + +#: ../../content/administration/upgrade.rst:233 +msgid "standard applications" +msgstr "" + +#: ../../content/administration/upgrade.rst:234 +msgid "Studio customization (as long as the :guilabel:`Studio` app is still active)" +msgstr "" + +#: ../../content/administration/upgrade.rst:235 +msgid "customizations done by our consulting and developer services *if* they are covered by a ‘Maintenance of Customisations’ subscription" +msgstr "" + +#: ../../content/administration/upgrade.rst:238 +msgid "The Upgrade Service is limited to your database's technical conversion and adaptation (standard modules and data) to make it compatible with the targeted version." +msgstr "" + +#: ../../content/administration/upgrade.rst:242 +msgid "What upgrading does NOT cover" +msgstr "" + +#: ../../content/administration/upgrade.rst:244 +msgid "The cleaning of pre-existing data & configuration while upgrading" +msgstr "" + +#: ../../content/administration/upgrade.rst:245 +msgid "Any new developments and/or upgrades of your own :ref:`custom modules `" +msgstr "" + +#: ../../content/administration/upgrade.rst:247 +msgid "`Training `_ on the latest version" +msgstr "" + +#: ../../content/administration/upgrade.rst:249 +msgid "You can get more information about your Enterprise Licence on our :ref:`Odoo Enterprise Subscription Agreement ` page." +msgstr "" + +#: ../../content/administration/upgrade.rst:255 +msgid ":doc:`upgrade/faq`" +msgstr "" + +#: ../../content/administration/upgrade.rst:256 +msgid ":doc:`odoo_sh`" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:8 +msgid "FAQ" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:13 +msgid "Why upgrade" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:15 +msgid "You benefit from the latest features of the :ref:`new major version ` released by Odoo." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:17 +msgid "If you are in an :ref:`unsupported version `, you get a new version with support." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:23 +msgid "When to upgrade" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:25 +msgid "Whenever you want. You can make your upgrade request as soon as a new version is released or when your version turns unsupported, and you still wish to enjoy support." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:31 +msgid "Availability of the new version" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:33 +msgid "As soon as Odoo announces the release of a new major version, you can create a test upgrade request to try the latest version. Please note that at this point, the upgrade scripts will only have been tested with demo data. Please report any issue you might encounter while testing via the `Odoo Support page `_ and make sure to be happy with your test version before requesting the upgrade of your database in production." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:42 +msgid "Duration of the upgrade" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:44 +msgid "It is impossible to give time estimates for every upgrade request." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:46 +msgid "In general, the \"smaller\" the database, the quickest the upgrade request is completed. A single-user database that uses only CRM will be processed faster than a multi-company, multi-user database that uses Accounting, Sales, Purchase, and Manufacturing." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:50 +msgid "You can expect the time it takes for the platform to upgrade the test database to be similar to the production upgrade." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:56 +msgid "Duration of the upgrade project" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:58 +msgid "It depends on the user involvement (the time spent on testing, reporting problems, etc.) and the issues encountered that might need to be addressed by our technical team." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:61 +msgid "So, in a nutshell, what can impact your upgrade lead time?" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:63 +msgid "Source & targeted versions" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:64 +msgid "Installed apps" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:65 +msgid "Volume of data" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:66 +msgid "Amount of customization (models, fields, methods, workflows, reports, website, etc.)" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:67 +msgid "Installation of new apps or configuration changes after the start of the test phase" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:68 +msgid "User commitment" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:73 +msgid "Upgrade of the custom modules" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:75 +msgid "As stated in our :doc:`/legal/terms/enterprise`, section :ref:`charges_standard`, this optional service is subject to additional fees." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:78 +msgid "Depending on your situation, the custom code could be upgraded by our services, by one of our partners, or you can do it yourself." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:86 +msgid "Upgrade or Migration" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:88 +msgid "An upgrade is switching to a newer version of Odoo, while a migration reflects the change of :ref:`editions ` or change of :ref:`hosting type `." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:97 +msgid "Editions change (from Community to Enterprise)" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:99 +msgid "The upgrade always returns an Enterprise edition of Odoo, whether the database you sent was a community or enterprise edition. It is required to have an enterprise subscription to upgrade." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:103 +msgid "If you need assistance on this matter, please contact us via the `Odoo Support page `_." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:107 +msgid "`Editions `_" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:112 +msgid "Switching the hosting types (Self-Hosting vs. Online Hosting - SaaS vs. Cloud Platform - Odoo.sh)" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:114 +msgid "An upgrade does not cover a change of `Hosting types `_." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:116 +msgid "Open the following link to get :doc:`more information about how to change your hosting type <../maintain/hosting_changes>`." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:124 +msgid "The Upgrade Report" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:126 +msgid "When an upgrade request completes successfully (test or production), you receive an email notification about it that includes an 'Upgrade Report'. This report is also sent to you via the Discuss app. It contains valuable information regarding changes that occurred during the upgrade. While it serves as a guide to possible issues to look out for, it is not an exhaustive list. It remains imperative that you test the upgraded database thoroughly and report any discrepancies you might find, before you decide to upgrade your production database." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:136 +msgid "Custom views" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:138 +msgid "During the upgrade, some custom views might get disabled for technical reasons. Therefore they might have to be fixed after the upgrade. The :ref:`Upgrade Report ` that is generated after the upgrade is available in the Discuss app, and lists all the custom views that might be impacted by this." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:146 +msgid "Release Notes by version" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:148 +msgid "Open our `Release Note `_ page to get a summary of the new features and improvements made in each version." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:152 +msgid "How long is my test available for" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:154 +msgid "An Odoo Online (SaaS) test database is available for one month by default. We can extend this trial period upon request. For Odoo.sh or on-premise, there is no restriction." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:158 +msgid "How many tests to perform before upgrading to production?" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:160 +msgid "As many as needed. When you are comfortable with the database, run a last test upgrade 48 hours before requesting your production upgrade and test your workflows one last time." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:164 +msgid "How to/Where to report upgrade issues?" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:166 +msgid "If you encounter issues during the upgrade process, please contact the Odoo Support through the `Odoo Support page `_." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:169 +msgid "To report an issue discovered during the testing phase, please select **An issue related to my upgrade (test phase)**." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:171 +msgid "To report an issue discovered post-upgrade, please select **An issue related to my upgrade (production)**." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:175 +msgid "Upgrading to production" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:177 +msgid "Once you have completed testing and are happy with the result, you decide on a date and time when you stop users from accessing Odoo, freeze all data entries, and create an upgrade request for the production upgrade." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:182 +msgid "How is my data handled in the Upgrade Platform?" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:184 +msgid "The Odoo Upgrade platform uses the same Privacy Policy as the rest of Odoo.com services." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:186 +msgid "Your data is hosted on servers that follow our security guidelines, namely:" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:188 +msgid "SSL - All web connections to client instances are protected with 256-bit SSL encryption (HTTPS with a 2048-bit modulus SSL certificate), and running behind Grade A SSL stacks. All our certificate chains are using SHA-2 already." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:191 +msgid "Safe System - Our servers are running recent Linux distribution with up-to-date security patches, with firewall and intrusion countermeasures (not disclosed for obvious reasons)." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:194 +msgid "Servers are located at the same locations as our Cloud providers with the following services:" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:196 +msgid "Restricted perimeter, physically accessed by authorized data center employees only" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:197 +msgid "Physical access control with security badges or biometrical security" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:198 +msgid "Security cameras monitoring the data center locations 24/7" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:199 +msgid "Security personnel on-site 24/7" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:201 +msgid "The uploaded and migrated databases uploaded to the Upgrade platform are kept for up to 3 months and are permanently deleted following that period." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:204 +msgid "You can learn more about privacy and data handling at Odoo by visiting our `General Data Protection Regulation page `_." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:208 +msgid "Rolling Release (applicable to Odoo Online databases)" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:210 +msgid "This feature allows customers to upgrade their database directly from a message prompt sent to the database administrator as soon as the new version is released. Odoo first tests the upgrade to the next version. The rolling release upgrade option is displayed if the automated tests are successful. The message offers two options:" +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:215 +msgid "To 'Upgrade Now', which immediately triggers the upgrade of your live production database." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:217 +msgid "To take you to your `database manager `_ where you can `request an upgraded test database `_ and check the upgraded test database for any discrepancies." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:221 +msgid "When you choose to proceed with the production upgrade directly, make sure all users have saved their work and are logged out. The upgrade takes approximately 15 minutes. During this time your database is unreachable. If you notice any problem after the upgrade, please report it via the `Odoo Support page `_." +msgstr "" + +#: ../../content/administration/upgrade/faq.rst:227 +msgid "If you are using the Website or Studio app, we recommend you always do a test upgrade before upgrading your production instance." +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:10 +msgid "Odoo.sh is integrated with the upgrade platform to make the upgrade process easier." +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:13 +msgid "The :guilabel:`Upgrade` tab is available in the branches view. It is only available for valid projects with a valid production build." +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:None +msgid "Click on the upgrade menu" +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:20 +msgid "The suggested upgrade steps on Odoo.sh are:" +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:22 +msgid "On a :guilabel:`Development` branch, upgrade your custom modules to keep them compatible with the new version and thoroughly **test them**." +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:24 +msgid "Switch that branch to the :guilabel:`Staging` branch, **upgrade** the last daily production backup and **test it**. Write upgrade scripts if necessary." +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:26 +msgid "Trigger the production upgrade from your :guilabel:`Production` branch and sit tight." +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:29 +msgid ":doc:`../../administration/upgrade`" +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:30 +msgid ":doc:`Upgrade FAQ <../upgrade/faq>`" +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:31 +msgid ":doc:`Introduction to Odoo.sh <../odoo_sh/overview/introduction>`" +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:36 +msgid "Upgrade your custom modules" +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:38 +msgid "The first step is to upgrade your custom modules to keep them compatible with the new version. Fork your :guilabel:`Production` branch in the :guilabel:`Development` stage, then go to the settings of your :guilabel:`Development` branch and select the Odoo version you target. If needed, modify your code to be compatible with the new version. Make sure to **test** your features are still working correctly." +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:45 +msgid "Depending on your contract, the upgrade of your custom modules can be done by yourself, by your Partner or by Odoo (if you hold a subscription including maintenance of customizations)." +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:51 +msgid "Upgrade your database on a staging branch" +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:53 +msgid "Take the upgraded development branch and drag & drop it to :guilabel:`Staging`." +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:55 +msgid "Go to the :guilabel:`Upgrade` tab and select the :guilabel:`target version`. Then, click on :guilabel:`Test Upgrade`." +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:None +msgid "Odoo.sh project and tabs" +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:62 +msgid "The **latest production daily automatic backup** is sent to the `upgrade platform `_ to start the upgrade test process." +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:66 +msgid "You can follow the upgrade process by going to the :guilabel:`Upgrade` menu of your :guilabel:`Production` branch." +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:69 +msgid "When the upgraded backup is ready on the `upgrade platform `_, it is automatically downloaded back to your project." +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:72 +msgid "The branch is now in a **special mode**: each time a **commit is pushed** on the branch, a **restore operation** of the upgraded backup occurs, and an **update of all the custom modules** happens. This allows you to quickly iterate on your custom modules upgrade scripts. The log file of the upgrade process can be found at :file:`~/logs/upgrade.log` in your newly upgraded staging build." +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:78 +msgid "The **special upgrade mode** is automatically closed after 30 days." +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:79 +#: ../../content/administration/upgrade/odoo_sh.rst:128 +msgid "It may happen that custom modules are no longer needed after an upgrade. Custom modules in the upgraded database are set to be updated. If the modules are missing in the code, the update fails, thus failing the whole process. An empty module with a manifest and possibly some custom upgrade script are necessary to clean up the database. The complete removal of the module has to be handled afterwards." +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:86 +msgid "Functionally test your upgraded database" +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:88 +msgid "Now that the test upgraded database is available on your staging branch, **thoroughly test it** and make sure everything runs as it's supposed to. Once you are satisfied with the result, you are ready to upgrade your production database." +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:93 +msgid "Production upgrade" +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:95 +msgid "Once you are happy with your testing, you can start the process on the :guilabel:`Production` branch." +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:98 +msgid "On your :guilabel:`Production` branch, go to the :guilabel:`Upgrade` tab, select the :guilabel:`targeted version` and click on the :guilabel:`start Upgrade` button." +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:None +msgid "View from the upgrade tab" +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:105 +msgid "The actual process is **triggered as soon as you push a new commit** in your branch. Make sure you are pushing code that is compatible with the new version. For example by merging the code from your upgraded staging branch." +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:110 +msgid "You can see the progress of the upgrade by going to the :guilabel:`Upgrade` tab of the main branch." +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:None +msgid "View showing the progress of the upgrade" +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:118 +msgid "Your database is unavailable throughout the process." +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:121 +msgid "If anything goes wrong, the platform automatically reverts the upgrade, the same as it would be for a regular update. In case of success, a backup is always made." +msgstr "" + +#: ../../content/administration/upgrade/odoo_sh.rst:124 +msgid "The update of your custom modules must be successful to complete the entire upgrade process. Make sure the status of your staging upgrade is :guilabel:`successful` before trying it in production." +msgstr "" + +#: ../../content/administration/upgrade/on_premise.rst:6 +msgid "Test upgrade request" +msgstr "" + +#: ../../content/administration/upgrade/on_premise.rst:8 +msgid "There are two ways to create your upgrade request." +msgstr "" + +#: ../../content/administration/upgrade/on_premise.rst:11 +msgid "Upgrade request via command line" +msgstr "" + +#: ../../content/administration/upgrade/on_premise.rst:13 +msgid "For technically-advanced users and partners, the upgrade process can be initiated via the following command line on the server where the database is hosted:" +msgstr "" + +#: ../../content/administration/upgrade/on_premise.rst:16 +msgid ":command:`python <(curl -s https://upgrade.odoo.com/upgrade) test -d -t `" +msgstr "" + +#: ../../content/administration/upgrade/on_premise.rst:19 +msgid "The above command creates the database dump, sends it to the upgrade platform, and initiates the automated upgrade process. During the upgrade, you can follow the live logs on your screen. Once the upgrade process is completed successfully, the upgraded database is restored onto the server (as a duplicate test database)." +msgstr "" + +#: ../../content/administration/upgrade/on_premise.rst:25 +msgid "Upgrade request via the Odoo Upgrade Portal" +msgstr "" + +#: ../../content/administration/upgrade/on_premise.rst:27 +msgid "Download a recent copy of your database and select the option :guilabel:`pg_dump custom format (without filestore)`." +msgstr "" + +#: ../../content/administration/upgrade/on_premise.rst:29 +msgid "Upload this dump file at https://upgrade.odoo.com and select *Testing* as the aim. Odoo performs the automated upgrade process. Once it is completed, you receive an email with a link to download the upgrade database dump file." +msgstr "" + +#: ../../content/administration/upgrade/on_premise.rst:32 +msgid "Import the upgraded database into your on-premise environment and manually test all processes and workflows." +msgstr "" + +#: ../../content/administration/upgrade/on_premise.rst:36 +msgid "For security reasons, only the person who submitted the upgrade request is able to download it." +msgstr "" + +#: ../../content/administration/upgrade/on_premise.rst:37 +msgid "Any problem found during testing should be reported via the `helpdesk `_." +msgstr "" + +#: ../../content/administration/upgrade/on_premise.rst:41 +msgid "Upgrade your production database" +msgstr "" + +#: ../../content/administration/upgrade/on_premise.rst:43 +msgid "Once you have completed the testing successfully, you can proceed to upgrade your live database in production. Download your upgraded database from the link in the email and import it onto your live environment." +msgstr "" + +#: ../../content/administration/upgrade/on_premise.rst:48 +msgid "Custom modules (if applicable)" +msgstr "" + +#: ../../content/administration/upgrade/on_premise.rst:50 +msgid "The upgrade of a database that contains custom modules is a two-step process." +msgstr "" + +#: ../../content/administration/upgrade/on_premise.rst:52 +msgid "The standard upgrade is done when your upgrade request is completed." +msgstr "" + +#: ../../content/administration/upgrade/on_premise.rst:53 +msgid "Your custom modules also need to be upgraded to keep them compatible with the new version." +msgstr "" + +#: ../../content/administration/upgrade/on_premise.rst:55 +msgid "Depending on your contract, the upgrade of your custom modules can be done" +msgstr "" + +#: ../../content/administration/upgrade/on_premise.rst:57 +msgid "by yourself." +msgstr "" + +#: ../../content/administration/upgrade/on_premise.rst:58 +msgid "by your Partner." +msgstr "" + +#: ../../content/administration/upgrade/on_premise.rst:59 +msgid "by Odoo (if you hold a subscription to 'Maintenance of Customizations')." +msgstr "" + +#: ../../content/administration/upgrade/online_hosting.rst:3 +msgid "Odoo Online (SaaS)" +msgstr "" + +#: ../../content/administration/upgrade/online_hosting.rst:6 +msgid "Requesting a test upgrade" +msgstr "" + +#: ../../content/administration/upgrade/online_hosting.rst:8 +msgid "Go to your `database manager `_" +msgstr "" + +#: ../../content/administration/upgrade/online_hosting.rst:9 +msgid "Click on your profile icon and select *My Databases*." +msgstr "" + +#: ../../content/administration/upgrade/online_hosting.rst:0 +msgid "Selecting My Databases under my profile" +msgstr "" + +#: ../../content/administration/upgrade/online_hosting.rst:14 +msgid "Click on the action settings icon next to your main database and select the *Upgrade* option." +msgstr "" + +#: ../../content/administration/upgrade/online_hosting.rst:0 +msgid "Selecting the action settings icon" +msgstr "" + +#: ../../content/administration/upgrade/online_hosting.rst:19 +msgid "In the pop-up message that will appear, select Test Upgrade." +msgstr "" + +#: ../../content/administration/upgrade/online_hosting.rst:0 +msgid "Selecting test upgrade" +msgstr "" + +#: ../../content/administration/upgrade/online_hosting.rst:24 +msgid "This triggers the automated upgrade process. A confirmation email is then sent to you with the the link to the upgraded database or to provide information if the upgrade failed." +msgstr "" + +#: ../../content/administration/upgrade/online_hosting.rst:28 +msgid "You can also see and access your test database from your *My Databases* page." msgstr "" diff --git a/locale/sources/applications.pot b/locale/sources/applications.pot index fa7ece13f..ca163909f 100644 --- a/locale/sources/applications.pot +++ b/locale/sources/applications.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Odoo 14.0\n" +"Project-Id-Version: Odoo 16.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-18 07:12+0200\n" +"POT-Creation-Date: 2022-10-04 12:47+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,6 +16,10 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../../content/applications.rst:3 -msgid "Applications" +#: ../../content/applications.rst:9 +msgid "User Docs" +msgstr "" + +#: ../../content/applications.rst:11 +msgid "Discover our user guides and configuration tutorials per application." msgstr "" diff --git a/locale/sources/contributing.pot b/locale/sources/contributing.pot index 0bbefaa86..975ab1c5c 100644 --- a/locale/sources/contributing.pot +++ b/locale/sources/contributing.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Odoo 14.0\n" +"Project-Id-Version: Odoo 16.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-18 07:12+0200\n" +"POT-Creation-Date: 2022-10-04 12:47+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,65 +16,1300 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../../content/contributing.rst:4 +#: ../../content/contributing.rst:7 msgid "Contributing" msgstr "" -#: ../../content/contributing/documentation.rst:4 -msgid "Contributing to the documentation" +#: ../../content/contributing.rst:9 +msgid "First, **thank you** for landing here and helping us improve Odoo!" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:4 +#: ../../content/contributing.rst:11 +msgid "This documentation section is intended as a guide to making contributions for first-timers and veterans." +msgstr "" + +#: ../../content/contributing.rst:14 +msgid "As an open-core project, Odoo accepts contributions from everyone, Odoo employees and members of the Odoo community alike, in all of its open-source `GitHub repositories `_." +msgstr "" + +#: ../../content/contributing/development.rst:6 +msgid "Development" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:6 +msgid "Coding Guidelines" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:8 +msgid "This page introduces the Odoo Coding Guidelines. Those aim to improve the quality of Odoo Apps code. Indeed proper code improves readability, eases maintenance, helps debugging, lowers complexity and promotes reliability. These guidelines should be applied to every new module and to all new development." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:15 +msgid "When modifying existing files in **stable version** the original file style strictly supersedes any other style guidelines. In other words please never modify existing files in order to apply these guidelines. It avoids disrupting the revision history of code lines. Diff should be kept minimal. For more details, see our `pull request guide `_." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:23 +msgid "When modifying existing files in **master (development) version** apply those guidelines to existing code only for modified code or if most of the file is under revision. In other words modify existing files structure only if it is going under major changes. In that case first do a **move** commit then apply the changes related to the feature." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:30 +msgid "Module structure" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:33 +msgid "Directories" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:34 +msgid "A module is organized in important directories. Those contain the business logic; having a look at them should make you understand the purpose of the module." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:37 +msgid "*data/* : demo and data xml" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:38 +msgid "*models/* : models definition" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:39 +msgid "*controllers/* : contains controllers (HTTP routes)" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:40 +msgid "*views/* : contains the views and templates" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:41 +msgid "*static/* : contains the web assets, separated into *css/, js/, img/, lib/, ...*" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:43 +msgid "Other optional directories compose the module." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:45 +msgid "*wizard/* : regroups the transient models (``models.TransientModel``) and their views" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:46 +msgid "*report/* : contains the printable reports and models based on SQL views. Python objects and XML views are included in this directory" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:47 +msgid "*tests/* : contains the Python tests" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:51 +msgid "File naming" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:53 +msgid "File naming is important to quickly find information through all odoo addons. This section explains how to name files in a standard odoo module. As an example we use a `plant nursery `_ application. It holds two main models *plant.nursery* and *plant.order*." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:58 +msgid "Concerning *models*, split the business logic by sets of models belonging to a same main model. Each set lies in a given file named based on its main model. If there is only one model, its name is the same as the module name. Each inherited model should be in its own file to help understanding of impacted models." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:72 +msgid "Concerning *security*, three main files should be used:" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:74 +msgid "First one is the definition of access rights done in a :file:`ir.model.access.csv` file." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:75 +msgid "User groups are defined in :file:`_groups.xml`." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:76 +msgid "Record rules are defined in :file:`_security.xml`." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:87 +msgid "Concerning *views*, backend views should be split like models and suffixed by ``_views.xml``. Backend views are list, form, kanban, activity, graph, pivot, .. views. To ease split by model in views main menus not linked to specific actions may be extracted into an optional ``_menus.xml`` file. Templates (QWeb pages used notably for portal / website display) and bundles (import of JS and CSS assets) are put in separate files. Those are respectively ``_templates.xml`` and ``assets.xml`` files." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:107 +msgid "Concerning *data*, split them by purpose (demo or data) and main model. Filenames will be the main_model name suffixed by ``_demo.xml`` or ``_data.xml``. For instance for an application having demo and data for its main model as well as subtypes, activities and mail templates all related to mail module:" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:120 +msgid "Concerning *controllers*, generally all controllers belong to a single controller contained in a file named ``.py``. An old convention in Odoo is to name this file ``main.py`` but it is considered as outdated. If you need to inherit an existing controller from another module do it in ``.py``. For example adding portal controller in an application is done in ``portal.py``." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:134 +msgid "Concerning *static files*, Javascript files follow globally the same logic as python models. Each component should be in its own file with a meaningful name. For instance, the activity widgets are located in ``activity.js`` of mail module. Subdirectories can also be created to structure the 'package' (see web module for more details). The same logic should be applied for the templates of JS widgets (static XML files) and for their styles (scss files). Don't link data (image, libraries) outside Odoo: do not use an URL to an image but copy it in the codebase instead." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:143 +msgid "Concerning *wizards*, naming convention is the same of for python models: ``.py`` and ``_views.xml``. Both are put in the wizard directory. This naming comes from old odoo applications using the wizard keyword for transient models." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:155 +msgid "Concerning *statistics reports* done with python / SQL views and classic views naming is the following :" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:165 +msgid "Concerning *printable reports* which contain mainly data preparation and Qweb templates naming is the following :" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:175 +msgid "The complete tree of our Odoo module therefore looks like" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:234 +msgid "File names should only contain ``[a-z0-9_]`` (lowercase alphanumerics and ``_``)" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:237 +msgid "Use correct file permissions : folder 755 and file 644." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:242 +msgid "XML files" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:245 +msgid "Format" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:246 +msgid "To declare a record in XML, the **record** notation (using **) is recommended:" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:248 +msgid "Place ``id`` attribute before ``model``" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:249 +msgid "For field declaration, ``name`` attribute is first. Then place the *value* either in the ``field`` tag, either in the ``eval`` attribute, and finally other attributes (widget, options, ...) ordered by importance." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:254 +msgid "Try to group the record by model. In case of dependencies between action/menu/views, this convention may not be applicable." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:256 +msgid "Use naming convention defined at the next point" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:257 +msgid "The tag ** is only used to set not-updatable data with ``noupdate=1``. If there is only not-updatable data in the file, the ``noupdate=1`` can be set on the ```` tag and do not set a ```` tag." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:275 +msgid "Odoo supports custom tags acting as syntactic sugar:" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:277 +msgid "menuitem: use it as a shortcut to declare a ``ir.ui.menu``" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:278 +msgid "template: use it to declare a QWeb View requiring only the ``arch`` section of the view." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:279 +msgid "report: use to declare a :ref:`report action `" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:280 +msgid "act_window: use it if the record notation can't do what you want" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:282 +msgid "The 4 first tags are preferred over the *record* notation." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:286 +msgid "XML IDs and naming" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:289 +msgid "Security, View and Action" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:291 +msgid "Use the following pattern :" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:293 +msgid "For a menu: :samp:`{}_menu`, or :samp:`{}_menu_{do_stuff}` for submenus." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:294 +msgid "For a view: :samp:`{}_view_{}`, where *view_type* is ``kanban``, ``form``, ``tree``, ``search``, ..." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:296 +msgid "For an action: the main action respects :samp:`{}_action`. Others are suffixed with :samp:`_{}`, where *detail* is a lowercase string briefly explaining the action. This is used only if multiple actions are declared for the model." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:300 +msgid "For window actions: suffix the action name by the specific view information like :samp:`{}_action_view_{}`." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:302 +msgid "For a group: :samp:`{}_group_{}` where *group_name* is the name of the group, generally 'user', 'manager', ..." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:304 +msgid "For a rule: :samp:`{}_rule_{}` where *concerned_group* is the short name of the concerned group ('user' for the 'model_name_group_user', 'public' for public user, 'company' for multi-company rules, ...)." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:309 +msgid "Name should be identical to xml id with dots replacing underscores. Actions should have a real naming as it is used as display name." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:363 +msgid "Inheriting XML" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:365 +msgid "Xml Ids of inheriting views should use the same ID as the original record. It helps finding all inheritance at a glance. As final Xml Ids are prefixed by the module that creates them there is no overlap." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:369 +msgid "Naming should contain an ``.inherit.{details}`` suffix to ease understanding the override purpose when looking at its name." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:380 +msgid "New primary views do not require the inherit suffix as those are new records based upon the first one." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:395 +#: ../../content/contributing/documentation.rst:204 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:861 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:863 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:879 +msgid "Python" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:399 +msgid "Do not forget to read the :ref:`Security Pitfalls ` section as well to write secure code." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:403 +msgid "PEP8 options" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:405 +msgid "Using a linter can help show syntax and semantic warnings or errors. Odoo source code tries to respect Python standard, but some of them can be ignored." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:408 +msgid "E501: line too long" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:409 +msgid "E301: expected 1 blank line, found 0" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:410 +msgid "E302: expected 2 blank lines, found 1" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:413 +msgid "Imports" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:414 +msgid "The imports are ordered as" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:416 +msgid "External libraries (one per line sorted and split in python stdlib)" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:417 +msgid "Imports of ``odoo``" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:418 +msgid "Imports from Odoo modules (rarely, and only if necessary)" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:420 +msgid "Inside these 3 groups, the imported lines are alphabetically sorted." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:438 +msgid "Idiomatics of Programming (Python)" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:440 +msgid "Always favor *readability* over *conciseness* or using the language features or idioms." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:441 +msgid "Don't use ``.clone()``" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:452 +msgid "Python dictionary : creation and update" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:477 +msgid "Use meaningful variable/class/method names" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:478 +msgid "Useless variable : Temporary variables can make the code clearer by giving names to objects, but that doesn't mean you should create temporary variables all the time:" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:490 +msgid "Multiple return points are OK, when they're simpler" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:510 +msgid "Know your builtins : You should at least have a basic understanding of all the Python builtins (http://docs.python.org/library/functions.html)" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:518 +msgid "Also, ``if 'key' in my_dict`` and ``if my_dict.get('key')`` have very different meaning, be sure that you're using the right one." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:521 +msgid "Learn list comprehensions : Use list comprehension, dict comprehension, and basic manipulation using ``map``, ``filter``, ``sum``, ... They make the code easier to read." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:534 +msgid "Collections are booleans too : In python, many objects have \"boolean-ish\" value when evaluated in a boolean context (such as an if). Among these are collections (lists, dicts, sets, ...) which are \"falsy\" when empty and \"truthy\" when containing items:" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:545 +msgid "So, you can write ``if some_collection:`` instead of ``if len(some_collection):``." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:548 +msgid "Iterate on iterables" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:562 +msgid "Use dict.setdefault" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:578 +msgid "As a good developer, document your code (docstring on methods, simple comments for tricky part of code)" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:580 +msgid "In additions to these guidelines, you may also find the following link interesting: http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html (a little bit outdated, but quite relevant)" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:585 +msgid "Programming in Odoo" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:587 +msgid "Avoid to create generators and decorators: only use the ones provided by the Odoo API." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:589 +msgid "As in python, use ``filtered``, ``mapped``, ``sorted``, ... methods to ease code reading and performance." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:594 +msgid "Make your method work in batch" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:595 +msgid "When adding a function, make sure it can process multiple records by iterating on self to treat each record." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:604 +msgid "For performance issue, when developing a 'stat button' (for instance), do not perform a ``search`` or a ``search_count`` in a loop. It is recommended to use ``read_group`` method, to compute all value in only one request." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:619 +msgid "Propagate the context" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:620 +msgid "The context is a ``frozendict`` that cannot be modified. To call a method with a different context, the ``with_context`` method should be used :" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:629 +msgid "Passing parameter in context can have dangerous side-effects." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:631 +msgid "Since the values are propagated automatically, some unexpected behavior may appear. Calling ``create()`` method of a model with *default_my_field* key in context will set the default value of *my_field* for the concerned model. But if during this creation, other objects (such as sale.order.line, on sale.order creation) having a field name *my_field* are created, their default value will be set too." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:637 +msgid "If you need to create a key context influencing the behavior of some object, choose a good name, and eventually prefix it by the name of the module to isolate its impact. A good example are the keys of ``mail`` module : *mail_create_nosubscribe*, *mail_notrack*, *mail_notify_user_signature*, ..." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:644 +msgid "Think extendable" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:646 +msgid "Functions and methods should not contain too much logic: having a lot of small and simple methods is more advisable than having few large and complex methods. A good rule of thumb is to split a method as soon as it has more than one responsibility (see http://en.wikipedia.org/wiki/Single_responsibility_principle)." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:651 +msgid "Hardcoding a business logic in a method should be avoided as it prevents to be easily extended by a submodule." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:677 +msgid "The above code is over extendable for the sake of example but the readability must be taken into account and a tradeoff must be made." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:680 +msgid "Also, name your functions accordingly: small and properly named functions are the starting point of readable/maintainable code and tighter documentation." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:683 +msgid "This recommendation is also relevant for classes, files, modules and packages. (See also http://en.wikipedia.org/wiki/Cyclomatic_complexity)" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:688 +msgid "Never commit the transaction" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:689 +msgid "The Odoo framework is in charge of providing the transactional context for all RPC calls. The principle is that a new database cursor is opened at the beginning of each RPC call, and committed when the call has returned, just before transmitting the answer to the RPC client, approximately like this:" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:710 +msgid "If any error occurs during the execution of the RPC call, the transaction is rolled back atomically, preserving the state of the system." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:713 +msgid "Similarly, the system also provides a dedicated transaction during the execution of tests suites, so it can be rolled back or not depending on the server startup options." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:717 +msgid "The consequence is that if you manually call ``cr.commit()`` anywhere there is a very high chance that you will break the system in various ways, because you will cause partial commits, and thus partial and unclean rollbacks, causing among others:" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:722 +msgid "inconsistent business data, usually data loss" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:723 +msgid "workflow desynchronization, documents stuck permanently" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:724 +msgid "tests that can't be rolled back cleanly, and will start polluting the database, and triggering error (this is true even if no error occurs during the transaction)" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:735 +msgid "Here is the very simple rule:" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:729 +msgid "You should **NEVER** call ``cr.commit()`` yourself, **UNLESS** you have created your own database cursor explicitly! And the situations where you need to do that are exceptional!" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:733 +msgid "And by the way if you did create your own cursor, then you need to handle error cases and proper rollback, as well as properly close the cursor when you're done with it." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:737 +msgid "And contrary to popular belief, you do not even need to call ``cr.commit()`` in the following situations: - in the ``_auto_init()`` method of an *models.Model* object: this is taken care of by the addons initialization method, or by the ORM transaction when creating custom models - in reports: the ``commit()`` is handled by the framework too, so you can update the database even from within a report - within *models.Transient* methods: these methods are called exactly like regular *models.Model* ones, within a transaction and with the corresponding ``cr.commit()/rollback()`` at the end - etc. (see general rule above if you are in doubt!)" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:749 +msgid "All ``cr.commit()`` calls outside of the server framework from now on must have an **explicit comment** explaining why they are absolutely necessary, why they are indeed correct, and why they do not break the transactions. Otherwise they can and will be removed !" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:756 +msgid "Use translation method correctly" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:758 +msgid "Odoo uses a GetText-like method named \"underscore\" ``_( )`` to indicate that a static string used in the code needs to be translated at runtime using the language of the context. This pseudo-method is accessed within your code by importing as follows:" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:767 +msgid "A few very important rules must be followed when using it, in order for it to work and to avoid filling the translations with useless junk." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:770 +msgid "Basically, this method should only be used for static strings written manually in the code, it will not work to translate field values, such as Product names, etc. This must be done instead using the translate flag on the corresponding field." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:775 +msgid "The method accepts optional positional or named parameter The rule is very simple: calls to the underscore method should always be in the form ``_('literal string')`` and nothing else:" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:818 +msgid "Also, keep in mind that translators will have to work with the literal values that are passed to the underscore function, so please try to make them easy to understand and keep spurious characters and formatting to a minimum. Translators must be aware that formatting patterns such as ``%s`` or ``%d``, newlines, etc. need to be preserved, but it's important to use these in a sensible and obvious manner:" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:838 +msgid "In general in Odoo, when manipulating strings, prefer ``%`` over ``.format()`` (when only one variable to replace in a string), and prefer ``%(varname)`` instead of position (when multiple variables have to be replaced). This makes the translation easier for the community translators." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:845 +msgid "Symbols and Conventions" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:855 +msgid "Model name (using the dot notation, prefix by the module name) :" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:848 +msgid "When defining an Odoo Model : use singular form of the name (*res.partner* and *sale.order* instead of *res.partnerS* and *saleS.orderS*)" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:850 +msgid "When defining an Odoo Transient (wizard) : use ``.`` where *related_base_model* is the base model (defined in *models/*) related to the transient, and *action* is the short name of what the transient do. Avoid the *wizard* word. For instance : ``account.invoice.make``, ``project.task.delegate.batch``, ..." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:854 +msgid "When defining *report* model (SQL views e.i.) : use ``.report.``, based on the Transient convention." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:857 +msgid "Odoo Python Class : use camelcase (Object-oriented style)." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:868 +msgid "Variable name :" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:866 +msgid "use camelcase for model variable" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:867 +msgid "use underscore lowercase notation for common variable." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:868 +msgid "suffix your variable name with *_id* or *_ids* if it contains a record id or list of id. Don't use ``partner_id`` to contain a record of res.partner" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:876 +msgid "``One2Many`` and ``Many2Many`` fields should always have *_ids* as suffix (example: sale_order_line_ids)" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:877 +msgid "``Many2One`` fields should have *_id* as suffix (example : partner_id, user_id, ...)" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:887 +msgid "Method conventions" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:879 +msgid "Compute Field : the compute method pattern is *_compute_*" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:880 +msgid "Search method : the search method pattern is *_search_*" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:881 +msgid "Default method : the default method pattern is *_default_*" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:882 +msgid "Selection method: the selection method pattern is *_selection_*" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:883 +msgid "Onchange method : the onchange method pattern is *_onchange_*" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:884 +msgid "Constraint method : the constraint method pattern is *_check_*" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:885 +msgid "Action method : an object action method is prefix with *action_*. Since it uses only one record, add ``self.ensure_one()`` at the beginning of the method." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:898 +msgid "In a Model attribute order should be" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:890 +msgid "Private attributes (``_name``, ``_description``, ``_inherit``, ``_sql_constraints``, ...)" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:891 +msgid "Default method and ``default_get``" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:892 +msgid "Field declarations" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:893 +msgid "Compute, inverse and search methods in the same order as field declaration" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:894 +msgid "Selection method (methods used to return computed values for selection fields)" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:895 +msgid "Constrains methods (``@api.constrains``) and onchange methods (``@api.onchange``)" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:896 +msgid "CRUD methods (ORM overrides)" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:897 +msgid "Action methods" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:898 +msgid "And finally, other business methods." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:954 +msgid "Javascript and CSS" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:957 +msgid "Static files organization" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:959 +msgid "Odoo addons have some conventions on how to structure various files. We explain here in more details how web assets are supposed to be organized." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:962 +msgid "The first thing to know is that the Odoo server will serve (statically) all files located in a *static/* folder, but prefixed with the addon name. So, for example, if a file is located in *addons/web/static/src/js/some_file.js*, then it will be statically available at the url *your-odoo-server.com/web/static/src/js/some_file.js*" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:967 +msgid "The convention is to organize the code according to the following structure:" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:969 +msgid "*static*: all static files in general" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:971 +msgid "*static/lib*: this is the place where js libs should be located, in a sub folder. So, for example, all files from the *jquery* library are in *addons/web/static/lib/jquery*" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:973 +msgid "*static/src*: the generic static source code folder" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:975 +msgid "*static/src/css*: all css files" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:976 +msgid "*static/fonts*" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:977 +msgid "*static/img*" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:978 +msgid "*static/src/js*" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:980 +msgid "*static/src/js/tours*: end user tour files (tutorials, not tests)" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:982 +msgid "*static/src/scss*: scss files" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:983 +msgid "*static/src/xml*: all qweb templates that will be rendered in JS" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:985 +msgid "*static/tests*: this is where we put all test related files." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:987 +msgid "*static/tests/tours*: this is where we put all tour test files (not tutorials)." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:990 +msgid "Javascript coding guidelines" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:992 +msgid "``use strict;`` is recommended for all javascript files" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:993 +msgid "Use a linter (jshint, ...)" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:994 +msgid "Never add minified Javascript Libraries" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:995 +msgid "Use camelcase for class declaration" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:997 +msgid "More precise JS guidelines are detailed in the `github wiki `_. You may also have a look at existing API in Javascript by looking Javascript References." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1002 +msgid "CSS coding guidelines" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1004 +msgid "Prefix all your classes with *o_* where *module_name* is the technical name of the module ('sale', 'im_chat', ...) or the main route reserved by the module (for website module mainly, i.e. : 'o_forum' for *website_forum* module). The only exception for this rule is the webclient: it simply uses *o_* prefix." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1009 +msgid "Avoid using *id* tag" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1010 +msgid "Use Bootstrap native classes" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1011 +msgid "Use underscore lowercase notation to name class" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1016 +msgid "Git" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1019 +msgid "Configure your git" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1021 +msgid "Based on ancestral experience and oral tradition, the following things go a long way towards making your commits more helpful:" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1024 +msgid "Be sure to define both the user.email and user.name in your local git config" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1030 +msgid "Be sure to add your full name to your Github profile here. Please feel fancy and add your team, avatar, your favorite quote, and whatnot ;-)" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1034 +msgid "Commit message structure" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1036 +msgid "Commit message has four parts: tag, module, short description and full description. Try to follow the preferred structure for your commit messages" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1059 +msgid "Tag and module name" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1061 +msgid "Tags are used to prefix your commit. They should be one of the following" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1063 +msgid "**[FIX]** for bug fixes: mostly used in stable version but also valid if you are fixing a recent bug in development version;" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1065 +msgid "**[REF]** for refactoring: when a feature is heavily rewritten;" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1066 +msgid "**[ADD]** for adding new modules;" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1067 +msgid "**[REM]** for removing resources: removing dead code, removing views, removing modules, ...;" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1069 +msgid "**[REV]** for reverting commits: if a commit causes issues or is not wanted reverting it is done using this tag;" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1071 +msgid "**[MOV]** for moving files: use git move and do not change content of moved file otherwise Git may loose track and history of the file; also used when moving code from one file to another;" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1074 +msgid "**[REL]** for release commits: new major or minor stable versions;" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1075 +msgid "**[IMP]** for improvements: most of the changes done in development version are incremental improvements not related to another tag;" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1077 +msgid "**[MERGE]** for merge commits: used in forward port of bug fixes but also as main commit for feature involving several separated commits;" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1079 +msgid "**[CLA]** for signing the Odoo Individual Contributor License;" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1080 +msgid "**[I18N]** for changes in translation files;" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1082 +msgid "After tag comes the modified module name. Use the technical name as functional name may change with time. If several modules are modified, list them or use various to tell it is cross-modules. Unless really required or easier avoid modifying code across several modules in the same commit. Understanding module history may become difficult." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1089 +msgid "Commit message header" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1091 +msgid "After tag and module name comes a meaningful commit message header. It should be self explanatory and include the reason behind the change. Do not use single words like \"bugfix\" or \"improvements\". Try to limit the header length to about 50 characters for readability." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1096 +msgid "Commit message header should make a valid sentence once concatenated with ``if applied, this commit will
``. For example ``[IMP] base: prevent to archive users linked to active partners`` is correct as it makes a valid sentence ``if applied, this commit will prevent users to archive...``." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1102 +msgid "Commit message full description" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1104 +msgid "In the message description specify the part of the code impacted by your changes (module name, lib, transversal object, ...) and a description of the changes." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1107 +msgid "First explain WHY you are modifying code. What is important if someone goes back to your commit in about 4 decades (or 3 days) is why you did it. It is the purpose of the change." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1111 +msgid "What you did can be found in the commit itself. If there was some technical choices involved it is a good idea to explain it also in the commit message after the why. For Odoo R&D developers \"PO team asked me to do it\" is not a valid why, by the way." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1115 +msgid "Please avoid commits which simultaneously impact multiple modules. Try to split into different commits where impacted modules are different. It will be helpful if we need to revert changes in a given module separately." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1119 +msgid "Don't hesitate to be a bit verbose. Most people will only see your commit message and judge everything you did in your life just based on those few sentences. No pressure at all." +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1123 +msgid "**You spend several hours, days or weeks working on meaningful features. Take some time to calm down and write clear and understandable commit messages.**" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1126 +msgid "If you are an Odoo R&D developer the WHY should be the purpose of the task you are working on. Full specifications make the core of the commit message. **If you are working on a task that lacks purpose and specifications please consider making them clear before continuing.**" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1131 +msgid "Finally here are some examples of correct commit messages :" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:1154 +msgid "Use the long description to explain the *why* not the *what*, the *what* can be seen in the diff" +msgstr "" + +#: ../../content/contributing/documentation.rst:5 +msgid "Documentation" +msgstr "" + +#: ../../content/contributing/documentation.rst:14 +msgid "This introductory guide will help you acquire the tools and knowledge you need to write documentation, whether you plan to make a minor content change or document an application from scratch." +msgstr "" + +#: ../../content/contributing/documentation.rst:21 +msgid "reStructuredText" +msgstr "" + +#: ../../content/contributing/documentation.rst:23 +msgid "Our documentation is written in **reStructuredText** (RST), a `lightweight markup language `_ consisting of normal text augmented with markup which allows including headings, images, notes, and so on. This might seem a bit abstract but there is no need to worry. :abbr:`RST (reStructuredText)` is not hard to learn, especially if you intend to make only small changes to the content." +msgstr "" + +#: ../../content/contributing/documentation.rst:29 +msgid "If you need to learn about a specific markup, head over to :doc:`our cheat sheet for RST ` which contains all the information that you should ever need for the user documentation of Odoo." +msgstr "" + +#: ../../content/contributing/documentation.rst:34 +msgid "We kindly ask you to observe a set of :doc:`content ` and :doc:`RST ` guidelines as you write documentation. This ensures that you stay consistent with the rest of the documentation and facilitates the approval of your content changes as they are reviewed by a redactor at Odoo." +msgstr "" + +#: ../../content/contributing/documentation.rst:40 +msgid ":doc:`documentation/content_guidelines`" +msgstr "" + +#: ../../content/contributing/documentation.rst:41 +msgid ":doc:`documentation/rst_cheat_sheet`" +msgstr "" + +#: ../../content/contributing/documentation.rst:42 +msgid ":doc:`documentation/rst_guidelines`" +msgstr "" + +#: ../../content/contributing/documentation.rst:47 +msgid "Getting started" +msgstr "" + +#: ../../content/contributing/documentation.rst:49 +msgid "As our documentation is maintained on GitHub, you will need a free GitHub account. Click `here `_ to create one." +msgstr "" + +#: ../../content/contributing/documentation.rst:52 +msgid "Now, depending on whether you want to update existing content, or rather work on new content and make file changes, you have two courses of action:" +msgstr "" + +#: ../../content/contributing/documentation.rst:55 +msgid "**For small changes** in ``.rst`` files only, i.e. addition/edition of paragraphs or typos, **we suggest that you use the GitHub interface**. This is the easiest and fasted way to submit your request for changes for the documentation and is suitable for non-technical people. Read :ref:`contributing/github-interface` to learn how to use this method." +msgstr "" + +#: ../../content/contributing/documentation.rst:59 +msgid "**For more complex cases**, it is necessary to **use Git and work from a local copy of the documentation**. This method seems intimidating but only requires basic knowledge of Git. See :ref:`contributing/canonical-git-workflow` for more information on this method." +msgstr "" + +#: ../../content/contributing/documentation.rst:66 +msgid "Use the GitHub interface" +msgstr "" + +#: ../../content/contributing/documentation.rst:68 +msgid "Verify that you are browsing the documentation in the version that you intend to change. The version can be selected from the dropdown in the top menu." +msgstr "" + +#: ../../content/contributing/documentation.rst:71 +msgid "Head over to the page that you want to change and click on the **Edit on GitHub** button in the top right corner of the page." +msgstr "" + +#: ../../content/contributing/documentation.rst:74 +msgid "If you do not have edit rights on the repository (`odoo/documentation `_), you need to fork it by clicking on the appropriate button. In other terms, you create a copy of the entire repository on your own account. If you do have the edit rights, skip this step." +msgstr "" + +#: ../../content/contributing/documentation.rst:81 +msgid "Make the appropriate changes while taking care of following the :doc:`content ` and :doc:`RST ` guidelines." +msgstr "" + +#: ../../content/contributing/documentation.rst:84 +msgid "Click on the **Preview changes** button to review your contribution in a more human-readable format. Be aware that the preview is not able to handle all markups correctly. Notes and tips, for instance, are not correctly rendered. The version of your content published to the website will be, however." +msgstr "" + +#: ../../content/contributing/documentation.rst:89 +msgid "Go to the bottom of the page to create a commit (:dfn:`what packs your changes together and labels them with a commit message`) of your changes." +msgstr "" + +#: ../../content/contributing/documentation.rst:0 +msgid "In first text box, describe your changes. For instance, \"Fix a typo\" and \"Add documentation for invoicing of sales orders\" are two clear commit messages." +msgstr "" + +#: ../../content/contributing/documentation.rst:0 +msgid "In the second text box, justify *why* you made these changes, if you feel that it is not obvious." +msgstr "" + +#: ../../content/contributing/documentation.rst:96 +msgid "Select the option \"Create a new branch for this commit and start a pull request.\" if you have the choice (if you have partial or full edit writes on the repository). If not, skip this step." +msgstr "" + +#: ../../content/contributing/documentation.rst:99 +msgid "Click on the green button. It is either labelled \"Commit changes\" or \"Propose file change\"." +msgstr "" + +#: ../../content/contributing/documentation.rst:103 +msgid "In the dropdown for the selection of the base branch (i.e., the version of the documentation that your changes concern), make sure to select the same version as in the first step of this guide and click on the **Create pull request** button." +msgstr "" + +#: ../../content/contributing/documentation.rst:109 +msgid "Double-check your :abbr:`PR (Pull Request)` and, when ready, click again on the **Create pull request** button to submit your changes for review by a content writer at Odoo." +msgstr "" + +#: ../../content/contributing/documentation.rst:114 +#: ../../content/contributing/documentation.rst:396 +msgid "You're done! If your changes are approved straight away they will appear in the documentation the very next day. It may also be the case that the reviewer has a question or a remark, so make sure to check your notifications or your emails, depending on your account settings." +msgstr "" + +#: ../../content/contributing/documentation.rst:121 +msgid "Use the canonical Git workflow" +msgstr "" + +#: ../../content/contributing/documentation.rst:126 +msgid "Prepare your machine" +msgstr "" + +#: ../../content/contributing/documentation.rst:131 +msgid "Install Git" +msgstr "" + +#: ../../content/contributing/documentation.rst:133 +msgid "We use `Git `_ to manage the files of the user documentation. It is a tool that allows to track the history of changes made to a file and, more importantly, to work on different versions of those files at the same time. It means that you do not need to worry about overwriting someone else’s pending work when you start editing the documentation." +msgstr "" + +#: ../../content/contributing/documentation.rst:138 +msgid "You must then configure Git to identify yourself as the author of your future contribution. Enter the same email address as the one you used to register on GitHub." +msgstr "" + +#: ../../content/contributing/documentation.rst:141 +msgid "Download and install **Git** on your machine." +msgstr "" + +#: ../../content/contributing/documentation.rst:142 +msgid "Verify that `the installation folder of Git is included in your system's PATH variable `_." +msgstr "" + +#: ../../content/contributing/documentation.rst:144 +#: ../../content/contributing/documentation.rst:169 +#: ../../content/contributing/documentation.rst:317 +#: ../../content/contributing/documentation.rst:337 +#: ../../content/contributing/documentation.rst:368 +msgid "Execute the following commands in a terminal:" +msgstr "" + +#: ../../content/contributing/documentation.rst:154 +msgid "Fetch the sources" +msgstr "" + +#: ../../content/contributing/documentation.rst:156 +msgid "As stated earlier, our documentation (in all its versions) is maintained on GitHub at `github.com/odoo/documentation `_. A modification is made by the mean of a :abbr:`PR (Pull Request)` (:dfn:`proposal of content changes`) to allow for a review of the changes before updating the sources of the documentation." +msgstr "" + +#: ../../content/contributing/documentation.rst:161 +msgid "Prior to submitting a modification, you need to make a copy of the sources and download that copy on your machine." +msgstr "" + +#: ../../content/contributing/documentation.rst:164 +msgid "Go to `github.com/odoo/documentation `_ and click on the **Fork** button in the top right corner." +msgstr "" + +#: ../../content/contributing/documentation.rst:177 +msgid "If you do not have edit rights on the repository owned by Odoo, replace \"odoo\" with your Github username in the URL of the command above. If you do have edit rights, it is not necessary to fork the repository." +msgstr "" + +#: ../../content/contributing/documentation.rst:181 +msgid "In order to ease the collaboration between writers coming from many different systems and teams, execute the following group of commands that correspond to your :abbr:`OS (Operating System)` in a terminal." +msgstr "" + +#: ../../content/contributing/documentation.rst:185 +msgid "Windows:" +msgstr "" + +#: ../../content/contributing/documentation.rst:193 +msgid "Linux or Mac OS:" +msgstr "" + +#: ../../content/contributing/documentation.rst:206 +msgid "Because the documentation is written in :abbr:`RST (reStructuredText)`, it needs to be built (:dfn:`converted to HTML`) in order to display nicely. This is done by the documentation generator which takes the original :abbr:`RST (reStructuredText)` files as input, transforms the markups in a human-readable format, and outputs HTML files to be read in your web browser." +msgstr "" + +#: ../../content/contributing/documentation.rst:211 +msgid "The documentation generator that we use is called `Sphinx `_. and is written in `Python `_. You have to install Python in order to use Sphinx. For the record, Sphinx is the program and Python the programming language, but you do not need to know much more about them so don't panic!" +msgstr "" + +#: ../../content/contributing/documentation.rst:216 +msgid "Python comes with its own package manager: `pip `_. It allows installing Python dependencies in a single command." +msgstr "" + +#: ../../content/contributing/documentation.rst:220 +msgid "Download and install the recommended release (`see README file `_) of **Python 3** on your machine." +msgstr "" + +#: ../../content/contributing/documentation.rst:222 +msgid "Make sure to have **pip** installed on your machine (on Windows, you can install pip alongside Python)." +msgstr "" + +#: ../../content/contributing/documentation.rst:224 +msgid "Execute the following commands in a terminal to verify that both installations finished successfully:" +msgstr "" + +#: ../../content/contributing/documentation.rst:232 +msgid "Execute the following commands in a terminal to install the Python dependencies of the documentation:" +msgstr "" + +#: ../../content/contributing/documentation.rst:241 +msgid "Depending on your :abbr:`OS (Operating System)`, you may need to run the commands ``python`` and ``pip`` instead of ``python3`` and ``pip3``" +msgstr "" + +#: ../../content/contributing/documentation.rst:247 +msgid "Make" +msgstr "" + +#: ../../content/contributing/documentation.rst:249 +msgid "`Make `_ is a tool that packs a bunch of command-lines into one to be easier to remember and to type. In our case, it is used to execute complex Sphinx build commands by using a single and simpler one instead." +msgstr "" + +#: ../../content/contributing/documentation.rst:253 +msgid "Download and install **Make** on your machine." +msgstr "" + +#: ../../content/contributing/documentation.rst:254 +msgid "Verify that `the installation folder of Make is included in your system's PATH variable `_." +msgstr "" + +#: ../../content/contributing/documentation.rst:260 +msgid "pngquant" +msgstr "" + +#: ../../content/contributing/documentation.rst:262 +msgid "`pngquant `_ is a tool that we use to compress PNG images so that the documentation does not end up weighting several Gigabytes in a few year span." +msgstr "" + +#: ../../content/contributing/documentation.rst:265 +msgid "Download and install **pngquant** on your machine." +msgstr "" + +#: ../../content/contributing/documentation.rst:266 +msgid "Verify that `the installation folder of pngquant is included in your system's PATH variable `_." +msgstr "" + +#: ../../content/contributing/documentation.rst:272 +msgid "Prepare your version" +msgstr "" + +#: ../../content/contributing/documentation.rst:274 +msgid "Now that your machine is all set up, it is time to do the same for your version of the documentation files. As it would not be convenient to have several people working on the version 13.0 in parallel (conflicts of content would occur all the time), and in order to be able to create a :abbr:`PR (Pull Request)`, you must `create a new branch `_ starting from the branch 13.0. In other words, you copy the entirety of this version’s files and give it another name. For this example, we will go with ``13.0-my_contribution``." +msgstr "" + +#: ../../content/contributing/documentation.rst:282 +msgid "Execute the following commands in a terminal to..." +msgstr "" + +#: ../../content/contributing/documentation.rst:284 +msgid "Navigate to the documentation folder:" +msgstr "" + +#: ../../content/contributing/documentation.rst:290 +msgid "Switch to the version 13.0:" +msgstr "" + +#: ../../content/contributing/documentation.rst:296 +msgid "Create your own branch which will be a copy of 13.0:" +msgstr "" + +#: ../../content/contributing/documentation.rst:305 +msgid "Perform your changes" +msgstr "" + +#: ../../content/contributing/documentation.rst:307 +msgid "You can now perform any change you want to the documentation files. These changes must be compliant with :abbr:`RST (reStructuredText)` syntax (see :doc:`documentation/rst_cheat_sheet`) and with our :doc:`content ` and :doc:`RST ` guidelines." +msgstr "" + +#: ../../content/contributing/documentation.rst:313 +msgid "If your changes include the addition of a new image, for instance :file:`my-image.png`, proceed as follows:" +msgstr "" + +#: ../../content/contributing/documentation.rst:316 +msgid "Make sure that the image is in ``.png`` format." +msgstr "" + +#: ../../content/contributing/documentation.rst:324 +msgid "Delete :file:`my-image.png`." +msgstr "" + +#: ../../content/contributing/documentation.rst:325 +msgid "Rename :file:`my-image-fs8.png` to :file:`my-image.png`." +msgstr "" + +#: ../../content/contributing/documentation.rst:326 +msgid "If your changes include renaming or moving an RST file to a new location, follow the `manual for redirect rules `_ to create the appropriate redirect rule(s)." +msgstr "" + +#: ../../content/contributing/documentation.rst:333 +msgid "Preview your changes" +msgstr "" + +#: ../../content/contributing/documentation.rst:335 +msgid "To preview your changes in a generated documentation, proceed as follows:" +msgstr "" + +#: ../../content/contributing/documentation.rst:346 +msgid "You can omit the :command:`make clean` command when no recent change has been made to the hierarchy of documentation files." +msgstr "" + +#: ../../content/contributing/documentation.rst:349 +msgid "Fix any error or warning shown in the logs of the build." +msgstr "" + +#: ../../content/contributing/documentation.rst:350 +msgid "Open the file :file:`documentation/_build/html/index.html` with your default web browser." +msgstr "" + +#: ../../content/contributing/documentation.rst:353 +msgid "These steps have for only purpose to show you the final results of your changes. They have no impact on the documentation source files." +msgstr "" + +#: ../../content/contributing/documentation.rst:359 +msgid "Submit your changes" +msgstr "" + +#: ../../content/contributing/documentation.rst:362 +msgid "We expect you to have basic knowledge of Git, which should be enough to cover the basic flow of a one-time contribution. If you plan on submitting several contributions, work on older versions of the documentation or perform any other advanced action, we recommend you to be confident with Git. Help yourself with `this manual of Git `_ and `this interactive tutorial `_." +msgstr "" + +#: ../../content/contributing/documentation.rst:376 +msgid "Go to `github.com/odoo/documentation/pulls `_ and click on the **New pull request** button." +msgstr "" + +#: ../../content/contributing/documentation.rst:381 +msgid "If you forked the base repository in the section :ref:`contributing/fetch-sources`, click on the link **compare across forks** If not, skip this step." +msgstr "" + +#: ../../content/contributing/documentation.rst:386 +msgid "In the dropdown for the selection of the base branch (i.e., the version of the documentation that your changes concern), make sure to select the version that your changes target (here **13.0**)." +msgstr "" + +#: ../../content/contributing/documentation.rst:391 +msgid "Double-check your :abbr:`PR (Pull Request)` and, when ready, click again on the **Create pull request** button to submit your changes for review by a redactor at Odoo." +msgstr "" + +#: ../../content/contributing/documentation/content_guidelines.rst:3 msgid "Content guidelines" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:6 +#: ../../content/contributing/documentation/content_guidelines.rst:5 msgid "To give the community the best documentation possible, we listed here a few guidelines, tips and tricks that will make your content shine at its brightest! While we encourage you to adopt your own writing style, some rules still apply to give the reader more clarity and comprehension." msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:11 -msgid "We strongly recommend contributors to carefully read the other documents in this *Contribution* section of the documentation. Good knowledge of the ins and outs of **RST writing** is required to write and submit your contribution. Note that it also affects your writing style itself." +#: ../../content/contributing/documentation/content_guidelines.rst:10 +msgid "We strongly recommend contributors to carefully read the other documents related to this section of the documentation. Good knowledge of the ins and outs of **RST writing** is required to write and submit your contribution. Note that it also affects your writing style itself." +msgstr "" + +#: ../../content/contributing/documentation/content_guidelines.rst:14 +msgid ":doc:`../documentation`" msgstr "" #: ../../content/contributing/documentation/content_guidelines.rst:15 -msgid ":doc:`introduction_guide`" -msgstr "" - -#: ../../content/contributing/documentation/content_guidelines.rst:16 -#: ../../content/contributing/documentation/introduction_guide.rst:34 msgid ":doc:`rst_cheat_sheet`" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:17 -#: ../../content/contributing/documentation/introduction_guide.rst:35 +#: ../../content/contributing/documentation/content_guidelines.rst:16 msgid ":doc:`rst_guidelines`" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:22 +#: ../../content/contributing/documentation/content_guidelines.rst:21 msgid "Writing style" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:24 +#: ../../content/contributing/documentation/content_guidelines.rst:23 msgid "**Writing for documentation** isn't the same as writing for a blog or another medium. Readers are more likely to skim read until they've found the information they are looking for. Keep in mind that the user documentation is a place to inform and describe, not to convince and promote." msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:31 +#: ../../content/contributing/documentation/content_guidelines.rst:30 msgid "Consistency" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:33 +#: ../../content/contributing/documentation/content_guidelines.rst:32 msgid "*Consistency is key to everything.*" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:35 +#: ../../content/contributing/documentation/content_guidelines.rst:34 msgid "Make sure that your writing style remains **consistent**. If you modify an existing text, try to match the existing tone and presentation, or rewrite it to match your own style." msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:41 +#: ../../content/contributing/documentation/content_guidelines.rst:40 msgid "Grammatical tenses" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:43 +#: ../../content/contributing/documentation/content_guidelines.rst:42 msgid "In English, descriptions and instructions require the use of a **Present Tense**, while a *future tense* is appropriate only when a specific event is to happen ulteriorly. This logic might be different in other languages." msgstr "" @@ -94,160 +1329,124 @@ msgstr "" msgid "*When you take a screenshot, remember that it will be automatically resized to fit the content block's width.*" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:56 +#: ../../content/contributing/documentation/content_guidelines.rst:55 msgid "Paragraphing" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:58 +#: ../../content/contributing/documentation/content_guidelines.rst:57 msgid "A paragraph comprises several sentences that are linked by a shared idea. They usually are two to six lines long." msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:61 +#: ../../content/contributing/documentation/content_guidelines.rst:60 msgid "In English, a new idea implies a new paragraph, rather than having a *line break* as it is common to do in some other languages. *Line breaks* are useful for layout purposes but shouldn't be used as a grammatical way of separating ideas." msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:66 +#: ../../content/contributing/documentation/content_guidelines.rst:65 msgid ":ref:`RST cheat sheet: Break the line but not the paragraph `" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:71 +#: ../../content/contributing/documentation/content_guidelines.rst:70 msgid "Titles and headings" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:73 +#: ../../content/contributing/documentation/content_guidelines.rst:72 msgid "To write good titles and headings:" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:75 +#: ../../content/contributing/documentation/content_guidelines.rst:74 msgid "**Be concise.**" msgstr "" #: ../../content/contributing/documentation/content_guidelines.rst:76 -msgid "**Avoid sentences**, questions, and titles starting with \"how to.\"" -msgstr "" - -#: ../../content/contributing/documentation/content_guidelines.rst:77 -msgid "**Don't use pronouns** in your titles, especially 2nd person (*your*)" +msgid "**Avoid sentences**, unnecessary verbs, questions, and titles starting with \"how to.\"" msgstr "" #: ../../content/contributing/documentation/content_guidelines.rst:78 +msgid "**Don't use pronouns** in your titles, especially 2nd person (*your*)." +msgstr "" + +#: ../../content/contributing/documentation/content_guidelines.rst:79 msgid "Use **sentence case**. This means you capitalize only:" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:80 +#: ../../content/contributing/documentation/content_guidelines.rst:81 msgid "the first word of the title or heading" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:81 +#: ../../content/contributing/documentation/content_guidelines.rst:82 msgid "the first word after a colon" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:82 +#: ../../content/contributing/documentation/content_guidelines.rst:83 msgid "proper nouns (brands, product and service names, etc.)" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:83 -msgid "app features, as written in the apps" -msgstr "" - #: ../../content/contributing/documentation/content_guidelines.rst:86 -msgid "Do not capitalize common nouns when they are not referred to as features. This is more likely to happen in headings rather than in titles." +msgid "Most titles and headings generally refer to a concept and do *not* represent the name of a feature or a model." msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:90 -msgid "Examples" +#: ../../content/contributing/documentation/content_guidelines.rst:88 +msgid "Do not capitalize the words of an acronym if they don't entail a proper noun." msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:90 -msgid "Explanations" -msgstr "" - -#: ../../content/contributing/documentation/content_guidelines.rst:0 -msgid "**Titles**" -msgstr "" - -#: ../../content/contributing/documentation/content_guidelines.rst:0 -msgid "(h1)" +#: ../../content/contributing/documentation/content_guidelines.rst:89 +msgid "Verbs in headings are fine since they often describe an action." msgstr "" #: ../../content/contributing/documentation/content_guidelines.rst:92 -msgid "*Quotation Templates*" -msgstr "" - -#: ../../content/contributing/documentation/content_guidelines.rst:92 -msgid "\"Quotation Templates\" is a feature in Odoo." +msgid "**Titles** (H1)" msgstr "" #: ../../content/contributing/documentation/content_guidelines.rst:94 -msgid "*Lead Mining*" +msgid "Quotation templates" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:94 -msgid "\"Lead Mining\" is a feature in Odoo." +#: ../../content/contributing/documentation/content_guidelines.rst:95 +msgid "Lead mining" msgstr "" #: ../../content/contributing/documentation/content_guidelines.rst:96 -msgid "*Resupply from another Warehouse*" +msgid "Resupply from another warehouse" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:96 -msgid "\"Warehouse\" is capitalized as we refer to the feature in the app rather than to a real warehouse." +#: ../../content/contributing/documentation/content_guidelines.rst:97 +msgid "Synchronize Google Calendar with Odoo" +msgstr "" + +#: ../../content/contributing/documentation/content_guidelines.rst:98 +msgid "Batch payments: SEPA Direct Debit (SDD)" msgstr "" #: ../../content/contributing/documentation/content_guidelines.rst:99 -msgid "*Synchronize Google Calendar with Odoo*" +msgid "Digitize vendor bills with optical character recognition (OCR)" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:99 -msgid "\"Google Calendar\" is a product and \"Odoo\" is a brand." +#: ../../content/contributing/documentation/content_guidelines.rst:101 +msgid "**Headings** (H2, H3)" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:0 -msgid "**Headings**" +#: ../../content/contributing/documentation/content_guidelines.rst:103 +msgid "Project stages" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:0 -msgid "(h2, h3, etc.)" -msgstr "" - -#: ../../content/contributing/documentation/content_guidelines.rst:102 -msgid "*Confirm the quotation*" -msgstr "" - -#: ../../content/contributing/documentation/content_guidelines.rst:102 -msgid "\"The quotation\" is a common noun not referring to a feature in Odoo." +#: ../../content/contributing/documentation/content_guidelines.rst:104 +msgid "Email alias" msgstr "" #: ../../content/contributing/documentation/content_guidelines.rst:105 -msgid "*Test environment*" +msgid "Confirm the quotation" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:105 -msgid "\"Environment\" is a common noun." +#: ../../content/contributing/documentation/content_guidelines.rst:106 +msgid "Generate SEPA Direct Debit XML files to submit payments" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:107 -msgid "*Add a new Payment Acquirer*" +#: ../../content/contributing/documentation/content_guidelines.rst:111 +msgid "Document structure" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:107 -msgid "\"Payment Acquirers\" is a feature in Odoo." -msgstr "" - -#: ../../content/contributing/documentation/content_guidelines.rst:109 -msgid "*Generate SEPA Direct Debit XML files to submit payments*" -msgstr "" - -#: ../../content/contributing/documentation/content_guidelines.rst:109 -msgid "\"SEPA Direct Debit\" and \"XML\" are considered as proper nouns." -msgstr "" - -#: ../../content/contributing/documentation/content_guidelines.rst:116 -msgid "Document's structure" -msgstr "" - -#: ../../content/contributing/documentation/content_guidelines.rst:118 -msgid "Use different **headings levels** to organize your text by sections and sub-sections. Your headings are also displayed in a dynamic *navigation bar* on the side." +#: ../../content/contributing/documentation/content_guidelines.rst:113 +msgid "Use different **heading levels** to organize your text by sections and sub-sections. Your headings are not only displayed in the document but also on the navigation menu (only the H1) and on the \"On this page\" sidebar (all H2 to H6)." msgstr "" #: ../../content/contributing/documentation/content_guidelines.rst:0 @@ -255,14 +1454,14 @@ msgid "**H1: Page title**" msgstr "" #: ../../content/contributing/documentation/content_guidelines.rst:0 -msgid "Your *page title* gives your reader a quick and clear understanding of what your content is about. It is also referenced in the section's *table of contents*." +msgid "Your *page title* gives your reader a quick and clear understanding of what your content is about." msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:126 +#: ../../content/contributing/documentation/content_guidelines.rst:122 msgid "The *content* in this section describes the upcoming content from a **business point of view**, and shouldn't put the emphasis on Odoo, as this is documentation and not marketing." msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:130 +#: ../../content/contributing/documentation/content_guidelines.rst:126 msgid "Start first with a **lead paragraph**, which helps the reader make sure that they've found the right page, then explain the **business aspects of this topic** in the following paragraphs." msgstr "" @@ -298,1157 +1497,1105 @@ msgstr "" msgid "Subsections are perfect for assessing very specific points. The title can be in the form of a question, if appropriate." msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:151 +#: ../../content/contributing/documentation/content_guidelines.rst:147 msgid "**H2: Next Section**" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:155 +#: ../../content/contributing/documentation/content_guidelines.rst:151 msgid ":ref:`RST cheat sheet: headings `" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:156 -msgid ":ref:`RST cheat sheet: specialized directives `" +#: ../../content/contributing/documentation/content_guidelines.rst:152 +msgid ":ref:`RST cheat sheet: markups `" +msgstr "" + +#: ../../content/contributing/documentation/content_guidelines.rst:157 +msgid "Organizing the documentation" +msgstr "" + +#: ../../content/contributing/documentation/content_guidelines.rst:159 +msgid "When writing documentation about a given topic, try to keep pages within the same folder organized." msgstr "" #: ../../content/contributing/documentation/content_guidelines.rst:161 +msgid "For most topics, a single page should do the job. Place it in the appropriate section of the documentation (e.g., content related to the CRM app go under :menuselection:`Applications -> Sales -> CRM`) and follow the :ref:`document structure ` guidelines." +msgstr "" + +#: ../../content/contributing/documentation/content_guidelines.rst:166 +msgid "For more complex topics, you may need several pages to cover all their aspects. Usually, you will find yourself adding documentation to a topic that is already partially covered. In that case, either create a new page and place it at the same level as other related pages or add new sections to an existing page. If you are documenting a complex topic from scratch, organize your content between one parent page (the :abbr:`TOC (Tree Of Contents)` page) and several child pages. Whenever possible, write content on the parent page and not only on the child pages. Make the parent page accessible from the navigation menu by using the :ref:`show-content ` metadata directive." +msgstr "" + +#: ../../content/contributing/documentation/content_guidelines.rst:178 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:440 msgid "Images" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:163 +#: ../../content/contributing/documentation/content_guidelines.rst:180 msgid "Adding a few images to illustrate your text helps the readers to understand and memorize your content. However, avoid adding too many images: it isn't necessary to illustrate all steps and features, and it may overload your page." msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:168 +#: ../../content/contributing/documentation/content_guidelines.rst:185 msgid "Don't forget to :ref:`compress your PNG files with pngquant `." msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:173 +#: ../../content/contributing/documentation/content_guidelines.rst:190 msgid "Screenshots" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:175 +#: ../../content/contributing/documentation/content_guidelines.rst:192 msgid "Screenshots are automatically resized to fit the content block's width. This implies that screenshots can't be too wide, else they would appear very small on-screen. Therefore, we recommend to avoid to take screenshots of a full screen display of the app, unless it is relevant to do so." msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:179 +#: ../../content/contributing/documentation/content_guidelines.rst:196 msgid "A few tips to improve your screenshots:" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:181 +#: ../../content/contributing/documentation/content_guidelines.rst:198 msgid "**Zoom** in your browser. We recommend a 110% zoom for better results." msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:182 +#: ../../content/contributing/documentation/content_guidelines.rst:199 msgid "**Resize** your browser's width, either by *resizing the window* itself or by opening the *browser's developer tools* (press the ``F12`` key) and resizing the width." msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:184 +#: ../../content/contributing/documentation/content_guidelines.rst:201 msgid "**Select** the relevant area, rather than keeping the full window." msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:185 +#: ../../content/contributing/documentation/content_guidelines.rst:202 msgid "If necessary, you can **edit** the screenshot to remove unnecessary fields and to narrow even more Odoo's display." msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:193 -msgid "Resizing the window's width is the most important step to do as Odoo's responsive design automatically resizes all fields to match the window's width." -msgstr "" - -#: ../../content/contributing/documentation/content_guidelines.rst:199 -msgid "Media files" -msgstr "" - -#: ../../content/contributing/documentation/content_guidelines.rst:201 -msgid "A **media filename**:" -msgstr "" - -#: ../../content/contributing/documentation/content_guidelines.rst:203 -msgid "is written in **lower-case letters**" -msgstr "" - -#: ../../content/contributing/documentation/content_guidelines.rst:204 -msgid "is **relevant** to the media's content. (E.g., :file:`screenshot-tips.gif`.)" -msgstr "" - -#: ../../content/contributing/documentation/content_guidelines.rst:205 -msgid "separates its words with a **hyphen** ``-`` (E.g., :file:`awesome-filename.png`.)" -msgstr "" - -#: ../../content/contributing/documentation/content_guidelines.rst:207 -msgid "Each document has its own folder in which the media files are located. The folder's name must be the same as the document's filename." +#: ../../content/contributing/documentation/content_guidelines.rst:None +msgid "Three tips to take good screenshots for the Odoo documentation." msgstr "" #: ../../content/contributing/documentation/content_guidelines.rst:210 -msgid "For example, the document :file:`doc_filename.rst` refers to two images that are placed in the folder ``doc_filename``." +msgid "Resizing the window's width is the most important step to do as Odoo's responsive design automatically resizes all fields to match the window's width." +msgstr "" + +#: ../../content/contributing/documentation/content_guidelines.rst:216 +msgid "Media files" +msgstr "" + +#: ../../content/contributing/documentation/content_guidelines.rst:218 +msgid "A **media filename**:" +msgstr "" + +#: ../../content/contributing/documentation/content_guidelines.rst:220 +msgid "is written in **lower-case letters**" +msgstr "" + +#: ../../content/contributing/documentation/content_guidelines.rst:221 +msgid "is **relevant** to the media's content. (E.g., :file:`screenshot-tips.gif`.)" msgstr "" #: ../../content/contributing/documentation/content_guidelines.rst:222 +msgid "separates its words with a **hyphen** ``-`` (E.g., :file:`awesome-filename.png`.)" +msgstr "" + +#: ../../content/contributing/documentation/content_guidelines.rst:224 +msgid "Each document has its own folder in which the media files are located. The folder's name must be the same as the document's filename." +msgstr "" + +#: ../../content/contributing/documentation/content_guidelines.rst:227 +msgid "For example, the document :file:`doc_filename.rst` refers to two images that are placed in the folder ``doc_filename``." +msgstr "" + +#: ../../content/contributing/documentation/content_guidelines.rst:239 msgid "Previously, image filenames would mostly be named with numbers (e.g., :file:`feature01.png`) and placed in a single ``media`` folder. While it is advised not to name your *new* images in that fashion, it is also essential **not to rename unchanged files**, as doing this would double the weight of renamed image files on the repository. They will eventually all be replaced as the content referencing those images is updated." msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:231 +#: ../../content/contributing/documentation/content_guidelines.rst:248 msgid "ALT tags" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:233 +#: ../../content/contributing/documentation/content_guidelines.rst:250 msgid "An **ALT tag** is a *text alternative* to an image. This text is displayed if the browser fails to render the image. It is also helpful for users who are visually impaired. Finally, it helps search engines, such as Google, to understand what the image is about and index it correctly, which improves the :abbr:`SEO (Search Engine Optimization)` significantly." msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:238 +#: ../../content/contributing/documentation/content_guidelines.rst:255 msgid "Good ALT tags are:" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:240 +#: ../../content/contributing/documentation/content_guidelines.rst:257 msgid "**Short** (one line maximum)" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:241 +#: ../../content/contributing/documentation/content_guidelines.rst:258 msgid "**Not a repetition** of a previous sentence or title" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:242 +#: ../../content/contributing/documentation/content_guidelines.rst:259 msgid "A **good description** of the action happening on the image" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:243 +#: ../../content/contributing/documentation/content_guidelines.rst:260 msgid "Easily **understandable** if read aloud" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:246 +#: ../../content/contributing/documentation/content_guidelines.rst:263 msgid ":ref:`RST cheat sheet: image directive `" msgstr "" -#: ../../content/contributing/documentation/introduction_guide.rst:4 -msgid "Introduction guide" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:6 -msgid "**First of all, thank you for landing here and helping us improve the user documentation of Odoo!**" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:8 -msgid "This introductory guide will help you acquire the tools and knowledge you need to write documentation, whether you plan to make a minor content change or document an application from scratch." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:15 -msgid "reStructuredText" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:17 -msgid "Our documentation is written in **reStructuredText** (RST), a `lightweight markup language `_ consisting of normal text augmented with markup which allows including headings, images, notes, and so on. This might seem a bit abstract but there is no need to worry. :abbr:`RST (reStructuredText)` is not hard to learn, especially if you intend to make only small changes to the content." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:23 -msgid "If you need to learn about a specific markup, head over to :doc:`our cheat sheet for RST ` which contains all the information that you should ever need for the user documentation of Odoo." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:28 -msgid "We kindly ask you to observe a set of :doc:`content ` and :doc:`RST ` guidelines as you write documentation. This ensures that you stay consistent with the rest of the documentation and facilitates the approval of your content changes as they are reviewed by a redactor at Odoo." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:36 -msgid ":doc:`content_guidelines`" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:41 -msgid "Getting started" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:43 -msgid "As our documentation is maintained on GitHub, you will need a free GitHub account. Click `here `_ to create one." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:46 -msgid "Now, depending on whether you want to update existing content, or rather work on new content and make file changes, you have two courses of action:" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:49 -msgid "**For small changes** in ``.rst`` files only, i.e. addition/edition of paragraphs or typos, **we suggest that you use the GitHub interface**. This is the easiest and fasted way to submit your request for changes for the documentation and is suitable for non-technical people. Read :ref:`contributing/github-interface` to learn how to use this method." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:53 -msgid "**For more complex cases**, it is necessary to **use Git and work from a local copy of the documentation**. This method seems intimidating but only requires basic knowledge of Git. See :ref:`contributing/canonical-git-workflow` for more information on this method." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:60 -msgid "Use the GitHub interface" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:62 -msgid "Verify that you are browsing the documentation in the version that you intend to change. The version can be selected from the dropdown in the top menu." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:67 -msgid "Head over to the page that you want to change and click on the **Edit on GitHub** button in the bottom of the left menu." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:72 -msgid "If you do not have edit rights on the repository (`odoo/documentation `_), you need to fork it by clicking on the appropriate button. In other terms, you create a copy of the entire repository on your own account. If you do have the edit rights, skip this step." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:79 -msgid "Make the appropriate changes while taking care of following the :doc:`guidelines `." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:82 -msgid "Click on the **Preview changes** button to review your contribution in a more human-readable format. Be aware that the preview is not able to handle all markups correctly. Notes and tips, for instance, are not correctly rendered. The version of your content published to the website will be, however." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:87 -msgid "Go to the bottom of the page to create a commit (:dfn:`what packs your changes together and labels them with a commit message`) of your changes." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:0 -msgid "In first text box, describe your changes. For instance, \"Fix a typo\" and \"Add documentation for invoicing of sales orders\" are two clear commit messages." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:0 -msgid "In the second text box, justify *why* you made these changes, if you feel that it is not obvious." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:94 -msgid "Select the option \"Create a new branch for this commit and start a pull request.\" if you have the choice (if you have partial or full edit writes on the repository). If not, skip this step." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:97 -msgid "Click on the green button. It is either labelled \"Commit changes\" or \"Propose file change\"." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:101 -msgid "In the dropdown for the selection of the base branch (i.e., the version of the documentation that your changes concern), make sure to select the same version as in the first step of this guide and click on the **Create pull request** button." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:107 -msgid "Double-check your :abbr:`PR (Pull Request)` and, when ready, click again on the **Create pull request** button to submit your changes for review by a content writer at Odoo." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:112 -#: ../../content/contributing/documentation/introduction_guide.rst:390 -msgid "You're done! If your changes are approved straight away they will appear in the documentation the very next day. It may also be the case that the reviewer has a question or a remark, so make sure to check your notifications or your emails, depending on your account settings." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:119 -msgid "Use the canonical Git workflow" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:124 -msgid "Prepare your machine" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:129 -msgid "Install Git" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:131 -msgid "We use `Git `_ to manage the files of the user documentation. It is a tool that allows to track the history of changes made to a file and, more importantly, to work on different versions of those files at the same time. It means that you do not need to worry about overwriting someone else’s pending work when you start editing the documentation." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:136 -msgid "You must then configure Git to identify yourself as the author of your future contribution. Enter the same email address as the one you used to register on GitHub." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:139 -msgid "Download and install **Git** on your machine." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:140 -msgid "Verify that `the installation folder of Git is included in your system's PATH variable `_." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:142 -#: ../../content/contributing/documentation/introduction_guide.rst:167 -#: ../../content/contributing/documentation/introduction_guide.rst:314 -#: ../../content/contributing/documentation/introduction_guide.rst:331 -#: ../../content/contributing/documentation/introduction_guide.rst:362 -msgid "Execute the following commands in a terminal:" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:152 -msgid "Fetch the sources" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:154 -msgid "As stated earlier, our documentation (in all its versions) is maintained on GitHub at `github.com/odoo/documentation `_. A modification is made by the mean of a :abbr:`PR (Pull Request)` (:dfn:`proposal of content changes`) to allow for a review of the changes before updating the sources of the documentation." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:159 -msgid "Prior to submitting a modification, you need to make a copy of the sources and download that copy on your machine." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:162 -msgid "Go to `github.com/odoo/documentation `_ and click on the **Fork** button in the top right corner." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:175 -msgid "If you do not have edit rights on the repository owned by Odoo, replace \"odoo\" with your Github username in the URL of the command above. If you do have edit rights, it is not necessary to fork the repository." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:179 -msgid "In order to ease the collaboration between writers coming from many different systems and teams, execute the following group of commands that correspond to your :abbr:`OS (Operating System)` in a terminal." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:183 -msgid "Windows:" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:191 -msgid "Linux or Mac OS:" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:202 -msgid "Python" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:204 -msgid "Because the documentation is written in :abbr:`RST (reStructuredText)`, it needs to be built (:dfn:`converted to HTML`) in order to display nicely. This is done by the documentation generator which takes the original :abbr:`RST (reStructuredText)` files as input, transforms the markups in a human-readable format, and outputs HTML files to be read in your web browser." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:209 -msgid "The documentation generator that we use is called `Sphinx `_. and is written in `Python `_. You have to install Python in order to use Sphinx. For the record, Sphinx is the program and Python the programming language, but you do not need to know much more about them so don't panic!" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:214 -msgid "Python comes with its own package manager: `pip `_. It allows installing Python dependencies in a single command." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:218 -msgid "Download and install the recommended release (`see README file `_) of **Python 3** on your machine." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:220 -msgid "Make sure to have **pip** installed on your machine (on Windows, you can install pip alongside Python)." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:222 -msgid "Execute the following commands in a terminal to verify that both installations finished successfully:" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:230 -msgid "Execute the following commands in a terminal to install the Python dependencies of the documentation:" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:239 -msgid "Depending on your :abbr:`OS (Operating System)`, you may need to run the commands ``python`` and ``pip`` instead of ``python3`` and ``pip3``" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:245 -msgid "Make" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:247 -msgid "`Make `_ is a tool that packs a bunch of command-lines into one to be easier to remember and to type. In our case, it is used to execute complex Sphinx build commands by using a single and simpler one instead." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:251 -msgid "Download and install **Make** on your machine." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:252 -msgid "Verify that `the installation folder of Make is included in your system's PATH variable `_." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:258 -msgid "pngquant" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:260 -msgid "`pngquant `_ is a tool that we use to compress PNG images so that the documentation does not end up weighting several Gigabytes in a few year span." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:263 -msgid "Download and install **pngquant** on your machine." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:264 -msgid "Verify that `the installation folder of pngquant is included in your system's PATH variable `_." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:270 -msgid "Prepare your version" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:272 -msgid "Now that your machine is all set up, it is time to do the same for your version of the documentation files. As it would not be convenient to have several people working on the version 14.0 in parallel (conflicts of content would occur all the time), and in order to be able to create a :abbr:`PR (Pull Request)`, you must `create a new branch `_ starting from the branch 14.0. In other words, you copy the entirety of this version’s files and give it another name. For this example, we will go with ``14.0-my_contribution``." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:280 -msgid "Execute the following commands in a terminal to..." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:282 -msgid "Navigate to the documentation folder:" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:288 -msgid "Switch to the version 14.0:" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:294 -msgid "Create your own branch which will be a copy of 14.0:" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:303 -msgid "Perform your changes" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:305 -msgid "You can now perform any change you want to the documentation files. These changes must be compliant with :abbr:`RST (reStructuredText)` syntax (see :doc:`rst_cheat_sheet`) and with our :doc:`guidelines `." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:310 -msgid "If your changes include the addition of a new image, for instance :file:`my_image.png`, proceed as follows:" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:313 -msgid "Make sure that the image is in ``.png`` format." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:321 -msgid "Delete :file:`my_image.png`." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:322 -msgid "Rename :file:`my_image-fs8.png` to :file:`my_image.png`." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:327 -msgid "Preview your changes" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:329 -msgid "To preview your changes in a generated documentation, proceed as follows:" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:340 -msgid "You can omit the :command:`make clean` command when no recent change has been made to the hierarchy of documentation files." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:343 -msgid "Fix any error or warning shown in the logs of the build." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:344 -msgid "Open the file :file:`documentation/_build/html/index.html` with your default web browser." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:347 -msgid "These steps have for only purpose to show you the final results of your changes. They have no impact on the documentation source files." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:353 -msgid "Submit your changes" -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:356 -msgid "We expect you to have basic knowledge of Git, which should be enough to cover the basic flow of a one-time contribution. If you plan on submitting several contributions, work on older versions of the documentation or perform any other advanced action, we recommend you to be confident with Git. Help yourself with `this manual of Git `_ and `this interactive tutorial `_." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:370 -msgid "Go to `github.com/odoo/documentation/pulls `_ and click on the **New pull request** button." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:375 -msgid "If you forked the base repository in the section :ref:`contributing/fetch-sources`, click on the link **compare across forks** If not, skip this step." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:380 -msgid "In the dropdown for the selection of the base branch (i.e., the version of the documentation that your changes concern), make sure to select the version that your changes target (here **14.0**)." -msgstr "" - -#: ../../content/contributing/documentation/introduction_guide.rst:385 -msgid "Double-check your :abbr:`PR (Pull Request)` and, when ready, click again on the **Create pull request** button to submit your changes for review by a redactor at Odoo." -msgstr "" - -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:4 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:5 msgid "RST cheat sheet" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:9 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:10 msgid "Headings" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:12 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:13 msgid "For each formatting line (e.g., ``===``), write as many symbols (``=``) as there are characters in the header." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:16 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:17 msgid "The symbols used for the formatting are, in fact, not important. Only the order in which they are written matters, as it determines the size of the decorated heading. This means that you may encounter different heading formatting and in a different order, in which case you should follow the formatting in place in the document. In any other case, use the formatting shown below." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:19 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:20 msgid "Heading size" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:19 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:20 msgid "Formatting" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:19 -msgid "Min/Max number of occurrences" -msgstr "" - -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:21 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:22 msgid "H1" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:0 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:0 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:0 -msgid "``=======``" -msgstr "" - -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:0 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:0 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:0 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:0 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:0 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:0 -msgid "``Heading``" -msgstr "" - -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:21 -msgid "1/1" -msgstr "" - -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:25 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:28 msgid "H2" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:25 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:28 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:31 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:34 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:37 -msgid "0/∞" -msgstr "" - -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:28 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:33 msgid "H3" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:0 -msgid "``-------``" -msgstr "" - -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:31 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:38 msgid "H4" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:0 -msgid "``~~~~~~~``" -msgstr "" - -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:34 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:43 msgid "H5" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:0 -msgid "``*******``" -msgstr "" - -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:37 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:48 msgid "H6" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:0 -msgid "``^^^^^^^``" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:55 +msgid "Each document must have **exactly one H1 heading**. No less, no more." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:44 -msgid "Markup" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:60 +msgid "Markups" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:49 -msgid "Inline markup" -msgstr "" - -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:51 -msgid "Use the following markups to emphasize your text to your liking:" -msgstr "" - -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:54 -msgid "\\*\\*Text\\*\\*" -msgstr "" - -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:54 -msgid "**Text**" -msgstr "" - -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:56 -msgid "\\*Text\\*" -msgstr "" - -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:56 -msgid "*Text*" -msgstr "" - -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:58 -msgid "\\`\\`Text\\`\\`" -msgstr "" - -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:58 -msgid "``Text``" -msgstr "" - -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:62 -msgid ":ref:`contributing/specialized-directives`" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:65 +msgid "Emphasis (italic)" msgstr "" #: ../../content/contributing/documentation/rst_cheat_sheet.rst:67 -msgid "Bulleted list" +msgid "To emphasize a part of the text. The text is rendered in italic." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:72 +msgid "Fill out the information *before* saving the form." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:81 +msgid "Strong emphasis (bold)" msgstr "" #: ../../content/contributing/documentation/rst_cheat_sheet.rst:83 -msgid "Numbered list" +msgid "To emphasize a part of the text. The text is rendered in bold." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:98 -msgid "Nested lists" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:88 +msgid "A **subdomain** is a domain that is a part of another domain." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:110 -msgid "Hyperlinks" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:97 +msgid "Technical term (literal)" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:99 +msgid "To write a technical term or a specific value to insert. The text is rendered in literal." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:104 +msgid "Insert the IP address of your printer, for example, `192.168.1.25`." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:113 +msgid "Definitions" msgstr "" #: ../../content/contributing/documentation/rst_cheat_sheet.rst:115 -msgid "Hyperlink references" +msgid "Use the `dfn` markup to define a term." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:117 -msgid "Hyperlink references are links to a URL with a custom label. They follow this syntax: ```label `_``" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:120 +msgid "The documentation is written in RST and needs to be built (:dfn:`converted to HTML`) to display nicely." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:121 -msgid "The URL can be a relative path to a file within the documentation." -msgstr "" - -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:124 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:145 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:191 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:231 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:262 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:287 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:312 -#: ../../content/contributing/documentation/rst_guidelines.rst:18 -msgid "Example" -msgstr "" - -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:126 -msgid "This excerpt of :abbr:`RST (reStructuredText)`: ``For instance, `this is a hyperlink reference `_.`` is rendered as follows in HTML: “For instance, `this is a hyperlink reference `_.”" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:131 +msgid "Abbreviations" msgstr "" #: ../../content/contributing/documentation/rst_cheat_sheet.rst:133 -msgid "External hyperlink targets" +msgid "Use the `abbr` markup to write a self-defining abbreviation that is displayed as a tooltip." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:135 -msgid "External hyperlink targets allow creating shortcuts for hyperlink references." +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:138 +msgid "Odoo uses :abbr:`OCR (optical character recognition)` and artificial intelligence technologies to recognize the content of the documents." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:136 -msgid "The definition syntax is as follows: ``.. _target: URL``" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:149 +msgid ":abbr:`GUI (Graphical User Interface)` element" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:137 -msgid "There are two ways to reference them, depending on the use case:" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:151 +msgid "Use the `guilabel` markup to identify any text of the interactive user interface (e.g., button labels, view titles, field names, lists items, ...)." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:139 -msgid "``target_`` creates a hyperlink with the target name as label and the URL as reference. Note that the ``_`` moved after the target!" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:157 +msgid "Update your credentials, then click on :guilabel:`Save`." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:141 -msgid "```label `_`` does exactly what you expect: the label replaces the name of the target, and the target is replaced by the URL." +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:166 +msgid "Menu selection" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:148 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:194 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:234 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:265 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:290 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:315 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:351 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:372 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:391 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:412 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:431 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:452 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:476 -msgid "RST" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:168 +msgid "Use the `menuselection` markup to guide the user through a sequence of menus." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:158 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:210 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:242 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:273 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:298 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:329 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:360 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:380 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:400 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:420 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:440 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:460 -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:485 -msgid "Render" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:173 +msgid "To review your sales performance, go to :menuselection:`Sales --> Reporting --> Dashboard`." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:160 -msgid "A `proof-of-concept `_ is a simplified version, a prototype of what is expected to agree on the main lines of expected changes. `PoC `_ is a common abbreviation." +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:182 +msgid "File" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:167 -msgid "Internal hyperlink targets" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:184 +msgid "Use the `file` markup to indicate a file path or name." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:169 -msgid "Internal hyperlink targets follow the same syntax as external hyperlink targets but without any URL. Indeed, they are internal. They allow referencing a specific part of a document by using the target as an anchor. When the user clicks on the reference, the documentation scrolls to the part of the page containing the target." +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:190 +msgid "Create redirections with the :file:`redirects.txt` file at the root of the repository." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:175 -msgid "Targets can be referenced from other files than the ones in which they are defined." +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:199 +msgid "Command" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:177 -msgid "The definition syntax is: ``.. _target:``" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:201 +msgid "Use the `command` markup to highlight a command." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:178 -msgid "There are two ways to reference them, both using the ``ref`` directive:" -msgstr "" - -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:180 -msgid "``:ref:`target``` creates a hyperlink to the anchor with the heading defined below as label." -msgstr "" - -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:181 -msgid "``:ref:`label ``` creates a hyperlink to the anchor with the given label." -msgstr "" - -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:183 -msgid "See :ref:`contributing/relative-links` to learn how to write proper relative links for internal references." -msgstr "" - -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:187 -msgid "Notice that there is no ``_`` at the end, as it is done with :ref:`hyperlink targets `." -msgstr "" - -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:212 -msgid "This can easily be done by creating a new product, see `How to create a product? `_ for additional help." -msgstr "" - -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:215 -msgid "**How to create a product?**" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:206 +msgid "Run the command :command:`make clean html` to delete existing built files and build the documentation to HTML." msgstr "" #: ../../content/contributing/documentation/rst_cheat_sheet.rst:217 -msgid "As explained at the `start of the page `_, ..." +msgid "Lists" msgstr "" #: ../../content/contributing/documentation/rst_cheat_sheet.rst:222 -msgid "Implicit hyperlink targets" +msgid "Bulleted list" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:226 -msgid "Implicit hyperlink targets are a special kind of internal hyperlink targets: they are automatically generated by section titles, footnotes, etc. Consequently, they don’t have a definition syntax." +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:227 +msgid "This is a bulleted list." msgstr "" #: ../../content/contributing/documentation/rst_cheat_sheet.rst:228 -msgid "They can be referenced the same first way as external hyperlink targets by using the name of the section title as URL." +msgid "It has two items, the second item uses two lines." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:244 -msgid "This can easily be done by creating a new user, see `How to create a new user? `_ for additional help. ..." +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:240 +msgid "Numbered list" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:250 -msgid "The ``doc`` directive" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:245 +msgid "This is a numbered list." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:253 -msgid "The ``doc`` directive allows referencing a documentation page wherever it is in the file tree through a relative file path." -msgstr "" - -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:254 -msgid "As usual, there are two ways to use the directive:" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:246 +msgid "Numbering is automatic." msgstr "" #: ../../content/contributing/documentation/rst_cheat_sheet.rst:256 -msgid "``:doc:`path_to_doc_page``` creates a hyperlink reference to the documentation page with the title of the page as label." +msgid "Use this format to start the numbering with a number other than one." msgstr "" #: ../../content/contributing/documentation/rst_cheat_sheet.rst:258 -msgid "``:doc:`label ``` creates a hyperlink reference to the documentation page with the given label." +msgid "The numbering is automatic from there." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:275 -msgid "Please refer to `this documentation `_ and to `Send a pro-forma invoice `_." +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:267 +msgid "Prefer the use of autonumbered lists with `#.` for better code resilience." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:281 -msgid "The ``download`` directive" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:272 +msgid "Nested lists" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:283 -msgid "The ``download`` directive allows referencing files (that are not necessarily :abbr:`RST (reStructuredText)` documents) within the source tree to be downloaded." +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:277 +msgid "This is the first item of a bulleted list." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:300 -msgid "Download this `module structure template `_ to start building your module in no time." +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:279 +msgid "It has a nested numbered list" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:306 -msgid "The ``image`` directive" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:280 +msgid "with two items." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:308 -msgid "The ``image`` directive allows inserting images in a document. It comes with a set of optional parameter directives that can individually be omitted if considered redundant." +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:292 +msgid "Hyperlinks" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:343 -msgid "Admonitions (alert blocks)" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:297 +msgid "External hyperlinks" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:348 -msgid "Seealso" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:299 +msgid "External hyperlinks are links to a URL with a custom label. They follow this syntax: ```label `_``" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:363 -msgid "`Customer invoices `_" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:303 +msgid "The URL can be a relative path to a file within the documentation." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:304 +msgid "Use the :ref:`documentation pages hyperlinks ` if you target another documentation page." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:310 +msgid "For instance, `this is an external hyperlink to Odoo's website `_." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:319 +msgid "External hyperlink aliases" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:321 +msgid "External hyperlink aliases allow creating shortcuts for external hyperlinks." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:322 +msgid "The definition syntax is as follows: ``.. _target: URL``" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:323 +msgid "There are two ways to reference them, depending on the use case:" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:325 +msgid "``target_`` creates a hyperlink with the target name as label and the URL as reference. Note that the ``_`` moved after the target!" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:327 +msgid "```label `_`` does exactly what you expect: the label replaces the name of the target, and the target is replaced by the URL." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:333 +msgid "A `proof-of-concept `_ is a simplified version, a prototype of what is expected to agree on the main lines of expected changes. `PoC `_ is a common abbreviation." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:347 +msgid "Custom anchors" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:349 +msgid "Custom anchors follow the same syntax as external hyperlink aliases but without any URL. Indeed, they are internal. They allow referencing a specific part of a document by using the target as an anchor. When the user clicks on the reference, the documentation scrolls to the part of the page containing the anchor." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:354 +msgid "The definition syntax is: ``.. _target:``" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:355 +msgid "There are two ways to reference them, both using the ``ref`` markup:" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:357 +msgid "``:ref:`target``` creates a hyperlink to the anchor with the heading defined below as label." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:358 +msgid "``:ref:`label ``` creates a hyperlink to the anchor with the given label." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:360 +msgid "See :ref:`contributing/relative-links` to learn how to write proper relative links for internal references." msgstr "" #: ../../content/contributing/documentation/rst_cheat_sheet.rst:364 -msgid "`Pro-forma invoices `_" +msgid "Custom anchors can be referenced from other files than the ones in which they are defined." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:369 -msgid "Note" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:365 +msgid "Notice that there is no ``_`` at the end, contrary to what is done with :ref:`external hyperlinks `." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:383 -msgid "Use this to get the attention of the reader about additional information." +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:371 +msgid "This can easily be done by creating a new product, see `How to create a product? `_ for additional help." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:388 -msgid "Tip" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:374 +msgid "**How to create a product?**" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:376 +msgid "As explained at the `start of the page `_, ..." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:394 +msgid "Documentation pages hyperlinks" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:397 +msgid "The ``doc`` markup allows referencing a documentation page wherever it is in the file tree through a relative file path." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:398 +msgid "As usual, there are two ways to use the markup:" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:401 +msgid "``:doc:`path_to_doc_page``` creates a hyperlink to the documentation page with the title of the page as label." msgstr "" #: ../../content/contributing/documentation/rst_cheat_sheet.rst:403 -msgid "Use this to inform the reader about a useful trick that requires an action." +msgid "``:doc:`label ``` creates a hyperlink to the documentation page with the given label." msgstr "" #: ../../content/contributing/documentation/rst_cheat_sheet.rst:409 -msgid "Important" +msgid "Please refer to `this documentation `_ and to `Send a pro-forma invoice `_." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:423 -msgid "Use this to notify the reader about an important information." +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:420 +msgid "File download hyperlinks" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:422 +msgid "The ``download`` markup allows referencing files (that are not necessarily :abbr:`RST (reStructuredText)` documents) within the source tree to be downloaded." msgstr "" #: ../../content/contributing/documentation/rst_cheat_sheet.rst:428 -msgid "Warning" +msgid "Download this `module structure template `_ to start building your module in no time." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:443 -msgid "Use this to require the reader to proceed with caution with what is described in the warning." +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:442 +msgid "The ``image`` markup allows inserting images in a document." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:449 -msgid "Danger" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:0 +msgid "Create an invoice." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:463 -msgid "Use this to alarm the reader about a serious threat." +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:458 +msgid "Add the :code:`:class: o-no-modal` `option `_ to an image to prevent opening it in a modal." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:468 -msgid "Formatting tips" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:465 +msgid "Alert blocks (admonitions)" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:473 -msgid "Break the line but not the paragraph" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:470 +msgid "Seealso" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:476 +msgid "`Customer invoices `_" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:477 +msgid "`Pro-forma invoices `_" msgstr "" #: ../../content/contributing/documentation/rst_cheat_sheet.rst:488 -msgid "First super long line that you break in two… here is rendered as a single line." -msgstr "" - -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:489 -msgid "Second line that follows a line break." +msgid "Note" msgstr "" #: ../../content/contributing/documentation/rst_cheat_sheet.rst:494 -msgid "Add comments" +msgid "Use this alert block to grab the reader's attention about additional information." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:496 -msgid "If you made a particular choice of writing or formatting that a future writer should be able to understand and take into account, consider writing a comment. Comments are blocks of text that do not count as a part of the documentation and that are used to pass a message to writers of the source code. They consist of a line starting with two dots and a space, followed by the comment." +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:504 +msgid "Tip" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:501 -msgid "``.. For instance, this line will not be rendered in the documentation.``" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:510 +msgid "Use this alert block to inform the reader about a useful trick that requires an action." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:506 -msgid "Use tables" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:520 +#: ../../content/contributing/documentation/rst_guidelines.rst:17 +msgid "Example" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:508 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:526 +msgid "Use this alert block to show an example." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:536 +msgid "Exercise" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:542 +msgid "Use this alert block to suggest an exercise to the reader." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:552 +msgid "Important" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:558 +msgid "Use this alert block to notify the reader about important information." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:568 +msgid "Warning" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:574 +msgid "Use this alert block to require the reader to proceed with caution with what is described in the warning." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:586 +msgid "Danger" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:592 +msgid "Use this alert block to bring the reader's attention to a serious threat." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:602 +msgid "Custom" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:607 +msgid "Title" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:609 +msgid "Customize this alert block with a **Title** of your choice." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:620 +msgid "Tables" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:623 +msgid "List tables" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:625 +msgid "List tables use two-level bulleted lists to convert data into a table. The first level represents the rows and the second level represents the columns." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:635 +msgid "Name" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:636 +msgid "Country" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:637 +msgid "Favorite color" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:638 +msgid "Raúl" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:639 +msgid "Montenegro" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:640 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:672 +msgid "Purple" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:641 +msgid "Mélanie" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:642 +msgid "France" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:643 +msgid "Red" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:662 +msgid "Grid tables" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:664 +msgid "Grid tables represent the rendered table and are more visual to work with." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:670 +msgid "Shirts" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:670 +msgid "T-shirts" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:672 +msgid "**Available colours**" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:672 +msgid "Green" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:674 +msgid "Turquoise" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:674 +msgid "Orange" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:676 +msgid "**Sleeves length**" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:676 +msgid "Long sleeves" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:676 +msgid "Short sleeves" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:692 +msgid "Use `=` instead of `-` to define header rows." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:693 +msgid "Remove `-` and `|` separators to merge cells." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:694 msgid "Make use of `this convenient table generator `_ to build your tables. Then, copy-paste the generated formatting into your document." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:514 -msgid "Spice up your writing with specialized directives" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:700 +msgid "Code blocks" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:516 -msgid "Use these additional directives to fine-tune your content:" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:720 +msgid "Content tabs" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:519 -msgid "**Directive**" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:723 +msgid "The `tabs` markup may not work well in some situations. In particular:" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:519 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:725 +msgid "The tabs' headers cannot be translated." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:726 +msgid "A tab cannot contain :ref:`headings `." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:727 +msgid "An :ref:`alert block ` cannot contain tabs." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:728 +msgid "A tab cannot contain :ref:`custom anchors `." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:733 +msgid "Basic tabs" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:735 +msgid "Basic tabs are useful to split the content into multiple options. The `tabs` markup is used to define sequence of tabs. Each tab is then defined with the `tab` markup followed by a label." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:743 +msgid "Odoo Online" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:745 +msgid "Content dedicated to Odoo Online users." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:747 +msgid "Odoo.sh" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:749 +msgid "Alternative for Odoo.sh users." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:751 +msgid "On-premise" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:753 +msgid "Third version for On-premise users." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:774 +msgid "Nested tabs" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:776 +msgid "Tabs can be nested inside one another." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:783 +msgid "Stars" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:787 +msgid "The Sun" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:789 +msgid "The closest star to us." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:791 +msgid "Proxima Centauri" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:793 +msgid "The second closest star to us." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:795 +msgid "Polaris" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:797 +msgid "The North Star." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:799 +msgid "Moons" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:803 +msgid "The Moon" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:805 +msgid "Orbits the Earth." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:807 +msgid "Titan" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:809 +msgid "Orbits Jupiter." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:846 +msgid "Group tabs" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:848 +msgid "Group tabs are special tabs that synchronize based on a group label. The last selected group is remembered and automatically selected when the user returns to the page or visits another page with the tabs group. The `group-tab` markup is used to define group tabs." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:857 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:859 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:871 +msgid "C++" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:865 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:867 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:886 +msgid "Java" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:938 +msgid "Code tabs" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:940 +msgid "Code tabs are essentially :ref:`group tabs ` that treat the content as a :ref:`code block `. The `code-tab` markup is used to define a code tab. Just as for the `code-block` markup, the language defines the syntax highlighting of the tab. If set, the label is used instead of the language for grouping tabs." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:991 +msgid "Document metadata" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:993 +msgid "Sphinx supports document-wide metadata markups that specify a behavior for the entire page." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:994 +msgid "They must be placed between colons (`:`) at the top of the source file." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:997 +msgid "**Metadata**" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:997 msgid "**Purpose**" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:519 -msgid "**Example**" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:999 +msgid "`show-content`" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:521 -msgid "**RST**" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:999 +msgid "Make a toctree page accessible from the navigation menu." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:521 -msgid "**HTML**" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1001 +msgid "`show-toc`" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:523 -msgid "``abbr``" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1001 +msgid "Show the table of content on a page that has the `show-content` metadata markup." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:523 -msgid "Self-defining abbreviations" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1004 +msgid "`code-column`" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:523 -msgid "``:abbr:`SO (Sales Order)```" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:0 +msgid "Show a dynamic side column that can be used to display interactive tutorials or code excerpts." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:523 -msgid ":abbr:`SO (Sales Order)`" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:0 +msgid "For example, see :doc:`/applications/finance/accounting/getting_started/memento`." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:525 -msgid "``command``" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1009 +msgid "`hide-page-toc`" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:525 -msgid "Highlight a command" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1009 +msgid "Hide the \"On this page\" sidebar and use full page width for the content." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:525 -msgid "``:command:`python example.py```" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1011 +msgid "`custom-css`" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:525 -msgid ":command:`python example.py`" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1011 +msgid "Link CSS files (comma-separated) to the document." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:527 -msgid "``dfn``" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1013 +msgid "`custom-js`" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:527 -msgid "Define a term" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1013 +msgid "Link JS files (comma-separated) to the document." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:527 -msgid "``:dfn:`a definition for a new term```" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1015 +msgid "`classes`" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:527 -msgid ":dfn:`a definition for a new term`" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1015 +msgid "Assign the specified classes to the `
` element of the document." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:529 -msgid "``file``" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1017 +msgid "`orphan`" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:529 -msgid "Indicate a file path" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1017 +msgid "Suppress the need to include the document in a toctree." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:529 -msgid "``:file:`~/odoo/odoo-bin```" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1019 +msgid "`nosearch`" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:529 -msgid ":file:`~/odoo/odoo-bin`" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1019 +msgid "Exclude the document from search results." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:531 -msgid "``menuselection``" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1025 +msgid "Formatting tips" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:531 -msgid "Guide a user through a sequence of menus" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1030 +msgid "Break the line but not the paragraph" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:531 -msgid "``:menuselection:`Sales --> Configuration --> Settings```" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:0 +msgid "A first long line that you break in two -> here <- is rendered as a single line." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:531 -msgid ":menuselection:`Sales --> Configuration --> Settings`" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:0 +msgid "A second line that follows a line break." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:537 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1048 msgid "Escape markup symbols (Advanced)" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:539 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1050 msgid "Markup symbols escaped with backslashes (``\\``) are rendered normally. For instance, ``this \\*\\*line of text\\*\\* with \\*markup\\* symbols`` is rendered as “this \\*\\*line of text\\*\\* with \\*markup\\* symbols”." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:543 -msgid "When it comes to backticks (`````), which are used in many case such as :ref:`hyperlink references `, using backslashes for escaping is no longer an option because the outer backticks interpret enclosed backslashes and thus prevent them from escaping inner backticks. For instance, ```\\`this formatting\\```` produces an ``[UNKNOWN NODE title_reference]`` error. Instead, `````this formatting````` should be used to produce the following result: ```this formatting```." +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1054 +msgid "When it comes to backticks (`````), which are used in many cases such as :ref:`external hyperlinks `, using backslashes for escaping is no longer an option because the outer backticks interpret enclosed backslashes and thus prevent them from escaping inner backticks. For instance, ```\\`this formatting\\```` produces an ``[UNKNOWN NODE title_reference]`` error. Instead, `````this formatting````` should be used to produce the following result: ```this formatting```." msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:4 +#: ../../content/contributing/documentation/rst_guidelines.rst:3 msgid "RST guidelines" msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:9 +#: ../../content/contributing/documentation/rst_guidelines.rst:8 msgid "Use relative links for internal URLs" msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:11 +#: ../../content/contributing/documentation/rst_guidelines.rst:10 msgid "If you need to reference an internal documentation page or a file that is not sitting in the same directory as your current page, always make use of *relative file paths* rather than *absolute file paths*. An absolute file path indicates the location of the target from the root of its file tree. A relative file path makes use of smart notations (such as ``../`` git that redirects to the parent folder) to indicate the location of the target *relative* to that of the source document." msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:20 +#: ../../content/contributing/documentation/rst_guidelines.rst:19 msgid "Given the following source file tree:" msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:35 +#: ../../content/contributing/documentation/rst_guidelines.rst:34 msgid "A reference to the rendered :file:`prices.html` and :file:`variants.html` could be made from :file:`import.rst` as follows:" msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:38 +#: ../../content/contributing/documentation/rst_guidelines.rst:37 msgid "Absolute:" msgstr "" +#: ../../content/contributing/documentation/rst_guidelines.rst:39 +msgid "``https://odoo.com/documentation/master/applications/sales/sales/products_prices/prices.html``" +msgstr "" + #: ../../content/contributing/documentation/rst_guidelines.rst:40 -msgid "``https://odoo.com/documentation/14.0/applications/sales/sales/products_prices/prices.html``" +msgid "``https://odoo.com/documentation/master/applications/sales/sales/products_prices/products/variants.html``" msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:41 -msgid "``https://odoo.com/documentation/14.0/applications/sales/sales/products_prices/products/variants.html``" -msgstr "" - -#: ../../content/contributing/documentation/rst_guidelines.rst:43 +#: ../../content/contributing/documentation/rst_guidelines.rst:42 msgid "Relative:" msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:45 +#: ../../content/contributing/documentation/rst_guidelines.rst:44 msgid "``../prices.html``" msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:46 +#: ../../content/contributing/documentation/rst_guidelines.rst:45 msgid "``variants.html``" msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:48 +#: ../../content/contributing/documentation/rst_guidelines.rst:47 msgid "The relative links are clearly superior in terms of readability and stability: the references survive version updates, folder name changes and file tree restructurations." msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:54 +#: ../../content/contributing/documentation/rst_guidelines.rst:53 msgid "Start a new line before the 100th character" msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:56 +#: ../../content/contributing/documentation/rst_guidelines.rst:55 msgid "In RST, it is possible to break a line without forcing a line break on the rendered HTML. Make use of this feature to write **lines of maximum 100 characters**. A line break in a sentence results in an additional whitespace in HTML. That means that you do not need to leave a trailing whitespace at the end of a line to separate words." msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:62 -msgid "You can safely break a line around the separators (``-->``) of ``menuselection`` directives and anywhere in a hyperlink reference. For the ``doc``, ``ref`` and ``download`` directives, this is only true for the label part of the reference." +#: ../../content/contributing/documentation/rst_guidelines.rst:61 +msgid "You can safely break a line around the separators (``-->``) of ``menuselection`` markups and anywhere in a hyperlink reference. For the ``doc``, ``ref`` and ``download`` markups, this is only true for the label part of the reference." msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:67 -msgid "Example: Line breaks within directive and inline markup" +#: ../../content/contributing/documentation/rst_guidelines.rst:66 +msgid "Example: Line breaks within markups" msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:76 +#: ../../content/contributing/documentation/rst_guidelines.rst:75 msgid "Be consistent with indentation" msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:78 +#: ../../content/contributing/documentation/rst_guidelines.rst:77 msgid "Use only spaces (never tabs)." msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:80 -msgid "Use as many spaces at the beginning of an indented line as needed to align it with the first character of the directive in the line above. This usually implies 3 spaces but you only need 2 for bulleted lists." +#: ../../content/contributing/documentation/rst_guidelines.rst:79 +msgid "Use as many spaces at the beginning of an indented line as needed to align it with the first character of the markup in the line above. This usually implies 3 spaces but you only need 2 for bulleted lists." msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:85 +#: ../../content/contributing/documentation/rst_guidelines.rst:84 msgid "Example: The first ``:`` is below the ``i`` (3 spaces)" msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:94 +#: ../../content/contributing/documentation/rst_guidelines.rst:93 msgid "Example: The ``:titlesonly:`` and page references start below the ``t`` (3 spaces)" msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:105 +#: ../../content/contributing/documentation/rst_guidelines.rst:104 msgid "Example: Continuation lines resume below the ``I``’s of “Invoice” (2 spaces)" msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:115 -msgid "Use the menuselection directive" +#: ../../content/contributing/documentation/rst_guidelines.rst:114 +msgid "Use the menuselection markup" msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:117 -msgid "Although chaining characters ``‣`` and menu names works fine to indicate a user which menus to click, it is best to use the ``menuselection`` directive (see :ref:`contributing/specialized-directives`) for the same result. Indeed, it renders the menus chain consistently with the rest of the documentation and would automatically adapt to the new graphic chart if we were to switch to a new one. This directive is used inline as follows: ``:menuselection:`Settings --> Products --> Variants```." +#: ../../content/contributing/documentation/rst_guidelines.rst:116 +msgid "Although chaining characters ``‣`` and menu names works fine to indicate a user which menus to click, it is best to use the ``menuselection`` markup (see :ref:`contributing/menuselection`) for the same result. Indeed, it renders the menus chain consistently with the rest of the documentation and would automatically adapt to the new graphic chart if we were to switch to a new one. This markup is used inline as follows: ``:menuselection:`Sales --> Settings --> Products --> Variants```." msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:127 +#: ../../content/contributing/documentation/rst_guidelines.rst:125 msgid "Write resilient code" msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:129 +#: ../../content/contributing/documentation/rst_guidelines.rst:127 msgid "Prefer the use of ``#.`` in numbered lists instead of ``1.``, ``2.``, etc. This removes the risk of breaking the numbering when adding new elements to the list and is easier to maintain." msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:131 +#: ../../content/contributing/documentation/rst_guidelines.rst:129 msgid "Avoid using implicit hyperlink targets and prefer internal hyperlink targets instead. Referencing the implicit target ``How to print quotations?`` is more prone to break than a reference to the explicit target ``_print_quotation`` which never appears in the rendered HTML and is thus even less likely to be modified." msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:139 +#: ../../content/contributing/documentation/rst_guidelines.rst:137 msgid "Prefix hyperlink targets with application names" msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:141 -msgid "As hyperlink targets are visible from the entire documentation when referenced with the ``ref`` directive, it is recommended to prefix the target name with that of the related application. For instance, naming a target ``_amazon/form`` instead of ``_form`` avoids unwanted behaviors and makes the purpose of the target clear." +#: ../../content/contributing/documentation/rst_guidelines.rst:139 +msgid "As hyperlink targets are visible from the entire documentation when referenced with the ``ref`` markup, it is recommended to prefix the target name with that of the related application. For instance, naming a target ``_amazon/form`` instead of ``_form`` avoids unwanted behaviors and makes the purpose of the target clear." msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:149 +#: ../../content/contributing/documentation/rst_guidelines.rst:147 msgid "Don’t break hyperlink targets" msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:151 +#: ../../content/contributing/documentation/rst_guidelines.rst:149 msgid "When refactoring (improving without adding new content) section headings or hyperlink targets, take care not to break any hyperlink reference to these targets or update them accordingly." msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:157 +#: ../../content/contributing/documentation/rst_guidelines.rst:155 msgid "Use single-underscore suffixes for hyperlink references" msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:162 +#: ../../content/contributing/documentation/rst_guidelines.rst:160 msgid "Although using a double-underscore suffix works most of the time for classic hyperlink references, it is not recommended as double-underscores normally indicate an anonymous hyperlink reference. This is a special kind of hyperlink reference that makes use of nameless hyperlink targets consisting only of two underscore." msgstr "" -#: ../../content/contributing/documentation/rst_guidelines.rst:164 +#: ../../content/contributing/documentation/rst_guidelines.rst:162 msgid "tl;dr: Double-underscore suffixes work until they don’t and are bad practice, use single-underscore suffixes instead." msgstr "" diff --git a/locale/sources/developer.pot b/locale/sources/developer.pot index db9b717d3..a078071c8 100644 --- a/locale/sources/developer.pot +++ b/locale/sources/developer.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Odoo 14.0\n" +"Project-Id-Version: Odoo 16.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-18 07:12+0200\n" +"POT-Creation-Date: 2022-10-04 12:47+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,10 +16,3043 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../../content/developer.rst:3 +#: ../../content/developer.rst:9 msgid "Developer" msgstr "" +#: ../../content/developer.rst:11 +msgid "Learn through tutorials and get help using reference guides." +msgstr "" + +#: ../../content/developer/api.rst:5 +#: ../../content/developer/reference/backend/http.rst:52 +#: ../../content/developer/reference/backend/orm.rst:54 +#: ../../content/developer/reference/backend/views.rst:1994 +#: ../../content/developer/reference/frontend/hooks.rst:85 +#: ../../content/developer/reference/frontend/hooks.rst:120 +#: ../../content/developer/reference/frontend/hooks.rst:168 +#: ../../content/developer/reference/frontend/hooks.rst:211 +#: ../../content/developer/reference/frontend/qweb.rst:966 +#: ../../content/developer/reference/frontend/registries.rst:170 +#: ../../content/developer/reference/frontend/services.rst:156 +#: ../../content/developer/reference/frontend/services.rst:211 +#: ../../content/developer/reference/frontend/services.rst:373 +#: ../../content/developer/reference/frontend/services.rst:421 +#: ../../content/developer/reference/frontend/services.rst:534 +#: ../../content/developer/reference/frontend/services.rst:637 +#: ../../content/developer/reference/frontend/services.rst:728 +#: ../../content/developer/reference/frontend/services.rst:777 +#: ../../content/developer/reference/frontend/services.rst:845 +msgid "API" +msgstr "" + +#: ../../content/developer/api/external_api.rst:3 +msgid "External API" +msgstr "" + +#: ../../content/developer/api/external_api.rst:5 +msgid "Odoo is usually extended internally via modules, but many of its features and all of its data are also available from the outside for external analysis or integration with various tools. Part of the :ref:`reference/orm/model` API is easily available over XML-RPC_ and accessible from a variety of languages." +msgstr "" + +#: ../../content/developer/api/external_api.rst:11 +msgid "Starting with PHP8, the XML-RPC extension may not be available by default. Check out the `manual `_ for the installation steps." +msgstr "" + +#: ../../content/developer/api/external_api.rst:16 +msgid ":doc:`Tutorial on web services <../howtos/web_services>`" +msgstr "" + +#: ../../content/developer/api/external_api.rst:19 +msgid "Connection" +msgstr "" + +#: ../../content/developer/api/external_api.rst:22 +msgid "Configuration" +msgstr "" + +#: ../../content/developer/api/external_api.rst:24 +msgid "If you already have an Odoo server installed, you can just use its parameters." +msgstr "" + +#: ../../content/developer/api/external_api.rst:28 +msgid "For Odoo Online instances (.odoo.com), users are created without a *local* password (as a person you are logged in via the Odoo Online authentication system, not by the instance itself). To use XML-RPC on Odoo Online instances, you will need to set a password on the user account you want to use:" +msgstr "" + +#: ../../content/developer/api/external_api.rst:34 +msgid "Log in your instance with an administrator account." +msgstr "" + +#: ../../content/developer/api/external_api.rst:35 +msgid "Go to :menuselection:`Settings --> Users & Companies --> Users`." +msgstr "" + +#: ../../content/developer/api/external_api.rst:36 +msgid "Click on the user you want to use for XML-RPC access." +msgstr "" + +#: ../../content/developer/api/external_api.rst:37 +msgid "Click on :guilabel:`Action` and select :guilabel:`Change Password`." +msgstr "" + +#: ../../content/developer/api/external_api.rst:38 +msgid "Set a :guilabel:`New Password` value then click :guilabel:`Change Password`." +msgstr "" + +#: ../../content/developer/api/external_api.rst:40 +msgid "The *server url* is the instance's domain (e.g. *https://mycompany.odoo.com*), the *database name* is the name of the instance (e.g. *mycompany*). The *username* is the configured user's login as shown by the *Change Password* screen." +msgstr "" + +#: ../../content/developer/api/external_api.rst:76 +msgid "API Keys" +msgstr "" + +#: ../../content/developer/api/external_api.rst:80 +msgid "Odoo has support for **api keys** and (depending on modules or settings) may **require** these keys to perform webservice operations." +msgstr "" + +#: ../../content/developer/api/external_api.rst:83 +msgid "The way to use API Keys in your scripts is to simply replace your **password** by the key. The login remains in-use. You should store the API Key as carefully as the password as they essentially provide the same access to your user account (although they can not be used to log-in via the interface)." +msgstr "" + +#: ../../content/developer/api/external_api.rst:88 +msgid "In order to add a key to your account, simply go to your :guilabel:`Preferences` (or :guilabel:`My Profile`):" +msgstr "" + +#: ../../content/developer/api/external_api.rst:94 +msgid "then open the :guilabel:`Account Security` tab, and click :guilabel:`New API Key`:" +msgstr "" + +#: ../../content/developer/api/external_api.rst:100 +msgid "Input a description for the key, **this description should be as clear and complete as possible**: it is the only way you will have to identify your keys later and know whether you should remove them or keep them around." +msgstr "" + +#: ../../content/developer/api/external_api.rst:104 +msgid "Click :guilabel:`Generate Key`, then copy the key provided. **Store this key carefully**: it is equivalent to your password, and just like your password the system will not be able to retrieve or show the key again later on. If you lose this key, you will have to create a new one (and probably delete the one you lost)." +msgstr "" + +#: ../../content/developer/api/external_api.rst:110 +msgid "Once you have keys configured on your account, they will appear above the :guilabel:`New API Key` button, and you will be able to delete them:" +msgstr "" + +#: ../../content/developer/api/external_api.rst:116 +msgid "**A deleted API key can not be undeleted or re-set**. You will have to generate a new key and update all the places where you used the old one." +msgstr "" + +#: ../../content/developer/api/external_api.rst:120 +msgid "Test database" +msgstr "" + +#: ../../content/developer/api/external_api.rst:122 +msgid "To make exploration simpler, you can also ask https://demo.odoo.com for a test database:" +msgstr "" + +#: ../../content/developer/api/external_api.rst:139 +msgid "PHP" +msgstr "" + +#: ../../content/developer/api/external_api.rst:148 +msgid "These examples use the `Ripcord `_ library, which provides a simple XML-RPC API. Ripcord requires that `XML-RPC support be enabled `_ in your PHP installation." +msgstr "" + +#: ../../content/developer/api/external_api.rst:154 +msgid "Since calls are performed over `HTTPS `_, it also requires that the `OpenSSL extension `_ be enabled." +msgstr "" + +#: ../../content/developer/api/external_api.rst:159 +msgid "Java" +msgstr "" + +#: ../../content/developer/api/external_api.rst:176 +msgid "These examples use the `Apache XML-RPC library `_." +msgstr "" + +#: ../../content/developer/api/external_api.rst:178 +msgid "The examples do not include imports as these imports couldn't be pasted in the code." +msgstr "" + +#: ../../content/developer/api/external_api.rst:182 +msgid "Logging in" +msgstr "" + +#: ../../content/developer/api/external_api.rst:184 +msgid "Odoo requires users of the API to be authenticated before they can query most data." +msgstr "" + +#: ../../content/developer/api/external_api.rst:187 +msgid "The ``xmlrpc/2/common`` endpoint provides meta-calls which don't require authentication, such as the authentication itself or fetching version information. To verify if the connection information is correct before trying to authenticate, the simplest call is to ask for the server's version. The authentication itself is done through the ``authenticate`` function and returns a user identifier (``uid``) used in authenticated calls instead of the login." +msgstr "" + +#: ../../content/developer/api/external_api.rst:218 +#: ../../content/developer/api/external_api.rst:304 +#: ../../content/developer/api/external_api.rst:346 +#: ../../content/developer/api/external_api.rst:385 +#: ../../content/developer/api/external_api.rst:425 +#: ../../content/developer/api/external_api.rst:489 +#: ../../content/developer/api/external_api.rst:522 +#: ../../content/developer/api/external_api.rst:570 +#: ../../content/developer/api/external_api.rst:653 +#: ../../content/developer/api/external_api.rst:724 +#: ../../content/developer/api/external_api.rst:793 +#: ../../content/developer/api/external_api.rst:842 +#: ../../content/developer/api/external_api.rst:954 +#: ../../content/developer/api/external_api.rst:1119 +#: ../../content/developer/howtos/web.rst:655 +msgid "Result:" +msgstr "" + +#: ../../content/developer/api/external_api.rst:251 +msgid "Calling methods" +msgstr "" + +#: ../../content/developer/api/external_api.rst:253 +msgid "The second endpoint is ``xmlrpc/2/object``. It is used to call methods of odoo models via the ``execute_kw`` RPC function." +msgstr "" + +#: ../../content/developer/api/external_api.rst:256 +msgid "Each call to ``execute_kw`` takes the following parameters:" +msgstr "" + +#: ../../content/developer/api/external_api.rst:258 +msgid "the database to use, a string" +msgstr "" + +#: ../../content/developer/api/external_api.rst:259 +msgid "the user id (retrieved through ``authenticate``), an integer" +msgstr "" + +#: ../../content/developer/api/external_api.rst:260 +msgid "the user's password, a string" +msgstr "" + +#: ../../content/developer/api/external_api.rst:261 +msgid "the model name, a string" +msgstr "" + +#: ../../content/developer/api/external_api.rst:262 +msgid "the method name, a string" +msgstr "" + +#: ../../content/developer/api/external_api.rst:263 +msgid "an array/list of parameters passed by position" +msgstr "" + +#: ../../content/developer/api/external_api.rst:264 +msgid "a mapping/dict of parameters to pass by keyword (optional)" +msgstr "" + +#: ../../content/developer/api/external_api.rst:268 +msgid "For instance, to see if we can read the ``res.partner`` model, we can call ``check_access_rights`` with ``operation`` passed by position and ``raise_exception`` passed by keyword (in order to get a true/false result rather than true/error):" +msgstr "" + +#: ../../content/developer/api/external_api.rst:311 +msgid "List records" +msgstr "" + +#: ../../content/developer/api/external_api.rst:313 +msgid "Records can be listed and filtered via :meth:`~odoo.models.Model.search`." +msgstr "" + +#: ../../content/developer/api/external_api.rst:315 +msgid ":meth:`~odoo.models.Model.search` takes a mandatory :ref:`domain ` filter (possibly empty), and returns the database identifiers of all records matching the filter." +msgstr "" + +#: ../../content/developer/api/external_api.rst:321 +msgid "To list customer companies, for instance:" +msgstr "" + +#: ../../content/developer/api/external_api.rst:353 +msgid "Pagination" +msgstr "" + +#: ../../content/developer/api/external_api.rst:355 +msgid "By default a search will return the ids of all records matching the condition, which may be a huge number. ``offset`` and ``limit`` parameters are available to only retrieve a subset of all matched records." +msgstr "" + +#: ../../content/developer/api/external_api.rst:392 +msgid "Count records" +msgstr "" + +#: ../../content/developer/api/external_api.rst:394 +msgid "Rather than retrieve a possibly gigantic list of records and count them, :meth:`~odoo.models.Model.search_count` can be used to retrieve only the number of records matching the query. It takes the same :ref:`domain ` filter as :meth:`~odoo.models.Model.search` and no other parameter." +msgstr "" + +#: ../../content/developer/api/external_api.rst:432 +msgid "Calling ``search`` then ``search_count`` (or the other way around) may not yield coherent results if other users are using the server: stored data could have changed between the calls." +msgstr "" + +#: ../../content/developer/api/external_api.rst:437 +msgid "Read records" +msgstr "" + +#: ../../content/developer/api/external_api.rst:439 +msgid "Record data are accessible via the :meth:`~odoo.models.Model.read` method, which takes a list of ids (as returned by :meth:`~odoo.models.Model.search`), and optionally a list of fields to fetch. By default, it fetches all the fields the current user can read, which tends to be a huge amount." +msgstr "" + +#: ../../content/developer/api/external_api.rst:495 +msgid "Conversely, picking only three fields deemed interesting." +msgstr "" + +#: ../../content/developer/api/external_api.rst:529 +msgid "Even if the ``id`` field is not requested, it is always returned." +msgstr "" + +#: ../../content/developer/api/external_api.rst:532 +msgid "List record fields" +msgstr "" + +#: ../../content/developer/api/external_api.rst:534 +msgid ":meth:`~odoo.models.Model.fields_get` can be used to inspect a model's fields and check which ones seem to be of interest." +msgstr "" + +#: ../../content/developer/api/external_api.rst:537 +msgid "Because it returns a large amount of meta-information (it is also used by client programs) it should be filtered before printing, the most interesting items for a human user are ``string`` (the field's label), ``help`` (a help text if available) and ``type`` (to know which values to expect, or to send when updating a record)." +msgstr "" + +#: ../../content/developer/api/external_api.rst:612 +msgid "Search and read" +msgstr "" + +#: ../../content/developer/api/external_api.rst:614 +msgid "Because it is a very common task, Odoo provides a :meth:`~odoo.models.Model.search_read` shortcut which, as its name suggests, is equivalent to a :meth:`~odoo.models.Model.search` followed by a :meth:`~odoo.models.Model.read`, but avoids having to perform two requests and keep ids around." +msgstr "" + +#: ../../content/developer/api/external_api.rst:620 +msgid "Its arguments are similar to :meth:`~odoo.models.Model.search`'s, but it can also take a list of ``fields`` (like :meth:`~odoo.models.Model.read`, if that list is not provided it will fetch all fields of matched records)." +msgstr "" + +#: ../../content/developer/api/external_api.rst:691 +msgid "Create records" +msgstr "" + +#: ../../content/developer/api/external_api.rst:693 +msgid "Records of a model are created using :meth:`~odoo.models.Model.create`. The method creates a single record and returns its database identifier." +msgstr "" + +#: ../../content/developer/api/external_api.rst:696 +msgid ":meth:`~odoo.models.Model.create` takes a mapping of fields to values, used to initialize the record. For any field which has a default value and is not set through the mapping argument, the default value will be used." +msgstr "" + +#: ../../content/developer/api/external_api.rst:731 +msgid "While most value types are what would expect (integer for :class:`~odoo.fields.Integer`, string for :class:`~odoo.fields.Char` or :class:`~odoo.fields.Text`)," +msgstr "" + +#: ../../content/developer/api/external_api.rst:735 +msgid ":class:`~odoo.fields.Date`, :class:`~odoo.fields.Datetime` and :class:`~odoo.fields.Binary` fields use string values" +msgstr "" + +#: ../../content/developer/api/external_api.rst:737 +msgid ":class:`~odoo.fields.One2many` and :class:`~odoo.fields.Many2many` use a special command protocol detailed in :meth:`the documentation to the write method `." +msgstr "" + +#: ../../content/developer/api/external_api.rst:742 +msgid "Update records" +msgstr "" + +#: ../../content/developer/api/external_api.rst:744 +msgid "Records can be updated using :meth:`~odoo.models.Model.write`. It takes a list of records to update and a mapping of updated fields to values similar to :meth:`~odoo.models.Model.create`." +msgstr "" + +#: ../../content/developer/api/external_api.rst:748 +msgid "Multiple records can be updated simultaneously, but they will all get the same values for the fields being set. It is not possible to perform \"computed\" updates (where the value being set depends on an existing value of a record)." +msgstr "" + +#: ../../content/developer/api/external_api.rst:800 +msgid "Delete records" +msgstr "" + +#: ../../content/developer/api/external_api.rst:802 +msgid "Records can be deleted in bulk by providing their ids to :meth:`~odoo.models.Model.unlink`." +msgstr "" + +#: ../../content/developer/api/external_api.rst:849 +msgid "Inspection and introspection" +msgstr "" + +#: ../../content/developer/api/external_api.rst:851 +msgid "While we previously used :meth:`~odoo.models.Model.fields_get` to query a model and have been using an arbitrary model from the start, Odoo stores most model metadata inside a few meta-models which allow both querying the system and altering models and fields (with some limitations) on the fly over XML-RPC." +msgstr "" + +#: ../../content/developer/api/external_api.rst:860 +msgid "``ir.model``" +msgstr "" + +#: ../../content/developer/api/external_api.rst:862 +msgid "Provides information about Odoo models via its various fields." +msgstr "" + +#: ../../content/developer/api/external_api.rst:864 +#: ../../content/developer/api/external_api.rst:1000 +#: ../../content/developer/howtos/web.rst:1326 +#: ../../content/developer/reference/backend/actions.rst:19 +#: ../../content/developer/reference/backend/actions.rst:416 +#: ../../content/developer/reference/backend/data.rst:221 +#: ../../content/developer/reference/backend/views.rst:1376 +#: ../../content/developer/reference/backend/views.rst:1784 +#: ../../content/developer/reference/backend/views.rst:1820 +#: ../../content/developer/reference/backend/views.rst:1904 +#: ../../content/developer/reference/backend/views.rst:2031 +#: ../../content/developer/reference/backend/views.rst:2200 +#: ../../content/developer/reference/backend/views.rst:2341 +#: ../../content/developer/reference/frontend/services.rst:872 +msgid "``name``" +msgstr "" + +#: ../../content/developer/api/external_api.rst:865 +msgid "a human-readable description of the model" +msgstr "" + +#: ../../content/developer/api/external_api.rst:866 +#: ../../content/developer/reference/backend/views.rst:2154 +msgid "``model``" +msgstr "" + +#: ../../content/developer/api/external_api.rst:867 +msgid "the name of each model in the system" +msgstr "" + +#: ../../content/developer/api/external_api.rst:869 +#: ../../content/developer/api/external_api.rst:1007 +#: ../../content/developer/reference/backend/actions.rst:231 +msgid "``state``" +msgstr "" + +#: ../../content/developer/api/external_api.rst:869 +msgid "whether the model was generated in Python code (``base``) or by creating an ``ir.model`` record (``manual``)" +msgstr "" + +#: ../../content/developer/api/external_api.rst:872 +msgid "``field_id``" +msgstr "" + +#: ../../content/developer/api/external_api.rst:872 +msgid "list of the model's fields through a :class:`~odoo.fields.One2many` to :ref:`reference/webservice/inspection/fields`" +msgstr "" + +#: ../../content/developer/api/external_api.rst:875 +#: ../../content/developer/reference/backend/actions.rst:148 +msgid "``view_ids``" +msgstr "" + +#: ../../content/developer/api/external_api.rst:875 +msgid ":class:`~odoo.fields.One2many` to the :ref:`reference/views` defined for the model" +msgstr "" + +#: ../../content/developer/api/external_api.rst:879 +msgid "``access_ids``" +msgstr "" + +#: ../../content/developer/api/external_api.rst:878 +msgid ":class:`~odoo.fields.One2many` relation to the :ref:`reference/security/acl` set on the model" +msgstr "" + +#: ../../content/developer/api/external_api.rst:881 +msgid "``ir.model`` can be used to" +msgstr "" + +#: ../../content/developer/api/external_api.rst:883 +msgid "Query the system for installed models (as a precondition to operations on the model or to explore the system's content)." +msgstr "" + +#: ../../content/developer/api/external_api.rst:885 +msgid "Get information about a specific model (generally by listing the fields associated with it)." +msgstr "" + +#: ../../content/developer/api/external_api.rst:887 +msgid "Create new models dynamically over RPC." +msgstr "" + +#: ../../content/developer/api/external_api.rst:890 +msgid "Custom model names must start with ``x_``." +msgstr "" + +#: ../../content/developer/api/external_api.rst:891 +msgid "The ``state`` must be provided and set to ``manual``, otherwise the model will not be loaded." +msgstr "" + +#: ../../content/developer/api/external_api.rst:893 +msgid "It is not possible to add new *methods* to a custom model, only fields." +msgstr "" + +#: ../../content/developer/api/external_api.rst:897 +msgid "A custom model will initially contain only the \"built-in\" fields available on all models:" +msgstr "" + +#: ../../content/developer/api/external_api.rst:992 +msgid "``ir.model.fields``" +msgstr "" + +#: ../../content/developer/api/external_api.rst:994 +msgid "Provides information about the fields of Odoo models and allows adding custom fields without using Python code." +msgstr "" + +#: ../../content/developer/api/external_api.rst:998 +#: ../../content/developer/reference/backend/actions.rst:229 +#: ../../content/developer/reference/backend/actions.rst:433 +msgid "``model_id``" +msgstr "" + +#: ../../content/developer/api/external_api.rst:998 +msgid ":class:`~odoo.fields.Many2one` to :ref:`reference/webservice/inspection/models` to which the field belongs" +msgstr "" + +#: ../../content/developer/api/external_api.rst:1001 +msgid "the field's technical name (used in ``read`` or ``write``)" +msgstr "" + +#: ../../content/developer/api/external_api.rst:1002 +msgid "``field_description``" +msgstr "" + +#: ../../content/developer/api/external_api.rst:1003 +msgid "the field's user-readable label (e.g. ``string`` in ``fields_get``)" +msgstr "" + +#: ../../content/developer/api/external_api.rst:1004 +msgid "``ttype``" +msgstr "" + +#: ../../content/developer/api/external_api.rst:1005 +msgid "the :ref:`type ` of field to create" +msgstr "" + +#: ../../content/developer/api/external_api.rst:1007 +msgid "whether the field was created via Python code (``base``) or via ``ir.model.fields`` (``manual``)" +msgstr "" + +#: ../../content/developer/api/external_api.rst:1009 +msgid "``required``, ``readonly``, ``translate``" +msgstr "" + +#: ../../content/developer/api/external_api.rst:1010 +msgid "enables the corresponding flag on the field" +msgstr "" + +#: ../../content/developer/api/external_api.rst:1012 +#: ../../content/developer/reference/backend/data.rst:226 +#: ../../content/developer/reference/backend/data.rst:250 +#: ../../content/developer/reference/backend/views.rst:895 +#: ../../content/developer/reference/backend/views.rst:1829 +#: ../../content/developer/reference/backend/views.rst:2232 +#: ../../content/developer/reference/backend/views.rst:2347 +#: ../../content/developer/reference/backend/views.rst:2411 +msgid "``groups``" +msgstr "" + +#: ../../content/developer/api/external_api.rst:1012 +msgid ":ref:`field-level access control `, a :class:`~odoo.fields.Many2many` to ``res.groups``" +msgstr "" + +#: ../../content/developer/api/external_api.rst:1016 +msgid "``selection``, ``size``, ``on_delete``, ``relation``, ``relation_field``, ``domain``" +msgstr "" + +#: ../../content/developer/api/external_api.rst:1015 +msgid "type-specific properties and customizations, see :ref:`the fields documentation ` for details" +msgstr "" + +#: ../../content/developer/api/external_api.rst:1019 +msgid "Like custom models, only new fields created with ``state=\"manual\"`` are activated as actual fields on the model." +msgstr "" + +#: ../../content/developer/api/external_api.rst:1021 +msgid "Computed fields can not be added via ``ir.model.fields``, some field meta-information (defaults, onchange) can not be set either." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:5 +msgid "Extract API" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:7 +msgid "Odoo provides a service allowing you to automate the processing of your invoices. The service scans your document using an Optical Character Recognition (OCR) engine and then uses AI-based algorithms to extract the fields of interest such as the total, the due date, or the invoice lines. More functional information can be found on the `demo page `_." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:11 +msgid "This service is a paid service. Each invoice processing will cost you one credit. Three different sized packs can be bought on `iap.odoo.com `_." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:13 +msgid "You can either use this service directly in the Odoo Accounting App or through the API. The Extract API which is detailed in the next section allows you to integrate our service directly into your own projects." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:17 +msgid "Invoices" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:18 +msgid "The extract API use the JSON-RPC2_ protocol. The diffent routes are located at the following address: **https://iap-extract.odoo.com**." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:21 +msgid "Expected successful flow" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:23 +msgid "Call :ref:`webservices/extract_api/invoice_parse` to submit your invoices (one call for each invoice). On success, you receive a `document_id` in the response." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:24 +msgid "You then have to regularly poll :ref:`webservices/extract_api/invoice_get_results` to get the document's parsing status." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:25 +msgid "Once the result received, you can validate it by calling :ref:`webservices/extract_api/invoice_validate` and sending the expected values. This step is optional but greatly helps the system to improve." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:28 +msgid "These 3 routes are detailed in this :ref:`section `. The HTTP POST method should be used for all of them. A python implementation of the full flow can be found :download:`here ` and a token for integration testing is provided in the :ref:`integration testing section `." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:34 +msgid "Routes" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:39 +msgid "``/iap/invoice_extract/parse``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:42 +#: ../../content/developer/api/extract_api.rst:145 +#: ../../content/developer/api/extract_api.rst:359 +#: ../../content/developer/howtos/themes.rst:959 +#: ../../content/developer/reference/frontend/assets.rst:301 +#: ../../content/developer/reference/frontend/framework_overview.rst:263 +#: ../../content/developer/reference/frontend/hooks.rst:45 +#: ../../content/developer/reference/frontend/hooks.rst:62 +#: ../../content/developer/reference/frontend/hooks.rst:102 +#: ../../content/developer/reference/frontend/hooks.rst:139 +#: ../../content/developer/reference/frontend/hooks.rst:185 +#: ../../content/developer/reference/frontend/hooks.rst:225 +#: ../../content/developer/reference/frontend/odoo_editor.rst:148 +#: ../../content/developer/reference/frontend/odoo_editor.rst:174 +#: ../../content/developer/reference/frontend/odoo_editor.rst:218 +#: ../../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:738 +#: ../../content/developer/reference/frontend/services.rst:853 +msgid "Description" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:43 +msgid "Request a processing of the document from the OCR. The route will return a `document_id` you can use to obtain the result of your request." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:46 +#: ../../content/developer/api/extract_api.rst:149 +#: ../../content/developer/api/extract_api.rst:364 +msgid "Request Body" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:48 +#: ../../content/developer/api/extract_api.rst:151 +#: ../../content/developer/api/extract_api.rst:366 +msgid "``jsonrpc`` (required)" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:49 +msgid "Must be exactly “2.0”." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:50 +#: ../../content/developer/api/extract_api.rst:153 +#: ../../content/developer/api/extract_api.rst:368 +msgid "``method`` (required)" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:51 +msgid "Must be “call”." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:52 +#: ../../content/developer/api/extract_api.rst:155 +msgid "``id`` (required)" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:53 +msgid "An identifier established by the client. It allows the client to keep track of which response goes with which request. This makes asynchronous calls easier." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:76 +#: ../../content/developer/api/extract_api.rst:374 +msgid "``params``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:55 +msgid "``account_token`` (required)" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:56 +msgid "The token of the account from which credits will be taken. Each successful call costs one token." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:58 +msgid "``version`` (optional)" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:58 +msgid "The version will determine the format of your requests and the format of the server response. Some results can be unavailable in older versions. For the current version 1.2.0, send ‘120’. If not specified, the latest version will be used." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:62 +msgid "``documents`` (required)" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:61 +msgid "The invoice must be provided as a string in the ASCII encoding. The list should contain only one string. If multiple strings are provided only the first string corresponding to a pdf will be processed. If no pdf is found, the first string will be processed. This field is a list only for legacy reasons. The supported extensions are *pdf*, *png*, *jpg* and *bmp*." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:76 +msgid "``user_infos`` (required)" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:65 +msgid "Information concerning the person to whom the invoice is intended. This information is not required in order for the service to work but it greatly improves the quality of the result." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:67 +msgid "``user_company_vat`` (optional)" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:68 +msgid "VAT number of the client." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:69 +msgid "``user_company_name`` (optional)" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:70 +msgid "Name of the client’s company." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:71 +msgid "``user_company_country_code`` (optional)" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:72 +msgid "Country code of the client. Format: `ISO3166 alpha-2 `_." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:73 +msgid "``user_lang`` (optional)" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:74 +msgid "The client language. Format: *language_code + _ + locale* (ex: fr_FR, en_US)." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:76 +msgid "``user_email`` (optional)" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:76 +msgid "The client email." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:100 +#: ../../content/developer/api/extract_api.rst:177 +#: ../../content/developer/api/extract_api.rst:465 +#: ../../content/developer/reference/backend/http.rst:81 +msgid "Response" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:102 +#: ../../content/developer/api/extract_api.rst:179 +#: ../../content/developer/api/extract_api.rst:467 +msgid "``jsonrpc``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:103 +msgid "A string specifying the version of the JSON-RPC protocol. It will be “2.0”." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:104 +#: ../../content/developer/api/extract_api.rst:181 +#: ../../content/developer/api/extract_api.rst:469 +#: ../../content/developer/reference/backend/actions.rst:219 +#: ../../content/developer/reference/backend/data.rst:70 +#: ../../content/developer/reference/backend/data.rst:155 +#: ../../content/developer/reference/backend/data.rst:232 +#: ../../content/developer/reference/backend/data.rst:242 +#: ../../content/developer/reference/backend/views.rst:866 +msgid "``id``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:105 +msgid "The identifier you set in the request body." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:112 +#: ../../content/developer/api/extract_api.rst:191 +#: ../../content/developer/api/extract_api.rst:475 +msgid "``result``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:107 +#: ../../content/developer/api/extract_api.rst:186 +#: ../../content/developer/api/extract_api.rst:472 +msgid "``status_code``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:108 +#: ../../content/developer/api/extract_api.rst:187 +#: ../../content/developer/api/extract_api.rst:473 +msgid "|STATUS_CODE|" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:109 +#: ../../content/developer/api/extract_api.rst:188 +#: ../../content/developer/api/extract_api.rst:475 +msgid "``status_msg``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:110 +#: ../../content/developer/api/extract_api.rst:189 +#: ../../content/developer/api/extract_api.rst:475 +msgid "|STATUS_MSG|" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:112 +msgid "``document_id``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:112 +#: ../../content/developer/api/extract_api.rst:191 +msgid "Only present if the request is successful." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:114 +msgid "The API does not actually use the JSON-RPC error scheme. Instead the API has its own error scheme bundled inside a successful JSON-RPC result." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:117 +#: ../../content/developer/api/extract_api.rst:196 +#: ../../content/developer/api/extract_api.rst:478 +msgid "status_code" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:117 +#: ../../content/developer/api/extract_api.rst:196 +#: ../../content/developer/api/extract_api.rst:478 +msgid "status_msg" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:119 +#: ../../content/developer/api/extract_api.rst:198 +#: ../../content/developer/api/extract_api.rst:480 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.amount:1 +msgid "0" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:119 +#: ../../content/developer/api/extract_api.rst:198 +#: ../../content/developer/api/extract_api.rst:480 +msgid "Success" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:120 +#: ../../content/developer/api/extract_api.rst:200 +msgid "2" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:120 +#: ../../content/developer/api/extract_api.rst:200 +msgid "An error occurred" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:121 +msgid "3" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:121 +msgid "You don't have enough credit" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:122 +#: ../../content/developer/howtos/rdtraining/C_data.rst:185 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.code_digits:1 +msgid "6" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:122 +msgid "Unsupported file format" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:123 +#: ../../content/developer/api/extract_api.rst:201 +msgid "9" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:123 +#: ../../content/developer/api/extract_api.rst:201 +msgid "Server is currently under maintenance. Please try again later." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:142 +msgid "``/iap/invoice_extract/get_results``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:146 +msgid "Request the results of the documents ids obtained with the :ref:`/parse ` route. Can either return the results or a \"request pending\" message." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:152 +#: ../../content/developer/api/extract_api.rst:154 +#: ../../content/developer/api/extract_api.rst:156 +#: ../../content/developer/api/extract_api.rst:159 +#: ../../content/developer/api/extract_api.rst:180 +#: ../../content/developer/api/extract_api.rst:182 +#: ../../content/developer/api/extract_api.rst:367 +#: ../../content/developer/api/extract_api.rst:369 +#: ../../content/developer/api/extract_api.rst:468 +#: ../../content/developer/api/extract_api.rst:470 +msgid "|SAME_AS_PARSE|" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:161 +msgid "``params``:" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:158 +msgid "``version`` (required)" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:161 +msgid "``documents_ids`` (required)" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:161 +msgid "The list of ``document_id`` for which you want to get the current parsing status." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:184 +msgid "Dictionary where each key is a document_id. For each ``document_id``:" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:191 +msgid "``results``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:193 +msgid "result keys are strings despite the fact that the document_ids given in the request body are integers." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:199 +#: ../../content/developer/howtos/rdtraining/C_data.rst:185 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.sequence:1 +msgid "1" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:199 +msgid "Not ready" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:234 +msgid "``feature_result``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:236 +msgid "Each field of interest we want to extract from the invoice such as the total or the due date are also called features. An exhaustive list of all the extracted features can be found in the table below." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:238 +msgid "For each feature, we return a list of candidates and we spotlight the candidate our model predicts to be the best fit for the feature." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:240 +msgid "``selected_value``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:241 +msgid "The best candidate for this feature." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:243 +msgid "``words``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:243 +msgid "List of all the candidates for this feature ordered by decreasing score." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:255 +msgid "``candidate``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:257 +msgid "For each candidate we give its representation and position in the document. Candidates are sorted by decreasing order of suitability." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:259 +msgid "``content``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:260 +msgid "Representation of the candidate." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:262 +msgid "``coords``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:262 +msgid "``[center_x, center_y, width, height, rotation_angle]``. The position and dimensions are relative to the size of the page and are therefore between 0 and 1. The angle is a clockwise rotation measured in degrees." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:265 +#: ../../content/developer/reference/backend/data.rst:253 +msgid "``page``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:265 +msgid "Page of the original document on which the candidate is located (starts at 0)." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:277 +msgid "Feature name" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:277 +msgid "Specifities" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:279 +msgid "``SWIFT_code``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:279 +msgid "**content** is a dictionary encoded as a string." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:281 +msgid "It contains information about the detected SWIFT code (or `BIC `_)." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:284 +msgid "Keys:" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:286 +msgid "``bic``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:287 +msgid "detected BIC (string)." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:288 +#: ../../content/developer/reference/backend/views.rst:617 +#: ../../content/developer/reference/backend/views.rst:734 +msgid "``name`` (optional)" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:289 +msgid "bank name (string)." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:290 +msgid "``country_code``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:291 +msgid "ISO3166 alpha-2 country code of the bank (string)." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:292 +msgid "``city`` (optional)" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:293 +msgid "city of the bank (string)." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:295 +msgid "``verified_bic``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:295 +msgid "True if the BIC has been found in our DB (bool)." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:297 +msgid "Name and city are present only if verified_bic is true." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:299 +msgid "``VAT_Number``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:299 +#: ../../content/developer/api/extract_api.rst:301 +#: ../../content/developer/api/extract_api.rst:303 +#: ../../content/developer/api/extract_api.rst:305 +#: ../../content/developer/api/extract_api.rst:319 +#: ../../content/developer/api/extract_api.rst:325 +msgid "**content** is a string" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:301 +msgid "``country``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:303 +msgid "``currency``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:305 +msgid "``date``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:307 +msgid "Format : *YYYY-MM-DD HH:MM:SS*" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:309 +msgid "``due_date``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:309 +msgid "Same as for ``date``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:311 +msgid "``global_taxes``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:311 +#: ../../content/developer/api/extract_api.rst:317 +#: ../../content/developer/api/extract_api.rst:321 +#: ../../content/developer/api/extract_api.rst:323 +msgid "**content** is a float" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:313 +msgid "**candidate** has an additional field ``amount_type``. Its value is always percent." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:315 +msgid "**selected_values** is a list of candidates." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:317 +msgid "``global_taxes_amount``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:319 +msgid "``invoice_id``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:321 +msgid "``subtotal``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:323 +msgid "``total``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:325 +msgid "``supplier``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:329 +msgid "``feature_result`` for the ``invoice_lines`` feature" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:331 +msgid "It follows a more specific structure. It is basically a list of dictionaries where each dictionary represents an invoice line. Each value follows a :ref:`webservices/extract_api/invoice_get_results/feature_result` structure." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:356 +msgid "``/iap/invoice_extract/validate``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:360 +msgid "Route that validates the different features of an invoice. The validation step is an optional step but is strongly recommended. By telling the system if it were right or wrong for each feature you give an important feedback. It has no direct impact but it helps the system to greatly improve its prediction accuracy for the invoices you will send in the future." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:371 +msgid "``documents_id`` (required)" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:372 +msgid "Id of the document for which you want to validate the result." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:374 +#: ../../content/developer/reference/backend/views.rst:1496 +#: ../../content/developer/reference/backend/views.rst:1486 +msgid "``values``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:374 +msgid "Contains the validation for each feature. The field ``merged_line`` indicates if the ``invoice_lines`` have been merged or not." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:376 +msgid "You don't have to validate all the features in order for the validation to succeed. However :ref:`/validate ` can't be called multiple times for a same invoice. Therefore you should validate all the features you want to validate at once." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:398 +msgid "``validation``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:400 +msgid "A **validation** for a given feature is a dictionary containing the textual representation of the expected value for this given feature. This format apply for all the features except for ``global_taxes`` and ``invoice_lines`` which have more complex validation format." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:409 +msgid "validation for ``global_taxes``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:411 +msgid "**content** is a list of dictionaries. Each dictionary represents a tax:" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:413 +msgid "``amount``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:414 +msgid "Amount on which the tax is applied." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:415 +msgid "``tax_amount``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:416 +msgid "Amount of the tax." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:417 +msgid "``tax_amount_type``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:418 +msgid "Indicates if the ``tax_amount`` is a percentage or a fixed value. The type must be specified using the literal string \"fixed\" or \"percent\"." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:420 +msgid "``tax_price_include``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:420 +msgid "Indicates if ``amount`` already contains the tax or not." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:436 +msgid "validation for ``invoice_lines``" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:438 +msgid "**lines** is a list of dictionaries. Each dictionary represents an invoice line. The dictionary keys speak for themselves." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:481 +msgid "12" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:481 +msgid "Validation format is incorrect" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:500 +#: ../../content/developer/reference/backend/testing.rst:535 +msgid "Integration Testing" +msgstr "" + +#: ../../content/developer/api/extract_api.rst:502 +msgid "You can test your integration by using *integration_token* as ``account_token`` in the :ref:`/parse ` request." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:504 +msgid "Using this token put you in test mode and allows you to simulate the entire flow without really parsing a document and without being billed one credit for each successful invoice parsing." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:506 +msgid "The only technical differences in test mode is that the document you send is not parsed by the system and that the response you get from :ref:`/get_results ` is a hard-coded one." +msgstr "" + +#: ../../content/developer/api/extract_api.rst:509 +msgid "A python implementation of the full flow can be found :download:`here `." +msgstr "" + +#: ../../content/developer/api/iap.rst:6 +msgid "In-App Purchase" +msgstr "" + +#: ../../content/developer/api/iap.rst:8 +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/api/iap.rst:12 +msgid "In that context, Odoo acts mostly as a *broker* between a client and an Odoo App Developer:" +msgstr "" + +#: ../../content/developer/api/iap.rst:15 +msgid "Users purchase service tokens from Odoo." +msgstr "" + +#: ../../content/developer/api/iap.rst:16 +msgid "Service providers draw tokens from the user's Odoo account when service is requested." +msgstr "" + +#: ../../content/developer/api/iap.rst:21 +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/api/iap.rst:26 +#: ../../content/developer/reference/frontend/javascript_reference.rst:18 +#: ../../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:709 +#: ../../content/developer/reference/frontend/services.rst:760 +#: ../../content/developer/reference/frontend/services.rst:835 +msgid "Overview" +msgstr "" + +#: ../../content/developer/api/iap.rst:31 +msgid "The Players" +msgstr "" + +#: ../../content/developer/api/iap.rst:33 +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/api/iap.rst:35 +msgid "The Client installed your Odoo App, and from there will request services." +msgstr "" + +#: ../../content/developer/api/iap.rst:36 +msgid "Odoo brokers crediting, the Client adds credit to their account, and you can draw credits from there to provide services." +msgstr "" + +#: ../../content/developer/api/iap.rst:38 +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/api/iap.rst:46 +msgid "The Credits" +msgstr "" + +#: ../../content/developer/api/iap.rst:48 +msgid "The credits went from integer to float value starting **October 2018**. Integer values are still supported." +msgstr "" + +#: ../../content/developer/api/iap.rst:51 +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/api/iap.rst:56 +msgid "for an sms service: 1 credit = 1 sms;" +msgstr "" + +#: ../../content/developer/api/iap.rst:57 +msgid "for an ad service: 1 credit = 1 ad; or" +msgstr "" + +#: ../../content/developer/api/iap.rst:58 +msgid "for a postage service: 1 credit = 1 post stamp." +msgstr "" + +#: ../../content/developer/api/iap.rst:60 +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/api/iap.rst:64 +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/api/iap.rst:67 +msgid "In the following explanations we will ignore the External Service, they are just a detail of the service you provide." +msgstr "" + +#: ../../content/developer/api/iap.rst:73 +msgid "'Normal' service flow" +msgstr "" + +#: ../../content/developer/api/iap.rst:75 +msgid "If everything goes well, the normal flow is the following:" +msgstr "" + +#: ../../content/developer/api/iap.rst:77 +msgid "The Client requests a service of some sort." +msgstr "" + +#: ../../content/developer/api/iap.rst:78 +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/api/iap.rst:81 +msgid "The Service Provider provides the service (either on their own or calling to External Services)." +msgstr "" + +#: ../../content/developer/api/iap.rst:83 +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/api/iap.rst:86 +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/api/iap.rst:93 +msgid "Insufficient credits" +msgstr "" + +#: ../../content/developer/api/iap.rst:95 +msgid "However, if the Client's account lacks credits for the service, the flow will be as follows:" +msgstr "" + +#: ../../content/developer/api/iap.rst:97 +msgid "The Client requests a service as previously." +msgstr "" + +#: ../../content/developer/api/iap.rst:98 +msgid "The Service Provider asks Odoo if there are enough credits on the Client's account and gets a negative reply." +msgstr "" + +#: ../../content/developer/api/iap.rst:100 +msgid "This is signaled back to the Client." +msgstr "" + +#: ../../content/developer/api/iap.rst:101 +msgid "Who is redirected to their Odoo account to credit it and re-try." +msgstr "" + +#: ../../content/developer/api/iap.rst:105 +msgid "Building your service" +msgstr "" + +#: ../../content/developer/api/iap.rst:107 +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/api/iap.rst:110 +msgid "provide an online service yourself (e.g. convert quotations to faxes for business in Japan);" +msgstr "" + +#: ../../content/developer/api/iap.rst:112 +msgid "provide an *offline* service yourself (e.g. provide accountancy service); or" +msgstr "" + +#: ../../content/developer/api/iap.rst:113 +msgid "act as intermediary to an other service provider (e.g. bridge to an MMS gateway)." +msgstr "" + +#: ../../content/developer/api/iap.rst:119 +msgid "Register the service on Odoo" +msgstr "" + +#: ../../content/developer/api/iap.rst:121 +#: ../../content/developer/api/iap.rst:225 +#: ../../content/developer/api/iap.rst:409 +#: ../../content/developer/api/iap.rst:411 +#: ../../content/developer/api/iap.rst:514 +#: ../../content/developer/howtos/company.rst:229 +#: ../../content/developer/howtos/translations.rst:21 +#: ../../content/developer/howtos/web.rst:137 +#: ../../content/developer/howtos/web.rst:1878 +#: ../../content/developer/howtos/website.rst:490 +#: ../../content/developer/reference/backend/actions.rst:176 +#: ../../../odoo/odoo/api.py:docstring of odoo.api:3 +#: ../../content/developer/reference/backend/orm.rst:637 +#: ../../content/developer/reference/backend/orm.rst:639 +#: ../../content/developer/reference/backend/orm.rst:832 +#: ../../content/developer/reference/backend/orm.rst:989 +#: ../../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:874 +#: ../../content/developer/reference/backend/views.rst:998 +#: ../../content/developer/reference/backend/views.rst:1000 +#: ../../content/developer/reference/backend/views.rst:1569 +#: ../../content/developer/reference/backend/views.rst:1664 +#: ../../content/developer/reference/backend/views.rst:1682 +#: ../../content/developer/reference/backend/views.rst:1811 +#: ../../content/developer/reference/frontend/qweb.rst:413 +#: ../../content/developer/reference/frontend/qweb.rst:414 +#: ../../content/developer/reference/frontend/qweb.rst:476 +#: ../../content/developer/reference/frontend/qweb.rst:793 +msgid "Todo" +msgstr "" + +#: ../../content/developer/api/iap.rst:121 +msgid "complete this part with screenshots" +msgstr "" + +#: ../../content/developer/api/iap.rst:123 +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/api/iap.rst:132 +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/api/iap.rst:136 +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/api/iap.rst:140 +msgid "The service has *seven* important fields:" +msgstr "" + +#: ../../content/developer/api/iap.rst:142 +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/api/iap.rst:147 +msgid ":samp:`label` - :class:`Label`: The name displayed on the shopping portal for the client." +msgstr "" + +#: ../../content/developer/api/iap.rst:152 +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/api/iap.rst:155 +msgid ":samp:`icon` - :class:`Icon`: A generic icon that will serve as default for your :ref:`packs `." +msgstr "" + +#: ../../content/developer/api/iap.rst:158 +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/api/iap.rst:164 +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/api/iap.rst:168 +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/api/iap.rst:172 +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/api/iap.rst:189 +msgid "You can then create *credit packs* which clients can purchase in order to use your service." +msgstr "" + +#: ../../content/developer/api/iap.rst:195 +msgid "Packs" +msgstr "" + +#: ../../content/developer/api/iap.rst:197 +msgid "A credit pack is essentially a product with five characteristics:" +msgstr "" + +#: ../../content/developer/api/iap.rst:199 +msgid "Name: name of the pack," +msgstr "" + +#: ../../content/developer/api/iap.rst:200 +msgid "Icon: specific icon for the pack (if not provided, it will fallback on the service icon)," +msgstr "" + +#: ../../content/developer/api/iap.rst:201 +msgid "Description: details on the pack that will appear on the shop page as well as the invoice," +msgstr "" + +#: ../../content/developer/api/iap.rst:203 +msgid "Amount: amount of credits the client is entitled to when buying the pack," +msgstr "" + +#: ../../content/developer/api/iap.rst:204 +msgid "Price: price in EUR (for the time being, USD support is planned)." +msgstr "" + +#: ../../content/developer/api/iap.rst:208 +msgid "Odoo takes a 25% commission on all pack sales. Adjust your selling price accordingly." +msgstr "" + +#: ../../content/developer/api/iap.rst:213 +msgid "Depending on the strategy, the price per credit may vary from one pack to another." +msgstr "" + +#: ../../content/developer/api/iap.rst:223 +msgid "Odoo App" +msgstr "" + +#: ../../content/developer/api/iap.rst:225 +msgid "does this actually require apps?" +msgstr "" + +#: ../../content/developer/api/iap.rst:227 +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/api/iap.rst:232 +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/api/iap.rst:236 +#: ../../content/developer/api/iap.rst:251 +msgid "`coalroller/__manifest__.py`" +msgstr "" + +#: ../../content/developer/api/iap.rst:246 +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/api/iap.rst:264 +msgid "`coalroller/views/res_partner_views.xml`" +msgstr "" + +#: ../../content/developer/api/iap.rst:289 +msgid "We can now implement the action method/callback. This will *call our own server*." +msgstr "" + +#: ../../content/developer/api/iap.rst:292 +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/api/iap.rst:299 +msgid "In that call, we will need to provide:" +msgstr "" + +#: ../../content/developer/api/iap.rst:301 +msgid "any relevant client parameter (none here)," +msgstr "" + +#: ../../content/developer/api/iap.rst:302 +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/api/iap.rst:308 +msgid "`coalroller/models/res_partner.py`" +msgstr "" + +#: ../../content/developer/api/iap.rst:336 +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/api/iap.rst:340 +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/api/iap.rst:345 +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/api/iap.rst:354 +#: ../../content/developer/reference/frontend/javascript_reference.rst:887 +msgid "Service" +msgstr "" + +#: ../../content/developer/api/iap.rst:356 +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/api/iap.rst:361 +#: ../../content/developer/api/iap.rst:451 +msgid "`coalroller_service/__manifest__.py`" +msgstr "" + +#: ../../content/developer/api/iap.rst:371 +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/api/iap.rst:375 +#: ../../content/developer/api/iap.rst:464 +msgid "`coalroller_service/controllers/main.py`" +msgstr "" + +#: ../../content/developer/api/iap.rst:409 +msgid "for the actual IAP will the \"portal\" page be on odoo.com or iap.odoo.com?" +msgstr "" + +#: ../../content/developer/api/iap.rst:411 +msgid "\"My Account\" > \"Your InApp Services\"?" +msgstr "" + +#: ../../content/developer/api/iap.rst:414 +msgid "The :class:`~odoo.addons.iap.tools.iap_tools.iap_charge` helper will:" +msgstr "" + +#: ../../content/developer/api/iap.rst:416 +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/api/iap.rst:419 +msgid "execute the body of the ``with`` statement" +msgstr "" + +#: ../../content/developer/api/iap.rst:420 +msgid "if the body of the ``with`` executes successfully, update the price of the transaction if needed" +msgstr "" + +#: ../../content/developer/api/iap.rst:422 +msgid "capture (confirm) the transaction" +msgstr "" + +#: ../../content/developer/api/iap.rst:423 +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/api/iap.rst:428 +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/api/iap.rst:433 +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/api/iap.rst:438 +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/api/iap.rst:443 +#: ../../content/developer/reference/backend/reports.rst:197 +msgid "``description``" +msgstr "" + +#: ../../content/developer/api/iap.rst:442 +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/api/iap.rst:449 +msgid "``credit_template``" +msgstr "" + +#: ../../content/developer/api/iap.rst:446 +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/api/iap.rst:491 +msgid "`coalroller_service/views/no-credit.xml`" +msgstr "" + +#: ../../content/developer/api/iap.rst:514 +msgid "how do you test your service?" +msgstr "" + +#: ../../content/developer/api/iap.rst:517 +msgid "JSON-RPC2_ Transaction API" +msgstr "" + +#: ../../content/developer/api/iap.rst:522 +msgid "The IAP transaction API does not require using Odoo when implementing your server gateway, calls are standard JSON-RPC2_." +msgstr "" + +#: ../../content/developer/api/iap.rst:524 +msgid "Calls use different *endpoints* but the same *method* on all endpoints (``call``)." +msgstr "" + +#: ../../content/developer/api/iap.rst:526 +msgid "Exceptions are returned as JSON-RPC2_ errors, the formal exception name is available on ``data.name`` for programmatic manipulation." +msgstr "" + +#: ../../content/developer/api/iap.rst:529 +msgid "`iap.odoo.com documentation`_ for additional information." +msgstr "" + +#: ../../content/developer/api/iap.rst:532 +#: ../../content/developer/api/iap.rst:778 +msgid "Authorize" +msgstr "" + +#: ../../content/developer/api/iap.rst:536 +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/api/iap.rst:539 +msgid "Any amount currently on hold by a pending transaction is considered unavailable to further authorize calls." +msgstr "" + +#: ../../content/developer/api/iap.rst:542 +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/api/iap.rst:0 +#: ../../content/developer/api/iap.rst:0 +#: ../../content/developer/api/iap.rst:0 +#: ../../content/developer/api/iap.rst:0 +#: ../../content/developer/api/iap.rst:0 +#: ../../content/developer/api/iap.rst:0 +#: ../../content/developer/api/iap.rst:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel._check_company:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.route:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.csrf_token:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.validate_csrf:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.make_response:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.make_json_response:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.render:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.JsonRPCDispatcher.handle_error:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.HttpDispatcher.handle_error:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response.load:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response.set_cookie:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Char:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Float:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Binary:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Html:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Image:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Monetary:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Selection:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Text:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.add:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Date.context_today:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.end_of:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.start_of:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.subtract:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Date.to_date:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Date.to_string:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.add:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Datetime.context_timestamp:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.end_of:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.start_of:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.subtract:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Datetime.to_datetime:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Datetime.to_string:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Many2one:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.One2many:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Many2many:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Many2many:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Many2oneReference:0 +#: ../../../odoo/odoo/api.py:docstring of odoo.api.ondelete:0 +#: ../../../odoo/odoo/api.py:docstring of odoo.api.returns:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.with_company:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.with_env:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.flush_model:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.flush_recordset:0 +#: ../../../odoo/odoo/api.py:docstring of odoo.api.Environment.invalidate_all:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.invalidate_model:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.invalidate_recordset:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.modified:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.create:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.copy:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.default_get:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.name_create:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.write:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.browse:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.search:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.search_count:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.name_search:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read_group:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.fields_get:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.get_view:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.filtered:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.filtered_domain:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.mapped:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.sorted:0 +#: ../../../odoo/odoo/exceptions.py:docstring of odoo.exceptions.RedirectWarning:0 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.browse_ref:0 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.ref:0 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.browse_ref:0 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.ref:0 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.browse_ref:0 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.ref:0 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.Form:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel._populate:0 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.cartesian:0 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.compute:0 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.iterate:0 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.randint:0 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.randomize:0 +#: ../../content/developer/reference/frontend/framework_overview.rst:0 +#: ../../content/developer/reference/frontend/framework_overview.rst:0 +#: ../../content/developer/reference/frontend/framework_overview.rst:0 +#: ../../content/developer/reference/frontend/framework_overview.rst:0 +#: ../../content/developer/reference/frontend/qweb.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../content/developer/api/iap.rst:548 +msgid "optional, helps users identify the reason for charges on their account" +msgstr "" + +#: ../../content/developer/api/iap.rst:550 +msgid "optional, allows the user to benefit from trial credits if his database is eligible (see :ref:`Service registration `)" +msgstr "" + +#: ../../content/developer/api/iap.rst:552 +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/api/iap.rst:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.csrf_token:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.validate_csrf:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.default_lang:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.get_http_params:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.make_response:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.JsonRPCDispatcher.handle_error:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.HttpDispatcher.handle_error:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response.load:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.add:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.end_of:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.start_of:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.subtract:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Date.to_date:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Date.to_string:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.add:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Datetime.context_timestamp:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.end_of:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.start_of:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.subtract:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Datetime.to_datetime:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Datetime.to_string:0 +#: ../../../odoo/odoo/api.py:docstring of odoo.api.Environment.user:0 +#: ../../../odoo/odoo/api.py:docstring of odoo.api.Environment.company:0 +#: ../../../odoo/odoo/api.py:docstring of odoo.api.Environment.companies:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.create:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.copy:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.default_get:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.name_create:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.browse:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.search:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.name_search:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read_group:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.fields_get:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.get_view:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.name_get:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.get_metadata:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.filtered:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.mapped:0 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.browse_ref:0 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.ref:0 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.browse_ref:0 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.ref:0 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.browse_ref:0 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.ref:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel._populate_factories:0 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.cartesian:0 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.compute:0 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.constant:0 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.iterate:0 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.randint:0 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.randomize:0 +#: ../../content/developer/reference/frontend/assets.rst:0 +#: ../../content/developer/reference/frontend/framework_overview.rst:0 +#: ../../content/developer/reference/frontend/framework_overview.rst:0 +#: ../../content/developer/reference/frontend/framework_overview.rst:0 +#: ../../content/developer/reference/frontend/framework_overview.rst:0 +#: ../../content/developer/reference/frontend/framework_overview.rst:0 +#: ../../content/developer/reference/frontend/framework_overview.rst:0 +#: ../../content/developer/reference/frontend/framework_overview.rst:0 +#: ../../content/developer/reference/frontend/framework_overview.rst:0 +#: ../../content/developer/reference/frontend/framework_overview.rst:0 +#: ../../content/developer/reference/frontend/framework_overview.rst:0 +#: ../../content/developer/reference/frontend/framework_overview.rst:0 +#: ../../content/developer/reference/frontend/framework_overview.rst:0 +#: ../../content/developer/reference/frontend/hooks.rst:0 +#: ../../content/developer/reference/frontend/javascript_reference.rst:0 +#: ../../content/developer/reference/frontend/javascript_reference.rst:0 +#: ../../content/developer/reference/frontend/javascript_reference.rst:0 +#: ../../content/developer/reference/frontend/mobile.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/registries.rst:0 +#: ../../content/developer/reference/frontend/registries.rst:0 +#: ../../content/developer/reference/frontend/registries.rst:0 +#: ../../content/developer/reference/frontend/registries.rst:0 +#: ../../content/developer/reference/frontend/registries.rst:0 +#: ../../content/developer/reference/frontend/services.rst:0 +#: ../../content/developer/reference/frontend/services.rst:0 +#: ../../content/developer/reference/frontend/services.rst:0 +#: ../../content/developer/reference/frontend/services.rst:0 +#: ../../content/developer/reference/frontend/services.rst:0 +#: ../../content/developer/reference/frontend/services.rst:0 +#: ../../content/developer/reference/frontend/services.rst:0 +msgid "Returns" +msgstr "" + +#: ../../content/developer/api/iap.rst:554 +msgid ":class:`TransactionToken` if the authorization succeeded" +msgstr "" + +#: ../../content/developer/api/iap.rst:0 +#: ../../content/developer/api/iap.rst:0 +#: ../../content/developer/api/iap.rst:0 +#: ../../content/developer/api/iap.rst:0 +#: ../../content/developer/api/iap.rst:0 +msgid "raises" +msgstr "" + +#: ../../content/developer/api/iap.rst:555 +msgid ":class:`~odoo.exceptions.AccessError` if the service token is invalid" +msgstr "" + +#: ../../content/developer/api/iap.rst:556 +msgid ":class:`~odoo.addons.iap.models.iap.InsufficientCreditError` if the account does not have enough credits" +msgstr "" + +#: ../../content/developer/api/iap.rst:557 +msgid "``TypeError`` if the ``credit`` value is not an integer or a float" +msgstr "" + +#: ../../content/developer/api/iap.rst:580 +#: ../../content/developer/api/iap.rst:858 +msgid "Capture" +msgstr "" + +#: ../../content/developer/api/iap.rst:584 +msgid "Confirms the specified transaction, transferring the reserved credits from the user's account to the service provider's." +msgstr "" + +#: ../../content/developer/api/iap.rst:587 +msgid "Capture calls are idempotent: performing capture calls on an already captured transaction has no further effect." +msgstr "" + +#: ../../content/developer/api/iap.rst:592 +msgid "optional parameter to capture a smaller amount of credits than authorized" +msgstr "" + +#: ../../content/developer/api/iap.rst:593 +#: ../../content/developer/api/iap.rst:625 +msgid ":class:`~odoo.exceptions.AccessError`" +msgstr "" + +#: ../../content/developer/api/iap.rst:613 +#: ../../content/developer/api/iap.rst:820 +msgid "Cancel" +msgstr "" + +#: ../../content/developer/api/iap.rst:617 +msgid "Cancels the specified transaction, releasing the hold on the user's credits." +msgstr "" + +#: ../../content/developer/api/iap.rst:620 +msgid "Cancel calls are idempotent: performing capture calls on an already cancelled transaction has no further effect." +msgstr "" + +#: ../../content/developer/api/iap.rst:643 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:127 +msgid "Types" +msgstr "" + +#: ../../content/developer/api/iap.rst:645 +msgid "Exceptions aside, these are *abstract types* used for clarity, you should not care how they are implemented." +msgstr "" + +#: ../../content/developer/api/iap.rst:650 +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/api/iap.rst:655 +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/api/iap.rst:658 +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/api/iap.rst:662 +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/api/iap.rst:668 +msgid "Identifier for a user account." +msgstr "" + +#: ../../content/developer/api/iap.rst:672 +msgid "Transaction identifier, returned by the authorization process and consumed by either capturing or cancelling the transaction." +msgstr "" + +#: ../../content/developer/api/iap.rst:677 +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/api/iap.rst:684 +msgid "Raised by:" +msgstr "" + +#: ../../content/developer/api/iap.rst:686 +msgid "any operation to which a service token is required, if the service token is invalid; or" +msgstr "" + +#: ../../content/developer/api/iap.rst:687 +msgid "any failure in an inter-server call. (typically, in :func:`~odoo.addons.iap.tools.iap_tools.iap_jsonrpc`)." +msgstr "" + +#: ../../content/developer/api/iap.rst:692 +msgid "Raised by any unexpected behaviour at the discretion of the App developer (*you*)." +msgstr "" + +#: ../../content/developer/api/iap.rst:696 +msgid "Test the API" +msgstr "" + +#: ../../content/developer/api/iap.rst:698 +msgid "In order to test the developed app, we propose a sandbox platform that allows you to:" +msgstr "" + +#: ../../content/developer/api/iap.rst:700 +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/api/iap.rst:703 +msgid "Test the API." +msgstr "" + +#: ../../content/developer/api/iap.rst:705 +msgid "The latter consists in specific tokens that will work on **IAP-Sandbox only**." +msgstr "" + +#: ../../content/developer/api/iap.rst:707 +msgid "Token ``000000``: Represents a non-existing account. Returns an :class:`~odoo.addons.iap.tools.iap_tools.InsufficientCreditError` on authorize attempt." +msgstr "" + +#: ../../content/developer/api/iap.rst:709 +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/api/iap.rst:711 +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/api/iap.rst:717 +msgid "Those tokens are only active on the IAP-Sanbox server." +msgstr "" + +#: ../../content/developer/api/iap.rst:718 +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/api/iap.rst:722 +msgid "Odoo Helpers" +msgstr "" + +#: ../../content/developer/api/iap.rst:724 +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/api/iap.rst:730 +msgid "Charging" +msgstr "" + +#: ../../content/developer/api/iap.rst:734 +msgid "A *context manager* for authorizing and automatically capturing or cancelling transactions for use in the backend/proxy." +msgstr "" + +#: ../../content/developer/api/iap.rst:737 +msgid "Works much like e.g. a cursor context manager:" +msgstr "" + +#: ../../content/developer/api/iap.rst:739 +msgid "immediately authorizes a transaction with the specified parameters;" +msgstr "" + +#: ../../content/developer/api/iap.rst:740 +msgid "executes the ``with`` body;" +msgstr "" + +#: ../../content/developer/api/iap.rst:741 +msgid "if the body executes in full without error, captures the transaction;" +msgstr "" + +#: ../../content/developer/api/iap.rst:742 +msgid "otherwise cancels it." +msgstr "" + +#: ../../content/developer/api/iap.rst:744 +#: ../../content/developer/api/iap.rst:784 +#: ../../content/developer/api/iap.rst:826 +#: ../../content/developer/api/iap.rst:864 +msgid "used to retrieve the ``iap.endpoint`` configuration key" +msgstr "" + +#: ../../content/developer/api/iap.rst:782 +msgid "Will authorize everything." +msgstr "" + +#: ../../content/developer/api/iap.rst:824 +msgid "Will cancel an authorized transaction." +msgstr "" + +#: ../../content/developer/api/iap.rst:862 +msgid "Will capture the amount ``credit`` on the given transaction." +msgstr "" + +#: ../../content/developer/cli.rst:6 +msgid "Command-line interface (CLI)" +msgstr "" + +#: ../../content/developer/cli.rst:8 +msgid "The CLI :dfn:`command-line interface` offers several functionalities related to Odoo. You can use it to :ref:`run the server `, :ref:`launch Odoo as a Python console environment `, :ref:`scaffold an Odoo module `, :ref:`populate a database `, or :ref:`count the number of lines of code `." +msgstr "" + +#: ../../content/developer/cli.rst:15 +msgid "The command to use to call the CLI depends on how you installed Odoo. In the examples below, we assume that you are :ref:`running Odoo from source ` with the :file:`odoo-bin` file. If you installed Odoo :ref:`from a distribution package ` or :ref:`with Docker `, you must adapt the command." +msgstr "" + +#: ../../content/developer/cli.rst:23 +msgid "Run Odoo from source" +msgstr "" + +#: ../../content/developer/cli.rst:25 +msgid "Navigate to the root of the directory where you downloaded the source files of Odoo Community." +msgstr "" + +#: ../../content/developer/cli.rst:27 +msgid "Run all CLI commands with :command:`./odoo-bin`" +msgstr "" + +#: ../../content/developer/cli.rst:29 +msgid "Odoo was installed from a distribution package" +msgstr "" + +#: ../../content/developer/cli.rst:31 +msgid "When Odoo was installed, an executable named `odoo` was added to your user's PATH. Replace all occurrences of :command:`odoo-bin` with :command:`odoo` in the examples below." +msgstr "" + +#: ../../content/developer/cli.rst:34 +msgid "Odoo was installed with Docker" +msgstr "" + +#: ../../content/developer/cli.rst:36 +msgid "Please refer to the `documentation of the official Docker image of Odoo `_." +msgstr "" + +#: ../../content/developer/cli.rst:42 +msgid "Help & version" +msgstr "" + +#: ../../content/developer/cli.rst:48 +msgid "shows help text with all available options" +msgstr "" + +#: ../../content/developer/cli.rst:52 +msgid "shows Odoo version e.g. \"Odoo Server 13.0\"" +msgstr "" + +#: ../../content/developer/cli.rst:57 +msgid "Running the server" +msgstr "" + +#: ../../content/developer/cli.rst:63 +msgid "database(s) used when installing or updating modules. Providing a comma-separated list restrict access to databases provided in list." +msgstr "" + +#: ../../content/developer/cli.rst:67 +msgid "For advanced database options, take a look :ref:`below `." +msgstr "" + +#: ../../content/developer/cli.rst:71 +msgid "comma-separated list of modules to install before running the server (requires :option:`-d`)." +msgstr "" + +#: ../../content/developer/cli.rst:76 +msgid "comma-separated list of modules to update before running the server. Use ``all`` for all modules. (requires :option:`-d`)." +msgstr "" + +#: ../../content/developer/cli.rst:81 +msgid "comma-separated list of directories in which modules are stored. These directories are scanned for modules." +msgstr "" + +#: ../../content/developer/cli.rst:88 +msgid "specify an additional upgrade path." +msgstr "" + +#: ../../content/developer/cli.rst:92 +msgid "list of server-wide modules to load. Those modules are supposed to provide features not necessarily tied to a particular database. This is in contrast to modules that are always bound to a specific database when they are installed (i.e. the majority of Odoo addons). Default is ``base,web``." +msgstr "" + +#: ../../content/developer/cli.rst:99 +msgid "path to an alternate :ref:`configuration file `. If not defined, Odoo checks ``ODOO_RC`` environmental variable and default location :file:`{$HOME}/.odoorc`. See configuration file section :ref:`below `." +msgstr "" + +#: ../../content/developer/cli.rst:106 +msgid "directory path where to store Odoo data (eg. filestore, sessions). If not specified, Odoo will fallback to a predefined path. On Unix systems its one defined in ``$XDG_DATA_HOME`` environmental variable or :file:`~/.local/share/Odoo` or :file:`/var/lib/Odoo`." +msgstr "" + +#: ../../content/developer/cli.rst:114 +msgid "saves the server configuration to the current configuration file (:file:`{$HOME}/.odoorc` by default, and can be overridden using :option:`-c`)." +msgstr "" + +#: ../../content/developer/cli.rst:120 +msgid "disables demo data loading for modules installed comma-separated, use ``all`` for all modules. Requires :option:`-d` and :option:`-i`." +msgstr "" + +#: ../../content/developer/cli.rst:126 +msgid "path to a file where the server pid will be stored" +msgstr "" + +#: ../../content/developer/cli.rst:130 +msgid "stops the server after its initialization." +msgstr "" + +#: ../../content/developer/cli.rst:134 +msgid "Absolute path to the GeoIP database file." +msgstr "" + +#: ../../content/developer/cli.rst:140 +msgid "Testing Configuration" +msgstr "" + +#: ../../content/developer/cli.rst:144 +msgid "runs tests after module installation" +msgstr "" + +#: ../../content/developer/cli.rst:148 +msgid "runs a python test file" +msgstr "" + +#: ../../content/developer/cli.rst:152 +msgid "Comma-separated list of specs to filter which tests to execute. Enable unit tests if set." +msgstr "" + +#: ../../content/developer/cli.rst:154 +msgid "Example: `--test-tags :TestClass.test_func,/test_module,external`" +msgstr "" + +#: ../../content/developer/cli.rst:156 +msgid "The `-` specifies if we want to include or exclude tests matching this spec." +msgstr "" + +#: ../../content/developer/cli.rst:157 +msgid "The tag will match tags added on a class with a :func:`~odoo.tests.common.tagged` decorator (all :ref:`test classes ` have `standard` and `at_install` tags until explicitly removed, see the decorator documentation)." +msgstr "" + +#: ../../content/developer/cli.rst:160 +msgid "`*` will match all tags." +msgstr "" + +#: ../../content/developer/cli.rst:161 +msgid "If tag is omitted on include mode, its value is `standard`." +msgstr "" + +#: ../../content/developer/cli.rst:162 +msgid "If tag is omitted on exclude mode, its value is `*`." +msgstr "" + +#: ../../content/developer/cli.rst:163 +msgid "The module, class, and method will respectively match the module name, test class name and test method name." +msgstr "" + +#: ../../content/developer/cli.rst:165 +msgid "Filtering and executing the tests happens twice: right after each module installation/update and at the end of the modules loading. At each stage tests are filtered by `--test-tags` specs and additionally by dynamic specs `at_install` and `post_install` correspondingly." +msgstr "" + +#: ../../content/developer/cli.rst:173 +msgid "Specify directory where to write screenshots when an HttpCase.browser_js test fails. It defaults to :file:`/tmp/odoo_tests/{db_name}/screenshots`" +msgstr "" + +#: ../../content/developer/cli.rst:178 +msgid "Enable screencasts and specify directory where to write screencasts files. The ``ffmpeg`` utility needs to be installed to encode frames into a video file. Otherwise frames will be kept instead of the video file." +msgstr "" + +#: ../../content/developer/cli.rst:185 +msgid "Database" +msgstr "" + +#: ../../content/developer/cli.rst:189 +msgid "database username, used to connect to PostgreSQL." +msgstr "" + +#: ../../content/developer/cli.rst:193 +msgid "database password, if using `password authentication`_." +msgstr "" + +#: ../../content/developer/cli.rst:197 +msgid "host for the database server" +msgstr "" + +#: ../../content/developer/cli.rst:199 +msgid "``localhost`` on Windows" +msgstr "" + +#: ../../content/developer/cli.rst:200 +msgid "UNIX socket otherwise" +msgstr "" + +#: ../../content/developer/cli.rst:204 +msgid "port the database listens on, defaults to 5432" +msgstr "" + +#: ../../content/developer/cli.rst:208 +msgid "hides databases that do not match ````. The filter is a `regular expression`_, with the additions that:" +msgstr "" + +#: ../../content/developer/cli.rst:211 +msgid "``%h`` is replaced by the whole hostname the request is made on." +msgstr "" + +#: ../../content/developer/cli.rst:212 +msgid "``%d`` is replaced by the subdomain the request is made on, with the exception of ``www`` (so domain ``odoo.com`` and ``www.odoo.com`` both match the database ``odoo``)." +msgstr "" + +#: ../../content/developer/cli.rst:216 +msgid "These operations are case sensitive. Add option ``(?i)`` to match all databases (so domain ``odoo.com`` using ``(?i)%d`` matches the database ``Odoo``)." +msgstr "" + +#: ../../content/developer/cli.rst:220 +msgid "Since version 11, it's also possible to restrict access to a given database listen by using the --database parameter and specifying a comma-separated list of databases" +msgstr "" + +#: ../../content/developer/cli.rst:224 +msgid "When combining the two parameters, db-filter supersedes the comma-separated database list for restricting database list, while the comma-separated list is used for performing requested operations like upgrade of modules." +msgstr "" + +#: ../../content/developer/cli.rst:232 +msgid "Restrict access to databases whose name starts with 11" +msgstr "" + +#: ../../content/developer/cli.rst:238 +msgid "Restrict access to only two databases, 11firstdatabase and 11seconddatabase" +msgstr "" + +#: ../../content/developer/cli.rst:244 +msgid "Restrict access to only two databases, 11firstdatabase and 11seconddatabase, and update base module on one database: 11firstdatabase. If database 11seconddatabase doesn't exist, the database is created and base modules is installed" +msgstr "" + +#: ../../content/developer/cli.rst:253 +msgid "Restrict access to databases whose name starts with 11, and update base module on one database: 11firstdatabase. If database 11seconddatabase doesn't exist, the database is created and base modules is installed" +msgstr "" + +#: ../../content/developer/cli.rst:260 +msgid "when creating new databases from the database-management screens, use the specified `template database`_. Defaults to ``template0``." +msgstr "" + +#: ../../content/developer/cli.rst:265 +msgid "Path to the PostgreSQL binaries that are used by the database manager to dump and restore databases. You have to specify this option only if these binaries are located in a non-standard directory." +msgstr "" + +#: ../../content/developer/cli.rst:271 +msgid "Suppresses the ability to list databases available on the system" +msgstr "" + +#: ../../content/developer/cli.rst:275 +msgid "Control the SSL security of the connection between Odoo and PostgreSQL. Value should be one of 'disable', 'allow', 'prefer', 'require', 'verify-ca' or 'verify-full' Default value is 'prefer'" +msgstr "" + +#: ../../content/developer/cli.rst:282 +msgid "Use the unaccent function provided by the database when available." +msgstr "" + +#: ../../content/developer/cli.rst:287 +msgid "Emails" +msgstr "" + +#: ../../content/developer/cli.rst:291 +msgid "Email address used as when Odoo needs to send mails" +msgstr "" + +#: ../../content/developer/cli.rst:295 +msgid "Define which email address the SMTP configuration will apply to. The field can be a domain name or an entire email address, or it can remain empty. If the sender's email address does not match this set filter, then the email will be encapsulated using a combination of the two system parameters: ``mail.default.from`` and ``mail.catchall.domain``. For example, \"Admin\" => \"Admin\" ." +msgstr "" + +#: ../../content/developer/cli.rst:303 +msgid "Address of the SMTP server to connect to in order to send mails" +msgstr "" + +#: ../../content/developer/cli.rst:309 +msgid "If set, odoo should use SSL/STARTSSL SMTP connections" +msgstr "" + +#: ../../content/developer/cli.rst:313 +msgid "Username to connect to the SMTP server" +msgstr "" + +#: ../../content/developer/cli.rst:317 +msgid "Password to connect to the SMTP server" +msgstr "" + +#: ../../content/developer/cli.rst:321 +msgid "An SSL certificate is to be used for authentication. If set, then `smtp-ssl-private-key` is required." +msgstr "" + +#: ../../content/developer/cli.rst:326 +msgid "An SSL private key is used for authentication. If set, then `smtp-ssl-certificate` is required." +msgstr "" + +#: ../../content/developer/cli.rst:331 +msgid "Internationalisation" +msgstr "" + +#: ../../content/developer/cli.rst:333 +msgid "Use these options to translate Odoo to another language. See i18n section of the user manual. Option '-d' is mandatory. Option '-l' is mandatory in case of importation" +msgstr "" + +#: ../../content/developer/cli.rst:339 +msgid "specifies the languages (separated by commas) for the translations you want to be loaded" +msgstr "" + +#: ../../content/developer/cli.rst:344 +msgid "specify the language of the translation file. Use it with --i18n-export or --i18n-import" +msgstr "" + +#: ../../content/developer/cli.rst:349 +msgid "export all sentences to be translated to a CSV file, a PO file or a TGZ archive and exit." +msgstr "" + +#: ../../content/developer/cli.rst:354 +msgid "import a CSV or a PO file with translations and exit. The '-l' option is required." +msgstr "" + +#: ../../content/developer/cli.rst:359 +msgid "overwrites existing translation terms on updating a module or importing a CSV or a PO file." +msgstr "" + +#: ../../content/developer/cli.rst:364 +msgid "specify modules to export. Use in combination with --i18n-export" +msgstr "" + +#: ../../content/developer/cli.rst:369 +msgid "Advanced Options" +msgstr "" + +#: ../../content/developer/cli.rst:374 +msgid "Developer features" +msgstr "" + +#: ../../content/developer/cli.rst:378 +msgid "comma-separated list of features. For development purposes only. Do not use it in production. Possible features are:" +msgstr "" + +#: ../../content/developer/cli.rst:381 +msgid "``all``: all the features below are activated" +msgstr "" + +#: ../../content/developer/cli.rst:383 +msgid "``xml``: read QWeb template from xml file directly instead of database. Once a template has been modified in database, it will be not be read from the xml file until the next update/init. Particularly, templates are not translated on using this option." +msgstr "" + +#: ../../content/developer/cli.rst:388 +msgid "``reload``: restart server when python file are updated (may not be detected depending on the text editor used)" +msgstr "" + +#: ../../content/developer/cli.rst:391 +msgid "``qweb``: break in the evaluation of QWeb template when a node contains ``t-debug='debugger'``" +msgstr "" + +#: ../../content/developer/cli.rst:393 +msgid "``(i)p(u)db``: start the chosen python debugger in the code when an unexpected error is raised before logging and returning the error." +msgstr "" + +#: ../../content/developer/cli.rst:396 +msgid "``werkzeug``: display the full traceback on the frontend page in case of exception" +msgstr "" + +#: ../../content/developer/cli.rst:402 +msgid "HTTP" +msgstr "" + +#: ../../content/developer/cli.rst:406 +msgid "do not start the HTTP or long-polling workers (may still start :ref:`cron ` workers)" +msgstr "" + +#: ../../content/developer/cli.rst:409 +msgid "has no effect if :option:`--test-enable` is set, as tests require an accessible HTTP server" +msgstr "" + +#: ../../content/developer/cli.rst:414 +msgid "TCP/IP address on which the HTTP server listens, defaults to ``0.0.0.0`` (all addresses)" +msgstr "" + +#: ../../content/developer/cli.rst:420 +msgid "Port on which the HTTP server listens, defaults to 8069." +msgstr "" + +#: ../../content/developer/cli.rst:424 +msgid "TCP port for websocket connections in multiprocessing or gevent mode, defaults to 8072. Not used in default (threaded) mode." +msgstr "" + +#: ../../content/developer/cli.rst:429 +msgid "enables the use of ``X-Forwarded-*`` headers through `Werkzeug's proxy support`_. Only enable this when running behind a trusted web proxy!" +msgstr "" + +#: ../../content/developer/cli.rst:433 +msgid "proxy mode *must not* be enabled outside of a reverse proxy scenario" +msgstr "" + +#: ../../content/developer/cli.rst:438 +msgid "delegates serving attachments files to the static web server and sets both ``X-Sendfile`` (apache) and ``X-Accel-*`` (nginx) http headers on stream responses. See :ref:`deploy/streaming` for web server configuration." +msgstr "" + +#: ../../content/developer/cli.rst:445 +msgid "Logging" +msgstr "" + +#: ../../content/developer/cli.rst:447 +msgid "By default, Odoo displays all logging of level_ ``info`` except for workflow logging (``warning`` only), and log output is sent to ``stdout``. Various options are available to redirect logging to other destinations and to customize the amount of logging output." +msgstr "" + +#: ../../content/developer/cli.rst:454 +msgid "sends logging output to the specified file instead of stdout. On Unix, the file `can be managed by external log rotation programs `_ and will automatically be reopened when replaced" +msgstr "" + +#: ../../content/developer/cli.rst:461 +msgid "logs to the system's event logger: `syslog on unices `_ and `the Event Log on Windows `_." +msgstr "" + +#: ../../content/developer/cli.rst:464 +msgid "Neither is configurable" +msgstr "" + +#: ../../content/developer/cli.rst:468 +msgid "logs to the ``ir.logging`` model (``ir_logging`` table) of the specified database. The database can be the name of a database in the \"current\" PostgreSQL, or `a PostgreSQL URI`_ for e.g. log aggregation." +msgstr "" + +#: ../../content/developer/cli.rst:474 +msgid ":samp:`{LOGGER}:{LEVEL}`, enables ``LOGGER`` at the provided ``LEVEL`` e.g. ``odoo.models:DEBUG`` will enable all logging messages at or above ``DEBUG`` level in the models." +msgstr "" + +#: ../../content/developer/cli.rst:478 +msgid "The colon ``:`` is mandatory" +msgstr "" + +#: ../../content/developer/cli.rst:479 +msgid "The logger can be omitted to configure the root (default) handler" +msgstr "" + +#: ../../content/developer/cli.rst:480 +msgid "If the level is omitted, the logger is set to ``INFO``" +msgstr "" + +#: ../../content/developer/cli.rst:482 +msgid "The option can be repeated to configure multiple loggers e.g." +msgstr "" + +#: ../../content/developer/cli.rst:490 +msgid "enable DEBUG logging for RPC requests, equivalent to ``--log-handler=odoo.http.rpc.request:DEBUG``" +msgstr "" + +#: ../../content/developer/cli.rst:495 +msgid "enable DEBUG logging for RPC responses, equivalent to ``--log-handler=odoo.http.rpc.response:DEBUG``" +msgstr "" + +#: ../../content/developer/cli.rst:500 +msgid "enables DEBUG logging of HTTP requests and responses, equivalent to ``--log-handler=odoo.http:DEBUG``" +msgstr "" + +#: ../../content/developer/cli.rst:505 +msgid "enables DEBUG logging of SQL querying, equivalent to ``--log-handler=odoo.sql_db:DEBUG``" +msgstr "" + +#: ../../content/developer/cli.rst:510 +msgid "Shortcut to more easily set predefined levels on specific loggers. \"real\" levels (``critical``, ``error``, ``warn``, ``debug``) are set on the ``odoo`` and ``werkzeug`` loggers (except for ``debug`` which is only set on ``odoo``)." +msgstr "" + +#: ../../content/developer/cli.rst:515 +msgid "Odoo also provides debugging pseudo-levels which apply to different sets of loggers:" +msgstr "" + +#: ../../content/developer/cli.rst:520 +msgid "``debug_sql``" +msgstr "" + +#: ../../content/developer/cli.rst:519 +msgid "sets the SQL logger to ``debug``" +msgstr "" + +#: ../../content/developer/cli.rst:521 +msgid "equivalent to ``--log-sql``" +msgstr "" + +#: ../../content/developer/cli.rst:524 +msgid "``debug_rpc``" +msgstr "" + +#: ../../content/developer/cli.rst:523 +msgid "sets the ``odoo`` and HTTP request loggers to ``debug``" +msgstr "" + +#: ../../content/developer/cli.rst:525 +msgid "equivalent to ``--log-level debug --log-request``" +msgstr "" + +#: ../../content/developer/cli.rst:530 +msgid "``debug_rpc_answer``" +msgstr "" + +#: ../../content/developer/cli.rst:527 +msgid "sets the ``odoo`` and HTTP request and response loggers to ``debug``" +msgstr "" + +#: ../../content/developer/cli.rst:530 +msgid "equivalent to ``--log-level debug --log-request --log-response``" +msgstr "" + +#: ../../content/developer/cli.rst:534 +msgid "In case of conflict between :option:`--log-level` and :option:`--log-handler`, the latter is used" +msgstr "" + +#: ../../content/developer/cli.rst:540 +msgid "Multiprocessing" +msgstr "" + +#: ../../content/developer/cli.rst:544 +msgid "if ``count`` is not 0 (the default), enables multiprocessing and sets up the specified number of HTTP workers (sub-processes processing HTTP and RPC requests)." +msgstr "" + +#: ../../content/developer/cli.rst:548 +msgid "multiprocessing mode is only available on Unix-based systems" +msgstr "" + +#: ../../content/developer/cli.rst:550 +msgid "A number of options allow limiting and recycling workers:" +msgstr "" + +#: ../../content/developer/cli.rst:554 +msgid "Number of requests a worker will process before being recycled and restarted." +msgstr "" + +#: ../../content/developer/cli.rst:557 +msgid "Defaults to *8196*." +msgstr "" + +#: ../../content/developer/cli.rst:561 +msgid "Maximum allowed virtual memory per worker. If the limit is exceeded, the worker is killed and recycled at the end of the current request." +msgstr "" + +#: ../../content/developer/cli.rst:564 +msgid "Defaults to *2048MiB*." +msgstr "" + +#: ../../content/developer/cli.rst:568 +msgid "Hard limit on virtual memory, any worker exceeding the limit will be immediately killed without waiting for the end of the current request processing." +msgstr "" + +#: ../../content/developer/cli.rst:572 +msgid "Defaults to *2560MiB*." +msgstr "" + +#: ../../content/developer/cli.rst:576 +msgid "Prevents the worker from using more than CPU seconds for each request. If the limit is exceeded, the worker is killed." +msgstr "" + +#: ../../content/developer/cli.rst:579 +msgid "Defaults to *60*." +msgstr "" + +#: ../../content/developer/cli.rst:583 +msgid "Prevents the worker from taking longer than seconds to process a request. If the limit is exceeded, the worker is killed." +msgstr "" + +#: ../../content/developer/cli.rst:586 +msgid "Differs from :option:`--limit-time-cpu` in that this is a \"wall time\" limit including e.g. SQL queries." +msgstr "" + +#: ../../content/developer/cli.rst:589 +msgid "Defaults to *120*." +msgstr "" + +#: ../../content/developer/cli.rst:593 +msgid "number of workers dedicated to :ref:`cron ` jobs. Defaults to *2*. The workers are threads in multi-threading mode and processes in multi-processing mode." +msgstr "" + +#: ../../content/developer/cli.rst:596 +msgid "For multi-processing mode, this is in addition to the HTTP worker processes." +msgstr "" + +#: ../../content/developer/cli.rst:601 +msgid "Configuration file" +msgstr "" + +#: ../../content/developer/cli.rst:605 +msgid "Most of the command-line options can also be specified via a configuration file. Most of the time, they use similar names with the prefix ``-`` removed and other ``-`` are replaced by ``_`` e.g. :option:`--db-template` becomes ``db_template``." +msgstr "" + +#: ../../content/developer/cli.rst:610 +msgid "Some conversions don't match the pattern:" +msgstr "" + +#: ../../content/developer/cli.rst:612 +msgid ":option:`--db-filter` becomes ``dbfilter``" +msgstr "" + +#: ../../content/developer/cli.rst:613 +msgid ":option:`--no-http` corresponds to the ``http_enable`` boolean" +msgstr "" + +#: ../../content/developer/cli.rst:614 +msgid "logging presets (all options starting with ``--log-`` except for :option:`--log-handler` and :option:`--log-db`) just add content to ``log_handler``, use that directly in the configuration file" +msgstr "" + +#: ../../content/developer/cli.rst:617 +msgid ":option:`--smtp` is stored as ``smtp_server``" +msgstr "" + +#: ../../content/developer/cli.rst:618 +msgid ":option:`--database` is stored as ``db_name``" +msgstr "" + +#: ../../content/developer/cli.rst:619 +msgid ":option:`--i18n-import` and :option:`--i18n-export` aren't available at all from configuration files" +msgstr "" + +#: ../../content/developer/cli.rst:622 +msgid "The default configuration file is :file:`{$HOME}/.odoorc` which can be overridden using :option:`--config `. Specifying :option:`--save ` will save the current configuration state back to that file. The configuration items relative to the command-line are to be specified in the section ``[options]``." +msgstr "" + +#: ../../content/developer/cli.rst:628 +msgid "Here is a sample file:" +msgstr "" + +#: ../../content/developer/cli.rst:653 +msgid "Shell" +msgstr "" + +#: ../../content/developer/cli.rst:655 +msgid "Odoo command-line also allows to launch odoo as a python console environment. This enables direct interaction with the :ref:`orm ` and its functionalities." +msgstr "" + +#: ../../content/developer/cli.rst:665 +msgid "Specify a preferred REPL to use in shell mode." +msgstr "" + +#: ../../content/developer/cli.rst:671 +msgid "Scaffolding" +msgstr "" + +#: ../../content/developer/cli.rst:675 +msgid "Scaffolding is the automated creation of a skeleton structure to simplify bootstrapping (of new modules, in the case of Odoo). While not necessary it avoids the tedium of setting up basic structures and looking up what all starting requirements are." +msgstr "" + +#: ../../content/developer/cli.rst:680 +msgid "Scaffolding is available via the :command:`odoo-bin scaffold` subcommand." +msgstr "" + +#: ../../content/developer/cli.rst:688 +msgid "the name of the module to create, may munged in various manners to generate programmatic names (e.g. module directory name, model names, …)" +msgstr "" + +#: ../../content/developer/cli.rst:693 +msgid "directory in which to create the new module, defaults to the current directory" +msgstr "" + +#: ../../content/developer/cli.rst:698 +msgid "a template directory, files are passed through jinja2_ then copied to the ``destination`` directory" +msgstr "" + +#: ../../content/developer/cli.rst:702 +msgid "This will create module *my_module* in directory */addons/*." +msgstr "" + +#: ../../content/developer/cli.rst:707 +msgid "Database Population" +msgstr "" + +#: ../../content/developer/cli.rst:711 +msgid "Odoo CLI supports database population features. If the feature is :ref:`implemented on a given model `, it allows automatic data generation of the model's records to test your modules in databases containing non-trivial amounts of records." +msgstr "" + +#: ../../content/developer/cli.rst:721 +msgid "list of models for which the database should be filled" +msgstr "" + +#: ../../content/developer/cli.rst:725 +msgid "population size, the actual records number depends on the model's `_populate_sizes` attribute. The generated records content is specified by the :meth:`~odoo.models._populate_factories` method of a given model (cf. the :file:`populate` folder of modules for further details)." +msgstr "" + +#: ../../content/developer/cli.rst:731 +msgid ":ref:`reference/testing/populate`" +msgstr "" + +#: ../../content/developer/cli.rst:736 +msgid "Cloc" +msgstr "" + +#: ../../content/developer/cli.rst:740 +msgid "Odoo Cloc is a tool to count the number of relevant lines written in Python, Javascript, CSS, SCSS, or XML. This can be used as a rough metric for pricing maintenance of extra modules." +msgstr "" + +#: ../../content/developer/cli.rst:745 +msgid "Command-line options" +msgstr "" + +#: ../../content/developer/cli.rst:750 +msgid "Process the code of all extra modules installed on the provided database, and of all server actions and computed fields manually created in the provided database." +msgstr "" + +#: ../../content/developer/cli.rst:752 +msgid "The :option:`--addons-path` option is required to specify the path(s) to the module folder(s)." +msgstr "" + +#: ../../content/developer/cli.rst:755 +msgid "If combined with :option:`--path`, the count will be that of the sum of both options' results (with possible overlaps). At least one of these two options is required to specify which code to process." +msgstr "" + +#: ../../content/developer/cli.rst:762 +msgid ":ref:`reference/cmdline/cloc/database-option`" +msgstr "" + +#: ../../content/developer/cli.rst:767 +msgid "Process the files in the provided path." +msgstr "" + +#: ../../content/developer/cli.rst:770 +msgid "If combined with :option:`--database`, the count will be that of the sum of both options' results (with possible overlaps). At least one of these two options is required to specify which code to process." +msgstr "" + +#: ../../content/developer/cli.rst:777 +msgid "Multiple paths can be provided by repeating the option." +msgstr "" + +#: ../../content/developer/cli.rst:784 +msgid ":ref:`reference/cmdline/cloc/path-option`" +msgstr "" + +#: ../../content/developer/cli.rst:790 +msgid "Comma-separated list of directories in which modules are stored. These directories are scanned for modules." +msgstr "" + +#: ../../content/developer/cli.rst:791 +msgid "Required if the :option:`--database` option is used." +msgstr "" + +#: ../../content/developer/cli.rst:796 +msgid "Specify a configuration file to use in place of the :option:`--addons-path` option." +msgstr "" + +#: ../../content/developer/cli.rst:805 +msgid "Show the details of lines counted for each file." +msgstr "" + +#: ../../content/developer/cli.rst:809 +msgid "Processed files" +msgstr "" + +#: ../../content/developer/cli.rst:814 +msgid "With the :option:`--database` option" +msgstr "" + +#: ../../content/developer/cli.rst:816 +msgid "Odoo Cloc counts the lines in each file of extra installed modules in a given database. In addition, it counts the Python lines of server actions and custom computed fields that have been directly created in the database or imported. Finally, it counts the lines of code of Javascript, CSS, and SCSS files, and of QWeb views from imported modules." +msgstr "" + +#: ../../content/developer/cli.rst:822 +msgid "Some files are excluded from the count by default:" +msgstr "" + +#: ../../content/developer/cli.rst:824 +msgid "The manifest (:file:`__manifest__.py` or :file:`__openerp__.py`)" +msgstr "" + +#: ../../content/developer/cli.rst:825 +msgid "The contents of the folder :file:`static/lib`" +msgstr "" + +#: ../../content/developer/cli.rst:826 +msgid "The tests defined in the folder :file:`tests` and :file:`static/tests`" +msgstr "" + +#: ../../content/developer/cli.rst:827 +msgid "The migrations scripts defined in the folder :file:`migrations` and `upgrades`" +msgstr "" + +#: ../../content/developer/cli.rst:828 +msgid "The XML files declared in the ``demo`` or ``demo_xml`` sections of the manifest" +msgstr "" + +#: ../../content/developer/cli.rst:830 +msgid "For special cases, a list of files that should be ignored by Odoo Cloc can be defined per module. This is specified by the ``cloc_exclude`` entry of the manifest:" +msgstr "" + +#: ../../content/developer/cli.rst:843 +msgid "The pattern ``**/*`` can be used to ignore an entire module. This can be useful to exclude a module from maintenance service costs." +msgstr "" + +#: ../../content/developer/cli.rst:845 +msgid "For more information about the pattern syntax, see `glob `_." +msgstr "" + +#: ../../content/developer/cli.rst:852 +msgid "With the :option:`--path` option" +msgstr "" + +#: ../../content/developer/cli.rst:854 +msgid "This method works the same as with the :ref:`--database option ` if a manifest file is present in the given folder. Otherwise, it counts all files." +msgstr "" + +#: ../../content/developer/cli.rst:860 +msgid "Identifying Extra Modules" +msgstr "" + +#: ../../content/developer/cli.rst:862 +msgid "To distinguish between standard and extra modules, Odoo Cloc uses the following heuristic: modules that are located (real file system path, after following symbolic links) in the same parent directory as the ``base``, ``web`` or ``web_enterprise`` standard modules are considered standard. Other modules are treated as extra modules." +msgstr "" + +#: ../../content/developer/cli.rst:869 +#: ../../content/developer/reference/frontend/services.rst:662 +msgid "Error Handling" +msgstr "" + +#: ../../content/developer/cli.rst:871 +msgid "Some file cannot be counted by Odoo Cloc. Those file are reported at the end of the output." +msgstr "" + +#: ../../content/developer/cli.rst:875 +msgid "Max file size exceeded" +msgstr "" + +#: ../../content/developer/cli.rst:877 +msgid "Odoo Cloc rejects any file larger than 25MB. Usually, source files are smaller than 1 MB. If a file is rejected, it may be:" +msgstr "" + +#: ../../content/developer/cli.rst:880 +msgid "A generated XML file that contains lots of data. It should be excluded in the manifest." +msgstr "" + +#: ../../content/developer/cli.rst:881 +msgid "A JavaScript library that should be placed in the :file:`static/lib` folder." +msgstr "" + +#: ../../content/developer/cli.rst:884 +msgid "Syntax Error" +msgstr "" + +#: ../../content/developer/cli.rst:886 +msgid "Odoo Cloc cannot count the lines of code of a Python file with a syntax problem. If an extra module contains such files, they should be fixed to allow the module to load. If the module works despite the presence of those files, they are probably not loaded and should therefore be removed from the module, or at least excluded in the manifest via ``cloc_exclude``." +msgstr "" + +#: ../../content/developer/cli.rst:893 +msgid "TSConfig Generator" +msgstr "" + +#: ../../content/developer/cli.rst:897 +msgid "When working on javascript, there are ways to help your editor providing you with powerful auto-completion. One of those ways is the use of a tsconfig.json file. Originally meant for typescript, editors can use its information with plain javascript also. With this config file, you will now have full auto-completion across modules." +msgstr "" + +#: ../../content/developer/cli.rst:902 +msgid "The command to generate this files takes as many unnamed arguments as you need. Those are relative paths to your addon directories. In the example below, we move up one folder to save the tsconfig file in the folder containing community and enterprise." +msgstr "" + #: ../../content/developer/glossary.rst:5 msgid "Glossary" msgstr "" @@ -80,10 +3113,642 @@ msgstr "" 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:3 +#: ../../content/developer/howtos.rst:5 msgid "Tutorials" 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:`/developer/howtos/backend`)." +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 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReport.chart_template_id:1 +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/getting_started/initial_configuration/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 "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:303 +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "id" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "code_prefix_start" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "code_prefix_end" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:182 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:255 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:73 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:180 +#: ../../content/developer/howtos/rdtraining/C_data.rst:178 +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountAccountTemplate.name:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountAccountTemplate.currency_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountAccountTemplate.code:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountAccountTemplate.account_type:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountAccountTemplate.reconcile:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountAccountTemplate.note:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountAccountTemplate.tax_ids:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountAccountTemplate.nocreate:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountAccountTemplate.chart_template_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountAccountTemplate.tag_ids:0 +#: ../../../odoo/addons/account/models/account_account_tag.py:docstring of odoo.addons.account.models.account_account_tag.AccountAccountTag.name:0 +#: ../../../odoo/addons/account/models/account_account_tag.py:docstring of odoo.addons.account.models.account_account_tag.AccountAccountTag.applicability:0 +#: ../../../odoo/addons/account/models/account_account_tag.py:docstring of odoo.addons.account.models.account_account_tag.AccountAccountTag.color:0 +#: ../../../odoo/addons/account/models/account_account_tag.py:docstring of odoo.addons.account.models.account_account_tag.AccountAccountTag.active:0 +#: ../../../odoo/addons/account/models/account_account_tag.py:docstring of odoo.addons.account.models.account_account_tag.AccountAccountTag.tax_negate:0 +#: ../../../odoo/addons/account/models/account_account_tag.py:docstring of odoo.addons.account.models.account_account_tag.AccountAccountTag.country_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.name:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.parent_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.code_digits:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.visible:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.currency_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.country_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.use_anglo_saxon:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.bank_account_code_prefix:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.cash_account_code_prefix:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.transfer_account_code_prefix:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.account_ids:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.income_currency_exchange_account_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.expense_currency_exchange_account_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.account_journal_suspense_account_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.account_journal_payment_debit_account_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.account_journal_payment_credit_account_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.default_cash_difference_income_account_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.default_cash_difference_expense_account_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.default_pos_receivable_account_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.property_account_receivable_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.property_account_payable_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.property_account_expense_categ_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.property_account_income_categ_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.property_account_expense_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.property_account_income_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.property_stock_account_input_categ_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.property_stock_account_output_categ_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.property_stock_valuation_account_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.property_tax_payable_account_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.property_tax_receivable_account_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.property_advance_tax_payment_account_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.property_cash_basis_base_account_id:0 +#: ../../../odoo/addons/l10n_multilang/models/account.py:docstring of odoo.addons.l10n_multilang.models.account.AccountChartTemplate.spoken_languages:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountFiscalPositionTemplate.sequence:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountFiscalPositionTemplate.name:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountFiscalPositionTemplate.chart_template_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountFiscalPositionTemplate.account_ids:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountFiscalPositionTemplate.tax_ids:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountFiscalPositionTemplate.note:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountFiscalPositionTemplate.auto_apply:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountFiscalPositionTemplate.vat_required:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountFiscalPositionTemplate.country_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountFiscalPositionTemplate.country_group_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountFiscalPositionTemplate.state_ids:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountFiscalPositionTemplate.zip_from:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountFiscalPositionTemplate.zip_to:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountGroupTemplate.parent_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountGroupTemplate.name:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountGroupTemplate.code_prefix_start:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountGroupTemplate.code_prefix_end:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountGroupTemplate.chart_template_id:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReport.name:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReport.line_ids:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReport.column_ids:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReport.root_report_id:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReport.chart_template_id:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReport.country_id:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReport.only_tax_exigible:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReport.availability_condition:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReport.load_more_limit:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReport.search_bar:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReport.default_opening_date_filter:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReport.filter_multi_company:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReport.filter_date_range:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReport.filter_show_draft:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReport.filter_unreconciled:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReport.filter_unfold_all:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReport.filter_period_comparison:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReport.filter_growth_comparison:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReport.filter_journals:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReport.filter_analytic:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReport.filter_hierarchy:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReport.filter_account_type:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReport.filter_partner:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReport.filter_fiscal_position:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReportLine.name:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReportLine.expression_ids:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReportLine.report_id:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReportLine.hierarchy_level:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReportLine.parent_id:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReportLine.children_ids:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReportLine.foldable:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReportLine.print_on_new_page:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReportLine.action_id:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReportLine.hide_if_zero:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.chart_template_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.name:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.type_tax_use:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.tax_scope:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.amount_type:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.active:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.children_tax_ids:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.sequence:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.amount:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.description:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.price_include:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.include_base_amount:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.is_base_affected:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.analytic:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.invoice_repartition_line_ids:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.refund_repartition_line_ids:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.tax_group_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.tax_exigibility:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.cash_basis_transition_account_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxRepartitionLineTemplate.factor_percent:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxRepartitionLineTemplate.repartition_type:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxRepartitionLineTemplate.account_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxRepartitionLineTemplate.invoice_tax_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxRepartitionLineTemplate.refund_tax_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxRepartitionLineTemplate.tag_ids:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxRepartitionLineTemplate.use_in_tax_closing:0 +msgid "name" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "chart_template_id/id" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "il_group_100100" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "100100" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "100499" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "Fixed Assets" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "l10n_il.il_chart_template" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "il_group_101110" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "101110" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "101400" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "Current Assets" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "il_group_101401" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "101401" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "101799" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "Bank And Cash" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "il_group_111000" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "111000" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "111999" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "Current Liabilities" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "il_group_112000" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "112000" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "112210" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "Non-current Liabilities" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "il_group_200000" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "200000" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "200199" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "Sales Income" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "il_group_200200" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "200200" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "200300" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "Other Income" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "il_group_201000" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "201000" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "201299" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "Cost of Goods" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "il_group_202000" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "202000" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "220900" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "Expenses" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "il_group_300000" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "300000" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "399999" +msgstr "" + +#: ../../../odoo/addons/l10n_il/data/account.group.template.csv:1 +msgid "Capital And Shares" +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/taxation/taxes/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 +#: ../../content/developer/howtos/accounting_localization.rst:376 +msgid ":doc:`/developer/reference/standard_modules/account/account_report_line`" +msgstr "" + +#: ../../content/developer/howtos/accounting_localization.rst:252 +msgid ":doc:`/applications/finance/accounting/reporting/declarations/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 `)." +msgstr "" + +#: ../../content/developer/howtos/accounting_localization.rst:262 +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.report`. For it to be considered as a tax report, you need to provide it with the right `root_report_id`." +msgstr "" + +#: ../../content/developer/howtos/accounting_localization.rst:276 +msgid "... followed by the declaration of its lines, as `account.report.line` records." +msgstr "" + +#: ../../content/developer/howtos/accounting_localization.rst:279 +msgid "`addons/l10n_au/data/account_tax_report_data.xml `_" +msgstr "" + +#: ../../content/developer/howtos/accounting_localization.rst:290 +msgid "Fiscal positions" +msgstr "" + +#: ../../content/developer/howtos/accounting_localization.rst:293 +msgid ":ref:`Fiscal Position References `" +msgstr "" + +#: ../../content/developer/howtos/accounting_localization.rst:294 +msgid ":doc:`/applications/finance/accounting/taxation/taxes/fiscal_positions`" +msgstr "" + +#: ../../content/developer/howtos/accounting_localization.rst:296 +msgid "Specify fiscal positions in the :file:`data/account_fiscal_position_template_data.xml` file." +msgstr "" + +#: ../../content/developer/howtos/accounting_localization.rst:299 +msgid "`addons/l10n_es/data/account_fiscal_position_template_data.xml `_" +msgstr "" + +#: ../../content/developer/howtos/accounting_localization.rst:308 +msgid "Final steps" +msgstr "" + +#: ../../content/developer/howtos/accounting_localization.rst:310 +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:314 +msgid "`addons/l10n_ch/data/account_chart_template_data.xml `_" +msgstr "" + +#: ../../content/developer/howtos/accounting_localization.rst:322 +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:325 +msgid "`addons/l10n_ch/demo/demo_company.xml `_" +msgstr "" + +#: ../../content/developer/howtos/accounting_localization.rst:334 +msgid "Accounting reports" +msgstr "" + +#: ../../content/developer/howtos/accounting_localization.rst:341 +msgid ":doc:`/applications/finance/accounting/reporting/overview`" +msgstr "" + +#: ../../content/developer/howtos/accounting_localization.rst:343 +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:345 +msgid "Basic :file:`__manifest__.py` file for such a module looks as following:" +msgstr "" + +#: ../../content/developer/howtos/accounting_localization.rst:366 +msgid "Functional overview of financial reports is here: :doc:`/applications/finance/accounting/reporting/overview/main_reports`." +msgstr "" + +#: ../../content/developer/howtos/accounting_localization.rst:368 +msgid "Some good examples:" +msgstr "" + +#: ../../content/developer/howtos/accounting_localization.rst:370 +msgid "`l10n_ch_reports/data/account_financial_html_report_data.xml `_" +msgstr "" + +#: ../../content/developer/howtos/accounting_localization.rst:371 +msgid "`l10n_be_reports/data/account_financial_html_report_data.xml `_" +msgstr "" + +#: ../../content/developer/howtos/accounting_localization.rst:373 +msgid "You can check the meaning of the fields here:" +msgstr "" + +#: ../../content/developer/howtos/accounting_localization.rst:375 +msgid ":doc:`/developer/reference/standard_modules/account/account_report`" +msgstr "" + +#: ../../content/developer/howtos/accounting_localization.rst:378 +msgid "If you gave a `root_report_id` to your report, it is now available in its variant selector. If not, you still need to add a menu item for it. A default menu item can be created from the form view of the report, by clicking on 'Actions', then 'Create Menu Item'. You'll then need to refresh the page to see it. Alternatively, to create a dedicated section for a totally new report in the :guilabel:`Reporting` menu, you need to create a new `ir.ui.menu` record (usually in the main `l10n_XX` module) and a new `ir.actions.client` (usually in the new report xml file) that calls the `account.report` with the new report id. Then, set the new menu as `parent_id` field in the action model. Example for the Belgian localization:" +msgstr "" + +#: ../../content/developer/howtos/accounting_localization.rst:380 +msgid "`ir.ui.menu record in l10n_be `_" +msgstr "" + +#: ../../content/developer/howtos/accounting_localization.rst:381 +msgid "`parent_id field in l10n_be_reports (v16) `_" +msgstr "" + #: ../../content/developer/howtos/backend.rst:7 msgid "Building a Module" msgstr "" @@ -129,6 +3794,7 @@ msgid "Everything in Odoo thus starts and ends with modules." msgstr "" #: ../../content/developer/howtos/backend.rst:48 +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:58 msgid "Composition of a module" msgstr "" @@ -145,6 +3811,7 @@ msgid "Declared as Python classes, these resources are automatically persisted b msgstr "" #: ../../content/developer/howtos/backend.rst:57 +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:68 msgid ":ref:`Object views `" msgstr "" @@ -153,6 +3820,7 @@ msgid "Definition of business objects UI display" msgstr "" #: ../../content/developer/howtos/backend.rst:65 +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:76 msgid ":ref:`Data files `" msgstr "" @@ -161,30 +3829,37 @@ msgid "XML or CSV files declaring the model metadata :" msgstr "" #: ../../content/developer/howtos/backend.rst:62 +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:73 msgid ":ref:`views ` or :ref:`reports `," msgstr "" #: ../../content/developer/howtos/backend.rst:63 +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:74 msgid "configuration data (modules parametrization, :ref:`security rules `)," msgstr "" #: ../../content/developer/howtos/backend.rst:64 +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:75 msgid "demonstration data" msgstr "" #: ../../content/developer/howtos/backend.rst:65 +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:76 msgid "and more" msgstr "" #: ../../content/developer/howtos/backend.rst:68 +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:79 msgid ":ref:`Web controllers `" msgstr "" #: ../../content/developer/howtos/backend.rst:68 +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:79 msgid "Handle requests from web browsers" msgstr "" #: ../../content/developer/howtos/backend.rst:71 +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:82 msgid "Static web data" msgstr "" @@ -193,11 +3868,12 @@ msgid "Images, CSS or javascript files used by the web interface or website" msgstr "" #: ../../content/developer/howtos/backend.rst:74 -#: ../../content/developer/reference/guidelines.rst:32 +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:91 msgid "Module structure" msgstr "" #: ../../content/developer/howtos/backend.rst:76 +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:93 msgid "Each module is a directory within a *module directory*. Module directories are specified by using the :option:`--addons-path ` option." msgstr "" @@ -206,6 +3882,7 @@ msgid "most command-line options can also be set using :ref:`a configuration fil msgstr "" #: ../../content/developer/howtos/backend.rst:86 +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:97 msgid "An Odoo module is declared by its :ref:`manifest `." msgstr "" @@ -234,6 +3911,7 @@ msgid "Use the command line above to create an empty module Open Academy, and i msgstr "" #: ../../content/developer/howtos/backend.rst:116 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:17 msgid "Object-Relational Mapping" msgstr "" @@ -250,6 +3928,7 @@ msgid "Models can be configured by setting a number of attributes at their defin msgstr "" #: ../../content/developer/howtos/backend.rst:137 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:107 msgid "Model fields" msgstr "" @@ -258,6 +3937,7 @@ msgid "Fields are used to define what the model can store and where. Fields are msgstr "" #: ../../content/developer/howtos/backend.rst:150 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:212 msgid "Common Attributes" msgstr "" @@ -266,6 +3946,7 @@ msgid "Much like the model itself, its fields can be configured, by passing conf msgstr "" #: ../../content/developer/howtos/backend.rst:157 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:236 msgid "Some attributes are available on all fields, here are the most common ones:" msgstr "" @@ -274,10 +3955,12 @@ msgid ":attr:`~odoo.fields.Field.string` (``unicode``, default: field's name)" msgstr "" #: ../../content/developer/howtos/backend.rst:160 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:239 msgid "The label of the field in UI (visible by users)." msgstr "" #: ../../content/developer/howtos/backend.rst:162 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:241 msgid ":attr:`~odoo.fields.Field.required` (``bool``, default: ``False``)" msgstr "" @@ -294,10 +3977,12 @@ msgid "Long-form, provides a help tooltip to users in the UI." msgstr "" #: ../../content/developer/howtos/backend.rst:167 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:246 msgid ":attr:`~odoo.fields.Field.index` (``bool``, default: ``False``)" msgstr "" #: ../../content/developer/howtos/backend.rst:167 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:246 msgid "Requests that Odoo create a `database index`_ on the column." msgstr "" @@ -322,6 +4007,7 @@ msgid "Odoo creates a few fields in all models\\ [#autofields]_. These fields ar msgstr "" #: ../../content/developer/howtos/backend.rst:186 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:272 msgid ":attr:`~odoo.fields.Model.id` (:class:`~odoo.fields.Id`)" msgstr "" @@ -330,30 +4016,37 @@ msgid "The unique identifier for a record in its model." msgstr "" #: ../../content/developer/howtos/backend.rst:188 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:274 msgid ":attr:`~odoo.fields.Model.create_date` (:class:`~odoo.fields.Datetime`)" msgstr "" #: ../../content/developer/howtos/backend.rst:189 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:275 msgid "Creation date of the record." msgstr "" #: ../../content/developer/howtos/backend.rst:190 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:276 msgid ":attr:`~odoo.fields.Model.create_uid` (:class:`~odoo.fields.Many2one`)" msgstr "" #: ../../content/developer/howtos/backend.rst:191 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:277 msgid "User who created the record." msgstr "" #: ../../content/developer/howtos/backend.rst:192 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:278 msgid ":attr:`~odoo.fields.Model.write_date` (:class:`~odoo.fields.Datetime`)" msgstr "" #: ../../content/developer/howtos/backend.rst:193 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:279 msgid "Last modification date of the record." msgstr "" #: ../../content/developer/howtos/backend.rst:195 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:282 msgid ":attr:`~odoo.fields.Model.write_uid` (:class:`~odoo.fields.Many2one`)" msgstr "" @@ -434,14 +4127,17 @@ msgid "Actions and menus are regular records in database, usually declared throu msgstr "" #: ../../content/developer/howtos/backend.rst:262 +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:63 msgid "by clicking on menu items (linked to specific actions)" msgstr "" #: ../../content/developer/howtos/backend.rst:263 +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:64 msgid "by clicking on buttons in views (if these are connected to actions)" msgstr "" #: ../../content/developer/howtos/backend.rst:264 +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:65 msgid "as contextual actions on object" msgstr "" @@ -519,6 +4215,7 @@ msgid "Form views" msgstr "" #: ../../content/developer/howtos/backend.rst:353 +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:85 msgid "Forms are used to create and edit single records." msgstr "" @@ -590,7 +4287,7 @@ msgid "Create a model for *sessions*. A session has a name, a start date, a dura msgstr "" #: ../../content/developer/howtos/backend.rst:460 -#: ../../content/developer/reference/javascript_reference.rst:2053 +#: ../../content/developer/reference/frontend/javascript_reference.rst:1855 msgid "Relational fields" msgstr "" @@ -675,8 +4372,8 @@ msgid "Using the relational field many2many, modify the *Session* model to relat msgstr "" #: ../../content/developer/howtos/backend.rst:522 -#: ../../content/developer/reference/javascript_reference.rst:411 -#: ../../content/developer/reference/views.rst:184 +#: ../../content/developer/reference/backend/views.rst:184 +#: ../../content/developer/reference/frontend/javascript_reference.rst:199 msgid "Inheritance" msgstr "" @@ -685,6 +4382,7 @@ msgid "Model inheritance" msgstr "" #: ../../content/developer/howtos/backend.rst:527 +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:114 msgid "Odoo provides two *inheritance* mechanisms to extend an existing model in a modular way." msgstr "" @@ -737,22 +4435,27 @@ msgid "An extension view references its parent using the ``inherit_id`` field, a msgstr "" #: ../../content/developer/howtos/backend.rst:579 +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:203 msgid "``expr``" msgstr "" #: ../../content/developer/howtos/backend.rst:579 +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:203 msgid "An XPath_ expression selecting a single element in the parent view. Raises an error if it matches no element or more than one" msgstr "" #: ../../content/developer/howtos/backend.rst:595 +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:219 msgid "``position``" msgstr "" #: ../../content/developer/howtos/backend.rst:582 +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:206 msgid "Operation to apply to the matched element:" msgstr "" #: ../../content/developer/howtos/backend.rst:584 +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:208 msgid "``inside``" msgstr "" @@ -761,38 +4464,45 @@ msgid "appends ``xpath``'s body at the end of the matched element" msgstr "" #: ../../content/developer/howtos/backend.rst:587 -#: ../../content/developer/reference/qweb.rst:528 -#: ../../content/developer/reference/views.rst:282 +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:211 +#: ../../content/developer/reference/backend/views.rst:284 +#: ../../content/developer/reference/frontend/qweb.rst:902 msgid "``replace``" msgstr "" #: ../../content/developer/howtos/backend.rst:587 +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:211 msgid "replaces the matched element with the ``xpath``'s body, replacing any ``$0`` node occurrence in the new body with the original element" msgstr "" #: ../../content/developer/howtos/backend.rst:589 -#: ../../content/developer/reference/qweb.rst:522 -#: ../../content/developer/reference/views.rst:288 +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:213 +#: ../../content/developer/reference/backend/views.rst:290 +#: ../../content/developer/reference/frontend/qweb.rst:896 msgid "``before``" msgstr "" #: ../../content/developer/howtos/backend.rst:590 +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:214 msgid "inserts the ``xpath``'s body as a sibling before the matched element" msgstr "" #: ../../content/developer/howtos/backend.rst:591 -#: ../../content/developer/reference/qweb.rst:524 -#: ../../content/developer/reference/views.rst:285 +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:215 +#: ../../content/developer/reference/backend/views.rst:287 +#: ../../content/developer/reference/frontend/qweb.rst:898 msgid "``after``" msgstr "" #: ../../content/developer/howtos/backend.rst:592 +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:216 msgid "inserts the ``xpaths``'s body as a sibling after the matched element" msgstr "" #: ../../content/developer/howtos/backend.rst:595 -#: ../../content/developer/reference/qweb.rst:533 -#: ../../content/developer/reference/views.rst:308 +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:219 +#: ../../content/developer/reference/backend/views.rst:315 +#: ../../content/developer/reference/frontend/qweb.rst:907 msgid "``attributes``" msgstr "" @@ -817,6 +4527,8 @@ msgid "Using view inheritance, display this fields in the partner form view" msgstr "" #: ../../content/developer/howtos/backend.rst:621 +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:193 +#: ../../content/developer/reference/frontend/framework_overview.rst:370 msgid "Domains" msgstr "" @@ -877,6 +4589,7 @@ msgid "Iterating over ``self`` gives the records one by one, where each record i msgstr "" #: ../../content/developer/howtos/backend.rst:699 +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:59 msgid "Dependencies" msgstr "" @@ -909,30 +4622,37 @@ msgid "Any field can be given a default value. In the field definition, add the msgstr "" #: ../../content/developer/howtos/backend.rst:738 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:115 msgid "The object ``self.env`` gives access to request parameters and other useful things:" msgstr "" #: ../../content/developer/howtos/backend.rst:741 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:118 msgid "``self.env.cr`` or ``self._cr`` is the database *cursor* object; it is used for querying the database" msgstr "" #: ../../content/developer/howtos/backend.rst:743 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:120 msgid "``self.env.uid`` or ``self._uid`` is the current user's database id" msgstr "" #: ../../content/developer/howtos/backend.rst:744 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:121 msgid "``self.env.user`` is the current user's record" msgstr "" #: ../../content/developer/howtos/backend.rst:745 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:122 msgid "``self.env.context`` or ``self._context`` is the context dictionary" msgstr "" #: ../../content/developer/howtos/backend.rst:746 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:123 msgid "``self.env.ref(xml_id)`` returns the record corresponding to an XML id" msgstr "" #: ../../content/developer/howtos/backend.rst:747 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:124 msgid "``self.env[model_name]`` returns an instance of the given model" msgstr "" @@ -949,6 +4669,7 @@ msgid "Add a field ``active`` in the class Session, and set sessions as active b msgstr "" #: ../../content/developer/howtos/backend.rst:757 +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:0 msgid "Onchange" msgstr "" @@ -977,6 +4698,7 @@ msgid "Model constraints" msgstr "" #: ../../content/developer/howtos/backend.rst:804 +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:12 msgid "Odoo provides two ways to set up automatically verified invariants: :func:`Python constraints ` and :attr:`SQL constraints `." msgstr "" @@ -1033,39 +4755,39 @@ msgid "Tree views can take supplementary attributes to further customize their b msgstr "" #: ../../content/developer/howtos/backend.rst:885 -#: ../../content/developer/reference/views.rst:978 -#: ../../content/developer/reference/views.rst:1411 -#: ../../content/developer/reference/views.rst:1532 +#: ../../content/developer/reference/backend/views.rst:1049 +#: ../../content/developer/reference/backend/views.rst:1733 +#: ../../content/developer/reference/backend/views.rst:1864 msgid "``decoration-{$name}``" msgstr "" #: ../../content/developer/howtos/backend.rst:861 -#: ../../content/developer/reference/views.rst:965 -#: ../../content/developer/reference/views.rst:1407 +#: ../../content/developer/reference/backend/views.rst:1036 +#: ../../content/developer/reference/backend/views.rst:1729 msgid "allow changing the style of a row's text based on the corresponding record's attributes." msgstr "" #: ../../content/developer/howtos/backend.rst:864 -#: ../../content/developer/reference/views.rst:104 -#: ../../content/developer/reference/views.rst:968 +#: ../../content/developer/reference/backend/views.rst:104 +#: ../../content/developer/reference/backend/views.rst:1039 msgid "Values are Python expressions. For each record, the expression is evaluated with the record's attributes as context values and if ``true``, the corresponding style is applied to the row. Here are some of the other values available in the context:" msgstr "" #: ../../content/developer/howtos/backend.rst:869 -#: ../../content/developer/reference/views.rst:109 -#: ../../content/developer/reference/views.rst:973 +#: ../../content/developer/reference/backend/views.rst:109 +#: ../../content/developer/reference/backend/views.rst:1044 msgid "``uid``: the id of the current user," msgstr "" #: ../../content/developer/howtos/backend.rst:870 -#: ../../content/developer/reference/views.rst:110 -#: ../../content/developer/reference/views.rst:974 +#: ../../content/developer/reference/backend/views.rst:110 +#: ../../content/developer/reference/backend/views.rst:1045 msgid "``today``: the current local date as a string of the form ``YYYY-MM-DD``," msgstr "" #: ../../content/developer/howtos/backend.rst:871 -#: ../../content/developer/reference/views.rst:111 -#: ../../content/developer/reference/views.rst:975 +#: ../../content/developer/reference/backend/views.rst:111 +#: ../../content/developer/reference/backend/views.rst:1046 msgid "``now``: same as ``today`` with the addition of the current time. This value is formatted as ``YYYY-MM-DD hh:mm:ss``." msgstr "" @@ -1074,7 +4796,7 @@ msgid "``{$name}`` can be ``bf`` (``font-weight: bold``), ``it`` (``font-style: msgstr "" #: ../../content/developer/howtos/backend.rst:890 -#: ../../content/developer/reference/views.rst:1391 +#: ../../content/developer/reference/backend/views.rst:1713 msgid "``editable``" msgstr "" @@ -1099,9 +4821,9 @@ msgid "Displays records as calendar events. Their root element is ```` msgstr "" #: ../../content/developer/howtos/backend.rst:907 -#: ../../content/developer/reference/views.rst:410 -#: ../../content/developer/reference/views.rst:962 -#: ../../content/developer/reference/views.rst:1342 +#: ../../content/developer/reference/backend/views.rst:434 +#: ../../content/developer/reference/backend/views.rst:1033 +#: ../../content/developer/reference/backend/views.rst:2420 msgid "``color``" msgstr "" @@ -1126,13 +4848,18 @@ msgid "record's field holding the end date/time for the event" msgstr "" #: ../../content/developer/howtos/backend.rst:914 -#: ../../content/developer/reference/views.rst:897 -#: ../../content/developer/reference/views.rst:1017 -#: ../../content/developer/reference/views.rst:1435 -#: ../../content/developer/reference/views.rst:1493 -#: ../../content/developer/reference/views.rst:1682 -#: ../../content/developer/reference/views.rst:1727 -#: ../../content/developer/reference/views.rst:1843 +#: ../../content/developer/reference/backend/views.rst:957 +#: ../../content/developer/reference/backend/views.rst:1090 +#: ../../content/developer/reference/backend/views.rst:1378 +#: ../../content/developer/reference/backend/views.rst:1761 +#: ../../content/developer/reference/backend/views.rst:1823 +#: ../../content/developer/reference/backend/views.rst:2034 +#: ../../content/developer/reference/backend/views.rst:2202 +#: ../../content/developer/reference/backend/views.rst:2414 +#: ../../content/developer/reference/frontend/services.rst:870 +#: ../../content/developer/reference/frontend/services.rst:873 +#: ../../content/developer/reference/frontend/services.rst:879 +#: ../../content/developer/reference/frontend/services.rst:885 msgid "``string``" msgstr "" @@ -1153,13 +4880,17 @@ msgid "Search view ```` elements can have a ``@filter_domain`` that overr msgstr "" #: ../../content/developer/howtos/backend.rst:935 +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:180 msgid "Search views can also contain ```` elements, which act as toggles for predefined searches. Filters must have one of the following attributes:" msgstr "" #: ../../content/developer/howtos/backend.rst:938 -#: ../../content/developer/reference/views.rst:850 -#: ../../content/developer/reference/views.rst:1801 -#: ../../content/developer/reference/views.rst:1878 +#: ../../content/developer/reference/backend/views.rst:908 +#: ../../content/developer/reference/backend/views.rst:1426 +#: ../../content/developer/reference/backend/views.rst:1475 +#: ../../content/developer/reference/backend/views.rst:1488 +#: ../../content/developer/reference/backend/views.rst:2156 +#: ../../content/developer/reference/backend/views.rst:2237 msgid "``domain``" msgstr "" @@ -1168,15 +4899,16 @@ msgid "add the given domain to the current search" msgstr "" #: ../../content/developer/howtos/backend.rst:942 -#: ../../content/developer/howtos/web.rst:1707 -#: ../../content/developer/reference/data.rst:72 -#: ../../content/developer/reference/views.rst:852 -#: ../../content/developer/reference/views.rst:1273 -#: ../../content/developer/reference/views.rst:1481 -#: ../../content/developer/reference/views.rst:1606 -#: ../../content/developer/reference/views.rst:1803 -#: ../../content/developer/reference/views.rst:1871 -#: ../../content/developer/reference/views.rst:1973 +#: ../../content/developer/howtos/web.rst:1710 +#: ../../content/developer/reference/backend/data.rst:72 +#: ../../content/developer/reference/backend/views.rst:910 +#: ../../content/developer/reference/backend/views.rst:1635 +#: ../../content/developer/reference/backend/views.rst:1809 +#: ../../content/developer/reference/backend/views.rst:1946 +#: ../../content/developer/reference/backend/views.rst:2158 +#: ../../content/developer/reference/backend/views.rst:2230 +#: ../../content/developer/reference/backend/views.rst:2337 +#: ../../content/developer/reference/frontend/services.rst:854 msgid "``context``" msgstr "" @@ -1201,7 +4933,7 @@ msgid "Add a button to group courses by responsible user." msgstr "" #: ../../content/developer/howtos/backend.rst:977 -#: ../../content/developer/reference/views.rst:945 +#: ../../content/developer/reference/backend/views.rst:1005 msgid "Gantt" msgstr "" @@ -1270,8 +5002,7 @@ msgid "Graph views contain ```` with a mandatory ``@type`` attribute taki msgstr "" #: ../../content/developer/howtos/backend.rst:1029 -#: ../../content/developer/reference/views.rst:1151 -#: ../../content/developer/reference/views.rst:1733 +#: ../../content/developer/reference/backend/views.rst:2086 msgid "``row`` (default)" msgstr "" @@ -1280,8 +5011,7 @@ msgid "the field should be aggregated by default" msgstr "" #: ../../content/developer/howtos/backend.rst:1032 -#: ../../content/developer/reference/views.rst:1156 -#: ../../content/developer/reference/views.rst:1737 +#: ../../content/developer/reference/backend/views.rst:2090 msgid "``measure``" msgstr "" @@ -1302,7 +5032,7 @@ msgid "Add a Graph view in the Session object that displays, for each course, th msgstr "" #: ../../content/developer/howtos/backend.rst:1052 -#: ../../content/developer/reference/views.rst:1175 +#: ../../content/developer/reference/backend/views.rst:1521 msgid "Kanban" msgstr "" @@ -1323,6 +5053,7 @@ msgid "Kanban views define the structure of each card as a mix of form elements msgstr "" #: ../../content/developer/howtos/backend.rst:1066 +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:0 msgid "Kanban view" msgstr "" @@ -1535,7 +5266,7 @@ msgid "the standard rendering context provides a number of elements, the most im msgstr "" #: ../../content/developer/howtos/backend.rst:1320 -#: ../../content/developer/reference/reports.rst:70 +#: ../../content/developer/reference/backend/reports.rst:70 msgid "``docs``" msgstr "" @@ -1544,7 +5275,8 @@ msgid "the records for which the report is printed" msgstr "" #: ../../content/developer/howtos/backend.rst:1323 -#: ../../content/developer/reference/reports.rst:31 +#: ../../content/developer/reference/backend/reports.rst:31 +#: ../../content/developer/reference/backend/security.rst:124 msgid "``user``" msgstr "" @@ -1596,91 +5328,12 @@ msgstr "" msgid "Define a dashboard containing the graph view you created, the sessions calendar view and a list view of the courses (switchable to a form view). This dashboard should be available through a menuitem in the menu, and automatically displayed in the web client when the OpenAcademy main menu is selected." msgstr "" -#: ../../content/developer/howtos/backend.rst:1373 -msgid "WebServices" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1375 -msgid "The web-service module offer a common interface for all web-services :" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1377 -msgid "XML-RPC" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1378 -msgid "JSON-RPC" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1380 -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/backend.rst:1384 -msgid "Odoo is accessible through XML-RPC/JSON-RPC interfaces, for which libraries exist in many languages." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1388 -msgid "XML-RPC Library" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1390 -msgid "The following example is a Python 3 program that interacts with an Odoo server with the library ``xmlrpc.client``::" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1409 -msgid "Add a new service to the client" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1411 -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/backend.rst:1447 -msgid "Instead of using a hard-coded course id, the code can look up a course by name::" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1458 -msgid "JSON-RPC Library" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1460 -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/backend.rst:1504 -msgid "Examples can be easily adapted from XML-RPC to JSON-RPC." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1508 -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/backend.rst:1511 -msgid "https://github.com/akretion/ooor" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1512 -msgid "https://github.com/OCA/odoorpc" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1513 -msgid "https://github.com/nicolas-van/openerp-client-lib" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1514 -msgid "http://pythonhosted.org/OdooRPC" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1515 -msgid "https://github.com/abhishek-jaiswal/php-openerp-lib" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1517 +#: ../../content/developer/howtos/backend.rst:1372 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:288 msgid "it is possible to :ref:`disable the automatic creation of some fields `" msgstr "" -#: ../../content/developer/howtos/backend.rst:1519 +#: ../../content/developer/howtos/backend.rst:1374 msgid "writing raw SQL queries is possible, but requires care as it bypasses all Odoo authentication and security mechanisms." msgstr "" @@ -1780,6 +5433,45 @@ msgstr "" msgid "The field `company_id` must not be defined with `check_company=True`." msgstr "" +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel._check_company:1 +msgid "Check the companies of the values of the given field names." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel._check_company:3 +msgid "names of relational fields to check" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel._check_company:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response.load:0 +#: ../../../odoo/odoo/api.py:docstring of odoo.api.Environment.company:0 +#: ../../../odoo/odoo/api.py:docstring of odoo.api.Environment.companies:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.create:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.write:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.search:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read_group:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.get_view:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.unlink:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.ensure_one:0 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.Form.save:0 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.O2MProxy.edit:0 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.O2MProxy.new:0 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.O2MProxy.remove:0 +msgid "Raises" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel._check_company:4 +msgid "if the `company_id` of the value of any field is not in `[False, self.company_id]` (or `self` if :class:`~odoo.addons.base.models.res_company`)." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel._check_company:8 +msgid "For :class:`~odoo.addons.base.models.res_users` relational fields, verifies record company is in `company_ids` fields." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel._check_company:11 +msgid "User with main company A, having access to company A and B, could be assigned or linked to records in company B." +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 "" @@ -1797,8 +5489,8 @@ msgid "When the field `company_id` is made required on a model, a good practice msgstr "" #: ../../content/developer/howtos/company.rst:168 -#: ../../content/developer/reference/javascript_reference.rst:1421 -#: ../../content/developer/reference/views.rst:6 +#: ../../content/developer/reference/backend/views.rst:6 +#: ../../content/developer/reference/frontend/javascript_reference.rst:1210 msgid "Views" msgstr "" @@ -1818,43 +5510,6 @@ msgstr "" msgid "This is achieved with security rules based on `company_ids`, which contains 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/web.rst:134 -#: ../../content/developer/howtos/web.rst:1875 -#: ../../content/developer/howtos/website.rst:490 -#: ../../content/developer/reference/actions.rst:176 -#: ../../content/developer/reference/orm.rst:605 -#: ../../content/developer/reference/orm.rst:607 -#: ../../content/developer/reference/orm.rst:722 -#: ../../content/developer/reference/orm.rst:879 -#: ../../content/developer/reference/qweb.rst:340 -#: ../../content/developer/reference/qweb.rst:421 -#: ../../content/developer/reference/security.rst:91 -#: ../../content/developer/reference/translations.rst:21 -#: ../../content/developer/reference/views.rst:13 -#: ../../content/developer/reference/views.rst:70 -#: ../../content/developer/reference/views.rst:81 -#: ../../content/developer/reference/views.rst:179 -#: ../../content/developer/reference/views.rst:241 -#: ../../content/developer/reference/views.rst:818 -#: ../../content/developer/reference/views.rst:938 -#: ../../content/developer/reference/views.rst:940 -#: ../../content/developer/reference/views.rst:1221 -#: ../../content/developer/reference/views.rst:1300 -#: ../../content/developer/reference/views.rst:1316 -#: ../../content/developer/reference/views.rst:1483 -#: ../../content/developer/reference/views.rst:2125 -#: ../../content/developer/webservices/iap.rst:121 -#: ../../content/developer/webservices/iap.rst:225 -#: ../../content/developer/webservices/iap.rst:407 -#: ../../content/developer/webservices/iap.rst:409 -#: ../../content/developer/webservices/iap.rst:510 -#: ../../content/developer/webservices/odoo.rst:400 -#: ../../content/developer/webservices/odoo.rst:996 -#: ../../content/developer/webservices/odoo.rst:1187 -msgid "Todo" -msgstr "" - #: ../../content/developer/howtos/company.rst:229 msgid "check_company on company_dependent fields." msgstr "" @@ -1904,7 +5559,7 @@ msgid "Dump stack" msgstr "" #: ../../content/developer/howtos/profilecode.rst:85 -msgid "Sending the SIGQUIT signal to an Odoo process (only available on POSIX) makes this process output the current stack trace to log, with info level. When an odoo process seems stucked, sending this signal to the process permit to know what the process is doing, and letting the process continue his job." +msgid "Sending the SIGQUIT signal to an Odoo process (only available on POSIX) makes this process output the current stack trace to log, with info level. When an odoo process seems stuck, sending this signal to the process permit to know what the process is doing, and letting the process continue his job." msgstr "" #: ../../content/developer/howtos/profilecode.rst:91 @@ -1939,6 +5594,6013 @@ msgstr "" msgid "To open profile.svg you should use browser, because other viewer may not support interactive part." msgstr "" +#: ../../content/developer/howtos/rdtraining.rst:39 +#: ../../content/developer/howtos/rdtraining.rst:69 +#: ../../content/developer/howtos/rdtraining.rst:39 +#: ../../content/developer/howtos/rdtraining.rst:69 +msgid "Advanced Topics" +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:7 +msgid "Getting started" +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:9 +msgid "Welcome to the Getting Started Odoo tutorial! If you reached this page that means you are interested in the development of your own Odoo module. It might also mean that you recently joined the Odoo company for a rather technical position. In any case, your journey to the technical side of Odoo starts here." +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:14 +msgid "This training is split in two parts:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:16 +msgid "The first part is the :ref:`core training `. Its objective is to give you an insight of the most important parts of the Odoo development framework. The chapters should be followed in their given order since they cover the development of a new Odoo application from scratch in an incremental way. In other words, each chapter depends on the previous one." +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:20 +msgid "The second part covers a set of :ref:`advanced topics `. Each topic can be followed independently, but requires the :ref:`core training `." +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:25 +msgid "Are you following this training as part of your technical onboarding as an Odoo employee? Then, we ask you to complete the first part of the training before joining your new team and the second part the month after." +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:29 +msgid "All topics are built around a business case we will enhance along the way. The reader is expected to actively take part in the training by writing the solution for each exercise." +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:32 +msgid "Ready? Let's get started!" +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:37 +msgid "Core training" +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:47 +msgid ":doc:`rdtraining/01_architecture`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:48 +msgid ":doc:`rdtraining/02_setup`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:49 +msgid ":doc:`rdtraining/03_newapp`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:50 +msgid ":doc:`rdtraining/04_basicmodel`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:51 +msgid ":doc:`rdtraining/05_securityintro`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:52 +msgid ":doc:`rdtraining/06_firstui`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:53 +msgid ":doc:`rdtraining/07_basicviews`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:54 +msgid ":doc:`rdtraining/08_relations`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:55 +msgid ":doc:`rdtraining/09_compute_onchange`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:56 +msgid ":doc:`rdtraining/10_actions`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:57 +msgid ":doc:`rdtraining/11_constraints`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:58 +msgid ":doc:`rdtraining/12_sprinkles`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:59 +msgid ":doc:`rdtraining/13_inheritance`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:60 +msgid ":doc:`rdtraining/14_other_module`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:61 +msgid ":doc:`rdtraining/15_qwebintro`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:62 +msgid ":doc:`rdtraining/16_guidelines_pr`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:67 +msgid "Advanced topics" +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:81 +msgid ":doc:`rdtraining/B_acl_irrules`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:82 +msgid ":doc:`rdtraining/C_data`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:83 +msgid ":doc:`rdtraining/D_mixins`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:84 +msgid ":doc:`rdtraining/E_unittest`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:85 +msgid ":doc:`rdtraining/J_reports`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:86 +msgid ":doc:`rdtraining/K_dashboard`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining.rst:87 +msgid ":doc:`rdtraining/N_security`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:5 +msgid "Chapter 1: Architecture Overview" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:8 +msgid "Multitier application" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:10 +msgid "Odoo follows a `multitier architecture`_, meaning that the presentation, the business logic and the data storage are separated. More specifically, it uses a three-tier architecture (image from Wikipedia):" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:None +msgid "Three-tier architecture" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:18 +msgid "The presentation tier is a combination of HTML5, JavaScript and CSS. The logic tier is exclusively written in Python, while the data tier only supports PostgreSQL as an RDBMS." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:21 +msgid "Depending on the scope of your module, Odoo development can be done in any of these tiers. Therefore, before going any further, it may be a good idea to refresh your memory if you don't have an intermediate level in these topics." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:25 +msgid "In order to go through this tutorial, you will need a very basic knowledge of HTML and an intermediate level of Python. Advanced topics will require more knowledge in the other subjects. There are plenty of tutorials freely accessible, so we cannot recommend one over another since it depends on your background." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:30 +msgid "For reference this is the official `Python tutorial`_." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:33 +msgid "Since version 15.0, Odoo is actively transitioning to using its own in-house developed `OWL framework `_ as part of its presentation tier. The legacy JavaScript framework is still supported but will be deprecated over time. This will be discussed further in advanced topics." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:39 +msgid "Odoo modules" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:41 +msgid "Both server and client extensions are packaged as *modules* which are optionally loaded in a *database*. A module is a collection of functions and data that target a single purpose." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:45 +msgid "Odoo modules can either add brand new business logic to an Odoo system or alter and extend existing business logic. One module can be created to add your country's accounting rules to Odoo's generic accounting support, while a different module can add support for real-time visualisation of a bus fleet." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:50 +msgid "Everything in Odoo starts and ends with modules." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:52 +msgid "Terminology: developers group their business features in Odoo *modules*. The main user-facing modules are flagged and exposed as *Apps*, but a majority of the modules aren't Apps. *Modules* may also be referred to as *addons* and the directories where the Odoo server finds them form the ``addons_path``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:60 +msgid "An Odoo module **can** contain a number of elements:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:65 +msgid ":ref:`Business objects `" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:63 +msgid "A business object (e.g. an invoice) is declared as a Python class. The fields defined in these classes are automatically mapped to database columns thanks to the :abbr:`ORM (Object-Relational Mapping)` layer." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:68 +msgid "Define UI display" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:71 +msgid "XML or CSV files declaring the model data:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:82 +msgid "Images, CSS or JavaScript files used by the web interface or website" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:84 +msgid "None of these elements are mandatory. Some modules may only add data files (e.g. country-specific accounting configuration), while others may only add business objects. During this training, we will create business objects, object views and data files. :ref:`Web controllers ` and :ref:`static web data ` are advanced topics." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:99 +msgid "When an Odoo module includes business objects (i.e. Python files), they are organized as a `Python package `_ with a ``__init__.py`` file. This file contains import instructions for various Python files in the module." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:104 +msgid "Here is a simplified module directory:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:118 +msgid "Odoo Editions" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:120 +msgid "Odoo is available in `two versions`_: Odoo Enterprise (licensed & shared sources) and Odoo Community (open-source). In addition to services such as support or upgrades, the Enterprise version provides extra functionalities to Odoo. From a technical point-of-view, these functionalities are simply new modules installed on top of the modules provided by the Community version." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/01_architecture.rst:125 +msgid "Ready to start? Before writing actual code, let's go to the :doc:`next chapter <02_setup>` to review the Odoo installation process. Even if Odoo is already running on your system, we strongly suggest you go through this chapter to make sure we start on the same page during the development of our new application." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:3 +msgid "Chapter 2: Development environment setup" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:5 +msgid "Depending on the intended use case, there are multiple ways to install Odoo. This tutorial will stick to the :ref:`source install ` (:dfn:`running Odoo from the source code`), which is best suited for Odoo developers." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:9 +msgid "Throughout this document, we assume that you are installing your development environment on a laptop provided by Odoo with Linux Mint installed and up-to-date. If that is not the case, switch to the :guilabel:`Windows` or :guilabel:`Mac OS` tab if any section of the installation guide, depending on which OS you are on. The steps remain essentially the same." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:15 +msgid "Set up Git" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:18 +msgid "Install and configure Git" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:20 +msgid "The very first step of the installation process is to install the `Git version control system `_ because the Odoo source code is managed on `GitHub `_." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:28 +msgid "Check if Git is installed by trying to print Git's version with the following command:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:34 +msgid "Once installed, register your name and email:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:42 +msgid "Configure GitHub" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:44 +msgid "You need a GitHub account to fetch the sources and contribute to Odoo's development. If you don't have one yet, create it. For the username, we recommend using your trigram \"xyz\" (or quadrigam) followed by '-odoo': 'xyz-odoo'." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:48 +msgid "The easiest way to authenticate with GitHub is to use an SSH connection. Using SSH authentication allows you to connect to GitHub without supplying your username and password every time you type a command." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:53 +msgid "The following step-by-step procedure is based based on the `official GitHub documentation `_." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:56 +msgid "Generate a new SSH key, add it to the ssh-agent, and copy the SSH key to your clipboard." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:65 +msgid "Go to `GitHub.com `_, then click on your profile picture in the upper-right corner of the page and then on :guilabel:`Settings`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:70 +msgid "On the user settings sidebar, click on :guilabel:`SSH and GPG keys`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:74 +msgid "Click on :guilabel:`New SSH key` or on :guilabel:`Add SSH key`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:78 +msgid "In the :guilabel:`Title` field, add a descriptive label for the new key." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:79 +msgid "Paste your key into the :guilabel:`Key` field." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:83 +msgid "Click on :guilabel:`Add SSH key`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:86 +msgid "Fetch the sources" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:88 +msgid "It is time to fetch the source code of Odoo. First, let's create a home for the Git repositories in :file:`$HOME/src/`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:96 +msgid "Then, clone the two repositories with SSH as explained in the :ref:`Installing Odoo guide `." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:100 +msgid "Cloning the repositories will take a while, enjoy a cup of coffee while you wait." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:105 +msgid "Configure the Git repositories" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:107 +msgid "To contribute to an Odoo repository, you first need to `fork it `_, then create a branch containing your changes on the fork, and finally submit a `Pull Request `_ to the repository." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:114 +msgid "If you are lucky enough to work at Odoo, the forks already exist. They are hosted on https://github.com/odoo-dev/odoo and https://github.com/odoo-dev/enterprise." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:117 +msgid "After your two forks are created, their remote address can be added in your local repositories. In the commands below, replace `odoo-dev/odoo` and `odoo-dev/enterprise` with the name of your forks if needed." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:134 +msgid "Install the dependencies" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:136 +msgid "As seen in :ref:`howto/rdtraining/01_architecture`, Odoo's server runs on Python and uses PostgreSQL as an RDBMS. In the context of a development machine, the easiest approach is to install everything locally. To do so, follow once again the :ref:`Installing Odoo guide `." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:142 +msgid "Some useful SQL commands:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:156 +msgid "Run the server" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:159 +msgid "Launch with `odoo-bin`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:161 +msgid "Once all dependencies are set up, Odoo can be launched by running `odoo-bin`, the command-line interface of the server." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:169 +msgid "There are multiple :ref:`command-line arguments ` that you can use to run the server. In this training you will only need some of them." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:174 +msgid "The database that is going to be used." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:178 +msgid "A comma-separated list of directories in which modules are stored. These directories are scanned for modules." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:183 +msgid "Prevent the worker from using more than CPU seconds for each request." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:187 +msgid "Prevent the worker from taking longer than seconds to process a request." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:190 +msgid "The :option:`--limit-time-cpu` and :option:`--limit-time-real` arguments can be used to prevent the worker from being killed when debugging the source code." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:0 +msgid "You may face an error similar to `AttributeError: module '' has no attribute '<$ATTRIBUTE'>`. In this case, you may need to re-install the module with :command:`$ pip install --upgrade --force-reinstall `." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:0 +msgid "If this error occurs with more than one module, you may need to re-install all the requirements with :command:`$ pip install --upgrade --force-reinstall -r requirements.txt`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:0 +msgid "You can also clear the python cache to solve the issue:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:204 +msgid "Other commonly used arguments are:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:206 +msgid ":option:`-i `: Install some modules before running the server (comma-separated list)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:208 +msgid ":option:`-u `: Update some modules before running the server (comma-separated list)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:212 +msgid "Log in to Odoo" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:214 +msgid "Open http://localhost:8069/ on your browser. We recommend using `Chrome `_, `Firefox `_, or any other browser with development tools." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:218 +msgid "To log in as the administrator user, use the following credentials:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:220 +msgid "email: `admin`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:221 +msgid "password: `admin`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:224 +msgid "Enable the developer mode" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:226 +msgid "The developer or debug mode is useful for training as it gives access to additional (advanced) tools. In the next chapters, **we will always assume that you have enabled the developer mode**." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:229 +msgid ":ref:`Enable the developer mode ` now. Choose the method that you prefer; they are all equivalent." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:233 +msgid "The main page of the Settings screen is only accessible if at least one application is installed. You will be led into installing your own application in the next chapter." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:237 +msgid "Extra tools" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:240 +msgid "Useful Git commands" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:242 +msgid "Here are some useful Git commands for your day-to-day work." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:0 +msgid "Switch branches:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:0 +msgid "When you switch branches, both repositories (odoo and enterprise) must be synchronized, i.e. both need to be in the same branch." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:256 +msgid "Fetch and rebase:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:269 +msgid "Code Editor" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:271 +msgid "If you are working at Odoo, many of your colleagues are using `VSCode `_, `VSCodium `_ (the open source equivalent), `PyCharm `_, or `Sublime Text `_. However, you are free to choose your preferred editor." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:276 +msgid "It is important to configure your linters correctly. Using a linter helps you by showing syntax and semantic warnings or errors. Odoo source code tries to respect Python's and JavaScript's standards, but some of them can be ignored." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:280 +msgid "For Python, we use PEP8 with these options ignored:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:282 +msgid "`E501`: line too long" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:283 +msgid "`E301`: expected 1 blank line, found 0" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:284 +msgid "`E302`: expected 2 blank lines, found 1" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:286 +msgid "For JavaScript, we use ESLint and you can find a `configuration file example here `_." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:290 +msgid "Administrator tools for PostgreSQL" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:292 +msgid "You can manage your PostgreSQL databases using the command line as demonstrated earlier or using a GUI application such as `pgAdmin `_ or `DBeaver `_." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:296 +msgid "To connect the GUI application to your database we recommend you connect using the Unix socket." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:298 +msgid "Host name/address: `/var/run/postgresql`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:299 +msgid "Port: `5432`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:300 +msgid "Username: `$USER`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:303 +msgid "Python Debugging" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:305 +msgid "When facing a bug or trying to understand how the code works, simply printing things out can go a long way, but a proper debugger can save a lot of time." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:308 +msgid "You can use a classic Python library debugger (`pdb `_, `pudb `_ or `ipdb `_), or you can use your editor's debugger." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:312 +msgid "In the following example we use ipdb, but the process is similar with other libraries." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:314 +msgid "Install the library:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:320 +msgid "Place a trigger (breakpoint):" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:339 +msgid "Here is a list of commands:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:343 +msgid "Print the list of available commands if not argument is supplied. With a command as an argument, print the help about that command." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:348 +msgid "The value of the `expression` is pretty-printed using the `pprint` module." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:352 +msgid "Print a stack trace with the most recent frame at the bottom." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:356 +msgid "Move the current frame one level down in the stack trace (to a newer frame)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:360 +msgid "Move the current frame one level up in the stack trace (to an older frame)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:364 +msgid "Continue the execution until the next line in the current function is reached or it returns." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:368 +msgid "Continue the execution and only stop when a breakpoint is encountered." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:372 +msgid "Execute the current line. Stop at the first possible occasion (either in a function that is called or on the next line in the current function)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:377 +msgid "Quit the debugger. The program being executed is aborted." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/02_setup.rst:381 +msgid "Now that your server is running, it's time to start :ref:`writing your own application `!" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:5 +msgid "Chapter 3: A New Application" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:7 +msgid "The purpose of this chapter is to lay the foundation for the creation of a completely new Odoo module. We will start from scratch with the minimum needed to have our module recognized by Odoo. In the upcoming chapters, we will progressively add features to build a realistic business case." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:12 +msgid "The Real Estate Advertisement module" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:14 +msgid "Our new module will cover a business area which is very specific and therefore not included in the standard set of modules: real estate. It is worth noting that before developing a new module, it is good practice to verify that Odoo doesn't already provide a way to answer the specific business case." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:19 +msgid "Here is an overview of the main list view containing some advertisements:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:None +msgid "List view 01" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:25 +msgid "The top area of the form view summarizes important information for the property, such as the name, the property type, the postcode and so on. The first tab contains information describing the property: bedrooms, living area, garage, garden..." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:None +msgid "Form view 01" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:33 +msgid "The second tab lists the offers for the property. We can see here that potential buyers can make offers above or below the expected selling price. It is up to the seller to accept an offer." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:None +msgid "Form view 02" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:40 +msgid "Here is a quick video showing the workflow of the module." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:42 +msgid "Hopefully, this video will be recorded soon :-)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:45 +msgid "Prepare the addon directory" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:47 +msgid "**Reference**: the documentation related to this topic can be found in :ref:`manifest `." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:52 +msgid "**Goal**: the goal of this section is to have Odoo recognize our new module, which will be an empty shell for now. It will be listed in the Apps:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:0 +msgid "The new module appears in the list" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:59 +msgid "The first step of module creation is to create a new directory. To ease the development, we suggest you first create the directory ``/home/$USER/src/custom``. In this directory we add another directory ``estate``, which is our module." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:63 +msgid "A module must contain at least 2 files: the ``__manifest__.py`` file and a ``__init__.py`` file. The ``__init__.py`` file can remain empty for now and we'll come back to it in the next chapter. On the other hand, the ``__manifest__.py`` file must describe our module and cannot remain empty. Its only required field is the ``name``, but it usually contains much more information." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:68 +msgid "Take a look at the `CRM file `__ as an example. In addition to providing the description of the module (``name``, ``category``, ``summary``, ``website``...), it lists its dependencies (``depends``). A dependency means that the Odoo framework will ensure that these modules are installed before our module is installed. Moreover, if one of these dependencies is uninstalled, then our module and **any other that depends on it will also be uninstalled**. Think about your favorite Linux distribution package manager (``apt``, ``dnf``, ``pacman``...): Odoo works in the same way." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:77 +msgid "Create the required addon files." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:79 +msgid "Create the following folders and files:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:81 +msgid "``/home/$USER/src/custom/estate/__init__.py``" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:82 +msgid "``/home/$USER/src/custom/estate/__manifest__.py``" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:84 +msgid "The ``__manifest__.py`` file should only define the name and the dependencies of our modules. The only necessary framework module for now is ``base``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:88 +msgid "Restart the Odoo server and add the ``custom`` folder to the ``addons-path``:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:94 +msgid "Go to Apps, click on Update Apps List, search for ``estate`` and... tadaaa, your module appears! Did it not appear? Maybe try removing the default 'Apps' filter ;-)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:98 +msgid "Remember to enable the :ref:`developer mode ` as explained in the previous chapter. You won't see the :guilabel:`Update Apps List` button otherwise." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:101 +msgid "Make your module an 'App'." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:103 +msgid "Add the appropriate key to your ``__manifest__.py`` so that the module appears when the 'Apps' filter is on." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:106 +msgid "You can even install the module! But obviously it's an empty shell, so no menu will appear." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/03_newapp.rst:108 +msgid "All good? If yes, then let's :ref:`create our first model `!" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:5 +msgid "Chapter 4: Models And Basic Fields" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:7 +msgid "At the end of the :ref:`previous chapter `, we were able to create an Odoo module. However, at this point it is still an empty shell which doesn't allow us to store any data. In our real estate module, we want to store the information related to the properties (name, description, price, living area...) in a database. The Odoo framework provides tools to facilitate database interactions." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:13 +msgid "Before moving forward in the exercise, make sure the ``estate`` module is installed, i.e. it must appear as 'Installed' in the Apps list." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:19 +msgid "**Reference**: the documentation related to this topic can be found in the :ref:`reference/orm/model` API." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:24 +msgid "**Goal**: at the end of this section, the table ``estate_property`` should be created:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:35 +msgid "A key component of Odoo is the `ORM`_ layer. This layer avoids having to manually write most `SQL`_ and provides extensibility and security services\\ [#rawsql]_." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:39 +msgid "Business objects are declared as Python classes extending :class:`~odoo.models.Model`, which integrates them into the automated persistence system." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:43 +msgid "Models can be configured by setting attributes in their definition. The most important attribute is :attr:`~odoo.models.Model._name`, which is required and defines the name for the model in the Odoo system. Here is a minimum definition of a model::" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:54 +msgid "This definition is enough for the ORM to generate a database table named ``test_model``. The ``.`` in the model ``_name`` is automatically converted into a ``_`` by the ORM. By convention all models are located in a ``models`` directory and each model is defined in its own Python file." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:59 +msgid "Take a look at how the ``crm_recurring_plan`` table is defined and how the corresponding Python file is imported:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:62 +msgid "The model is defined in the file ``crm/models/crm_recurring_plan.py`` (see `here `__)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:64 +msgid "The file ``crm_recurring_plan.py`` is imported in ``crm/models/__init__.py`` (see `here `__)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:66 +msgid "The folder ``models`` is imported in ``crm/__init__.py`` (see `here `__)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:69 +msgid "Define the real estate properties model." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:71 +msgid "Based on example given in the CRM module, create the appropriate files and folder for the ``estate_property`` table." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:74 +msgid "When the files are created, add a minimum definition for the ``estate.property`` model." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:77 +msgid "Any modification of the Python files requires a restart of the Odoo server. When we restart the server, we will add the parameters ``-d`` and ``-u``:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:84 +msgid "``-u estate`` means we want to upgrade the ``estate`` module, i.e. the ORM will apply database schema changes. In this case it creates a new table. ``-d rd-demo`` means that the upgrade should be performed on the ``rd-demo`` database. ``-u`` should always be used in combination with ``-d``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:89 +msgid "During the startup you should see the following warnings:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:99 +msgid "If this is the case, then you should be good! To be sure, double check with ``psql`` as demonstrated in the **Goal**." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:102 +msgid "Add a description." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:104 +msgid "Add a ``_description`` to your model to get rid of one of the warnings." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:109 +msgid "**Reference**: the documentation related to this topic can be found in the :ref:`reference/orm/fields` API." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:112 +msgid "Fields are used to define what the model can store and where they are stored. Fields are defined as attributes in the model class::" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:123 +msgid "The ``name`` field is a :class:`~odoo.fields.Char` which will be represented as a Python unicode ``str`` and a SQL ``VARCHAR``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:131 +msgid "**Goal**: at the end of this section, several basic fields should have been added to the table ``estate_property``:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:167 +msgid "There are two broad categories of fields: 'simple' fields, which are atomic values stored directly in the model's table, and 'relational' fields, which link records (of the same or different models)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:171 +msgid "Simple field examples are :class:`~odoo.fields.Boolean`, :class:`~odoo.fields.Float`, :class:`~odoo.fields.Char`, :class:`~odoo.fields.Text`, :class:`~odoo.fields.Date` and :class:`~odoo.fields.Selection`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:175 +msgid "Add basic fields to the Real Estate Property table." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:177 +msgid "Add the following basic fields to the table:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:180 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:253 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:71 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:178 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:241 +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:173 +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:215 +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:262 +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:155 +#: ../../content/developer/howtos/rdtraining/C_data.rst:176 +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:301 +msgid "Field" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:180 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:71 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:178 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:241 +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:173 +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:215 +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:262 +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:155 +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:301 +#: ../../content/developer/reference/frontend/assets.rst:300 +#: ../../content/developer/reference/frontend/framework_overview.rst:262 +#: ../../content/developer/reference/frontend/hooks.rst:224 +#: ../../content/developer/reference/frontend/odoo_editor.rst:147 +#: ../../content/developer/reference/frontend/odoo_editor.rst:173 +#: ../../content/developer/reference/frontend/odoo_editor.rst:217 +#: ../../content/developer/reference/frontend/owl_components.rst:237 +#: ../../content/developer/reference/frontend/owl_components.rst:316 +#: ../../content/developer/reference/frontend/owl_components.rst:383 +#: ../../content/developer/reference/frontend/owl_components.rst:427 +#: ../../content/developer/reference/frontend/owl_components.rst:631 +#: ../../content/developer/reference/frontend/services.rst:246 +#: ../../content/developer/reference/frontend/services.rst:438 +#: ../../content/developer/reference/frontend/services.rst:466 +#: ../../content/developer/reference/frontend/services.rst:737 +#: ../../content/developer/reference/frontend/services.rst:852 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountAccountTemplate.account_type:1 +msgid "Type" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:182 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:184 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:73 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:180 +msgid "Char" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:183 +#: ../../content/developer/howtos/rdtraining/C_data.rst:180 +msgid "description" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:183 +msgid "Text" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:184 +#: ../../content/developer/howtos/rdtraining/C_data.rst:181 +msgid "postcode" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:185 +#: ../../content/developer/howtos/rdtraining/C_data.rst:182 +msgid "date_availability" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:185 +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:176 +msgid "Date" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:186 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:256 +#: ../../content/developer/howtos/rdtraining/C_data.rst:183 +msgid "expected_price" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:186 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:187 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:243 +msgid "Float" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:187 +#: ../../content/developer/howtos/rdtraining/C_data.rst:184 +msgid "selling_price" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:188 +#: ../../content/developer/howtos/rdtraining/C_data.rst:185 +msgid "bedrooms" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:188 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:189 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:190 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:193 +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:175 +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:217 +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:264 +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:303 +msgid "Integer" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:189 +#: ../../content/developer/howtos/rdtraining/C_data.rst:186 +msgid "living_area" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:190 +#: ../../content/developer/howtos/rdtraining/C_data.rst:187 +msgid "facades" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:191 +#: ../../content/developer/howtos/rdtraining/C_data.rst:188 +msgid "garage" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:191 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:192 +msgid "Boolean" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:192 +#: ../../content/developer/howtos/rdtraining/C_data.rst:189 +msgid "garden" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:193 +#: ../../content/developer/howtos/rdtraining/C_data.rst:190 +msgid "garden_area" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:194 +#: ../../content/developer/howtos/rdtraining/C_data.rst:191 +msgid "garden_orientation" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:194 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:244 +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:304 +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:306 +msgid "Selection" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:197 +msgid "The ``garden_orientation`` field must have 4 possible values: 'North', 'South', 'East' and 'West'. The selection list is defined as a list of tuples, see `here `__ for an example." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:202 +msgid "When the fields are added to the model, restart the server with ``-u estate``" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:208 +msgid "Connect to ``psql`` and check the structure of the table ``estate_property``. You'll notice that a couple of extra fields were also added to the table. We will revisit them later." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:216 +msgid "**Goal**: at the end of this section, the columns ``name`` and ``expected_price`` should be not nullable in the table ``estate_property``:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:231 +msgid "Much like the model itself, fields can be configured by passing configuration attributes as parameters::" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:238 +msgid ":attr:`~odoo.fields.Field.string` (``str``, default: field's name)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:241 +msgid "If ``True``, the field can not be empty. It must either have a default value or always be given a value when creating a record." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:243 +msgid ":attr:`~odoo.fields.Field.help` (``str``, default: ``''``)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:244 +msgid "Provides long-form help tooltip for users in the UI." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:248 +msgid "Set attributes for existing fields." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:250 +msgid "Add the following attributes:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:253 +#: ../../content/developer/reference/frontend/javascript_reference.rst:1825 +msgid "Attribute" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:255 +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:256 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:73 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:180 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:245 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:246 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountAccountTemplate.name:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountAccountTemplate.code:0 +#: ../../../odoo/addons/account/models/account_account_tag.py:docstring of odoo.addons.account.models.account_account_tag.AccountAccountTag.name:0 +#: ../../../odoo/addons/account/models/account_account_tag.py:docstring of odoo.addons.account.models.account_account_tag.AccountAccountTag.applicability:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.name:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.code_digits:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.currency_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.bank_account_code_prefix:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.cash_account_code_prefix:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.transfer_account_code_prefix:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountFiscalPositionTemplate.name:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountFiscalPositionTemplate.chart_template_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountGroupTemplate.name:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountGroupTemplate.chart_template_id:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReport.name:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReportLine.name:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReportLine.report_id:0 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReportLine.hierarchy_level:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.chart_template_id:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.name:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.type_tax_use:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.amount_type:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.sequence:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.amount:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxRepartitionLineTemplate.factor_percent:0 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxRepartitionLineTemplate.repartition_type:0 +msgid "required" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:259 +msgid "After restarting the server, both fields should be not nullable." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:262 +msgid "Automatic Fields" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:264 +msgid "**Reference**: the documentation related to this topic can be found in :ref:`reference/fields/automatic`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:267 +msgid "You may have noticed your model has a few fields you never defined. Odoo creates a few fields in all models\\ [#autofields]_. These fields are managed by the system and can't be written to, but they can be read if useful or necessary:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:273 +msgid "The unique identifier for a record of the model." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:281 +msgid "User who last modified the record." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:284 +msgid "Now that we have created our first model, let's :ref:`add some security `!" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:290 +msgid "writing raw SQL queries is possible, but requires caution as this bypasses all Odoo authentication and security mechanisms." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:5 +msgid "Chapter 5: Security - A Brief Introduction" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:7 +msgid "In the :ref:`previous chapter `, we created our first table intended to store business data. In a business application such as Odoo, one of the first questions to consider is who\\ [#who]_ can access the data. Odoo provides a security mechanism to allow access to the data for specific groups of users." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:12 +msgid "The topic of security is covered in more detail in :ref:`howto/rdtraining/B_acl_irrules`. This chapter aims to cover the minimum required for our new module." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:16 +msgid "Data Files (CSV)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:18 +msgid "Odoo is a highly data driven system. Although behavior is customized using Python code, part of a module's value is in the data it sets up when loaded. One way to load data is through a CSV file. One example is the `list of country states `__ which is loaded at installation of the ``base`` module." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:33 +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:83 +msgid "``id`` is an :term:`external identifier`. It can be used to refer to the record (without knowing its in-database identifier)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:35 +msgid "``country_id:id`` refers to the country by using its :term:`external identifier`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:36 +msgid "``name`` is the name of the state." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:37 +msgid "``code`` is the code of the state." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:39 +msgid "These three fields are `defined `__ in the ``res.country.state`` model." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:43 +msgid "By convention, a file importing data is located in the ``data`` folder of a module. When the data is related to security, it is located in the ``security`` folder. When the data is related to views and actions (we will cover this later), it is located in the ``views`` folder. Additionally, all of these files must be declared in the ``data`` list within the ``__manifest__.py`` file. Our example file is defined `in the manifest of the base module `__." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:50 +msgid "Also note that the content of the data files is only loaded when a module is installed or updated." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:55 +msgid "The data files are sequentially loaded following their order in the ``__manifest__.py`` file. This means that if data ``A`` refers to data ``B``, you must make sure that ``B`` is loaded before ``A``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:59 +msgid "In the case of the country states, you will note that the `list of countries `__ is loaded **before** the `list of country states `__. This is because the states refer to the countries." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:65 +msgid "Why is all this important for security? Because all the security configuration of a model is loaded through data files, as we'll see in the next section." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:69 +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:140 +#: ../../content/developer/reference/backend/security.rst:45 +msgid "Access Rights" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:71 +msgid "**Reference**: the documentation related to this topic can be found in :ref:`reference/security/acl`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:76 +msgid "**Goal**: at the end of this section, the following warning should not appear anymore:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:82 +msgid "When no access rights are defined on a model, Odoo determines that no users can access the data. It is even notified in the log:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:89 +msgid "Access rights are defined as records of the model ``ir.model.access``. Each access right is associated with a model, a group (or no group for global access) and a set of permissions: create, read, write and unlink\\ [#unlink]_. Such access rights are usually defined in a CSV file named ``ir.model.access.csv``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:95 +msgid "Here is an example for our previous ``test.model``:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:102 +msgid "``id`` is an :term:`external identifier`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:103 +msgid "``name`` is the name of the ``ir.model.access``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:104 +msgid "``model_id/id`` refers to the model which the access right applies to. The standard way to refer to the model is ``model_``, where ```` is the ``_name`` of the model with the ``.`` replaced by ``_``. Seems cumbersome? Indeed it is..." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:107 +msgid "``group_id/id`` refers to the group which the access right applies to. We will cover the concept of groups in the :ref:`advanced topic ` dedicated to the security." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:109 +msgid "``perm_read,perm_write,perm_create,perm_unlink``: read, write, create and unlink permissions" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:111 +msgid "Add access rights." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:113 +msgid "Create the ``ir.model.access.csv`` file in the appropriate folder and define it in the ``__manifest__.py`` file." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:116 +msgid "Give the read, write, create and unlink permissions to the group ``base.group_user``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:118 +msgid "Tip: the warning message in the log gives you most of the solution ;-)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:120 +msgid "Restart the server and the warning message should have disappeared!" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:122 +msgid "It's now time to finally :ref:`interact with the UI `!" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:124 +msgid "meaning which Odoo user (or group of users)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/05_securityintro.rst:126 +msgid "'unlink' is the equivalent of 'delete'" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:5 +msgid "Chapter 6: Finally, Some UI To Play With" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:7 +msgid "Now that we've created our new :ref:`model ` and its corresponding :ref:`access rights `, it is time to interact with the user interface." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:11 +msgid "At the end of this chapter, we will have created a couple of menus in order to access a default list and form view." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:15 +msgid "Data Files (XML)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:17 +msgid "**Reference**: the documentation related to this topic can be found in :ref:`reference/data`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:20 +msgid "In :ref:`howto/rdtraining/05_securityintro`, we added data through a CSV file. The CSV format is convenient when the data to load has a simple format. When the format is more complex (e.g. load the structure of a view or an email template), we use the XML format. For example, this `help field `__ contains HTML tags. While it would be possible to load such data through a CSV file, it is more convenient to use an XML file." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:28 +msgid "The XML files must be added to the same folders as the CSV files and defined similarly in the ``__manifest__.py``. The content of the data files is also sequentially loaded when a module is installed or updated, therefore all remarks made for CSV files hold true for XML files. When the data is linked to views, we add them to the ``views`` folder." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:33 +msgid "In this chapter we will load our first action and menus though an XML file. Actions and menus are standard records in the database." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:38 +msgid "When performance is important, the CSV format is preferred over the XML format. This is the case in Odoo where loading a CSV file is faster than loading an XML file." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:41 +msgid "In Odoo, the user interface (actions, menus and views) is largely defined by creating and composing records defined in an XML file. A common pattern is Menu > Action > View. To access records the user navigates through several menu levels; the deepest level is an action which triggers the opening of a list of the records." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:47 +#: ../../content/developer/iot.rst:138 +#: ../../content/developer/reference/backend/actions.rst:6 +msgid "Actions" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:49 +msgid "**Reference**: the documentation related to this topic can be found in :ref:`reference/actions`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:54 +msgid "**Goal**: at the end of this section, an action should be loaded in the system. We won't see anything yet in the UI, but the file should be loaded in the log:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:61 +msgid "Actions can be triggered in three ways:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:67 +msgid "We will only cover the first case in this chapter. The second case will be covered in a :ref:`later chapter ` while the last is the focus of an advanced topic. In our Real Estate example, we would like to link a menu to the ``estate.property`` model, so we are able to create a new record. The action can be viewed as the link between the menu and the model." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:73 +msgid "A basic action for our ``test.model`` is:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:85 +msgid "``model`` has a fixed value of ``ir.actions.act_window`` (:ref:`reference/actions/window`)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:86 +msgid "``name`` is the name of the action." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:87 +msgid "``res_model`` is the model which the action applies to." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:88 +msgid "``view_mode`` are the views that will be available; in this case they are the list (tree) and form views. We'll see :ref:`later ` that there can be other view modes." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:91 +msgid "Examples can be found everywhere in Odoo, but `this `__ is a good example of a simple action. Pay attention to the structure of the XML data file since you will need it in the following exercise." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:96 +msgid "Add an action." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:98 +msgid "Create the ``estate_property_views.xml`` file in the appropriate folder and define it in the ``__manifest__.py`` file." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:101 +msgid "Create an action for the model ``estate.property``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:103 +msgid "Restart the server and you should see the file loaded in the log." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:106 +msgid "Menus" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:108 +msgid "**Reference**: the documentation related to this topic can be found in :ref:`reference/data/shortcuts`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:113 +msgid "**Goal**: at the end of this section, three menus should be created and the default view is displayed:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:0 +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:0 +msgid "Root menus" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:0 +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:0 +msgid "First level and action menus" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:0 +msgid "Default form view" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:128 +msgid "To reduce the complexity in declaring a menu (``ir.ui.menu``) and connecting it to the corresponding action, we can use the ```` shortcut ." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:131 +msgid "A basic menu for our ``test_model_action`` is:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:137 +msgid "The menu ``test_model_menu_action`` is linked to the action ``test_model_action``, and the action is linked to the model ``test.model``. As previously mentioned, the action can be seen as the link between the menu and the model." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:141 +msgid "However, menus always follow an architecture, and in practice there are three levels of menus:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:143 +msgid "The root menu, which is displayed in the App switcher (the Odoo Community App switcher is a dropdown menu)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:145 +msgid "The first level menu, displayed in the top bar" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:146 +msgid "The action menus" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:156 +msgid "The easiest way to define the structure is to create it in the XML file. A basic structure for our ``test_model_action`` is:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:167 +msgid "The name for the third menu is taken from the name of the ``action``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:169 +msgid "Add menus." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:171 +msgid "Create the ``estate_menus.xml`` file in the appropriate folder and define it in the ``__manifest__.py`` file. Remember the sequential loading of the data files ;-)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:174 +msgid "Create the three levels of menus for the ``estate.property`` action created in the previous exercise. Refer to the **Goal** of this section for the expected result." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:177 +msgid "Restart the server and **refresh the browser**\\ [#refresh]_. You should now see the menus, and you'll even be able to create your first real estate property advertisement!" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:181 +msgid "Fields, Attributes And View" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:185 +msgid "**Goal**: at the end of this section, the selling price should be read-only and the number of bedrooms and the availability date should have default values. Additionally the selling price and availability date values won't be copied when the record is duplicated." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:None +msgid "Interaction between model and view" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:193 +msgid "The reserved fields ``active`` and ``state`` are added to the ``estate.property`` model." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:195 +msgid "So far we have only used the generic view for our real estate property advertisements, but in most cases we want to fine tune the view. There are many fine-tunings possible in Odoo, but usually the first step is to make sure that:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:199 +msgid "some fields have a default value" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:200 +msgid "some fields are read-only" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:201 +msgid "some fields are not copied when duplicating the record" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:203 +msgid "In our real estate business case, we would like the following:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:205 +msgid "The selling price should be read-only (it will be automatically filled in later)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:206 +msgid "The availability date and the selling price should not be copied when duplicating a record" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:207 +msgid "The default number of bedrooms should be 2" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:208 +msgid "The default availability date should be in 3 months" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:211 +msgid "Some New Attributes" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:213 +msgid "Before moving further with the view design, let's step back to our model definition. We saw that some attributes, such as ``required=True``, impact the table schema in the database. Other attributes will impact the view or provide default values." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:217 +msgid "Add new attributes to the fields." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:219 +msgid "Find the appropriate attributes (see :class:`~odoo.fields.Field`) to:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:221 +msgid "set the selling price as read-only" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:222 +msgid "prevent copying of the availability date and the selling price values" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:224 +msgid "Restart the server and refresh the browser. You should not be able to set any selling prices. When duplicating a record, the availability date should be empty." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:228 +msgid "Default Values" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:230 +msgid "Any field can be given a default value. In the field definition, add the option ``default=X`` where ``X`` is either a Python literal value (boolean, integer, float, string) or a function taking a model and returning a value::" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:237 +msgid "The ``name`` field will have the value 'Unknown' by default while the ``last_seen`` field will be set as the current time." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:240 +msgid "Set default values." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:242 +msgid "Add the appropriate default attributes so that:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:244 +msgid "the default number of bedrooms is 2" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:245 +msgid "the default availability date is in 3 months" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:247 +msgid "Tip: this might help you: :meth:`~odoo.fields.Date.today`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:249 +msgid "Check that the default values are set as expected." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:252 +msgid "Reserved Fields" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:254 +msgid "**Reference**: the documentation related to this topic can be found in :ref:`reference/orm/fields/reserved`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:257 +msgid "A few field names are reserved for pre-defined behaviors. They should be defined on a model when the related behavior is desired." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:260 +msgid "Add active field." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:262 +msgid "Add the ``active`` field to the ``estate.property`` model." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:264 +msgid "Restart the server, create a new property, then come back to the list view... The property will not be listed! ``active`` is an example of a reserved field with a specific behavior: when a record has ``active=False``, it is automatically removed from any search. To display the created property, you will need to specifically search for inactive records." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:None +msgid "Inactive records" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:273 +msgid "Set a default value for active field." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:275 +msgid "Set the appropriate default value for the ``active`` field so it doesn't disappear anymore." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:277 +msgid "Note that the default ``active=False`` value was assigned to all existing records." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:279 +msgid "Add state field." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:281 +msgid "Add a ``state`` field to the ``estate.property`` model. Five values are possible: New, Offer Received, Offer Accepted, Sold and Canceled. It must be required, should not be copied and should have its default value set to 'New'." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:285 +msgid "Make sure to use the correct type!" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:287 +msgid "The ``state`` will be used later on for several UI enhancements." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:289 +msgid "Now that we are able to interact with the UI thanks to the default views, the next step is obvious: we want to define :ref:`our own views `." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/06_firstui.rst:292 +msgid "A refresh is needed since the web client keeps a cache of the various menus and views for performance reasons." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:5 +msgid "Chapter 7: Basic Views" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:7 +msgid "We have seen in the :ref:`previous chapter ` that Odoo is able to generate default views for a given model. In practice, the default view is **never** acceptable for a business application. Instead, we should at least organize the various fields in a logical manner." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:12 +msgid "Views are defined in XML files with actions and menus. They are instances of the ``ir.ui.view`` model." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:15 +msgid "In our real estate module, we need to organize the fields in a logical way:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:17 +msgid "in the list (tree) view, we want to display more than just the name." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:18 +msgid "in the form view, the fields should be grouped." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:19 +msgid "in the search view, we must be able to search on more than just the name. Specifically, we want a filter for the 'Available' properties and a shortcut to group by postcode." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:23 +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:317 +#: ../../content/developer/reference/backend/views.rst:1692 +msgid "List" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:25 +msgid "**Reference**: the documentation related to this topic can be found in :ref:`reference/views/list`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:30 +msgid "**Goal**: at the end of this section, the list view should look like this:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:0 +msgid "List view" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:36 +msgid "List views, also called tree views, display records in a tabular form." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:38 +msgid "Their root element is ````. The most basic version of this view simply lists all the fields to display in the table (where each field is a column):" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:48 +msgid "A simple example can be found `here `__." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:51 +msgid "Add a custom list view." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:53 +msgid "Define a list view for the ``estate.property`` model in the appropriate XML file. Check the **Goal** of this section for the fields to display." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:56 +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:378 +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:117 +msgid "Tips:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:58 +msgid "do not add the ``editable=\"bottom\"`` attribute that you can find in the example above. We'll come back to it later." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:60 +msgid "some field labels may need to be adapted to match the reference." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:63 +msgid "As always, you need to restart the server (do not forget the ``-u`` option) and refresh the browser to see the result." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:68 +msgid "You will probably use some copy-paste in this chapter, therefore always make sure that the ``id`` remains unique for each view!" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:72 +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:234 +#: ../../content/developer/reference/backend/views.rst:774 +msgid "Form" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:74 +msgid "**Reference**: the documentation related to this topic can be found in :ref:`reference/views/form`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:79 +msgid "**Goal**: at the end of this section, the form view should look like this:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:0 +msgid "Form view" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:87 +msgid "Their root element is ``
``. They are composed of high-level structure elements (groups and notebooks) and interactive elements (buttons and fields):" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:110 +msgid "It is possible to use regular HTML tags such as ``div`` and ``h1`` as well as the the ``class`` attribute (Odoo provides some built-in classes) to fine-tune the look." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:113 +msgid "A simple example can be found `here `__." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:116 +msgid "Add a custom form view." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:118 +msgid "Define a form view for the ``estate.property`` model in the appropriate XML file. Check the **Goal** of this section for the expected final design of the page." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:121 +msgid "This might require some trial and error before you get to the expected result ;-) It is advised that you add the fields and the tags one at a time to help understand how it works." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:124 +msgid "In order to avoid relaunching the server every time you do a modification to the view, it can be convenient to use the ``--dev xml`` parameter when launching the server:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:131 +msgid "This parameter allows you to just refresh the page to view your view modifications." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:134 +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:385 +#: ../../content/developer/reference/backend/views.rst:2175 +msgid "Search" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:136 +msgid "**Reference**: the documentation related to this topic can be found in :ref:`reference/views/search`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:141 +msgid "**Goal**: at the end of this section, the search view should look like this:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:0 +msgid "Search fields" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:0 +#: ../../content/developer/reference/backend/orm.rst:1033 +msgid "Filter" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:0 +msgid "Group By" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:155 +msgid "Search views are slightly different from the list and form views since they don't display *content*. Although they apply to a specific model, they are used to filter other views' content (generally aggregated views such as :ref:`reference/views/list`). Beyond the difference in use case, they are defined the same way." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:160 +msgid "Their root element is ````. The most basic version of this view simply lists all the fields for which a shortcut is desired:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:170 +msgid "The default search view generated by Odoo provides a shortcut to filter by ``name``. It is very common to add the fields which the user is likely to filter on in a customized search view." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:173 +msgid "Add a custom search view." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:175 +msgid "Define a search view for the ``estate.property`` model in the appropriate XML file. Check the first image of this section's **Goal** for the list of fields." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:178 +msgid "After restarting the server, it should be possible to filter on the given fields." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:183 +msgid "``domain``: adds the given domain to the current search" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:184 +msgid "``context``: adds some context to the current search; uses the key ``group_by`` to group results on the given field name" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:187 +msgid "A simple example can be found `here `__." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:190 +msgid "Before going further in the exercise, it is necessary to introduce the 'domain' concept." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:195 +msgid "**Reference**: the documentation related to this topic can be found in :ref:`reference/orm/domains`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:198 +msgid "In Odoo, a domain encodes conditions on records: a domain is a list of criteria used to select a subset of a model's records. Each criterion is a triplet with a *field name*, an *operator* and a *value*. A record satisfies a criterion if the specified field meets the condition of the operator applied to the value." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:203 +msgid "For instance, when used on the *Product* model the following domain selects all *services* with a unit price greater than *1000*::" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:208 +msgid "By default criteria are combined with an implicit AND, meaning *every* criterion needs to be satisfied for a record to match a domain. The logical operators ``&`` (AND), ``|`` (OR) and ``!`` (NOT) can be used to explicitly combine criteria. They are used in prefix position (the operator is inserted before its arguments rather than between). For instance, to select products 'which are services *OR* have a unit price which is *NOT* between 1000 and 2000'::" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:221 +msgid "Add filter and Group By." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:223 +msgid "The following should be added to the previously created search view:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:225 +msgid "a filter which displays available properties, i.e. the state should be 'New' or 'Offer Received'." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:227 +msgid "the ability to group results by postcode." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/07_basicviews.rst:229 +msgid "Looking good? At this point we are already able to create models and design a user interface which makes sense business-wise. However, a key component is still missing: the :ref:`link between models `." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:5 +msgid "Chapter 8: Relations Between Models" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:7 +msgid "The :ref:`previous chapter ` covered the creation of custom views for a model containing basic fields. However, in any real business scenario we need more than one model. Moreover, links between models are necessary. One can easily imagine one model containing the customers and another one containing the list of users. You might need to refer to a customer or a user on any existing business model." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:13 +msgid "In our real estate module, we want the following information for a property:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:15 +msgid "the customer who bought the property" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:16 +msgid "the real restate agent who sold the property" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:17 +msgid "the property type: house, apartment, penthouse, castle..." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:18 +msgid "a list of tags characterizing the property: cozy, renovated..." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:19 +msgid "a list of the offers received" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:22 +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:305 +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:307 +msgid "Many2one" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:24 +msgid "**Reference**: the documentation related to this topic can be found in :class:`~odoo.fields.Many2one`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:29 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:136 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:199 +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:26 +#: ../../content/developer/howtos/rdtraining/10_actions.rst:27 +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:24 +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:20 +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:18 +msgid "**Goal**: at the end of this section:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:31 +msgid "a new ``estate.property.type`` model should be created with the corresponding menu, action and views." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:0 +msgid "Property type" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:37 +msgid "three Many2one fields should be added to the ``estate.property`` model: property type, buyer and seller." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:0 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:0 +msgid "Property" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:43 +msgid "In our real estate module, we want to define the concept of property type. A property type is, for example, a house or an apartment. It is a standard business need to categorize properties according to their type, especially to refine filtering." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:47 +msgid "A property can have **one** type, but the same type can be assigned to **many** properties. This is supported by the **many2one** concept." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:50 +msgid "A many2one is a simple link to another object. For example, in order to define a link to the ``res.partner`` in our test model, we can write::" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:55 +msgid "By convention, many2one fields have the ``_id`` suffix. Accessing the data in the partner can then be easily done with::" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:62 +msgid "`foreign keys `_" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:64 +msgid "In practice a many2one can be seen as a dropdown list in a form view." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:66 +msgid "Add the Real Estate Property Type table." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:68 +msgid "Create the ``estate.property.type`` model and add the following field:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:71 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:178 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:241 +#: ../../content/developer/reference/backend/views.rst:68 +msgid "Attributes" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:76 +#: ../../content/developer/howtos/rdtraining/08_relations.rst:183 +msgid "Add the menus as displayed in this section's **Goal**" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:77 +msgid "Add the field ``property_type_id`` into your ``estate.property`` model and its form, tree and search views" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:80 +msgid "This exercise is a good recap of the previous chapters: you need to create a :ref:`model `, set the :ref:`model `, add an :ref:`action and a menu `, and :ref:`create a view `." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:86 +msgid "Tip: do not forget to import any new Python files in ``__init__.py``, add new data files in ``__manifest.py__`` or add the access rights ;-)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:89 +msgid "Once again, restart the server and refresh to see the results!" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:91 +msgid "In the real estate module, there are still two missing pieces of information we want on a property: the buyer and the salesperson. The buyer can be any individual, but on the other hand the salesperson must be an employee of the real estate agency (i.e. an Odoo user)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:95 +msgid "In Odoo, there are two models which we commonly refer to:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:97 +msgid "``res.partner``: a partner is a physical or legal entity. It can be a company, an individual or even a contact address." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:99 +msgid "``res.users``: the users of the system. Users can be 'internal', i.e. they have access to the Odoo backend. Or they can be 'portal', i.e. they cannot access the backend, only the frontend (e.g. to access their previous orders in eCommerce)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:103 +msgid "Add the buyer and the salesperson." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:105 +msgid "Add a buyer and a salesperson to the ``estate.property`` model using the two common models mentioned above. They should be added in a new tab of the form view, as depicted in this section's **Goal**." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:108 +msgid "The default value for the salesperson must be the current user. The buyer should not be copied." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:110 +msgid "Tip: to get the default value, check the note below or look at an example `here `__." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:126 +msgid "Now let's have a look at other types of links." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:129 +msgid "Many2many" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:131 +msgid "**Reference**: the documentation related to this topic can be found in :class:`~odoo.fields.Many2many`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:138 +msgid "a new ``estate.property.tag`` model should be created with the corresponding menu and action." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:0 +msgid "Property tag" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:144 +msgid "tags should be added to the ``estate.property`` model:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:150 +msgid "In our real estate module, we want to define the concept of property tags. A property tag is, for example, a property which is 'cozy' or 'renovated'." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:153 +msgid "A property can have **many** tags and a tag can be assigned to **many** properties. This is supported by the **many2many** concept." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:156 +msgid "A many2many is a bidirectional multiple relationship: any record on one side can be related to any number of records on the other side. For example, in order to define a link to the ``account.tax`` model on our test model, we can write::" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:162 +msgid "By convention, many2many fields have the ``_ids`` suffix. This means that several taxes can be added to our test model. It behaves as a list of records, meaning that accessing the data must be done in a loop::" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:169 +msgid "A list of records is known as a *recordset*, i.e. an ordered collection of records. It supports standard Python operations on collections, such as ``len()`` and ``iter()``, plus extra set operations like ``recs1 | recs2``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:173 +msgid "Add the Real Estate Property Tag table." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:175 +msgid "Create the ``estate.property.tag`` model and add the following field:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:184 +msgid "Add the field ``tag_ids`` to your ``estate.property`` model and in its form and tree views" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:186 +msgid "Tip: in the view, use the ``widget=\"many2many_tags\"`` attribute as demonstrated `here `__. The ``widget`` attribute will be explained in detail in :ref:`a later chapter of the training `. For now, you can try to adding and removing it and see the result ;-)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:192 +msgid "One2many" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:194 +msgid "**Reference**: the documentation related to this topic can be found in :class:`~odoo.fields.One2many`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:201 +msgid "a new ``estate.property.offer`` model should be created with the corresponding form and tree view." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:202 +msgid "offers should be added to the ``estate.property`` model:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:0 +msgid "Property offers" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:208 +msgid "In our real estate module, we want to define the concept of property offers. A property offer is an amount a potential buyer offers to the seller. The offer can be lower or higher than the expected price." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:212 +msgid "An offer applies to **one** property, but the same property can have **many** offers. The concept of **many2one** appears once again. However, in this case we want to display the list of offers for a given property so we will use the **one2many** concept." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:216 +msgid "A one2many is the inverse of a many2one. For example, we defined on our test model a link to the ``res.partner`` model thanks to the field ``partner_id``. We can define the inverse relation, i.e. the list of test models linked to our partner::" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:222 +msgid "The first parameter is called the ``comodel`` and the second parameter is the field we want to inverse." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:225 +msgid "By convention, one2many fields have the ``_ids`` suffix. They behave as a list of records, meaning that accessing the data must be done in a loop::" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:233 +msgid "Because a :class:`~odoo.fields.One2many` is a virtual relationship, there *must* be a :class:`~odoo.fields.Many2one` field defined in the comodel." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:236 +msgid "Add the Real Estate Property Offer table." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:238 +msgid "Create the ``estate.property.offer`` model and add the following fields:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:241 +#: ../../content/developer/howtos/rdtraining/C_data.rst:176 +#: ../../content/developer/howtos/rdtraining/C_data.rst:176 +msgid "Values" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:243 +msgid "price" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:244 +msgid "status" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:244 +msgid "no copy" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:244 +msgid "Accepted, Refused" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:245 +msgid "partner_id" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:245 +msgid "Many2one (``res.partner``)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:246 +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:305 +msgid "property_id" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:246 +msgid "Many2one (``estate.property``)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:249 +msgid "Create a tree view and a form view with the ``price``, ``partner_id`` and ``status`` fields. No need to create an action or a menu." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:251 +msgid "Add the field ``offer_ids`` to your ``estate.property`` model and in its form view as depicted in this section's **Goal**." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:254 +msgid "There are several important things to notice here. First, we don't need an action or a menu for all models. Some models are intended to be accessed only through another model. This is the case in our exercise: an offer is always accessed through a property." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:258 +msgid "Second, despite the fact that the ``property_id`` field is required, we did not include it in the views. How does Odoo know which property our offer is linked to? Well that's part of the magic of using the Odoo framework: sometimes things are defined implicitly. When we create a record through a one2many field, the corresponding many2one is populated automatically for convenience." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/08_relations.rst:264 +msgid "Still alive? This chapter is definitely not the easiest one. It introduced a couple of new concepts while relying on everything that was introduced before. The :ref:`next chapter ` will be lighter, don't worry ;-)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:5 +msgid "Chapter 9: Computed Fields And Onchanges" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:7 +msgid "The :ref:`relations between models ` are a key component of any Odoo module. They are necessary for the modelization of any business case. However, we may want links between the fields within a given model. Sometimes the value of one field is determined from the values of other fields and other times we want to help the user with data entry." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:13 +msgid "These cases are supported by the concepts of computed fields and onchanges. Although this chapter is not technically complex, the semantics of both concepts is very important. This is also the first time we will write Python logic. Until now we haven't written anything other than class definitions and field declarations." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:19 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:96 +#: ../../content/developer/reference/backend/orm.rst:241 +msgid "Computed Fields" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:21 +msgid "**Reference**: the documentation related to this topic can be found in :ref:`reference/fields/compute`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:28 +msgid "In the property model, the total area and the best offer should be computed:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:0 +msgid "Compute fields" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:34 +msgid "In the property offer model, the validity date should be computed and can be updated:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:0 +msgid "Compute field with inverse" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:40 +msgid "In our real estate module, we have defined the living area as well as the garden area. It is then natural to define the total area as the sum of both fields. We will use the concept of a computed field for this, i.e. the value of a given field will be computed from the value of other fields." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:44 +msgid "So far fields have been stored directly in and retrieved directly from the database. Fields can also be *computed*. In this case, the field's value is not retrieved from the database but computed on-the-fly by calling a method of the model." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:49 +msgid "To create a computed field, create a field and set its attribute :attr:`~odoo.fields.Field.compute` to the name of a method. The computation method should set the value of the computed field for every record in ``self``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:54 +msgid "By convention, :attr:`~odoo.fields.Field.compute` methods are private, meaning that they cannot be called from the presentation tier, only from the business tier (see :ref:`howto/rdtraining/01_architecture`). Private methods have a name starting with an underscore ``_``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:61 +msgid "The value of a computed field usually depends on the values of other fields in the computed record. The ORM expects the developer to specify those dependencies on the compute method with the decorator :func:`~odoo.api.depends`. The given dependencies are used by the ORM to trigger the recomputation of the field whenever some of its dependencies have been modified::" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:80 +msgid "``self`` is a collection." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:83 +msgid "The object ``self`` is a *recordset*, i.e. an ordered collection of records. It supports the standard Python operations on collections, e.g. ``len(self)`` and ``iter(self)``, plus extra set operations such as ``recs1 | recs2``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:88 +msgid "Iterating over ``self`` gives the records one by one, where each record is itself a collection of size 1. You can access/assign fields on single records by using the dot notation, e.g. ``record.name``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:92 +msgid "Many examples of computed fields can be found in Odoo. `Here `__ is a simple one." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:96 +msgid "Compute the total area." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:98 +msgid "Add the ``total_area`` field to ``estate.property``. It is defined as the sum of the ``living_area`` and the ``garden_area``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:101 +msgid "Add the field in the form view as depicted on the first image of this section's **Goal**." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:103 +msgid "For relational fields it's possible to use paths through a field as a dependency::" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:113 +msgid "The example is given with a :class:`~odoo.fields.Many2one`, but it is valid for :class:`~odoo.fields.Many2many` or a :class:`~odoo.fields.One2many`. An example can be found `here `__." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:117 +msgid "Let's try it in our module with the following exercise!" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:119 +msgid "Compute the best offer." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:121 +msgid "Add the ``best_price`` field to ``estate.property``. It is defined as the highest (i.e. maximum) of the offers' ``price``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:124 +msgid "Add the field to the form view as depicted in the first image of this section's **Goal**." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:126 +msgid "Tip: you might want to try using the :meth:`~odoo.models.BaseModel.mapped` method. See `here `__ for a simple example." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:131 +msgid "Inverse Function" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:133 +msgid "You might have noticed that computed fields are read-only by default. This is expected since the user is not supposed to set a value." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:136 +msgid "In some cases, it might be useful to still be able to set a value directly. In our real estate example, we can define a validity duration for an offer and set a validity date. We would like to be able to set either the duration or the date with one impacting the other." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:140 +msgid "To support this Odoo provides the ability to use an ``inverse`` function::" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:159 +msgid "An example can be found `here `__." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:162 +msgid "A compute method sets the field while an inverse method sets the field's dependencies." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:165 +msgid "Note that the ``inverse`` method is called when saving the record, while the ``compute`` method is called at each change of its dependencies." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:168 +msgid "Compute a validity date for offers." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:170 +msgid "Add the following fields to the ``estate.property.offer`` model:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:173 +msgid "Default" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:175 +msgid "validity" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:175 +msgid "7" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:176 +msgid "date_deadline" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:179 +msgid "Where ``date_deadline`` is a computed field which is defined as the sum of two fields from the offer: the ``create_date`` and the ``validity``. Define an appropriate inverse function so that the user can set either the date or the validity." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:183 +msgid "Tip: the ``create_date`` is only filled in when the record is created, therefore you will need a fallback to prevent crashing at time of creation." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:186 +msgid "Add the fields in the form view and the list view as depicted on the second image of this section's **Goal**." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:189 +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:275 +msgid "Additional Information" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:191 +msgid "Computed fields are **not stored** in the database by default. Therefore it is **not possible** to search on a computed field unless a ``search`` method is defined. This topic is beyond the scope of this training, so we won't cover it. An example can be found `here `__." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:196 +msgid "Another solution is to store the field with the ``store=True`` attribute. While this is usually convenient, pay attention to the potential computation load added to your model. Lets re-use our example::" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:208 +msgid "Every time the partner ``name`` is changed, the ``description`` is automatically recomputed for **all the records** referring to it! This can quickly become prohibitive to recompute when millions of records need recomputation." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:212 +msgid "It is also worth noting that a computed field can depend on another computed field. The ORM is smart enough to correctly recompute all the dependencies in the right order... but sometimes at the cost of degraded performance." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:216 +msgid "In general performance must always be kept in mind when defining computed fields. The more complex is your field to compute (e.g. with a lot of dependencies or when a computed field depends on other computed fields), the more time it will take to compute. Always take some time to evaluate the cost of a computed field beforehand. Most of the time it is only when your code reaches a production server that you realize it slows down a whole process. Not cool :-(" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:223 +msgid "Onchanges" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:225 +msgid "**Reference**: the documentation related to this topic can be found in :func:`~odoo.api.onchange`:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:230 +msgid "**Goal**: at the end of this section, enabling the garden will set a default area of 10 and an orientation to North." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:237 +msgid "In our real estate module, we also want to help the user with data entry. When the 'garden' field is set, we want to give a default value for the garden area as well as the orientation. Additionally, when the 'garden' field is unset we want the garden area to reset to zero and the orientation to be removed. In this case, the value of a given field modifies the value of other fields." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:243 +msgid "The 'onchange' mechanism provides a way for the client interface to update a form without saving anything to the database whenever the user has filled in a field value. To achieve this, we define a method where ``self`` represents the record in the form view and decorate it with :func:`~odoo.api.onchange` to specify which field it is triggered by. Any change you make on ``self`` will be reflected on the form::" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:264 +msgid "In this example, changing the partner will also change the name and the description values. It is up to the user whether or not to change the name and description values afterwards. Also note that we do not loop on ``self``, this is because the method is only triggered in a form view, where ``self`` is always a single record." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:269 +msgid "Set values for garden area and orientation." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:271 +msgid "Create an ``onchange`` in the ``estate.property`` model in order to set values for the garden area (10) and orientation (North) when garden is set to True. When unset, clear the fields." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:277 +msgid "Onchanges methods can also return a non-blocking warning message (`example `__)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:281 +msgid "How to use them?" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:283 +msgid "There is no strict rule for the use of computed fields and onchanges." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:285 +msgid "In many cases, both computed fields and onchanges may be used to achieve the same result. Always prefer computed fields since they are also triggered outside of the context of a form view. Never ever use an onchange to add business logic to your model. This is a **very bad** idea since onchanges are not automatically triggered when creating a record programmatically; they are only triggered in the form view." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:291 +msgid "The usual pitfall of computed fields and onchanges is trying to be 'too smart' by adding too much logic. This can have the opposite result of what was expected: the end user is confused from all the automation." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:295 +msgid "Computed fields tend to be easier to debug: such a field is set by a given method, so it's easy to track when the value is set. Onchanges, on the other hand, may be confusing: it is very difficult to know the extent of an onchange. Since several onchange methods may set the same fields, it easily becomes difficult to track where a value is coming from." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:300 +msgid "When using stored computed fields, pay close attention to the dependencies. When computed fields depend on other computed fields, changing a value can trigger a large number of recomputations. This leads to poor performance." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:304 +msgid "In the :ref:`next chapter`, we'll see how we can trigger some business logic when buttons are clicked." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:5 +msgid "Chapter 10: Ready For Some Action?" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:7 +msgid "So far we have mostly built our module by declaring fields and views. We just introduced business logic in the :ref:`previous chapter ` thanks to computed fields and onchanges. In any real business scenario, we would want to link some business logic to action buttons. In our real estate example, we would like to be able to:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:12 +msgid "cancel or set a property as sold" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:13 +msgid "accept or refuse an offer" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:15 +msgid "One could argue that we can already do these things by changing the state manually, but this is not really convenient. Moreover, we want to add some extra processing: when an offer is accepted we want to set the selling price and the buyer for the property." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:20 +msgid "Action Type" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:22 +msgid "**Reference**: the documentation related to this topic can be found in :ref:`reference/actions` and :ref:`reference/exceptions`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:29 +msgid "You should be able to cancel or set a property as sold:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:0 +msgid "Cancel and set to sold" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:35 +msgid "A canceled property cannot be sold and a sold property cannot be canceled. For the sake of clarity, the ``state`` field has been added on the view." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:38 +msgid "You should be able to accept or refuse an offer:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:0 +msgid "Accept or refuse an offer" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:44 +msgid "Once an offer is accepted, the selling price and the buyer should be set:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:0 +msgid "Accept an offer" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:50 +msgid "In our real estate module, we want to link business logic with some buttons. The most common way to do this is to:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:53 +msgid "Add a button in the view, for example in the ``header`` of the view:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:66 +msgid "and link this button to business logic:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:82 +msgid "By assigning ``type=\"object\"`` to our button, the Odoo framework will execute a Python method with ``name=\"action_do_something\"`` on the given model." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:85 +msgid "The first important detail to note is that our method name isn't prefixed with an underscore (``_``). This makes our method a **public** method, which can be called directly from the Odoo interface (through an RPC call). Until now, all methods we created (compute, onchange) were called internally, so we used **private** methods prefixed by an underscore. You should always define your methods as private unless they need to be called from the user interface." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:91 +msgid "Also note that we loop on ``self``. Always assume that a method can be called on multiple records; it's better for reusability." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:94 +msgid "Finally, a public method should always return something so that it can be called through XML-RPC. When in doubt, just ``return True``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:97 +msgid "There are hundreds of examples in the Odoo source code. One example is this `button in a view `__ and its `corresponding Python method `__" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:102 +msgid "Cancel and set a property as sold." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:104 +msgid "Add the buttons 'Cancel' and 'Sold' to the ``estate.property`` model. A canceled property cannot be set as sold, and a sold property cannot be canceled." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:107 +msgid "Refer to the first image of the **Goal** for the expected result." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:109 +msgid "Tip: in order to raise an error, you can use the :ref:`UserError` function. There are plenty of examples in the Odoo source code ;-)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:112 +msgid "Add the buttons 'Accept' and 'Refuse' to the ``estate.property.offer`` model." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:114 +msgid "Refer to the second image of the **Goal** for the expected result." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:116 +msgid "Tip: to use an icon as a button, have a look `at this example `__." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:119 +msgid "When an offer is accepted, set the buyer and the selling price for the corresponding property." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:121 +msgid "Refer to the third image of the **Goal** for the expected result." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:123 +msgid "Pay attention: in real life only one offer can be accepted for a given property!" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:126 +msgid "Object Type" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:128 +msgid "In :ref:`howto/rdtraining/06_firstui`, we created an action that was linked to a menu. You may be wondering if it is possible to link an action to a button. Good news, it is! One way to do it is:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:136 +msgid "We use ``type=\"action\"`` and we refer to the :term:`external identifier` in the ``name``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/10_actions.rst:138 +msgid "In the :ref:`next chapter ` we'll see how we can prevent encoding incorrect data in Odoo." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:5 +msgid "Chapter 11: Constraints" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:7 +msgid "The :ref:`previous chapter ` introduced the ability to add some business logic to our model. We can now link buttons to business code, but how can we prevent users from entering incorrect data? For example, in our real estate module nothing prevents users from setting a negative expected price." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:17 +msgid "SQL" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:19 +msgid "**Reference**: the documentation related to this topic can be found in :ref:`reference/orm/models` and in the `PostgreSQL's documentation`_." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:26 +msgid "Amounts should be (strictly) positive" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:0 +msgid "Constraints on amounts" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:32 +msgid "Property types and tags should have a unique name" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:0 +msgid "Constraints on names" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:38 +msgid "SQL constraints are defined through the model attribute :attr:`~odoo.models.Model._sql_constraints`. This attribute is assigned a list of triples containing strings ``(name, sql_definition, message)``, where ``name`` is a valid SQL constraint name, ``sql_definition`` is a table_constraint_ expression and ``message`` is the error message." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:44 +msgid "You can find a simple example `here `__." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:47 +msgid "Add SQL constraints." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:49 +msgid "Add the following constraints to their corresponding models:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:51 +msgid "A property expected price must be strictly positive" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:52 +msgid "A property selling price must be positive" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:53 +msgid "An offer price must be strictly positive" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:54 +msgid "A property tag name and property type name must be unique" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:56 +msgid "Tip: search for the ``unique`` keyword in the Odoo codebase for examples of unique names." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:58 +msgid "Restart the server with the ``-u estate`` option to see the result. Note that you might have data that prevents a SQL constraint from being set. An error message similar to the following might pop up:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:65 +msgid "For example, if some offers have a price of zero, then the constraint can't be applied. You can delete the problematic data in order to apply the new constraints." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:69 +#: ../../content/developer/reference/backend/security.rst:450 +#: ../../content/developer/reference/backend/security.rst:452 +#: ../../content/developer/reference/backend/testing.rst:716 +#: ../../content/developer/reference/frontend/qweb.rst:354 +#: ../../content/developer/reference/frontend/qweb.rst:468 +msgid "Python" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:71 +msgid "**Reference**: the documentation related to this topic can be found in :func:`~odoo.api.constrains`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:76 +msgid "**Goal**: at the end of this section, it will not possible to accept an offer lower than 90% of the expected price." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:0 +msgid "Python constraint" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:83 +msgid "SQL constraints are an efficient way of ensuring data consistency. However it may be necessary to make more complex checks which require Python code. In this case we need a Python constraint." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:86 +msgid "A Python constraint is defined as a method decorated with :func:`~odoo.api.constrains` and is invoked on a recordset. The decorator specifies which fields are involved in the constraint. The constraint is automatically evaluated when any of these fields are modified . The method is expected to raise an exception if its invariant is not satisfied::" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:103 +msgid "A simple example can be found `here `__." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:106 +msgid "Add Python constraints." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:108 +msgid "Add a constraint so that the selling price cannot be lower than 90% of the expected price." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:110 +msgid "Tip: the selling price is zero until an offer is validated. You will need to fine tune your check to take this into account." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:115 +msgid "Always use the :meth:`~odoo.tools.float_utils.float_compare` and :meth:`~odoo.tools.float_utils.float_is_zero` methods from `odoo.tools.float_utils` when working with floats!" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:119 +msgid "Ensure the constraint is triggered every time the selling price or the expected price is changed!" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:121 +msgid "SQL constraints are usually more efficient than Python constraints. When performance matters, always prefer SQL over Python constraints." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/11_constraints.rst:124 +msgid "Our real estate module is starting to look good. We added some business logic, and now we make sure the data is consistent. However, the user interface is still a bit rough. Let's see how we can improve it in the :ref:`next chapter `." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:5 +msgid "Chapter 12: Add The Sprinkles" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:7 +msgid "Our real estate module now makes sense from a business perspective. We created :ref:`specific views `, added several :ref:`action buttons ` and :ref:`constraints `. However our user interface is still a bit rough. We would like to add some colors to the list views and make some fields and buttons conditionally disappear. For example, the 'Sold' and 'Cancel' buttons should disappear when the property is sold or canceled since it is no longer allowed to change the state at this point." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:15 +msgid "This chapter covers a very small subset of what can be done in the views. Do not hesitate to read the reference documentation for a more complete overview." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:18 +msgid "**Reference**: the documentation related to this chapter can be found in :ref:`reference/views`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:22 +msgid "Inline Views" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:26 +msgid "**Goal**: at the end of this section, a specific list of properties should be added to the property type view:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:0 +msgid "Inline list view" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:33 +msgid "In the real estate module we added a list of offers for a property. We simply added the field ``offer_ids`` with:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:40 +msgid "The field uses the specific view for ``estate.property.offer``. In some cases we want to define a specific list view which is only used in the context of a form view. For example, we would like to display the list of properties linked to a property type. However, we only want to display 3 fields for clarity: name, expected price and state." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:45 +msgid "To do this, we can define *inline* list views. An inline list view is defined directly inside a form view. For example:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:81 +msgid "In the form view of the ``test.model``, we define a specific list view for ``test.model.line`` with fields ``field_1`` and ``field_2``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:84 +msgid "An example can be found `here `__." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:87 +msgid "Add an inline list view." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:89 +msgid "Add the ``One2many`` field ``property_ids`` to the ``estate.property.type`` model." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:90 +msgid "Add the field in the ``estate.property.type`` form view as depicted in the **Goal** of this section." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:94 +#: ../../content/developer/reference/frontend/javascript_reference.rst:278 +#: ../../content/developer/reference/frontend/javascript_reference.rst:2092 +msgid "Widgets" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:96 +msgid "**Reference**: the documentation related to this section can be found in :ref:`reference/js/widgets`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:101 +msgid "**Goal**: at the end of this section, the state of the property should be displayed using a specific widget:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:None +msgid "Statusbar widget" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:108 +msgid "Four states are displayed: New, Offer Received, Offer Accepted and Sold." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:110 +msgid "Whenever we've added fields to our models, we've (almost) never had to worry about how these fields would look like in the user interface. For example, a date picker is provided for a ``Date`` field and a ``One2many`` field is automatically displayed as a list. Odoo chooses the right 'widget' depending on the field type." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:115 +msgid "However, in some cases, we want a specific representation of a field which can be done thanks to the ``widget`` attribute. We already used it for the ``tag_ids`` field when we used the ``widget=\"many2many_tags\"`` attribute. If we hadn't used it, then the field would have displayed as a list." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:120 +msgid "Each field type has a set of widgets which can be used to fine tune its display. Some widgets also take extra options. An exhaustive list can be found in :ref:`reference/js/widgets`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:123 +msgid "Use the status bar widget." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:125 +msgid "Use the ``statusbar`` widget in order to display the ``state`` of the ``estate.property`` as depicted in the **Goal** of this section." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:128 +msgid "Tip: a simple example can be found `here `__." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:131 +msgid "Same field multiple times in a view" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:133 +msgid "Add a field only **once** to a list or a form view. Adding it multiple times is not supported." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:137 +msgid "List Order" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:139 +msgid "**Reference**: the documentation related to this section can be found in :ref:`reference/orm/models`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:144 +msgid "**Goal**: at the end of this section, all lists should display by default in a deterministic order. Property types can be ordered manually." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:147 +msgid "During the previous exercises, we created several list views. However, at no point did we specify which order the records had to be listed in by default. This is a very important thing for many business cases. For example, in our real estate module we would want to display the highest offers on top of the list." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:153 +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:182 +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:215 +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:262 +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:249 +#: ../../content/developer/reference/backend/orm.rst:95 +msgid "Model" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:155 +msgid "Odoo provides several ways to set a default order. The most common way is to define the ``_order`` attribute directly in the model. This way, the retrieved records will follow a deterministic order which will be consistent in all views including when records are searched programmatically. By default there is no order specified, therefore the records will be retrieved in a non-deterministic order depending on PostgreSQL." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:161 +msgid "The ``_order`` attribute takes a string containing a list of fields which will be used for sorting. It will be converted to an order_by_ clause in SQL. For example:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:175 +msgid "Our records are ordered by descending ``id``, meaning the highest comes first." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:177 +msgid "Add model ordering." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:179 +msgid "Define the following orders in their corresponding models:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:182 +msgid "Order" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:184 +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:305 +msgid "``estate.property``" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:184 +msgid "Descending ID" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:185 +msgid "``estate.property.offer``" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:185 +msgid "Descending Price" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:186 +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:264 +msgid "``estate.property.tag``" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:186 +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:187 +#: ../../content/developer/reference/frontend/framework_overview.rst:261 +#: ../../content/developer/reference/frontend/hooks.rst:21 +#: ../../content/developer/reference/frontend/odoo_editor.rst:146 +#: ../../content/developer/reference/frontend/odoo_editor.rst:172 +#: ../../content/developer/reference/frontend/odoo_editor.rst:216 +#: ../../content/developer/reference/frontend/owl_components.rst:236 +#: ../../content/developer/reference/frontend/owl_components.rst:315 +#: ../../content/developer/reference/frontend/owl_components.rst:630 +#: ../../content/developer/reference/frontend/services.rst:245 +#: ../../content/developer/reference/frontend/services.rst:437 +#: ../../content/developer/reference/frontend/services.rst:465 +#: ../../content/developer/reference/frontend/services.rst:736 +#: ../../content/developer/reference/frontend/services.rst:851 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountAccountTemplate.name:1 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.name:1 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountGroupTemplate.name:1 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReport.name:1 +#: ../../../odoo/addons/account/models/account_report.py:docstring of odoo.addons.account.models.account_report.AccountReportLine.name:1 +msgid "Name" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:187 +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:217 +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:307 +msgid "``estate.property.type``" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:191 +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:319 +msgid "View" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:193 +msgid "Ordering is possible at the model level. This has the advantage of a consistent order everywhere a list of records is retrieved. However, it is also possible to define a specific order directly in a view thanks to the ``default_order`` attribute (`example `__)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:199 +msgid "Manual" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:201 +msgid "Both model and view ordering allow flexibility when sorting records, but there is still one case we need to cover: the manual ordering. A user may want to sort records depending on the business logic. For example, in our real estate module we would like to sort the property types manually. It is indeed useful to have the most used types appear at the top of the list. If our real estate agency mainly sells houses, it is more convenient to have 'House' appear before 'Apartment'." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:207 +msgid "To do so, a ``sequence`` field is used in combination with the ``handle`` widget. Obviously the ``sequence`` field must be the first field in the ``_order`` attribute." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:210 +msgid "Add manual ordering." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:212 +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:259 +msgid "Add the following field:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:217 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountFiscalPositionTemplate.sequence:1 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.sequence:1 +msgid "Sequence" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:220 +msgid "Add the sequence to the ``estate.property.type`` list view with the correct widget." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:222 +msgid "Tip: you can find an example here: `model `__ and `view `__." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:228 +msgid "Attributes and options" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:230 +msgid "It would be prohibitive to detail all the available features which allow fine tuning of the look of a view. Therefore, we'll stick to the most common ones." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:238 +msgid "**Goal**: at the end of this section, the property form view will have:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:240 +msgid "Conditional display of buttons and fields" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:241 +msgid "Tag colors" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:0 +msgid "Form view with sprinkles" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:248 +msgid "In our real estate module, we want to modify the behavior of some fields. For example, we don't want to be able to create or edit a property type from the form view. Instead we expect the types to be handled in their appropriate menu. We also want to give tags a color. In order to add these behavior customizations, we can add the ``options`` attribute to several field widgets." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:253 +msgid "Add widget options." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:255 +msgid "Add the appropriate option to the ``property_type_id`` field to prevent the creation and the editing of a property type from the property form view. Have a look at the :ref:`Many2one widget documentation ` for more info." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:264 +msgid "Color" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:267 +msgid "Then add the appropriate option to the ``tag_ids`` field to add a color picker on the tags. Have a look at the :ref:`FieldMany2ManyTags widget documentation ` for more info." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:271 +msgid "In :ref:`howto/rdtraining/06_firstui`, we saw that reserved fields were used for specific behaviors. For example, the ``active`` field is used to automatically filter out inactive records. We added the ``state`` as a reserved field as well. It's now time to use it! A ``state`` field is used in combination with a ``states`` attribute in the view to display buttons conditionally." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:277 +msgid "Add conditional display of buttons." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:279 +msgid "Use the ``states`` attribute to display the header buttons conditionally as depicted in this section's **Goal** (notice how the 'Sold' and 'Cancel' buttons change when the state is modified)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:282 +msgid "Tip: do not hesitate to search for ``states=`` in the Odoo XML files for some examples." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:284 +msgid "More generally, it is possible to make a field ``invisible``, ``readonly`` or ``required`` based on the value of other fields thanks to the ``attrs`` attribute. Note that ``invisible`` can also be applied to other elements of the view such as ``button`` or ``group``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:288 +msgid "The ``attrs`` is a dictionary with the property as a key and a domain as a value. The domain gives the condition in which the property applies. For example:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:298 +msgid "This means that the ``description`` field is invisible when ``is_partner`` is ``False``. It is important to note that a field used in an ``attrs`` **must** be present in the view. If it should not be displayed to the user, we can use the ``invisible`` attribute to hide it." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:302 +msgid "Use ``attrs``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:304 +msgid "Make the garden area and orientation invisible in the ``estate.property`` form view when there is no garden." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:306 +msgid "Make the 'Accept' and 'Refuse' buttons invisible once the offer state is set." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:307 +msgid "Do not allow adding an offer when the property state is 'Offer Accepted', 'Sold' or 'Canceled'. To do this use the ``readonly`` ``attrs``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:312 +msgid "Using a (conditional) ``readonly`` attribute in the view can be useful to prevent data entry errors, but keep in mind that it doesn't provide any level of security! There is no check done server-side, therefore it's always possible to write on the field through a RPC call." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:321 +msgid "**Goal**: at the end of this section, the property and offer list views should have color decorations. Additionally, offers and tags will be editable directly in the list, and the availability date will be hidden by default." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:0 +msgid "List view with decorations and optional field" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:0 +msgid "Editable list" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:333 +msgid "When the model only has a few fields, it can be useful to edit records directly through the list view and not have to open the form view. In the real estate example, there is no need to open a form view to add an offer or create a new tag. This can be achieved thanks to the ``editable`` attribute." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:337 +msgid "Make list views editable." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:339 +msgid "Make the ``estate.property.offer`` and ``estate.property.tag`` list views editable." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:341 +msgid "On the other hand, when a model has a lot of fields it can be tempting to add too many fields in the list view and make it unclear. An alternative method is to add the fields, but make them optionally hidden. This can be achieved thanks to the ``optional`` attribute." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:345 +msgid "Make a field optional." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:347 +msgid "Make the field ``date_availability`` on the ``estate.property`` list view optional and hidden by default." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:350 +msgid "Finally, color codes are useful to visually emphasize records. For example, in the real estate module we would like to display refused offers in red and accepted offers in green. This can be achieved thanks to the ``decoration-{$name}`` attribute (see :ref:`reference/js/widgets` for a complete list):" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:362 +msgid "The records where ``is_partner`` is ``True`` will be displayed in green." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:364 +msgid "Add some decorations." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:366 +msgid "On the ``estate.property`` list view:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:368 +msgid "Properties with an offer received are green" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:369 +msgid "Properties with an offer accepted are green and bold" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:370 +msgid "Properties sold are muted" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:372 +msgid "On the ``estate.property.offer`` list view:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:374 +msgid "Refused offers are red" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:375 +msgid "Accepted offers are green" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:376 +msgid "The state should not be visible anymore" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:380 +msgid "Keep in mind that **all** fields used in attributes must be in the view!" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:381 +msgid "If you want to test the color of the \"Offer Received\" and \"Offer Accepted\" states, add the field in the form view and change it manually (we'll implement the business logic for this later)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:387 +msgid "**Reference**: the documentation related to this section can be found in :ref:`reference/views/search` and :ref:`reference/views/search/defaults`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:392 +msgid "**Goal**: at the end of this section, the available properties will be filtered by default, and searching on the living area returns results where the area is larger than the given number." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:0 +msgid "Default filters and domains" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:400 +msgid "Last but not least, there are some tweaks we would like to apply when searching. First of all, we want to have our 'Available' filter applied by default when we access the properties. To make this happen, we need to use the ``search_default_{$name}`` action context, where ``{$name}`` is the filter name. This means that we can define which filter(s) will be activated by default at the action level." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:405 +msgid "Here is an example of an `action `__ with its `corresponding filter `__." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:410 +msgid "Add a default filter." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:412 +msgid "Make the 'Available' filter selected by default in the ``estate.property`` action." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:414 +msgid "Another useful improvement in our module would be the ability to search efficiently by living area. In practice, a user will want to search for properties of 'at least' the given area. It is unrealistic to expect users would want to find a property of an exact living area. It is always possible to make a custom search, but that's inconvenient." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:419 +msgid "Search view ```` elements can have a ``filter_domain`` that overrides the domain generated for searching on the given field. In the given domain, ``self`` represents the value entered by the user. In the example below, it is used to search on both ``name`` and ``description`` fields." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:431 +msgid "Change the living area search." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:433 +msgid "Add a ``filter_domain`` to the living area to include properties with an area equal to or greater than the given value." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:437 +msgid "Stat Buttons" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:441 +msgid "**Goal**: at the end of this section, there will be a stat button on the property type form view which shows the list of all offers related to properties of the given type when it is clicked on." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:0 +msgid "Stat button" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:448 +msgid "If you've already used some functional modules in Odoo, you've probably already encountered a 'stat button'. These buttons are displayed on the top right of a form view and give a quick access to linked documents. In our real estate module, we would like to have a quick link to the offers related to a given property type as depicted in the **Goal** of this section." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:453 +msgid "At this point of the tutorial we have already seen most of the concepts to do this. However, there is not a single solution and it can still be confusing if you don't know where to start from. We'll describe a step-by-step solution in the exercise. It can always be useful to find some examples in the Odoo codebase by looking for ``oe_stat_button``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:458 +msgid "The following exercise might be a bit more difficult than the previous ones since it assumes you are able to search for examples in the source code on your own. If you are stuck there is probably someone nearby who can help you ;-)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:462 +msgid "The exercise introduces the concept of :ref:`reference/fields/related`. The easiest way to understand it is to consider it as a specific case of a computed field. The following definition of the ``description`` field:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:473 +msgid "is equivalent to:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:487 +msgid "Every time the partner name is changed, the description is modified." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:489 +msgid "Add a stat button to property type." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:491 +msgid "Add the field ``property_type_id`` to ``estate.property.offer``. We can define it as a related field on ``property_id.property_type_id`` and set it as stored." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:494 +msgid "Thanks to this field, an offer will be linked to a property type when it's created. You can add the field to the list view of offers to make sure it works." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:497 +msgid "Add the field ``offer_ids`` to ``estate.property.type`` which is the One2many inverse of the field defined in the previous step." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:500 +msgid "Add the field ``offer_count`` to ``estate.property.type``. It is a computed field that counts the number of offers for a given property type (use ``offer_ids`` to do so)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:503 +msgid "At this point, you have all the information necessary to know how many offers are linked to a property type. When in doubt, add ``offer_ids`` and ``offer_count`` directly to the view. The next step is to display the list when clicking on the stat button." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:507 +msgid "Create a stat button on ``estate.property.type`` pointing to the ``estate.property.offer`` action. This means you should use the ``type=\"action\"`` attribute (go back to the end of :ref:`howto/rdtraining/10_actions` if you need a refresher)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:511 +msgid "At this point, clicking on the stat button should display all offers. We still need to filter out the offers." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:514 +msgid "On the ``estate.property.offer`` action, add a domain that defines ``property_type_id`` as equal to the ``active_id`` (= the current record, `here is an example `__)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:518 +msgid "Looking good? If not, don't worry, the :ref:`next chapter ` doesn't require stat buttons ;-)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:5 +msgid "Chapter 13: Inheritance" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:7 +msgid "A powerful aspect of Odoo is its modularity. A module is dedicated to a business need, but modules can also interact with one another. This is useful for extending the functionality of an existing module. For example, in our real estate scenario we want to display the list of a salesperson's properties directly in the regular user view." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:12 +msgid "But before going through the specific Odoo module inheritance, let's see how we can alter the behavior of the standard CRUD (Create, Retrieve, Update or Delete) methods." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:16 +msgid "Python Inheritance" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:22 +msgid "It should not be possible to delete a property which is not new or canceled." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:0 +#: ../../content/developer/reference/backend/orm.rst:972 +msgid "Unlink" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:28 +msgid "When an offer is created, the property state should change to 'Offer Received'" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:29 +msgid "It should not be possible to create an offer with a lower price than an existing offer" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:0 +msgid "Create" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:35 +msgid "In our real estate module, we never had to develop anything specific to be able to do the standard CRUD actions. The Odoo framework provides the necessary tools to do them. In fact, such actions are already included in our model thanks to classical Python inheritance::" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:48 +msgid "Our ``class TestModel`` inherits from :class:`~odoo.models.Model` which provides :meth:`~odoo.models.Model.create`, :meth:`~odoo.models.Model.read`, :meth:`~odoo.models.Model.write` and :meth:`~odoo.models.Model.unlink`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:52 +msgid "These methods (and any other method defined on :class:`~odoo.models.Model`) can be extended to add specific business logic::" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:70 +msgid "The decorator :func:`~odoo.api.model` is necessary for the :meth:`~odoo.models.Model.create` method because the content of the recordset ``self`` is not relevant in the context of creation, but it is not necessary for the other CRUD methods." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:74 +msgid "It is also important to note that even though we can directly override the :meth:`~odoo.models.Model.unlink` method, you will almost always want to write a new method with the decorator :func:`~odoo.api.ondelete` instead. Methods marked with this decorator will be called during :meth:`~odoo.models.Model.unlink` and avoids some issues that can occur during uninstalling the model's module when :meth:`~odoo.models.Model.unlink` is directly overridden." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:80 +msgid "In Python 3, ``super()`` is equivalent to ``super(TestModel, self)``. The latter may be necessary when you need to call the parent method with a modified recordset." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:85 +msgid "It is very important to **always** call ``super()`` to avoid breaking the flow. There are only a few very specific cases where you don't want to call it." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:87 +msgid "Make sure to **always** return data consistent with the parent method. For example, if the parent method returns a ``dict()``, your override must also return a ``dict()``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:90 +msgid "Add business logic to the CRUD methods." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:92 +msgid "Prevent deletion of a property if its state is not 'New' or 'Canceled'" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:94 +msgid "Tip: create a new method with the :func:`~odoo.api.ondelete` decorator and remember that ``self`` can be a recordset with more than one record." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:97 +msgid "At offer creation, set the property state to 'Offer Received'. Also raise an error if the user tries to create an offer with a lower amount than an existing offer." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:100 +msgid "Tip: the ``property_id`` field is available in the ``vals``, but it is an ``int``. To instantiate an ``estate.property`` object, use ``self.env[model_name].browse(value)`` (`example `__)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:105 +msgid "Model Inheritance" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:107 +msgid "**Reference**: the documentation related to this topic can be found in :ref:`reference/orm/inheritance`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:110 +msgid "In our real estate module, we would like to display the list of properties linked to a salesperson directly in the Settings / Users & Companies / Users form view. To do this, we need to add a field to the ``res.users`` model and adapt its view to show it." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:116 +msgid "The first inheritance mechanism allows modules to modify the behavior of a model defined in an another module by:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:119 +msgid "adding fields to the model," +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:120 +msgid "overriding the definition of fields in the model," +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:121 +msgid "adding constraints to the model," +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:122 +msgid "adding methods to the model," +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:123 +msgid "overriding existing methods in the model." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:125 +msgid "The second inheritance mechanism (delegation) allows every record of a model to be linked to a parent model's record and provides transparent access to the fields of this parent record." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:None +msgid "Inheritance Methods" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:133 +msgid "In Odoo, the first mechanism is by far the most used. In our case, we want to add a field to an existing model, which means we will use the first mechanism. For example::" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:143 +msgid "A practical example where two fields are added to a model can be found `here `__." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:147 +msgid "By convention, each inherited model is defined in its own Python file. In our example, it would be ``models/inherited_model.py``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:150 +msgid "Add a field to Users." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:152 +msgid "Add the following field to ``res.users``:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:157 +msgid "property_ids" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:157 +msgid "One2many inverse of ``user_id`` to ``estate.property``" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:160 +msgid "Add a domain to the field so it only lists the available properties." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:162 +msgid "In the next section let's add the field to the view and check that everything is working well!" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:165 +msgid "View Inheritance" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:167 +msgid "**Reference**: the documentation related to this topic can be found in :ref:`reference/views/inheritance`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:172 +msgid "**Goal**: at the end of this section, the list of available properties linked to a salesperson should be displayed in their user form view" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:0 +msgid "Users" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:179 +msgid "Instead of modifying existing views in place (by overwriting them), Odoo provides view inheritance where children 'extension' views are applied on top of root views. These extension can both add and remove content from their parent view." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:183 +msgid "An extension view references its parent using the ``inherit_id`` field. Instead of a single view, its ``arch`` field contains a number of ``xpath`` elements that select and alter the content of their parent view:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:209 +msgid "appends ``xpath``'s body to the end of the matched element" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:218 +msgid "alters the attributes of the matched element using the special ``attribute`` elements in the ``xpath``'s body" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:221 +msgid "When matching a single element, the ``position`` attribute can be set directly on the element to be found. Both inheritances below have the same result." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:234 +msgid "An example of a view inheritance extension can be found `here `__." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:237 +msgid "Add fields to the Users view." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:239 +msgid "Add the ``property_ids`` field to the ``base.view_users_form`` in a new notebook page." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:241 +msgid "Tip: an example an inheritance of the users' view can be found `here `__." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:244 +msgid "Inheritance is extensively used in Odoo due to its modular concept. Do not hesitate to read the corresponding documentation for more info!" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:247 +msgid "In the :ref:`next chapter `, we will learn how to interact with other modules." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:5 +msgid "Chapter 14: Interact With Other Modules" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:7 +msgid "In the :ref:`previous chapter `, we used inheritance to modify the behavior of a module. In our real estate scenario, we would like to go a step further and be able to generate invoices for our customers. Odoo provides an Invoicing module, so it would be neat to create an invoice directly from our real estate module, i.e. once a property is set to 'Sold', an invoice is created in the Invoicing application." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:14 +msgid "Concrete Example: Account Move" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:20 +msgid "A new module ``estate_account`` should be created" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:21 +msgid "When a property is sold, an invoice should be issued for the buyer" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:0 +msgid "Invoice creation" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:27 +msgid "Any time we interact with another module, we need to keep in mind the modularity. If we intend to sell our application to real estate agencies, some may want the invoicing feature but others may not want it." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:32 +msgid "Link Module" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:34 +msgid "The common approach for such use cases is to create a 'link' module. In our case, the module would depend on ``estate`` and ``account`` and would include the invoice creation logic of the estate property. This way the real estate and the accounting modules can be installed independently. When both are installed, the link module provides the new feature." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:39 +msgid "Create a link module." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:41 +msgid "Create the ``estate_account`` module, which depends on the ``estate`` and ``account`` modules. For now, it will be an empty shell." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:44 +msgid "Tip: you already did this at the :ref:`beginning of the tutorial `. The process is very similar." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:47 +msgid "When the ``estate_account`` module appears in the list, go ahead and install it! You'll notice that the Invoicing application is installed as well. This is expected since your module depends on it. If you uninstall the Invoicing application, your module will be uninstalled as well." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:54 +msgid "Invoice Creation" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:56 +msgid "It's now time to generate the invoice. We want to add functionality to the ``estate.property`` model, i.e. we want to add some extra logic for when a property is sold. Does that sound familiar? If not, it's a good idea to go back to the :ref:`previous chapter ` since you might have missed something ;-)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:61 +msgid "As a first step, we need to extend the action called when pressing the :ref:`'Sold' button ` on a property. To do so, we need to create a :ref:`model inheritance ` in the ``estate_account`` module for the ``estate.property`` model. For now, the overridden action will simply return the ``super`` call. Maybe an example will make things clearer::" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:75 +msgid "A practical example can be found `here `__." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:78 +msgid "Add the first step of invoice creation." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:80 +msgid "Create a ``estate_property.py`` file in the correct folder of the ``estate_account`` module." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:81 +msgid "``_inherit`` the ``estate.property`` model." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:82 +msgid "Override the ``action_sold`` method (you might have named it differently) to return the ``super`` call." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:85 +msgid "Tip: to make sure it works, add a ``print`` or a debugger breakpoint in the overridden method." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:87 +msgid "Is it working? If not, maybe check that all Python files are correctly imported." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:89 +msgid "If the override is working, we can move forward and create the invoice. Unfortunately, there is no easy way to know how to create any given object in Odoo. Most of the time, it is necessary to have a look at its model to find the required fields and provide appropriate values." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:93 +msgid "A good way to learn is to look at how other modules already do what you want to do. For example, one of the basic flows of Sales is the creation of an invoice from a sales order. This looks like a good starting point since it does exactly what we want to do. Take some time to read and understand the `_create_invoices `__ method. When you are done crying because this simple task looks awfully complex, we can move forward in the tutorial." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:100 +msgid "To create an invoice, we need the following information:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:102 +msgid "a ``partner_id``: the customer" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:103 +msgid "a ``move_type``: it has several `possible values `__" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:104 +msgid "a ``journal_id``: the accounting journal" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:106 +msgid "This is enough to create an empty invoice." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:108 +msgid "Add the second step of invoice creation." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:110 +msgid "Create an empty ``account.move`` in the override of the ``action_sold`` method:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:112 +msgid "the ``partner_id`` is taken from the current ``estate.property``" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:113 +msgid "the ``move_type`` should correspond to a 'Customer Invoice'" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:114 +msgid "the ``journal_id`` must be a ``sale`` journal (when in doubt, have a look `here `__)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:119 +msgid "to create an object, use ``self.env[model_name].create(values)``, where ``values`` is a ``dict``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:121 +msgid "the ``create`` method doesn't accept recordsets as field values." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:123 +msgid "When a property is set to 'Sold', you should now have a new customer invoice created in Invoicing / Customers / Invoices." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:126 +msgid "Obviously we don't have any invoice lines so far. To create an invoice line, we need the following information:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:129 +msgid "``name``: a description of the line" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:130 +msgid "``quantity``" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:131 +msgid "``price_unit``" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:133 +msgid "Moreover, an invoice line needs to be linked to an invoice. The easiest and most efficient way to link a line to an invoice is to include all lines at invoice creation. To do this, the ``invoice_line_ids`` field is included in the ``account.move`` creation, which is a :class:`~odoo.fields.One2many`. One2many and Many2many use special 'commands' which have been made human readable with the :class:`~odoo.fields.Command` namespace. This namespace represents a triplet command to execute on a set of records. The triplet was originally the only option to do these commands, but it is now standard to use the namespace instead. The format is to place them in a list which is executed sequentially. Here is a simple example to include a One2many field ``line_ids`` at creation of a ``test.model``::" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:159 +msgid "Add the third step of invoice creation." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:161 +msgid "Add two invoice lines during the creation of the ``account.move``. Each property sold will be invoiced following these conditions:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:164 +msgid "6% of the selling price" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:165 +msgid "an additional 100.00 from administrative fees" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:167 +msgid "Tip: Add the ``invoice_line_ids`` at creation following the example above. For each line, we need a ``name``, ``quantity`` and ``price_unit``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/14_other_module.rst:170 +msgid "This chapter might be one of the most difficult that has been covered so far, but it is the closest to what Odoo development will be in practice. In the :ref:`next chapter `, we will introduce the templating mechanism used in Odoo." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:5 +msgid "Chapter 15: A Brief History Of QWeb" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:7 +msgid "So far the interface design of our real estate module has been rather limited. Building a list view is straightforward since only the list of fields is necessary. The same holds true for the form view: despite the use of a few tags such as ```` or ````, there is very little to do in terms of design." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:12 +msgid "However, if we want to give a unique look to our application, it is necessary to go a step further and be able to design new views. Moreover, other features such as PDF reports or website pages need another tool to be created with more flexibility: a templating_ engine." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:16 +msgid "You might already be familiar with existing engines such as Jinja (Python), ERB (Ruby) or Twig (PHP). Odoo comes with its own built-in engine: :ref:`reference/qweb`. QWeb is the primary templating engine used by Odoo. It is an XML templating engine and used mostly to generate HTML fragments and pages." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:21 +msgid "You probably already have come across the `kanban board`_ in Odoo where the records are displayed in a card-like structure. We will build such a view for our real estate module." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:25 +msgid "Concrete Example: A Kanban View" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:27 +msgid "**Reference**: the documentation related to this topic can be found in :ref:`reference/views/kanban`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:32 +msgid "**Goal**: at the end of this section a Kanban view of the properties should be created:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:38 +msgid "In our estate application, we would like to add a Kanban view to display our properties. Kanban views are a standard Odoo view (like the form and list views), but their structure is much more flexible. In fact, the structure of each card is a mix of form elements (including basic HTML) and QWeb. The definition of a Kanban view is similar to the definition of the list and form views, except that their root element is ````. In its simplest form, a Kanban view looks like:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:57 +msgid "Let's break down this example:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:59 +msgid "````: defines a list of :ref:`reference/qweb` templates. Kanban views *must* define at least one root template ``kanban-box``, which will be rendered once for each record." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:61 +msgid "````: ```` is a placeholder element for QWeb directives. In this case, it is used to set the ``name`` of the template to ``kanban-box``" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:63 +msgid "``
``: the ``oe_kanban_global_click`` makes the ``
`` clickable to open the record." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:65 +msgid "````: this will add the ``name`` field to the view." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:67 +msgid "Make a minimal kanban view." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:69 +msgid "Using the simple example provided, create a minimal Kanban view for the properties. The only field to display is the ``name``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:72 +msgid "Tip: you must add ``kanban`` in the ``view_mode`` of the corresponding ``ir.actions.act_window``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:75 +msgid "Once the Kanban view is working, we can start improving it. If we want to display an element conditionally, we can use the ``t-if`` directive (see :ref:`reference/qweb/conditionals`)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:94 +msgid "We added a few things:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:96 +msgid "``t-if``: the ``
`` element is rendered if the condition is true." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:97 +msgid "``record``: an object with all the requested fields as its attributes. Each field has two attributes ``value`` and ``raw_value``. The former is formatted according to current user parameters and the latter is the direct value from a :meth:`~odoo.models.Model.read`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:101 +msgid "In the above example, the field ``name`` was added in the ```` element, but ``state`` is outside of it. When we need the value of a field but don't want to display it in the view, it is possible to add it outside of the ```` element." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:105 +msgid "Improve the Kanban view." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:107 +msgid "Add the following fields to the Kanban view: expected price, best price, selling price and tags. Pay attention: the best price is only displayed when an offer is received, while the selling price is only displayed when an offer is accepted." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:111 +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:121 +msgid "Refer to the **Goal** of the section for a visual example." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:113 +msgid "Let's give the final touch to our view: the properties must be grouped by type by default. You might want to have a look at the various options described in :ref:`reference/views/kanban`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:116 +msgid "Add default grouping." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:118 +msgid "Use the appropriate attribute to group the properties by type by default. You must also prevent drag and drop." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:123 +msgid "Kanban views are a typical example of how it is always a good idea to start from an existing view and fine tune it instead of starting from scratch. There are many options and classes available, so... read and learn!" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/15_qwebintro.rst:127 +msgid "It is now time to add the :ref:`final touches to our application and submit it on GitHub `!" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:5 +msgid "Chapter 16: Polish Your Code And Submit Your PR" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:7 +msgid "In the previous chapters we saw how to create a fully functional business application. Now we will prepare our code to be shared and learn how to share it." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:11 +msgid "Coding guidelines" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:13 +msgid "We will start refactoring the code to match to the Odoo coding guidelines. The guidelines aim to improve the quality of the Odoo Apps code." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:17 +msgid "**Reference**: you will find the Odoo coding guidelines in :doc:`/contributing/development/coding_guidelines`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:20 +msgid "Polish your code." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:22 +msgid "Refactor your code to respect the coding guidelines. Don't forget to run your linter and respect the module structure, the variable names, the method name convention, the model attribute order and the xml ids." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:27 +msgid "Your first Pull Request (PR)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:29 +msgid "**The following is intended to be used by Odoo staff members only. All repositories mentioned are not accessible for third-parties.**" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:32 +msgid "Now that your code respects the Odoo code guidelines and is polished up, let's share it with others." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:35 +msgid "Configure development repository" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:37 +msgid "We will start by creating a git development environment for the 'custom' folder, like we did in the beginning for 'odoo' and 'enterprise'. The PR will target the `odoo/technical-training-sandbox` repository." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:40 +msgid "To do this the first step is to `fork `__ in GitHub `this repository `__ to create your own development repository." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:45 +msgid "After you successfully created your development repository, we will configure your existing `$HOME/src/custom` folder to be able to commit your work." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:60 +msgid "Note that if your work is already in a :ref:`Git and GitHub configured folder ` the previous steps are not needed. This is the case when you start working in the 'odoo' or 'enterprise' folders." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:65 +msgid "Branch, Commit & Push" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:67 +msgid "Before creating the PR, a new working branch has to be created and used to commit the code. Afterwards the branch will be pushed to the development repository." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:70 +msgid "Create your working branch:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:76 +msgid "Your branch name must follow the following name structure : --" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:78 +msgid "Example: The branch master-sale-fixes-abc on odoo-dev/odoo is a branch containing fixes for the sales app in the odoo/odoo repository, to be deployed in master and done by ABC." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:81 +msgid "Commit your code:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:90 +msgid "**Everyone reads your commit messages!**" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:92 +msgid "The commit message is very important, follow the :ref:`Git guidelines `." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:96 +msgid "Push your new branch to your development repository:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:102 +msgid "NEVER use `git push --force` (or `git push -f`) with a branch that does not belong to you or in a stable branch. Never, never, never!" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:105 +msgid "Remember that you can use `git status` at any point to check the current status of your branch" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:106 +msgid "You can create git aliases to shorten some of these commands. Ask your colleagues if they use git aliases and get inspired by their work." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:110 +msgid "Create your first PR" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:112 +msgid "After pushing your branch to your development repository you will see an output similar to:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:130 +msgid "There are two ways to create the PR:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:132 +msgid "Click on the link displayed in the output of the push command." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:133 +msgid "Open a browser in your development repository `https://github.com/xyz-odoo/technical-training-sandbox`. There will be a button to create a new pull request." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:138 +msgid "You will notice that your commit message is used as the pull request message. This occurs if you have only 1 commit. If you have multiple commits, you can either make a summary of the commits as the PR message or if there aren't that many commits you can just copy/paste your commit messages as the PR message." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:145 +msgid "Test on the runbot" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:147 +msgid "Odoo has its own :abbr:`CI (Continuous integration)` server named `runbot `__. All commits, branches and PR will be tested to avoid regressions or breaking of the stable versions. All the runs that pass the tests are deployed on their own server with demo data." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:151 +msgid "Play with the runbot." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:153 +msgid "Feel free to go to the runbot website and open the last stable version of Odoo to check out all the available applications and functionalities." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/A_i18n.rst:7 +msgid "Advanced A: Internationalization" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/A_i18n.rst:9 +#: ../../content/developer/howtos/rdtraining/F_jstour.rst:9 +#: ../../content/developer/howtos/rdtraining/G_website.rst:9 +#: ../../content/developer/howtos/rdtraining/H_adv_views.rst:9 +#: ../../content/developer/howtos/rdtraining/I_jswidget.rst:9 +#: ../../content/developer/howtos/rdtraining/L_cron.rst:9 +#: ../../content/developer/howtos/rdtraining/M_migration.rst:9 +#: ../../content/developer/howtos/rdtraining/O_perf.rst:9 +msgid "Hopefully, this topic will be written soon :-)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:5 +msgid "Advanced B: ACL and Record Rules" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:7 +msgid "ACL stands for \"Access Control List\"" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:11 +msgid "This tutorial assumes you have completed the :ref:`Core Training `." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:14 +#: ../../content/developer/howtos/rdtraining/J_reports.rst:12 +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:12 +msgid "To follow the exercise, it is recommended that you fetch the branch 15.0-core from the `technical training solutions `__ repository. It contains a version of the module created during the core training we can use as a starting point." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:20 +msgid "So far we have mostly concerned ourselves with implementing useful features. However in most business scenarios *security* quickly becomes a concern: currently," +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:24 +msgid "Any employee (which is what ``group_user`` stands for) can create, read, update or delete properties, property types, or property tags." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:26 +msgid "If ``estate_account`` is installed then only agents allowed to interact with invoicing can confirm sales as that's necessary to :ref:`create an invoice `." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:30 +msgid "However:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:32 +msgid "We do not want third parties to be able to access properties directly." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:33 +msgid "Not all our employees may be real-estate agents (e.g. administrative personnel, property managers, ...), we don't want non-agents to see the available properties." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:36 +msgid "Real-estate agents don't need or get to decide what property types or tags are *available*." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:38 +msgid "Real-estate agents can have *exclusive* properties, we do not want one agent to be able to manage another's exclusives." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:40 +msgid "All real-estate agents should be able to confirm the sale of a property they can manage, but we do not want them to be able to validate or mark as paid any invoice in the system." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:46 +msgid "We may actually be fine with some or most of these for a small business." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:48 +msgid "Because it's easier for users to disable unnecessary security rules than it is to create them from nothing, it's better to err on the side of caution and limit access: users can relax that access if necessary or convenient." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:53 +msgid "Groups" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:57 +msgid "The documentation related to this topic can be found in :ref:`the security reference `." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:60 +msgid ":doc:`/contributing/development/coding_guidelines` document the format and location of master data items." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:63 +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:145 +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:210 +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:279 +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:323 +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:400 +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:471 +msgid "**Goal**" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:65 +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:147 +msgid "At the end of this section," +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:67 +msgid "We can make employees *real-estate agents* or *real-estate managers*." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:68 +msgid "The ``admin`` user is a real-estate manager." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:69 +msgid "We have a new *real-estate agent* employee with no access to invoicing or administration." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:72 +msgid "It would not be practical to attach individual security rules to employees any time we need a change so *groups* link security rules and users. They correspond to roles that can be assigned to employees." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:76 +msgid "For most Odoo applications [#app]_ a good baseline is to have *user* and *manager* (or administrator) roles: the manager can change the configuration of the application and oversee the entirety of its use while the user can well, use the application [#appuser]_." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:81 +msgid "This baseline seems sufficient for us:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:83 +msgid "Real estate managers can configure the system (manage available types and tags) as well as oversee every property in the pipeline." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:85 +msgid "Real estate agents can manage the properties under their care, or properties which are not specifically under the care of any agent." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:88 +msgid "In keeping with Odoo's data-driven nature, a group is no more than a record of the ``res.groups`` model. They are normally part of a module's :ref:`master data `, defined in one of the module's data files." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:92 +msgid "As simple example `can be found here `_." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:96 +msgid "Create the ``security.xml`` file in the appropriate folder and add it to the ``__manifest__.py`` file." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:98 +msgid "If not already, add a ``'category'`` field to your ``__manifest__.py`` with value ``Real Estate/Brokerage``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:100 +msgid "Add a record creating a group with the id ``estate_group_user``, the name \"Agent\" and the category ``base.module_category_real_estate_brokerage``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:103 +msgid "Below that, add a record creating a group with the id ``estate_group_manager``, the name \"Manager\" and the category ``base.module_category_real_estate_brokerage``. The ``estate_group_manager`` group needs to imply ``estate_group_user``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:109 +msgid "Where does that **category** comes from ? It's a *module category*. Here we used the category id ``base.module_category_real_estate_brokerage`` which was automatically generated by Odoo based on the `category` set in the ``__manifest__.py`` of the module. You can also find here the list of `default module categories `_ provided by Odoo." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:118 +msgid "Since we modified data files, remember to restart Odoo and update the module using ``-u estate``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:121 +msgid "If you go to :menuselection:`Settings --> Manage Users` and open the ``admin`` user (\"Mitchell Admin\"), you should see a new section:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:126 +msgid "Set the admin user to be a *Real Estate manager*." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:130 +msgid "Via the web interface, create a new user with only the \"real estate agent\" access. The user should not have any Invoicing or Administration access." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:133 +msgid "Use a private tab or window to log in with the new user (remember to set a password), as the real-estate agent you should only see the real estate application, and possibly the Discuss (chat) application:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:142 +msgid "The documentation related to this topic can be found at :ref:`reference/security/acl`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:149 +msgid "Employees who are not at least real-estate agents will not see the real-estate application." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:151 +msgid "Real-estate agents will not be able to update the property types or tags." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:153 +msgid "Access rights were first introduced in :ref:`howto/rdtraining/05_securityintro`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:155 +msgid "Access rights are a way to give users access to models *via* groups: associate an access right to a group, then all users with that group will have the access." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:158 +msgid "For instance we don't want real-estate agents to be able to modify what property types are available, so we would not link that access to the \"user\" group." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:161 +msgid "Access rights can only give access, they can't remove it: when access is checked, the system looks to see if *any* access right associated with the user (via any group) grants that access." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:166 +msgid "group" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:166 +msgid "create" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:166 +msgid "read" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:166 +msgid "update" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:166 +msgid "delete" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:168 +msgid "A" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:168 +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:168 +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:169 +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:170 +msgid "X" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:169 +msgid "B" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:170 +msgid "C" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:173 +msgid "A user with the groups A and C will be able to do anything but delete the object while one with B and C will be able to read and update it, but not create or delete it." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:178 +msgid "The group of an access right can be omitted, this means the ACL applies to *every user*, this is a useful but risky fallback as depending on the applications installed it can grant even non-users access to the model." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:181 +msgid "If no access right applies to a user, they are not granted access (default-deny)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:183 +msgid "If a menu item points to a model to which a user doesn't have access and has no submenus which the user can see, the menu will not be displayed." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:186 +msgid "Update the access rights file to:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:188 +msgid "Give full access to all objects to your Real Estate Manager group." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:189 +msgid "Give agents (real estate users) only read access to types and tags." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:190 +msgid "Give nobody the right to delete properties." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:191 +msgid "Check that your agent user is not able to alter types or tags, or to delete properties, but that they can otherwise create or update properties." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:197 +msgid "Remember to give different xids to your ``ir.model.access`` records otherwise they will overwrite one another." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:200 +msgid "Since the \"demo\" user was not made a real-estate agent or manager, they should not even be able to see the real-estate application. Use a private tab or window to check for this (the \"demo\" user has the password \"demo\")." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:205 +#: ../../content/developer/reference/backend/security.rst:83 +msgid "Record Rules" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:207 +msgid "The documentation related to this topic can be found at :ref:`reference/security/rules`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:212 +msgid "At the end of this section, agents will not be able to see the properties exclusive to their colleagues; but managers will still be able to see everything." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:216 +msgid "Access rights can grant access to an entire model but often we need to be more specific: while an agent can interact with properties in general we may not want them to update or even see properties managed by one of their colleagues." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:220 +msgid "Record *rules* provide that precision: they can grant or reject access to individual records:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:236 +msgid "The :ref:`reference/orm/domains` is how access is managed: if the record passes then access is granted, otherwise access is rejected." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:241 +msgid "Because rules tends to be rather complex and not created in bulk, they're usually created in XML rather than the CSV used for access rights." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:244 +msgid "The rule above:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:246 +msgid "Only applies to the \"create\", \"update\" (write) and \"delete\" (unlink) operations: here we want every employee to be able to see other users' records but only the author / assignee can update a record." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:249 +msgid "Is :ref:`non-global ` so we can provide an additional rule for e.g. managers." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:251 +msgid "Allows the operation if the current user (``user.id``) is set (e.g. created, or is assigned) on the record, or if the record has no associated user at all." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:256 +msgid "If no rule is defined or applies to a model and operation, then the operation is allowed (*default-allow*), this can have odd effects if access rights are not set up correctly (are too permissive)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:262 +msgid "Define a rule which limits agents to only being able to see or modify properties which have no salesperson, or for which they are the salesperson." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:265 +msgid "You may want to create a second real-estate agent user, or create a few properties for which the salesperson is a manager or some other user." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:268 +msgid "Verify that your real estate manager(s) can still see all properties. If not, why not? Remember:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:271 +msgid "The ``estate_group_manager`` group needs to imply ``estate_group_user``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:274 +msgid "Security Override" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:277 +msgid "Bypassing Security" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:281 +msgid "At the end of this section, agents should be able to confirm property sales without needing invoicing access." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:284 +msgid "If you try to mark a property as \"sold\" as the real estate agent, you should get an access error:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:289 +msgid "This happens because ``estate_account`` tries to create an invoice during the process, but creating an invoice requires the right to all invoice management." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:292 +msgid "We want agents to be able to confirm a sale without them having full invoicing access, which means we need to *bypass* the normal security checks of Odoo in order to create an invoice *despite* the current user not having the right to do so." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:297 +msgid "There are two main ways to bypass existing security checks in Odoo, either wilfully or as a side-effect:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:300 +msgid "The ``sudo()`` method will create a new recordset in \"sudo mode\", this ignores all access rights and record rules (although hard-coded group and user checks may still apply)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:303 +msgid "Performing raw SQL queries will bypass access rights and record rules as a side-effect of bypassing the ORM itself." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:308 +msgid "Update ``estate_account`` to bypass access rights and rules when creating the invoice." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:313 +msgid "These features should generally be avoided, and only used with extreme care, after having checked that the current user and operation should be able to bypass normal access rights validation." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:317 +msgid "Operations performed in such modes should also rely on user input as little as possible, and should validate it to the maximum extent they can." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:321 +msgid "Programmatically checking security" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:325 +msgid "At the end of this section, the creation of the invoice should be resilient to security issues regardless to changes to ``estate``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:328 +msgid "In Odoo, access rights and record rules are only checked *when performing data access via the ORM* e.g. creating, reading, searching, writing, or unlinking a record via ORM methods. Other methods do *not* necessarily check against any sort of access rights." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:333 +msgid "In the previous section, we bypassed the record rules when creating the invoice in ``action_sold``. This bypass can be reached by any user without any access right being checked:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:337 +msgid "Add a print to ``action_sold`` in ``estate_account`` before the creation of the invoice (as creating the invoice accesses the property, therefore triggers an ACL check) e.g.::" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:343 +msgid "You should see ``reached`` in your Odoo log, followed by an access error." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:345 +msgid "Just because you're already in Python code does not mean any access right or rule has or will be checked." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:348 +msgid "*Currently* the accesses are implicitly checked by accessing data on ``self`` as well as calling ``super()`` (which does the same and *updates* ``self``), triggering access errors and cancelling the transaction \"uncreating\" our invoice." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:353 +msgid "*However* if this changes in the future, or we add side-effects to the method (e.g. reporting the sale to a government agency), or bugs are introduced in ``estate``, ... it would be possible for non-agents to trigger operations they should not have access to." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:358 +msgid "Therefore when performing non-CRUD operations, or legitimately bypassing the ORM or security, or when triggering other side-effects, it is extremely important to perform *explicit security checks*." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:362 +msgid "Explicit security checks can be performed by:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:364 +msgid "Checking who the current user is (``self.env.user``) and match them against specific models or records." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:366 +msgid "Checking that the current user has specific groups hard-coded to allow or deny an operation (``self.env.user.has_group``)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:368 +msgid "Calling the ``check_access_rights(operation)`` method on a recordset, this verifies whether the current user has access to the model itself." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:370 +msgid "Calling ``check_access_rule(operations)`` on a non-empty recordset, this verifies that the current user is allowed to perform the operation on *every* record of the set." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:374 +msgid "Checking access rights and checking record rules are separate operations, if you're checking record rules you usually want to also check access rights beforehand." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:380 +msgid "Before creating the invoice, use ``check_access_rights`` and ``check_access_rule`` to ensure that the current user can update properties in general as well as the specific property the invoice is for." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:384 +msgid "Re-run the bypass script, check that the error occurs before the print." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:389 +msgid "Multi-company security" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:393 +msgid ":ref:`reference/howtos/company` for an overview of multi-company facilities in general, and :ref:`multi-company security rules ` in particular." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:397 +msgid "Documentation on rules in general can, again, be found at :ref:`reference/security/rules`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:402 +msgid "At the end of this section, agents should only have access to properties of their agency (or agencies)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:405 +msgid "For one reason or another we might need to manage our real-estate business as multiple companies e.g. we might have largely autonomous agencies, a franchise setup, or multiple brands (possibly from having acquired other real-estate businesses) which remain legally or financially separate from one another." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:411 +msgid "Odoo can be used to manage multiple companies inside the same system, however the actual handling is up to individual modules: Odoo itself provides the tools to manage the issue of company-dependent fields and *multi-company rules*, which is what we're going to concern ourselves with." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:416 +msgid "We want different agencies to be \"siloed\" from one another, with properties belonging to a given agency and users (whether agents or managers) only able to see properties linked to their agency." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:420 +msgid "As before, because this is based on non-trivial records it's easier for a user to relax rules than to tighten them so it makes sense to default to a relatively stronger security model." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:424 +msgid "Multi-company rules are simply record rules based on the ``company_ids`` or ``company_id`` fields:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:427 +msgid "``company_ids`` is all the companies to which the current user has access" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:428 +msgid "``company_id`` is the currently active company (the one the user is currently working in / for)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:431 +msgid "Multi-company rules will *usually* use the former i.e. check if the record is associated with *one* of the companies the user has access to:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:447 +msgid "Multi-company rules are usually :ref:`global `, otherwise there is a high risk that additional rules would allow bypassing the multi-company rules." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:453 +msgid "Add a ``company_id`` field to ``estate.property``, it should be required (we don't want agency-less properties), and should default to the current user's current company." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:456 +msgid "Create a new company, with a new estate agent in that company." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:457 +msgid "The manager should be a member of both companies." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:458 +msgid "The old agent should only be a member of the old company." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:459 +msgid "Create a few properties in each company (either use the company selector as the manager or use the agents). Unset the default salesman to avoid triggering *that* rule." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:462 +msgid "All agents can see all companies, which is not desirable, add the record rule restricting this behaviour." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:465 +msgid "remember to ``--update`` your module when you change its model or data" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:469 +msgid "Visibility != security" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:473 +msgid "At the end of this section, real-estate agents should not see the Settings menu of the real-estate application, but should still be able to set the property type or tags." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:477 +msgid "Specific Odoo models can be associated directly with groups (or companies, or users). It is important to figure out whether this association is a *security* or a *visibility* feature before using it:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:481 +msgid "*Visibility* features mean a user can still access the model or record otherwise, either through another part of the interface or by :doc:`performing operations remotely using RPC <../../api/external_api>`, things might just not be visible in the web interface in some contexts." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:485 +msgid "*Security* features mean a user can not access records, fields or operations." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:487 +msgid "Here are some examples:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:489 +msgid "Groups on *model fields* (in Python) are a security feature, users outside the group will not be able to retrieve the field, or even know it exists." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:492 +msgid "Example: in server actions, `only system users can see or update Python code `_." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:494 +msgid "Groups on *view elements* (in XML) are a visibility feature, users outside the group will not be able to see the element or its content in the form but they will otherwise be able to interact with the object (including that field)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:498 +msgid "Example: `only managers have an immediate filter to see their teams' leaves `_." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:500 +msgid "Groups on menus and actions are visibility features, the menu or action will not be shown in the interface but that doesn't prevent directly interacting with the underlying object." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:504 +msgid "Example: `only system administrators can see the elearning settings menu `_." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:509 +msgid "Real Estate agents can not add property types or tags, but can see their options from the Property form view when creating it." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:512 +msgid "The Settings menu just adds noise to their interface, make it only visible to managers." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:515 +msgid "Despite not having access to the Property Types and Property Tags menus anymore, agents can still access the underlying objects since they can still select tags or a type to set on their properties." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:519 +msgid "An Odoo Application is a group of related modules covering a business area or field, usually composed of a base module and a number of expansions on that base to add optional or specific features, or link to other business areas." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:524 +msgid "For applications which would be used by most or every employees, the \"application user\" role might be done away with and its abilities granted to all employees directly e.g. generally all employees can submit expenses or take time off." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:5 +msgid "Advanced C: Master and Demo Data" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:7 +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:7 +msgid "This tutorial assumes you followed the Core Training." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:9 +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:9 +msgid "To do the exercise, fetch the branch 15.0-core from the `technical training solutions `__ repository. It contains a basic module we will use as a starting point" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:14 +msgid "Data Types" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:17 +msgid "Master Data" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:19 +msgid "Master data is usually part of the technical or business requirements for the module. In other words, such data is often necessary for the module to work properly. This data will always be installed when installing the module." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:23 +msgid "We already met technical data previously since we have defined :ref:`security rules`, :ref:`views` and :ref:`actions`. Those are one kind of master data." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:27 +msgid "On top of technical data, business data can be defined, e.g. countries, currencies, units of measure, as well as complete country localization (legal reports, tax definitions, chart of account), and much more..." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:32 +msgid "Demo Data" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:34 +msgid "In additional to master data, which are requirements for a module to work properly, we also like having data for demonstration purposes:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:37 +msgid "Help the sales representatives make their demos quickly." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:38 +msgid "Have a set of working data for developers to test new features and see how these new features look with data they might not have added themselves." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:40 +msgid "Test that the data is loaded correctly, without raising an error." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:41 +msgid "Setup most of the features to be used quickly when creating a new database." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:43 +msgid "Demo data is automatically loaded when you start the server if you don't explicitly say you don't want it. This can be done in the database manager or with the command line." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:66 +msgid "Data Declaration" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:69 +#: ../../content/developer/reference/backend/module.rst:11 +msgid "Manifest" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:71 +msgid "**Reference**: the documentation related to this topic can be found in :ref:`Module Manifests`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:74 +msgid "Data is declared either in CSV or in XML. Each file containing data must be added in the manifest for them to be loaded." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:77 +msgid "The keys to use in the manifest to add new data are ``data`` for the master data and ``demo`` for the demo data. Both values should be a list of strings representing the relative paths to the files declaring the data." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:81 +msgid "Usually, demo data is in a ``demo`` folder, views and actions are in a ``views`` folder, security related data is in a ``security`` folder, and other data is in a ``data`` folder." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:85 +msgid "If your work tree looks like this:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:104 +msgid "Your manifest should look like this:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:127 +msgid "CSV" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:129 +msgid "**Reference**: the documentation related to this topic can be found in :ref:`CSV data files`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:132 +msgid "The easiest way to declare simple data is by using the CSV format. This is however limited in terms of features: use it for long lists of simple models, but prefer XML otherwise." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:141 +msgid "Your IDE has probably an extension to have a syntax highlighting of the CSV files" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:143 +msgid "`Atom `__." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:144 +msgid "`PyCharm/IntelliJ `__." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:145 +msgid "`Vim `__." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:146 +msgid "`Visual Studio `__." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:148 +msgid "Add some standard Real Estate Property Types for the `estate` module: Residential, Commercial, Industrial and Land. These should always be installed." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:152 +msgid "XML" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:154 +msgid "**Reference**: the documentation related to this topic can be found in :ref:`Data Files`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:157 +msgid "When the data to create is more complex it can be useful, or even necessary, to do it in XML." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:173 +msgid "Create some demo data for the `estate` module." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:178 +#: ../../content/developer/howtos/rdtraining/C_data.rst:242 +#: ../../content/developer/howtos/rdtraining/C_data.rst:243 +#: ../../content/developer/howtos/rdtraining/C_data.rst:244 +msgid "Big Villa" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:178 +msgid "Trailer home" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:179 +msgid "state" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:179 +msgid "New" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:179 +msgid "Canceled" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:180 +msgid "A nice and big villa" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:180 +msgid "Home in a trailer park" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:181 +msgid "12345" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:181 +msgid "54321" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:182 +msgid "2020-02-02" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:182 +msgid "1970-01-01" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:183 +msgid "1,600,000" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:183 +msgid "100,000" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:184 +msgid "120,000" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:186 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxRepartitionLineTemplate.factor_percent:1 +msgid "100" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:186 +msgid "10" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:187 +#: ../../content/developer/howtos/rdtraining/C_data.rst:187 +msgid "4" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:188 +#: ../../content/developer/howtos/rdtraining/C_data.rst:189 +#: ../../content/developer/reference/backend/mixins.rst:154 +#: ../../content/developer/reference/backend/mixins.rst:182 +#: ../../content/developer/reference/backend/mixins.rst:192 +#: ../../../odoo/addons/account/models/account_account_tag.py:docstring of odoo.addons.account.models.account_account_tag.AccountAccountTag.active:1 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.visible:1 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.active:1 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.is_base_affected:1 +msgid "True" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:188 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountAccountTemplate.reconcile:1 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountAccountTemplate.nocreate:1 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountChartTemplate.use_anglo_saxon:1 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.price_include:1 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountTaxTemplate.include_base_amount:1 +msgid "False" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:190 +msgid "100000" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:191 +msgid "South" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:195 +msgid "Data Extension" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:197 +msgid "During the Core Training, we saw in the :ref:`howto/rdtraining/13_inheritance` chapter we could inherit (extend) an existing view. This was a special case of data extension: any data can be extended in a module." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:201 +msgid "When you are adding new fields to an existing model in a new module, you might want to populate those fields on the records created in the modules you are depending on. This is done by giving the `xml_id` of the record you want to extend. It won't replace it, in this case we will set the ``field_c`` to the given value for both records." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:220 +#: ../../content/developer/reference/backend/data.rst:104 +msgid "``ref``" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:222 +msgid "Related fields can be set using the ``ref`` key. The value of that key is the ``xml_id`` of the record you want to link. Remember the ``xml_id`` is composed of the name of the module where the data is first declared, followed by a dot, followed by the ``id`` of the record (just the ``id`` works too if you are in the module declaring it)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:235 +msgid "Create some demo data offers for the properties you created." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:237 +msgid "Create offers using the partners defined in ``base``" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:240 +msgid "Partner" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:240 +msgid "Estate" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:240 +msgid "Price" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:240 +msgid "Validity" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:242 +#: ../../content/developer/howtos/rdtraining/C_data.rst:243 +msgid "Azure Interior" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:242 +msgid "10000" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:242 +#: ../../content/developer/howtos/rdtraining/C_data.rst:243 +#: ../../content/developer/howtos/rdtraining/C_data.rst:244 +msgid "14" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:243 +msgid "1500000" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:244 +msgid "Deco Addict" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:244 +msgid "1500001" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:247 +msgid "Ensure both of your demo properties are created with their Property Type set to Residential." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:250 +#: ../../content/developer/reference/backend/data.rst:145 +msgid "``eval``" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:252 +msgid "The value to assign to a field is not always a simple string and you might need to compute it. It can also be used to optimize the insertion of related values, or because a constraint forces you to add the related values in batch. See ::ref:`Add X2many fields `." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:264 +msgid "The offers you added should always be in a date relative to the installation of the module." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:268 +#: ../../content/developer/reference/backend/data.rst:98 +#: ../../content/developer/reference/backend/data.rst:159 +msgid "``search``" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:270 +msgid "Sometimes, you need to call the ORM to do a ``search``. This is not feasible with the CSV format." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:283 +msgid "In this code snippet, it is needed because the master data depends on the localization installed." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:287 +#: ../../content/developer/reference/backend/data.rst:164 +msgid "``function``" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:289 +msgid "You might also need to execute python code when loading data." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:297 +msgid "Validate one of the demo data offers by using the \"Accept Offer\" button. Refuse the others." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:304 +msgid "Add X2many fields" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:306 +msgid "**Reference**: the documentation related to this topic can be found in :class:`~odoo.fields.Command`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:309 +msgid "If you need to add related data in a One2many or a Many2many field, you can do so by using the :class:`~odoo.fields.Command` methods." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:328 +msgid "Create one new Property, but this time with some offers created directly inside the One2many field linked to the Offers." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:332 +#: ../../content/developer/howtos/website.rst:234 +msgid "Accessing the data" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:334 +msgid "You should never access demo data outside of the demo data declaration, not even in tests." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:337 +msgid "There are multiple ways to access the master/demo data." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:339 +msgid "In python code, you can use the ``env.ref(self, xml_id, raise_if_not_found=True)`` method. It returns the recordset linked to the ``xml_id`` you specify." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:342 +msgid "In XML, you can use the `ref` key like this" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:352 +msgid "It will call the ref method, and store the id of the record returned on the field ``related_id`` of the record of type ``tutorial.example`` with id ``id1``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:355 +msgid "In CSV, the title of the column must be suffixed with ``:id`` or ``/id``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:364 +msgid "In SQL, it is more complicated, see :ref:`the advanced section`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:366 +msgid "Data can always be deleted by the user. Always code defensively, taking this into account." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:373 +msgid "Advanced" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:378 +msgid "What is the XML id?" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:380 +msgid "Because we don't want a column ``xml_id`` in every single SQL table of the database, we need a mechanism to store it. This is done with the ``ir.model.data`` model." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:383 +msgid "It contains the name of the record (the ``xml_id``) along with the module in which it is defined, the model defining it, and the id of it." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:387 +msgid "No update" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:389 +msgid "The records created with the ``noupdate`` flag won't be updated when upgrading the module that created them, but it will be created if it didn't exist yet." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:392 +msgid "``odoo-bin -i module`` will bypass this setting and always load the data. But normally one shouldn't do this on a production database." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:405 +msgid "Import as SQL" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:407 +msgid "In some cases, it makes sense to do the import directly in SQL. This is however discouraged as it bypasses all the features of the ORM, computed fields (including metadata) and python constraints." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:410 +msgid "Generally using raw SQL also bypasses ACLs and increases the risks of injections." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:412 +msgid "**Reference**: :ref:`Security in Odoo`" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:414 +msgid "It can help to speed the import time by a lot `with huge files `__." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:416 +msgid "For more complex imports like for the `translations `__." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/C_data.rst:418 +msgid "It can be necessary to `initialize the database `__." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/D_mixins.rst:5 +msgid "Advanced D: Mixins" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/D_mixins.rst:7 +msgid "If you need to interface with common Odoo features such as the chatter, you can rely on :doc:`mixins <../../reference/backend/mixins>`. They are Odoo models exposing useful methods through inheritance." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/D_mixins.rst:11 +msgid "To learn and play with mixins, visit `this repository `_. This module for a plant nursery is training material developed for the OXP 2018. You don't need to code it on your side. But you can check the presentations in the :file:`/static/pdf` directory and play with the module to discover some magic features in Odoo." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:5 +msgid "Advanced E: Python Unit Tests" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:13 +msgid "**Reference**: `Odoo's Test Framework: Learn Best Practices `__ (Odoo Experience 2020) on Youtube." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:17 +msgid "Writing tests is a necessity for multiple reasons. Here is a non exhaustive list:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:19 +msgid "Ensure code will not be broken in the future" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:20 +msgid "Define the scope of your code" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:21 +msgid "Give examples of use cases" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:22 +msgid "It is one way to technically document the code" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:23 +msgid "Help your coding by defining your goal before working towards it" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:26 +msgid "Running Tests" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:28 +msgid "Before knowing how to write tests, we need to know how to run them." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:80 +msgid "Integration Bots" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:82 +msgid "This section is only for Odoo employees and people that are contributing to `github.com/odoo`. We highly recommend having your own CI otherwise." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:85 +msgid "When a test is written, it is important to make sure it always passes when modifications are applied to the source code. To automate this task, we use a development practice called Continuous Integration (CI). This is why we have some bots running all the tests at different moments. Whether you are working at Odoo or not, if you are trying to merge something inside `odoo/odoo`, `odoo/enterprise`, `odoo/upgrade` or on odoo.sh, you will have to go through the CI. If you are working on another project, you should think of adding your own CI." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:94 +msgid "Runbot" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:96 +msgid "**Reference**: the documentation related to this topic can be found in `Runbot FAQ `__." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:99 +msgid "Most of the tests are run on `Runbot `__ every time a commit is pushed on GitHub." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:102 +msgid "You can see the state of a commit/branch by filtering on the runbot dashboard." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:104 +msgid "A **bundle** is created for each branch. A bundle consists of a configuration and batches." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:107 +msgid "A **batch** is a set of builds, depending on the parameters of the bundle. A batch is green (i.e. passes the tests) if all the builds are green." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:110 +msgid "A **build** is when we launch a server. It can be divided in sub-builds. Usually there are builds for the community version, the enterprise version (only if there is an enterprise branch but you can force the build), and the migration of the branch. A build is green if every sub-build is green." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:115 +msgid "A **sub-build** only does some parts of what a full build does. It is used to speed up the CI process. Generally it is used to split the post install tests in 4 parallel instances. A sub-build is green if all the tests are passing and there are no errors/warnings logged." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:120 +msgid "All tests are run regardless of the modifications done. Correcting a typo in an error message or refactoring a whole module triggers the same tests. All modules will be installed as well. This means something might not work even if the Runbot is green, i.e. your changes depend on a module that the module the changes are in doesn't depend on." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:124 +msgid "The localization modules (i.e. country-specific modules) are not installed on Runbot (except the generic one). Some modules with external dependencies can also be excluded." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:126 +msgid "There is a nightly build running additional tests: module operations, localization, single module installs, multi-builds for nondeterministic bugs, etc. These are not kept in the standard CI to shorten the time of execution." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:130 +msgid "You can also login to a build built by Runbot. There are 3 users usable: `admin`, `demo` and `portal`. The password is the same as the login. This is useful to quickly test things on different versions without having to build it locally. The full logs are also available; these are used for monitoring." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:136 +msgid "Robodoo" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:138 +msgid "You will most likely have to gain a little bit more experience before having the rights to summon robodoo, but here are a few remarks anyways." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:141 +msgid "Robodoo is the guy spamming the CI status as tags on your PRs, but he is also the guy that kindly integrates your commits into the main repositories." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:144 +msgid "When the last batch is green, the reviewer can ask robodoo to merge your PR (it is more a `rebase` than a `merge`). It will then go to the mergebot." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:148 +msgid "Mergebot" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:150 +msgid "`Mergebot `__ is the last testing phase before merging a PR." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:152 +msgid "It will take the commits in your branch not yet present on the target, stage it and rerun the tests one more time, including the enterprise version even if you are only changing something in community." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:156 +msgid "This step can fail with a `Staging failed` error message. This could be due to" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:158 +msgid "a nondeterministic bug that is already on the target. If you are an Odoo employee, you can check those here: https://runbot.odoo.com/runbot/errors" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:160 +msgid "a nondeterministic bug that you introduced but wasn't detected in the CI before" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:161 +msgid "an incompatibility with another commit merged right before and what you are trying to merge" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:162 +msgid "an incompatibility with the enterprise repository if you only did changes in the community repo" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:164 +msgid "Always check that the issue does not come from you before asking the merge bot to retry: rebase your branch on the target and rerun the tests locally." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:168 +msgid "Modules" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:170 +msgid "Because Odoo is modular, the tests need to be also modular. This means tests are defined in the module that adds the functionality you are adding in and tests cannot depend on functionality coming from modules your module doesn't depend on." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:174 +msgid "**Reference**: the documentation related to this topic can be found in :ref:`Special Tags`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:195 +msgid "If the behavior you want to test can be changed by the installation of another module, you need to ensure that the tag `at_install` is set; otherwise you can use the tag `post_install` to speed up the CI and ensure it is not changed if it shouldn't." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:200 +msgid "Writing a test" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:202 +msgid "**Reference**: the documentation related to this topic can be found in `Python unittest `__. and :ref:`Testing Odoo`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:206 +msgid "Here are a few things to take into consideration before writing a test" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:208 +msgid "The tests should be independent from the data currently in the database (including demo data)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:209 +msgid "Tests should not impact the database by leaving/changing residual data. This is usually done by the test framework by doing a rollback. This is why you must never call ``cr.commit`` in a test (nor anywhere else in the business code)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:212 +msgid "For a bug fix, the test should fail before applying the fix and pass after." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:213 +msgid "Don't test something that is already tested elsewhere; you can trust the ORM. Most of the tests in business modules should only test the business flows." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:215 +msgid "You shouldn't need to flush data into the database." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:217 +msgid "Remember that ``onchange`` only applies in the Form views, not by changing the attributes in python. This also applies in the tests. If you want to emulate a Form view, you can use ``odoo.tests.common.Form``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:221 +msgid "The tests should be located in a ``tests`` folder in the root of your module. Each test file name should start with `test_` and be imported in the ``__init__.py`` of the test folder. You shouldn't import the test folder/module in the ``__init__.py`` of the module." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:237 +msgid "All the tests should extend ``odoo.tests.common.TransactionCase``. You usually define a ``setUpClass`` and the tests. After writing the `setUpClass`, you have an `env` available in the class and can start interacting with the ORM." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:241 +msgid "These test classes are built on top of the ``unittest`` python module." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:284 +msgid "For better readability, split your tests into multiple files depending on the scope of the tests. You can also have a Common class that most of the tests should inherit from; this common class can define the whole set up for the module. For instance in `account `__." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:289 +msgid "Update the code so no one can:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:291 +msgid "Create an offer for a sold property" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:292 +msgid "Sell a property with no accepted offers on it" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:294 +msgid "and create tests for both of these cases. Additionally check that selling a property that can be sold is correctly marked as sold after selling it." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:298 +msgid "Someone keeps breaking the reset of Garden Area and Orientation when you uncheck the Garden checkbox. Make sure it doesn't happen again." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/E_unittest.rst:301 +msgid "Tip: remember the note about `Form` a little bit above." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/F_jstour.rst:7 +msgid "Advanced F: JS Tours" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/G_website.rst:7 +msgid "Advanced G: Controllers & Website" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/H_adv_views.rst:7 +msgid "Advanced H: Advanced Views" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/I_jswidget.rst:7 +msgid "Advanced I: Custom JS Widget" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:5 +msgid "Advanced J: PDF Reports" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:9 +msgid "This tutorial assumes you have completed the :ref:`Core Training ` and have installed :ref:`wkhtmltopdf `." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:18 +msgid "We were previously :ref:`introduced to QWeb ` in the Core Training where it was used to build a kanban view. Now we will expand on one of QWeb's other main uses: creating PDF reports. A common business requirement is the ability to create documents to send to customers and to use internally. These reports can be used to summarize and display information in an organized template to support the business in different ways. Odoo can additionally add our company's header and footer to our reports with minimal extra effort." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:25 +msgid "The documentation related to this topic can be found in :ref:`reference/qweb`, :ref:`reference/reports/report` and the :ref:`reference/actions/report` section of the Actions reference." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:30 +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:35 +msgid "File Structure" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:32 +msgid "The bulk of a PDF report is its QWeb template. It also typically needs a corresponding ``ir.actions.report`` to include the report within a module's business logic. There is no strict rule for the file names or where they are located, but these two parts are typically stored in 2 separate files within a ``report`` folder in the top level of your module's directory. If a module has many or multiple long report templates, then they are often organized in a logical manner across different files named after the report(s) they contain. All actions for the reports are usually stored in the same file ending with ``_reports.xml`` regardless of the number of reports it contains." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:41 +msgid "Therefore it is expected that your work tree will look something like:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:59 +msgid "Note that you will often see other non-QWeb and non-XML files containing \"report\" in their name also within the report folder. These are unrelated to the reports covered in this tutorial and are covered in :ref:`another advanced topic `. For now you can think of them as customized views that use direct SQL queries (sometimes referred to as SQL Views)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:64 +msgid "Don't forget to add whatever files your template and action view will be located in to your ``__manifest__.py``. In this case you will want to add the files to the ``data`` list and remember that the files listed in a manifest are loaded sequentially!" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:69 +msgid "Basic Report" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:73 +msgid "**Goal**: at the end of this section, we will can print a report that displays all offers for a property." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:0 +msgid "Simple PDF report" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:80 +msgid "In our real estate example there are many useful reports that we could create. One simple report we can create is one that displays all of a property's offers." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:84 +msgid "Report Data" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:86 +msgid "Before we do anything we first need some data to populate our reports or else this tutorial won't be very interesting. When creating reports, you will need some data to test your report code and check that the resulting look is as expected. It is a good idea to test with data that will cover most or all of your expected use cases. A good representation set for our simple report is:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:91 +msgid "At least 3 properties where 1 is \"sold\", 1 is \"offer received\" and 1 is \"new\"." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:92 +msgid "At least 2-3 offers for our \"sold\" and \"offer received\" properties" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:94 +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:117 +msgid "If you don't have a set of data like this already, you can either:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:96 +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:119 +msgid "Complete :ref:`howto/rdtraining/C_data` (if you haven't done so already) and add the extra cases to your demo data (you may need to create a new database to load in the demo data)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:98 +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:121 +msgid "Manually create the data in your database." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:99 +msgid "Copy this `data file `__ into a new directory (data) in your estate module and copy `these lines `__ into your __manifest__.py file (you may need to create a new database to load in the demo data)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:104 +msgid "Before continuing, click through your data in your database and make sure your data is as expected. Of course you can add the data after you write your report code, but then you will not be able to incrementally test portions of your code as you write it. This can make checking for mistakes and debugging your code more difficult in the long run for complicated reports." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:110 +msgid "Minimal Template" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:112 +msgid "A minimal viable template is viewable under the \"Minimal viable template\" section of the :ref:`reference/reports/templates` documentation. We can modify this example to build our minimal property offers template file:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:154 +msgid "Most of the Odoo specific (i.e. non-HTML) items in our file are explained in the minimal viable template section. Some additional features in our template are:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:157 +msgid "The use of the ``class=\"table\"`` attribute so our table has some nice formatting. Twitter Bootstrap (we're using its table class in this case) and FontAwesome (useful for adding icons) classes can be used in your report template." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:160 +msgid "The use of ``t-set``, ``t-value``, ``t-foreach`` and ``t-as`` so that we can loop over all of the ``offer_ids``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:162 +msgid "If you are already familiar with website templating engines, then the QWeb directives (i.e. the `t-` commands) probably don't need much explanation and you can just look at its :ref:`documentation ` and skip ahead to the next subsection." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:166 +msgid "Otherwise you are encouraged to read more about them ( `Wikipedia `__ has a good high level description), but the general idea is that QWeb provides the ability to dynamically generate web code based on Odoo data and simple commands. I.e. QWeb can access recordset data (and methods) and process simple programming operations such as setting and accessing temporary variables. For example, in the above example:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:172 +msgid "``t-set`` creates a temporary variable called \"offers\" that has its value set by ``t-value`` to the current ``estate.property`` recordset's ``offer_ids``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:174 +msgid "the ``t-foreach`` and ``t-as`` usage is the equivalent to the Python:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:181 +msgid "Report Action" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:183 +msgid "Now that we have a template, we need to make it accessible in our app via a ``ir.actions.report``. A practical example of ``ir.actions.report`` is `here `__ corresponding to `this template `__. Its contents are all explained in :ref:`the documentation `." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:190 +msgid "An ``ir.actions.report`` is primarily used via the Print menu of a model's view. In the practical example, the ``binding_model_id`` specifies which model's views the report should show in and Odoo will auto-magically add it for you. Another common use case of the report action is to link it to a button like we learned in :ref:`howto/rdtraining/10_actions`. This is handy for reports that only make sense under specific conditions. For example, if we wanted to make a \"Final Sale\" report, then we can link it to a \"Print Sale Info\" button that appears in the form view only when the property is \"Sold\"." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:None +msgid "Print Menu Button" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:202 +msgid "You may have noticed or are wondered why our report template loops through a recordset. When our template is passed more than one record, it can produce one PDF report for all of the records. Using the Print menu in the list view with multiple records selected will demonstrate this." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:207 +msgid "Make a Report" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:209 +msgid "Finally, you now know where to create your files and how the content of the files should look. Happy report making!" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:211 +msgid "Make a report." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:213 +msgid "Add the property offers report from the minimal template subsection to the Print menu of the Property views." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:215 +msgid "Improve the report by adding more data. Refer to the **Goal** of this section to see what additional data you can add and feel free to add even more." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:218 +msgid "Bonus: Make an extra flexible report by adding in some logic so that when there are no offers on a property then we don't create a table and instead write something about how there are no offers yet. Hint: you will need to use ``t-if`` and ``t-else``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:222 +msgid "Remember to check that your PDF reports match your data as expected." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:226 +msgid "Sub-templates" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:230 +msgid "**Goal**: at the end of this section, we will have a sub-template that we use in 2 reports." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:0 +msgid "Report using a subtemplate" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:236 +msgid "There are two main reasons for using sub-templates. One is to make the code easier to read when working with extra long or complicated templates. The other is to reuse code where possible. Our simple property offers report is useful, but listing property offers information can be useful for more than just one report template. One example is a report that lists all of a salesman's properties' offers." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:241 +msgid "See if you can understand how to call a sub-template by reading the :ref:`documentation ` on it and/or by looking at an `example `__ (remember QWeb uses the same control flows regardless if it is for a report or a view in Odoo.)" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:246 +msgid "Create and use a sub-template." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:248 +msgid "Split the table portion of the offers into its own template. Remember to check that your original report still prints correctly afterwards." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:251 +msgid "Add a new report for ``res.users`` that allows you to print all of the Real Estate Properties that are visible in their form view (i.e. in the \"Settings\" app). Include the offers for each of those saleman's properties in the same report. Hint: since the ``binding_model_id`` in this case will not be within the estate module, you will need to use ``ref=\"base.model_res_users\"``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:256 +msgid "Your end result should look similar to the image in the **Goal** of this section." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:258 +msgid "Remember to check that your reports match your data as expected!" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:261 +msgid "Report Inheritance" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:265 +msgid "**Goal**: at the end of this section, we will inherit the property report in the ``estate_account`` module." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:0 +msgid "An inherited report" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:272 +msgid "Inheritance in QWeb uses the same ``xpath`` elements as :ref:`views inheritance `. A QWeb template refers to its parent template in a different way though. It is even easier to do by just adding the ``inherit_id`` attribute to the ``template`` element and setting it equal to the *module.parent_template_id*." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:276 +msgid "We didn't add any new fields to any of the estate models in `estate_account`, but we can still add information to our existing property report. For example, we know that any \"Sold\" properties will already have an invoice created for them, so we can add this information to our report." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:280 +msgid "Inherit a report." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:282 +msgid "Extend the property report to include some information about the invoice. You can look at the **Goal** of this section for inspiration (i.e. print a line when the property is Done, otherwise print nothing)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:285 +msgid "Again, remember to check that your reports match your data as expected!" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:288 +msgid "Additional Features" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:290 +msgid "All of the following extra features are described further in the :ref:`reference/reports/report` documentation, including how to implement each of them." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:294 +#: ../../content/developer/howtos/web.rst:1227 +msgid "Translations" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:296 +msgid "We all know Odoo is used in multiple languages thanks to automated and manual translating. QWeb reports are no exception! Note that sometimes the translations do not work properly if there are unnecessary spaces in your template's text content so try to avoid them when possible (especially leading spaces)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:301 +#: ../../content/developer/reference/backend/reports.rst:309 +msgid "Reports are web pages" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:303 +msgid "You probably are tired of hearing that QWeb creates HTML, but we're saying it again! One of the neat features about reports being written in QWeb is they can be viewed within the web browser. This can be useful if you want to embed a hyperlink that leads to a specific report. Note that the usual security checks will still apply to prevent unauthorized users from accessing the reports." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:309 +#: ../../content/developer/reference/backend/reports.rst:148 +msgid "Barcodes" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/J_reports.rst:311 +msgid "Odoo has a built-in barcode image creator that allows for barcodes to be embedded in your reports. Check out the corresponding `code `__ to see all the supported barcode types." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:5 +msgid "Advanced K: Dashboards" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:9 +msgid "This tutorial assumes you have completed the :ref:`Core Training ` and have access to Odoo Enterprise features." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:18 +msgid "The term \"Dashboard\" is used in Odoo for objects that display data, but involves different implementations. This tutorial will only focus on the Enterprise view that is used to provide aggregated data visualization. They can be added as a ``view_mode`` to an existing model (i.e. a view you can switch to via the view buttons in the top right of a view), but they are also often used as a view for to a special model customized for data visualization. You may hear these special views referred to as SQL views." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:25 +msgid "It is useful to note there is a \"Dashboard\" app in Odoo Community. This app allows users to create their own customized view of data, but the customization is only visible to each user and can only be viewed within the \"Dashboard\" app. Technically it is possible to make global dashboards using this ``board`` module, but it is much easier to do as an Enterprise view. Plus it looks nicer and has extra features not available in ``board``. Some other dashboards within Odoo also exist, but they are custom made and are beyond the scope of this tutorial." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:32 +msgid "The documentation related to this topic can be found in :ref:`reference/views/dashboard`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:37 +msgid "You probably have already guessed that since dashboard views are an Enterprise view, they must have a dependency on an Enterprise module. The Enterprise module is ``web_dashboard``. Don't forget to add it to your manifest file! It is standard to add dashboards intended to be used as a ``view_mode`` for one of your module's models (in the ``model`` folder``) to the views directory (i.e. the same file that contains the other views for the same model)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:43 +msgid "It is standard to create a separate Enterprise module to add extra Enterprise views and features to a Community module. This is done in a similar manner as the module link technique covered within :ref:`howto/rdtraining/14_other_module`. The difference is that instead of linking 2 different modules, we are extending our `estate` module. We do this by creating a new module and adding both the Community module and its necessary Enterprise module dependencies to its manifest. You will commonly see \"enterprise\" in the module's directory name. To keep this tutorial simple, we will add dashboards to our existing ``estate`` module." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:51 +msgid "SQL Views have 2 parts: their xml file (don't forget to add it to your manifest file) and their Python file (don't forget to add it to the appropriate ``__init.py__`` files). The former is the same format as the ``view_mode`` xml while the latter contains a custom model and SQL code to populate its fields. It is standard to add SQL view files to the ``report/`` directory. It is also common to include \"report\" in the name of the SQL view's files. You may be wondering why do we put the files in a report directory? We saw earlier that the dashboard is for data visualization, therefore it is not editable. You can think of dashboards as interactive reports where you can click on statistics, graphs, and charts to see the specific data contributing to them. Note it is also standard to store the xml code for :ref:`PDF report templates ` in the report directory." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:62 +msgid "It is expected that your work tree will look something like:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:83 +msgid "Dashboard View" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:87 +msgid "**Goal**: at the end of this section, we will have a new dashboard view that displays different property statistics." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:0 +msgid "Basic Dashboard view" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:94 +msgid "Dashboards can display data in different ways, including:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:96 +msgid "showing an ``aggregate`` of a field" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:97 +msgid "using aggregated fields in a ``formula``" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:98 +msgid "using a ``widget``" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:99 +msgid "using another ``view`` as a subview" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:101 +msgid "There are many useful statistics and visuals we can provide for our real estate example using these options. A full example to reference while doing the exercises in this section is `viewable here `__ (restricted github repository link)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:107 +msgid "Data" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:108 +msgid "To fully enjoy our dashboard view, we will need good test data to populate it. Test data will allow us to check that the resulting look and statistics are correct. It is a good idea to test with data that will cover most or all of your expected use cases, but is also easy to verify with that your statistics are correct. In our goal's case we are looking at count, sum, average, minimum, and maximum statistics, therefore a good representation set for our dashboard is:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:114 +msgid "At least 3 properties with different property types, expected prices, and average living area." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:115 +msgid "At least 1 sold property and at least 1 canceled property" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:122 +msgid "Copy this `data file `__ into a new directory called ``data`` in your estate module and copy `these lines `__ into your __manifest__.py file (you may need to create a new database to load in the demo data)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:127 +msgid "Click through your database data and make sure it is what you expect. Of course you can add the data after you write your dashboard code and then test that your view is working as expected." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:131 +msgid "Aggregations" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:132 +msgid "Building a dashboard view is very similar to what you have previously done in :ref:`howto/rdtraining/07_basicviews`. For the dashboard view, we use the `dashboard` root element and choose from its possible tags (see all the possibilities and their attributes in the :ref:`reference/views/dashboard` documentation). So a simple dashboard example is:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:146 +msgid "In this example, ```` adds styling and ```` declares an aggregation. We indicate which ``field`` we want to aggregate, what ``string`` to display with the value, and how to aggregate it with the `group_operator` attribute. The `group_operator` can use any valid PostgreSQL aggregate function plus the special Odoo defined ``count_distinct``." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:151 +msgid "Hopefully you remember how to add views to a window action `view_mode` (hint, it was covered in :ref:`howto/rdtraining/06_firstui`). Now let's make some dashboards!" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:154 +msgid "Make a dashboard view." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:156 +msgid "Create a dashboard of aggregated values for the ``estate.property`` model. You can look at the **Goal** of this section for some inspiration. Remember to check that your statistics are calculating as you expect and note that the calculated values take into consideration any applied view filters!" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:161 +msgid "Bonus: Add in some aggregations that need a `domain` to make sense (remember domains were also covered in :ref:`howto/rdtraining/07_basicviews`)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:165 +msgid "Pie Charts" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:166 +msgid "Adding pie charts to dashboards is a piece of cake using the `` element. An example is:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:176 +msgid "In this example, we indicate that we're using the `pie_chart` widget with the `name` attribute, the ``title`` for the pie chart, and that we're grouping it by property type." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:179 +msgid "Add some pie charts." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:181 +msgid "Add the pie charts from the **Goal** of this section to your dashboard. Hint: you will need to add `'measure': selling_price` to your pie chart `attrs` if you want to show selling prices grouped by property type." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:185 +msgid "Hover over and click on the pie charts to check your charts counts values and don't forget that filters will also apply to the charts." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:188 +msgid "Bonus: Add a domain to your selling price pie chart to only include \"sold\" properties (i.e. not \"offer_accepted\" ones). Note that the `'` will need to be escaped since it is declared as part of the `attrs`." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:193 +msgid "Subviews" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:194 +msgid "Similar to how we can use the list view within the form view (we saw this automatically happen for One2many relationships in :ref:`howto/rdtraining/08_relations`), we can add other views within our dashboard view. The most commonly added are the pivot and graph views, but the cohort view is also an option. These views are covered in more depth in :ref:`howto/rdtraining/H_adv_views`. For this topic you are only required to know their names. A dashboard with only subviews is:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:207 +msgid "The `ref` attribute can be added to `` elements to use a specific xml id for that view. If no xml id is provided for a graph or pivot view then the default view will be used. The cohort view will not work in the dashboard without a specific xml id. If you have already created some of these views then you are welcome to add them to your dashboard! Sample graph and pivot views are included in the `solution code `__ that you are welcome to use as well." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:215 +msgid "Add subviews." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:217 +msgid "Add in a graph and a pivot view to your dashboard. Try playing around with the layout of your subviews in relation to your pie charts and aggregated values and refer to the **Goal** of this section for an often used layout. Remember to check that your subviews are displaying your data as expected (and yes, they are also affected by the filters!)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:223 +msgid "SQL Views" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:227 +msgid "This section expects you to have a basic knowledge of SQL. If you have little to no SQL knowledge then `this is a good tutorial to start with `__ and these `exercises `__ are good for those who need a refresher or extra practice." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:234 +msgid "**Goal**: at the end of this section, we will have a new SQL view that displays different property statistics." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:0 +msgid "SQL view" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:242 +msgid "Occasionally we want to show data that goes beyond what our model already has in it. We could add a lot of stored computed or related fields (non-stored fields cannot be aggregated or displayed in pie charts), but it would be impractical to store a bunch of fields only for this purpose. We can instead add a custom SQL view to minimize the computational load and keep our model clean of unnecessary fields." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:250 +msgid "We will start with the more difficult part: our special report model. This file starts the same as any other model except that we add 2 attributes ``_auto`` and ``_rec_name``::" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:262 +msgid "``_auto = False`` indicates that we do not want to store the model in the database and we will create a custom table by overriding the ``BaseModel.init()`` method. ``_rec_name`` indicates which of the model's fields represents a record's name (i.e. the name that will be used in the navigation breadcrumb when opening a record's form view). In this case I left it as 'id' because our property offers don't have a name. We will need the `tools` import later (i.e. ``odoo/odoo/tools``, which is full of all sort of useful helper methods you will probably use in the future). Note that it is standard to include ``report`` in the model name." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:270 +msgid "Remember your new model will need to be added to your security file like you learned in :ref:`howto/rdtraining/05_securityintro`!" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:273 +msgid "Then we define the fields we need for our dashboard the same way as any other model (like you learned in :ref:`howto/rdtraining/04_basicmodel`), except that every field is ``readonly=True``. After all, our model is for readonly purposes only." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:277 +msgid "Now we override the ``BaseModel.init()`` method mentioned earlier::" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:288 +msgid "We use ``tools.drop_view_if_exists`` to ensure that we don't create a conflicting view and then execute the SQL query. It is standard to separate the different parts of the query to allow for easier model extension. Exactly how the query is split up across methods is not standardized, but you will often see at minimum ``_select`` and ``_from`` methods [or something similar] and of course all of these methods will return strings. The columns from the SELECT will populate our model's fields so ensure that your column names match your field names or use alias names that match." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:296 +msgid "Create report model." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:298 +msgid "Create a report model with the following fields:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:301 +#: ../../../odoo/addons/account/models/chart_template.py:docstring of odoo.addons.account.models.chart_template.AccountAccountTemplate.note:1 +msgid "Note" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:303 +msgid "Corresponds to ``id`` of ``estate.property.offer``" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:304 +msgid "offer_state" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:304 +msgid "Equals ``state`` choices of ``estate.property.offer``" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:306 +msgid "property_state" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:306 +msgid "Equals ``state`` choices of ``estate.property``" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:307 +msgid "property_type_id" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:310 +msgid "and write the SQL query necessary to populate the fields (hint, you will need 2 JOINs)." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:312 +msgid "You won't be able to check if your model is correct until we create a view for it, but you are welcome to check your query directly in your database to see if the results are as you expect. If you struggle with this exercise, then `here is an example `__ to reference." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:320 +msgid "Now that we have our model, we can make its dashboard view. There is no difference to how its made except that its file is located in the ``report`` folder. Since it is a new model not linked to any other model, we will also have to add a new menuitem to view our dashboard. Typically SQL views are added under a first level menu called *Reporting* (because it's a report, surprise!). Do you remember how to add a ``menuitem``? If not, revisit :ref:`howto/rdtraining/06_firstui`) again." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:326 +msgid "Create report view." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:328 +msgid "Recreate the dashboard in the **Goal** of this section. Hint: it uses the ``formula`` element, which we did not need for our previous dashboard." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:331 +msgid "Bonus: Create ``list`` and ``form`` views for your new report model so we don't have to see the ugly defaults when you click on your pie charts." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:335 +msgid "Extra Tips" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:336 +msgid "**Tip 1** A common mistake in SQL views is to not take into account the duplication of certain data due to table JOINs. For example, in our **Goal** we have a pie chart of the offers' property types. We may be tempted to add a similar pie chart with a domain to only include canceled properties, so we think we are only counting the number of canceled properties by property type. In reality we are still looking at all the offers per property so any property with more than 1 offer will be counted per offer. This example is easily double checked by clicking on the pie chart to see its list view:" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:0 +msgid "Pie chart list view" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:348 +msgid "But for cases such as average aggregations or using a subview such as the pivot view, it is easy to miss this mistake. It is also easy to miss this mistake when you have insufficient test data. In order to add a number of properties canceled by property type pie chart to this report, we would either have to do a hack (too advanced for this tutorial) or simply exclude it from this report." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:354 +msgid "**Tip 2** If you have a field that you do not want as a measure (i.e. in your pivot or graph views), then you can add ``store=False`` to it and it will not show." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:357 +msgid "**Tip 3** If you have a SQL View that depends on context then instead of overriding ``BaseModel.init()`` set the ``_table_query`` property::" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:364 +msgid "The *select* and *from* methods remain the same." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:366 +msgid "`Here is an example `__ of a report that depends on the currently selected companies (in a multi-company environment) context to determine the currency exchange rates to use for accurately displaying amounts when the selected companies have different currencies." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/L_cron.rst:7 +msgid "Advanced L: Scheduled & Server Actions" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/M_migration.rst:7 +msgid "Advanced M: Migrations" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/N_security.rst:5 +msgid "Advanced N: Security" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/N_security.rst:7 +msgid "Every day we hear about data leaks and attacks in the newspapers. We expect you to be aware and careful about how to avoid security breaches in your future developments." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/N_security.rst:11 +msgid "You already defined new models in your training. Did you check the access rights and define record rules on it ? Are you sure your module is not an open door to SQL injections ? Did you use getattr or t-raw in your code?" +msgstr "" + +#: ../../content/developer/howtos/rdtraining/N_security.rst:15 +msgid "No or wrong access rules on models." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/N_security.rst:16 +msgid "Introduction of public methods that should actually be private." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/N_security.rst:17 +msgid "Wrong manipulation of access tokens." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/N_security.rst:18 +msgid "No or wrong `ir.rules` (restriction rules) on models." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/N_security.rst:19 +msgid "Introduction of SQL injections." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/N_security.rst:20 +msgid "etc." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/N_security.rst:22 +msgid "Please check this `presentation from Olivier Dony (odo) `_ about common mistakes that you should **absolutely** avoid in your future developments. Also, please always use this `security checklist `_ to double-check your development and avoid further embarrassing issues." +msgstr "" + +#: ../../content/developer/howtos/rdtraining/O_perf.rst:7 +msgid "Advanced O: Performances" +msgstr "" + #: ../../content/developer/howtos/themes.rst:4 msgid "Theme Tutorial" msgstr "" @@ -2251,8 +11913,8 @@ msgid "Add Styles" msgstr "" #: ../../content/developer/howtos/themes.rst:306 -#: ../../content/developer/reference/mobile.rst:9 -#: ../../content/developer/webservices/upgrade.rst:10 +#: ../../content/developer/reference/frontend/framework_overview.rst:6 +#: ../../content/developer/reference/frontend/mobile.rst:9 msgid "Introduction" msgstr "" @@ -2337,7 +11999,7 @@ msgid "\\(1) Set the values for Odoo-provided SCSS variables" msgstr "" #: ../../content/developer/howtos/themes.rst:397 -msgid "Odoo declares many CSS rules, most being entirely customizable by overridding the related SCSS variables. First, create a new file called primary_variables.scss and add it the same way as the style.scss file. The only difference it that you won't add it in the ``assets_frontend`` template but in the ``_assets_primary_variables`` template." +msgid "Odoo declares many CSS rules, most being entirely customizable by overriding the related SCSS variables. First, create a new file called primary_variables.scss and add it the same way as the style.scss file. The only difference it that you won't add it in the ``assets_frontend`` template but in the ``_assets_primary_variables`` template." msgstr "" #: ../../content/developer/howtos/themes.rst:414 @@ -2517,7 +12179,8 @@ msgid "Xpath expression" msgstr "" #: ../../content/developer/howtos/themes.rst:796 -#: ../../content/developer/reference/data.rst:14 +#: ../../content/developer/reference/backend/data.rst:14 +#: ../../content/developer/reference/backend/testing.rst:547 msgid "Structure" msgstr "" @@ -2526,6 +12189,7 @@ msgid "``//div[@id='snippet_structure']``" msgstr "" #: ../../content/developer/howtos/themes.rst:797 +#: ../../content/developer/reference/frontend/registries.rst:108 msgid "Content" msgstr "" @@ -2705,13 +12369,6 @@ msgstr "" msgid "Event" msgstr "" -#: ../../content/developer/howtos/themes.rst:959 -#: ../../content/developer/webservices/extract_api.rst:42 -#: ../../content/developer/webservices/extract_api.rst:152 -#: ../../content/developer/webservices/extract_api.rst:382 -msgid "Description" -msgstr "" - #: ../../content/developer/howtos/themes.rst:961 msgid "``start``" msgstr "" @@ -2952,1365 +12609,1605 @@ msgstr "" msgid "Descriptions, while not important to search engine rankings, are extremely important in gaining user click-through. These are an opportunity to advertise content and to let people searching know exactly whether the given page contains the information they're looking for. It is important that titles and descriptions on each page are unique." msgstr "" -#: ../../content/developer/howtos/web.rst:4 +#: ../../content/developer/howtos/translations.rst:7 +msgid "Translating Modules" +msgstr "" + +#: ../../content/developer/howtos/translations.rst:9 +msgid "This section explains how to provide translation abilities to your module." +msgstr "" + +#: ../../content/developer/howtos/translations.rst:11 +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:15 +msgid "Exporting translatable term" +msgstr "" + +#: ../../content/developer/howtos/translations.rst:17 +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:21 +msgid "needs technical features" +msgstr "" + +#: ../../content/developer/howtos/translations.rst:23 +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:27 +msgid "leave the language to the default (new language/empty template)" +msgstr "" + +#: ../../content/developer/howtos/translations.rst:28 +msgid "select the `PO File`_ format" +msgstr "" + +#: ../../content/developer/howtos/translations.rst:29 +msgid "select your module" +msgstr "" + +#: ../../content/developer/howtos/translations.rst:30 +msgid "click :guilabel:`Export` and download the file" +msgstr "" + +#: ../../content/developer/howtos/translations.rst:36 +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:46 +msgid "translations for all loaded languages are also installed or updated when installing or updating a module" +msgstr "" + +#: ../../content/developer/howtos/translations.rst:50 +msgid "Implicit exports" +msgstr "" + +#: ../../content/developer/howtos/translations.rst:52 +msgid "Odoo automatically exports translatable strings from \"data\"-type content:" +msgstr "" + +#: ../../content/developer/howtos/translations.rst:54 +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:57 +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:61 +msgid "for :class:`~odoo.fields.Field`, unless their model is marked with ``_translate = False``:" +msgstr "" + +#: ../../content/developer/howtos/translations.rst:64 +msgid "their ``string`` and ``help`` attributes are exported" +msgstr "" + +#: ../../content/developer/howtos/translations.rst:65 +msgid "if ``selection`` is present and a list (or tuple), it's exported" +msgstr "" + +#: ../../content/developer/howtos/translations.rst:66 +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:68 +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:72 +msgid "Explicit exports" +msgstr "" + +#: ../../content/developer/howtos/translations.rst:74 +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:79 +msgid "In Python, the wrapping function is :func:`odoo._`::" +msgstr "" + +#: ../../content/developer/howtos/translations.rst:83 +msgid "In JavaScript, the wrapping function is generally :js:func:`odoo.web._t`:" +msgstr "" + +#: ../../content/developer/howtos/translations.rst:91 +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:95 +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:102 +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:108 +msgid "This could look like the following::" +msgstr "" + +#: ../../content/developer/howtos/translations.rst:121 +msgid "Variables" +msgstr "" + +#: ../../content/developer/howtos/translations.rst:122 +msgid "**Don't** the extract may work but it will not translate the text correctly::" +msgstr "" + +#: ../../content/developer/howtos/translations.rst:126 +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:133 +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:156 +msgid "**Don't** pluralize terms the English-way::" +msgstr "" + +#: ../../content/developer/howtos/translations.rst:162 +msgid "**Do** keep in mind every language has different plural forms::" +msgstr "" + +#: ../../content/developer/howtos/translations.rst:170 +msgid "Read vs Run Time" +msgstr "" + +#: ../../content/developer/howtos/translations.rst:172 +msgid "**Don't** invoke translation lookup at server launch::" +msgstr "" + +#: ../../content/developer/howtos/translations.rst:185 +msgid "**Don't** invoke translation lookup when the javascript file is read::" +msgstr "" + +#: ../../content/developer/howtos/translations.rst:196 +msgid "**Do** use lazy translation lookup method::" +msgstr "" + +#: ../../content/developer/howtos/translations.rst:210 +msgid "or **do** evaluate dynamically the translatable content::" +msgstr "" + +#: ../../content/developer/howtos/translations.rst:219 +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.rst:5 msgid "Customizing the web client" msgstr "" -#: ../../content/developer/howtos/web.rst:6 -msgid "Note: this section is really really out of date. It will be updated someday, but meanwhile, this tutorial will probably be frustrating to follow, since it was written a long time ago." +#: ../../content/developer/howtos/web.rst:9 +msgid "this section is really really out of date. It will be updated someday, but meanwhile, this tutorial will probably be frustrating to follow, since it was written a long time ago." msgstr "" -#: ../../content/developer/howtos/web.rst:15 +#: ../../content/developer/howtos/web.rst:18 msgid "This guide is about creating modules for Odoo's web client." msgstr "" -#: ../../content/developer/howtos/web.rst:17 +#: ../../content/developer/howtos/web.rst:20 msgid "To create websites with Odoo, see :doc:`website`; to add business capabilities or extend existing business systems of Odoo, see :doc:`backend`." msgstr "" -#: ../../content/developer/howtos/web.rst:22 +#: ../../content/developer/howtos/web.rst:25 msgid "This guide assumes knowledge of:" msgstr "" -#: ../../content/developer/howtos/web.rst:24 +#: ../../content/developer/howtos/web.rst:27 msgid "Javascript basics and good practices" msgstr "" -#: ../../content/developer/howtos/web.rst:25 +#: ../../content/developer/howtos/web.rst:28 msgid "jQuery_" msgstr "" -#: ../../content/developer/howtos/web.rst:26 +#: ../../content/developer/howtos/web.rst:29 msgid "`Underscore.js`_" msgstr "" -#: ../../content/developer/howtos/web.rst:28 +#: ../../content/developer/howtos/web.rst:31 msgid "It also requires :ref:`an installed Odoo `, and Git_." msgstr "" -#: ../../content/developer/howtos/web.rst:32 +#: ../../content/developer/howtos/web.rst:35 msgid "A Simple Module" msgstr "" -#: ../../content/developer/howtos/web.rst:34 +#: ../../content/developer/howtos/web.rst:37 msgid "Let's start with a simple Odoo module holding basic web component configuration and letting us test the web framework." msgstr "" -#: ../../content/developer/howtos/web.rst:37 +#: ../../content/developer/howtos/web.rst:40 msgid "The example module is available online and can be downloaded using the following command:" msgstr "" -#: ../../content/developer/howtos/web.rst:44 +#: ../../content/developer/howtos/web.rst:47 msgid "This will create a ``petstore`` folder wherever you executed the command. You then need to add that folder to Odoo's :option:`addons path `, create a new database and install the ``oepetstore`` module." msgstr "" -#: ../../content/developer/howtos/web.rst:49 +#: ../../content/developer/howtos/web.rst:52 msgid "If you browse the ``petstore`` folder, you should see the following content:" msgstr "" -#: ../../content/developer/howtos/web.rst:75 +#: ../../content/developer/howtos/web.rst:78 msgid "The module already holds various server customizations. We'll come back to these later, for now let's focus on the web-related content, in the ``static`` folder." msgstr "" -#: ../../content/developer/howtos/web.rst:79 +#: ../../content/developer/howtos/web.rst:82 msgid "Files used in the \"web\" side of an Odoo module must be placed in a ``static`` folder so they are available to a web browser, files outside that folder can not be fetched by browsers. The ``src/css``, ``src/js`` and ``src/xml`` sub-folders are conventional and not strictly necessary." msgstr "" -#: ../../content/developer/howtos/web.rst:84 +#: ../../content/developer/howtos/web.rst:87 msgid "``oepetstore/static/css/petstore.css``" msgstr "" -#: ../../content/developer/howtos/web.rst:85 +#: ../../content/developer/howtos/web.rst:88 msgid "Currently empty, will hold the CSS_ for pet store content" msgstr "" -#: ../../content/developer/howtos/web.rst:86 +#: ../../content/developer/howtos/web.rst:89 msgid "``oepetstore/static/xml/petstore.xml``" msgstr "" -#: ../../content/developer/howtos/web.rst:87 +#: ../../content/developer/howtos/web.rst:90 msgid "Mostly empty, will hold :ref:`reference/qweb` templates" msgstr "" -#: ../../content/developer/howtos/web.rst:106 +#: ../../content/developer/howtos/web.rst:109 msgid "``oepetstore/static/js/petstore.js``" msgstr "" -#: ../../content/developer/howtos/web.rst:89 +#: ../../content/developer/howtos/web.rst:92 msgid "The most important (and interesting) part, contains the logic of the application (or at least its web-browser side) as javascript. It should currently look like::" msgstr "" -#: ../../content/developer/howtos/web.rst:108 +#: ../../content/developer/howtos/web.rst:111 msgid "Which only prints a small message in the browser's console." msgstr "" -#: ../../content/developer/howtos/web.rst:110 +#: ../../content/developer/howtos/web.rst:113 msgid "The files in the ``static`` folder, need to be defined within the module in order for them to be loaded correctly. Everything in ``src/xml`` is defined in ``__manifest__.py`` while the contents of ``src/css`` and ``src/js`` are defined in ``petstore.xml``, or a similar file." msgstr "" -#: ../../content/developer/howtos/web.rst:114 +#: ../../content/developer/howtos/web.rst:117 msgid "All JavaScript files are concatenated and :term:`minified` to improve application load time." msgstr "" -#: ../../content/developer/howtos/web.rst:117 +#: ../../content/developer/howtos/web.rst:120 msgid "One of the drawback is debugging becomes more difficult as individual files disappear and the code is made significantly less readable. It is possible to disable this process by enabling the \"developer mode\": log into your Odoo instance (user *admin* password *admin* by default) open the user menu (in the top-right corner of the Odoo screen) and select :guilabel:`About Odoo` then :guilabel:`Activate the developer mode`:" msgstr "" -#: ../../content/developer/howtos/web.rst:131 +#: ../../content/developer/howtos/web.rst:134 msgid "This will reload the web client with optimizations disabled, making development and debugging significantly more comfortable." msgstr "" -#: ../../content/developer/howtos/web.rst:134 +#: ../../content/developer/howtos/web.rst:137 msgid "qweb files hooked via __manifest__.py, but js and CSS use bundles" msgstr "" -#: ../../content/developer/howtos/web.rst:137 +#: ../../content/developer/howtos/web.rst:140 msgid "Odoo JavaScript Module" msgstr "" -#: ../../content/developer/howtos/web.rst:139 +#: ../../content/developer/howtos/web.rst:142 msgid "Javascript doesn't have built-in modules. As a result variables defined in different files are all mashed together and may conflict. This has given rise to various module patterns used to build clean namespaces and limit risks of naming conflicts." msgstr "" -#: ../../content/developer/howtos/web.rst:144 +#: ../../content/developer/howtos/web.rst:147 msgid "The Odoo framework uses one such pattern to define modules within web addons, in order to both namespace code and correctly order its loading." msgstr "" -#: ../../content/developer/howtos/web.rst:147 +#: ../../content/developer/howtos/web.rst:150 msgid "``oepetstore/static/js/petstore.js`` contains a module declaration::" msgstr "" -#: ../../content/developer/howtos/web.rst:153 +#: ../../content/developer/howtos/web.rst:156 msgid "In Odoo web, modules are declared as functions set on the global ``odoo`` variable. The function's name must be the same as the addon (in this case ``oepetstore``) so the framework can find it, and automatically initialize it." msgstr "" -#: ../../content/developer/howtos/web.rst:157 +#: ../../content/developer/howtos/web.rst:160 msgid "When the web client loads your module it will call the root function and provide two parameters:" msgstr "" -#: ../../content/developer/howtos/web.rst:160 +#: ../../content/developer/howtos/web.rst:163 msgid "the first parameter is the current instance of the Odoo web client, it gives access to various capabilities defined by the Odoo (translations, network services) as well as objects defined by the core or by other modules." msgstr "" -#: ../../content/developer/howtos/web.rst:164 +#: ../../content/developer/howtos/web.rst:167 msgid "the second parameter is your own local namespace automatically created by the web client. Objects and variables which should be accessible from outside your module (either because the Odoo web client needs to call them or because others may want to customize them) should be set inside that namespace." msgstr "" -#: ../../content/developer/howtos/web.rst:171 +#: ../../content/developer/howtos/web.rst:174 msgid "Classes" msgstr "" -#: ../../content/developer/howtos/web.rst:173 +#: ../../content/developer/howtos/web.rst:176 msgid "Much as modules, and contrary to most object-oriented languages, javascript does not build in *classes*\\ [#classes]_ although it provides roughly equivalent (if lower-level and more verbose) mechanisms." msgstr "" -#: ../../content/developer/howtos/web.rst:177 +#: ../../content/developer/howtos/web.rst:180 msgid "For simplicity and developer-friendliness Odoo web provides a class system based on John Resig's `Simple JavaScript Inheritance`_." msgstr "" -#: ../../content/developer/howtos/web.rst:180 +#: ../../content/developer/howtos/web.rst:183 msgid "New classes are defined by calling the :func:`~odoo.web.Class.extend` method of :class:`odoo.web.Class`::" msgstr "" -#: ../../content/developer/howtos/web.rst:189 +#: ../../content/developer/howtos/web.rst:192 msgid "The :func:`~odoo.web.Class.extend` method takes a dictionary describing the new class's content (methods and static attributes). In this case, it will only have a ``say_hello`` method which takes no parameters." msgstr "" -#: ../../content/developer/howtos/web.rst:193 +#: ../../content/developer/howtos/web.rst:196 msgid "Classes are instantiated using the ``new`` operator::" msgstr "" -#: ../../content/developer/howtos/web.rst:199 +#: ../../content/developer/howtos/web.rst:202 msgid "And attributes of the instance can be accessed via ``this``::" msgstr "" -#: ../../content/developer/howtos/web.rst:212 +#: ../../content/developer/howtos/web.rst:215 msgid "Classes can provide an initializer to perform the initial setup of the instance, by defining an ``init()`` method. The initializer receives the parameters passed when using the ``new`` operator::" msgstr "" -#: ../../content/developer/howtos/web.rst:229 +#: ../../content/developer/howtos/web.rst:232 msgid "It is also possible to create subclasses from existing (used-defined) classes by calling :func:`~odoo.web.Class.extend` on the parent class, as is done to subclass :class:`~odoo.web.Class`::" msgstr "" -#: ../../content/developer/howtos/web.rst:243 +#: ../../content/developer/howtos/web.rst:246 msgid "When overriding a method using inheritance, you can use ``this._super()`` to call the original method::" msgstr "" -#: ../../content/developer/howtos/web.rst:259 +#: ../../content/developer/howtos/web.rst:262 msgid "``_super`` is not a standard method, it is set on-the-fly to the next method in the current inheritance chain, if any. It is only defined during the *synchronous* part of a method call, for use in asynchronous handlers (after network calls or in ``setTimeout`` callbacks) a reference to its value should be retained, it should not be accessed via ``this``::" msgstr "" -#: ../../content/developer/howtos/web.rst:282 +#: ../../content/developer/howtos/web.rst:285 msgid "Widgets Basics" msgstr "" -#: ../../content/developer/howtos/web.rst:284 +#: ../../content/developer/howtos/web.rst:287 msgid "The Odoo web client bundles jQuery_ for easy DOM manipulation. It is useful and provides a better API than standard `W3C DOM`_\\ [#dombugs]_, but insufficient to structure complex applications leading to difficult maintenance." msgstr "" -#: ../../content/developer/howtos/web.rst:289 +#: ../../content/developer/howtos/web.rst:292 msgid "Much like object-oriented desktop UI toolkits (e.g. Qt_, Cocoa_ or GTK_), Odoo Web makes specific components responsible for sections of a page. In Odoo web, the base for such components is the :class:`~odoo.Widget` class, a component specialized in handling a page section and displaying information for the user." msgstr "" -#: ../../content/developer/howtos/web.rst:296 +#: ../../content/developer/howtos/web.rst:299 msgid "Your First Widget" msgstr "" -#: ../../content/developer/howtos/web.rst:298 +#: ../../content/developer/howtos/web.rst:301 msgid "The initial demonstration module already provides a basic widget::" msgstr "" -#: ../../content/developer/howtos/web.rst:306 +#: ../../content/developer/howtos/web.rst:309 msgid "It extends :class:`~odoo.Widget` and overrides the standard method :func:`~odoo.Widget.start`, which — much like the previous ``MyClass`` — does little for now." msgstr "" -#: ../../content/developer/howtos/web.rst:310 +#: ../../content/developer/howtos/web.rst:313 msgid "This line at the end of the file::" msgstr "" -#: ../../content/developer/howtos/web.rst:315 +#: ../../content/developer/howtos/web.rst:318 msgid "registers our basic widget as a client action. Client actions will be explained later, for now this is just what allows our widget to be called and displayed when we select the :menuselection:`Pet Store --> Pet Store --> Home Page` menu." msgstr "" -#: ../../content/developer/howtos/web.rst:322 +#: ../../content/developer/howtos/web.rst:325 msgid "because the widget will be called from outside our module, the web client needs its \"fully qualified\" name, not the local version." msgstr "" -#: ../../content/developer/howtos/web.rst:326 +#: ../../content/developer/howtos/web.rst:329 msgid "Display Content" msgstr "" -#: ../../content/developer/howtos/web.rst:328 +#: ../../content/developer/howtos/web.rst:331 msgid "Widgets have a number of methods and features, but the basics are simple:" msgstr "" -#: ../../content/developer/howtos/web.rst:330 +#: ../../content/developer/howtos/web.rst:333 msgid "set up a widget" msgstr "" -#: ../../content/developer/howtos/web.rst:331 +#: ../../content/developer/howtos/web.rst:334 msgid "format the widget's data" msgstr "" -#: ../../content/developer/howtos/web.rst:332 +#: ../../content/developer/howtos/web.rst:335 msgid "display the widget" msgstr "" -#: ../../content/developer/howtos/web.rst:334 +#: ../../content/developer/howtos/web.rst:337 msgid "The ``HomePage`` widget already has a :func:`~odoo.Widget.start` method. That method is part of the normal widget lifecycle and automatically called once the widget is inserted in the page. We can use it to display some content." msgstr "" -#: ../../content/developer/howtos/web.rst:339 +#: ../../content/developer/howtos/web.rst:342 msgid "All widgets have a :attr:`~odoo.Widget.$el` which represents the section of page they're in charge of (as a jQuery_ object). Widget content should be inserted there. By default, :attr:`~odoo.Widget.$el` is an empty ``
`` element." msgstr "" -#: ../../content/developer/howtos/web.rst:344 +#: ../../content/developer/howtos/web.rst:347 msgid "A ``
`` element is usually invisible to the user if it has no content (or without specific styles giving it a size) which is why nothing is displayed on the page when ``HomePage`` is launched." msgstr "" -#: ../../content/developer/howtos/web.rst:348 +#: ../../content/developer/howtos/web.rst:351 msgid "Let's add some content to the widget's root element, using jQuery::" msgstr "" -#: ../../content/developer/howtos/web.rst:356 +#: ../../content/developer/howtos/web.rst:359 msgid "That message will now appear when you open :menuselection:`Pet Store --> Pet Store --> Home Page`" msgstr "" -#: ../../content/developer/howtos/web.rst:361 +#: ../../content/developer/howtos/web.rst:364 msgid "to refresh the javascript code loaded in Odoo Web, you will need to reload the page. There is no need to restart the Odoo server." msgstr "" -#: ../../content/developer/howtos/web.rst:364 +#: ../../content/developer/howtos/web.rst:367 msgid "The ``HomePage`` widget is used by Odoo Web and managed automatically. To learn how to use a widget \"from scratch\" let's create a new one::" msgstr "" -#: ../../content/developer/howtos/web.rst:373 +#: ../../content/developer/howtos/web.rst:376 msgid "We can now add our ``GreetingsWidget`` to the ``HomePage`` by using the ``GreetingsWidget``'s :func:`~odoo.Widget.appendTo` method::" msgstr "" -#: ../../content/developer/howtos/web.rst:384 +#: ../../content/developer/howtos/web.rst:387 msgid "``HomePage`` first adds its own content to its DOM root" msgstr "" -#: ../../content/developer/howtos/web.rst:385 +#: ../../content/developer/howtos/web.rst:388 msgid "``HomePage`` then instantiates ``GreetingsWidget``" msgstr "" -#: ../../content/developer/howtos/web.rst:386 +#: ../../content/developer/howtos/web.rst:389 msgid "Finally it tells ``GreetingsWidget`` where to insert itself, delegating part of its :attr:`~odoo.Widget.$el` to the ``GreetingsWidget``." msgstr "" -#: ../../content/developer/howtos/web.rst:389 +#: ../../content/developer/howtos/web.rst:392 msgid "When the :func:`~odoo.Widget.appendTo` method is called, it asks the widget to insert itself at the specified position and to display its content. The :func:`~odoo.Widget.start` method will be called during the call to :func:`~odoo.Widget.appendTo`." msgstr "" -#: ../../content/developer/howtos/web.rst:394 +#: ../../content/developer/howtos/web.rst:397 msgid "To see what happens under the displayed interface, we will use the browser's DOM Explorer. But first let's alter our widgets slightly so we can more easily find where they are, by :attr:`adding a class to their root elements `::" msgstr "" -#: ../../content/developer/howtos/web.rst:408 +#: ../../content/developer/howtos/web.rst:411 msgid "If you can find the relevant section of the DOM (right-click on the text then :guilabel:`Inspect Element`), it should look like this:" msgstr "" -#: ../../content/developer/howtos/web.rst:420 +#: ../../content/developer/howtos/web.rst:423 msgid "Which clearly shows the two ``
`` elements automatically created by :class:`~odoo.Widget`, because we added some classes on them." msgstr "" -#: ../../content/developer/howtos/web.rst:423 +#: ../../content/developer/howtos/web.rst:426 msgid "We can also see the two message-holding divs we added ourselves" msgstr "" -#: ../../content/developer/howtos/web.rst:425 +#: ../../content/developer/howtos/web.rst:428 msgid "Finally, note the ``
`` element which represents the ``GreetingsWidget`` instance is *inside* the ``
`` which represents the ``HomePage`` instance, since we appended" msgstr "" -#: ../../content/developer/howtos/web.rst:431 +#: ../../content/developer/howtos/web.rst:434 msgid "Widget Parents and Children" msgstr "" -#: ../../content/developer/howtos/web.rst:433 +#: ../../content/developer/howtos/web.rst:436 msgid "In the previous part, we instantiated a widget using this syntax::" msgstr "" -#: ../../content/developer/howtos/web.rst:437 +#: ../../content/developer/howtos/web.rst:440 msgid "The first argument is ``this``, which in that case was a ``HomePage`` instance. This tells the widget being created which other widget is its *parent*." msgstr "" -#: ../../content/developer/howtos/web.rst:441 +#: ../../content/developer/howtos/web.rst:444 msgid "As we've seen, widgets are usually inserted in the DOM by another widget and *inside* that other widget's root element. This means most widgets are \"part\" of another widget, and exist on behalf of it. We call the container the *parent*, and the contained widget the *child*." msgstr "" -#: ../../content/developer/howtos/web.rst:446 +#: ../../content/developer/howtos/web.rst:449 msgid "Due to multiple technical and conceptual reasons, it is necessary for a widget to know who is its parent and who are its children." msgstr "" -#: ../../content/developer/howtos/web.rst:457 +#: ../../content/developer/howtos/web.rst:460 msgid ":func:`~odoo.Widget.getParent`" msgstr "" -#: ../../content/developer/howtos/web.rst:450 +#: ../../content/developer/howtos/web.rst:453 msgid "can be used to get the parent of a widget::" msgstr "" -#: ../../content/developer/howtos/web.rst:469 +#: ../../content/developer/howtos/web.rst:472 msgid ":func:`~odoo.Widget.getChildren`" msgstr "" -#: ../../content/developer/howtos/web.rst:460 +#: ../../content/developer/howtos/web.rst:463 msgid "can be used to get a list of its children::" msgstr "" -#: ../../content/developer/howtos/web.rst:471 +#: ../../content/developer/howtos/web.rst:474 msgid "When overriding the :func:`~odoo.Widget.init` method of a widget it is *of the utmost importance* to pass the parent to the ``this._super()`` call, otherwise the relation will not be set up correctly::" msgstr "" -#: ../../content/developer/howtos/web.rst:482 +#: ../../content/developer/howtos/web.rst:485 msgid "Finally, if a widget does not have a parent (e.g. because it's the root widget of the application), ``null`` can be provided as parent::" msgstr "" -#: ../../content/developer/howtos/web.rst:488 +#: ../../content/developer/howtos/web.rst:491 msgid "Destroying Widgets" msgstr "" -#: ../../content/developer/howtos/web.rst:490 +#: ../../content/developer/howtos/web.rst:493 msgid "If you can display content to your users, you should also be able to erase it. This is done via the :func:`~odoo.Widget.destroy` method::" msgstr "" -#: ../../content/developer/howtos/web.rst:495 +#: ../../content/developer/howtos/web.rst:498 msgid "When a widget is destroyed it will first call :func:`~odoo.Widget.destroy` on all its children. Then it erases itself from the DOM. If you have set up permanent structures in :func:`~odoo.Widget.init` or :func:`~odoo.Widget.start` which must be explicitly cleaned up (because the garbage collector will not handle them), you can override :func:`~odoo.Widget.destroy`." msgstr "" -#: ../../content/developer/howtos/web.rst:504 +#: ../../content/developer/howtos/web.rst:507 msgid "when overriding :func:`~odoo.Widget.destroy`, ``_super()`` *must always* be called otherwise the widget and its children are not correctly cleaned up leaving possible memory leaks and \"phantom events\", even if no error is displayed" msgstr "" -#: ../../content/developer/howtos/web.rst:510 +#: ../../content/developer/howtos/web.rst:513 msgid "The QWeb Template Engine" msgstr "" -#: ../../content/developer/howtos/web.rst:512 +#: ../../content/developer/howtos/web.rst:515 msgid "In the previous section we added content to our widgets by directly manipulating (and adding to) their DOM::" msgstr "" -#: ../../content/developer/howtos/web.rst:517 +#: ../../content/developer/howtos/web.rst:520 msgid "This allows generating and displaying any type of content, but gets unwieldy when generating significant amounts of DOM (lots of duplication, quoting issues, ...)" msgstr "" -#: ../../content/developer/howtos/web.rst:521 +#: ../../content/developer/howtos/web.rst:524 msgid "As many other environments, Odoo's solution is to use a `template engine`_. Odoo's template engine is called :ref:`reference/qweb`." msgstr "" -#: ../../content/developer/howtos/web.rst:524 +#: ../../content/developer/howtos/web.rst:527 msgid "QWeb is an XML-based templating language, similar to `Genshi `_, `Thymeleaf `_ or `Facelets `_. It has the following characteristics:" msgstr "" -#: ../../content/developer/howtos/web.rst:530 +#: ../../content/developer/howtos/web.rst:533 msgid "It's implemented fully in JavaScript and rendered in the browser" msgstr "" -#: ../../content/developer/howtos/web.rst:531 +#: ../../content/developer/howtos/web.rst:534 msgid "Each template file (XML files) contains multiple templates" msgstr "" -#: ../../content/developer/howtos/web.rst:532 +#: ../../content/developer/howtos/web.rst:535 msgid "It has special support in Odoo Web's :class:`~odoo.Widget`, though it can be used outside of Odoo's web client (and it's possible to use :class:`~odoo.Widget` without relying on QWeb)" msgstr "" -#: ../../content/developer/howtos/web.rst:538 +#: ../../content/developer/howtos/web.rst:541 msgid "The rationale behind using QWeb instead of existing javascript template engines is the extensibility of pre-existing (third-party) templates, much like Odoo :ref:`views `." msgstr "" -#: ../../content/developer/howtos/web.rst:542 +#: ../../content/developer/howtos/web.rst:545 msgid "Most javascript template engines are text-based which precludes easy structural extensibility where an XML-based templating engine can be generically altered using e.g. XPath or CSS and a tree-alteration DSL (or even just XSLT). This flexibility and extensibility is a core characteristic of Odoo, and losing it was considered unacceptable." msgstr "" -#: ../../content/developer/howtos/web.rst:549 +#: ../../content/developer/howtos/web.rst:552 msgid "Using QWeb" msgstr "" -#: ../../content/developer/howtos/web.rst:551 +#: ../../content/developer/howtos/web.rst:554 msgid "First let's define a simple QWeb template in the almost-empty ``oepetstore/static/src/xml/petstore.xml`` file:" msgstr "" -#: ../../content/developer/howtos/web.rst:563 +#: ../../content/developer/howtos/web.rst:566 msgid "Now we can use this template inside of the ``HomePage`` widget. Using the ``QWeb`` loader variable defined at the top of the page, we can call to the template defined in the XML file::" msgstr "" -#: ../../content/developer/howtos/web.rst:573 +#: ../../content/developer/howtos/web.rst:576 msgid ":func:`QWeb.render` looks for the specified template, renders it to a string and returns the result." msgstr "" -#: ../../content/developer/howtos/web.rst:576 +#: ../../content/developer/howtos/web.rst:579 msgid "However, because :class:`~odoo.Widget` has special integration for QWeb the template can be set directly on the widget via its :attr:`~odoo.Widget.template` attribute::" msgstr "" -#: ../../content/developer/howtos/web.rst:587 +#: ../../content/developer/howtos/web.rst:590 msgid "Although the result looks similar, there are two differences between these usages:" msgstr "" -#: ../../content/developer/howtos/web.rst:590 +#: ../../content/developer/howtos/web.rst:593 msgid "with the second version, the template is rendered right before :func:`~odoo.Widget.start` is called" msgstr "" -#: ../../content/developer/howtos/web.rst:592 +#: ../../content/developer/howtos/web.rst:595 msgid "in the first version the template's content is added to the widget's root element, whereas in the second version the template's root element is directly *set as* the widget's root element. Which is why the \"greetings\" sub-widget also gets a red background" msgstr "" -#: ../../content/developer/howtos/web.rst:599 +#: ../../content/developer/howtos/web.rst:602 msgid "templates should have a single non-``t`` root element, especially if they're set as a widget's :attr:`~odoo.Widget.template`. If there are multiple \"root elements\", results are undefined (usually only the first root element will be used and the others will be ignored)" msgstr "" -#: ../../content/developer/howtos/web.rst:605 +#: ../../content/developer/howtos/web.rst:608 msgid "QWeb Context" msgstr "" -#: ../../content/developer/howtos/web.rst:607 +#: ../../content/developer/howtos/web.rst:610 msgid "QWeb templates can be given data and can contain basic display logic." msgstr "" -#: ../../content/developer/howtos/web.rst:609 +#: ../../content/developer/howtos/web.rst:612 msgid "For explicit calls to :func:`QWeb.render`, the template data is passed as second parameter::" msgstr "" -#: ../../content/developer/howtos/web.rst:614 +#: ../../content/developer/howtos/web.rst:617 msgid "with the template modified to:" msgstr "" -#: ../../content/developer/howtos/web.rst:622 +#: ../../content/developer/howtos/web.rst:625 msgid "will result in:" msgstr "" -#: ../../content/developer/howtos/web.rst:628 +#: ../../content/developer/howtos/web.rst:631 msgid "When using :class:`~odoo.Widget`'s integration it is not possible to provide additional data to the template. The template will be given a single ``widget`` context variable, referencing the widget being rendered right before :func:`~odoo.Widget.start` is called (the widget's state will essentially be that set up by :func:`~odoo.Widget.init`):" msgstr "" -#: ../../content/developer/howtos/web.rst:652 -msgid "Result:" -msgstr "" - -#: ../../content/developer/howtos/web.rst:659 +#: ../../content/developer/howtos/web.rst:662 msgid "Template Declaration" msgstr "" -#: ../../content/developer/howtos/web.rst:661 +#: ../../content/developer/howtos/web.rst:664 msgid "We've seen how to *render* QWeb templates, let's now see the syntax of the templates themselves." msgstr "" -#: ../../content/developer/howtos/web.rst:664 +#: ../../content/developer/howtos/web.rst:667 msgid "A QWeb template is composed of regular XML mixed with QWeb *directives*. A QWeb directive is declared with XML attributes starting with ``t-``." msgstr "" -#: ../../content/developer/howtos/web.rst:667 +#: ../../content/developer/howtos/web.rst:670 msgid "The most basic directive is ``t-name``, used to declare new templates in a template file:" msgstr "" -#: ../../content/developer/howtos/web.rst:678 +#: ../../content/developer/howtos/web.rst:681 msgid "``t-name`` takes the name of the template being defined, and declares that it can be called using :func:`QWeb.render`. It can only be used at the top-level of a template file." msgstr "" -#: ../../content/developer/howtos/web.rst:683 +#: ../../content/developer/howtos/web.rst:686 msgid "Escaping" msgstr "" -#: ../../content/developer/howtos/web.rst:685 +#: ../../content/developer/howtos/web.rst:688 msgid "The ``t-esc`` directive can be used to output text:" msgstr "" -#: ../../content/developer/howtos/web.rst:691 +#: ../../content/developer/howtos/web.rst:694 msgid "It takes a Javascript expression which is evaluated, the result of the expression is then HTML-escaped and inserted in the document. Since it's an expression it's possible to provide just a variable name as above, or a more complex expression like a computation:" msgstr "" -#: ../../content/developer/howtos/web.rst:700 +#: ../../content/developer/howtos/web.rst:703 msgid "or method calls:" msgstr "" -#: ../../content/developer/howtos/web.rst:707 +#: ../../content/developer/howtos/web.rst:710 msgid "Outputting HTML" msgstr "" -#: ../../content/developer/howtos/web.rst:709 +#: ../../content/developer/howtos/web.rst:712 msgid "To inject HTML in the page being rendered, use ``t-raw``. Like ``t-esc`` it takes an arbitrary Javascript expression as parameter, but it does not perform an HTML-escape step." msgstr "" -#: ../../content/developer/howtos/web.rst:719 +#: ../../content/developer/howtos/web.rst:722 msgid "``t-raw`` *must not* be used on any data which may contain non-escaped user-provided content as this leads to `cross-site scripting`_ vulnerabilities" msgstr "" -#: ../../content/developer/howtos/web.rst:724 -#: ../../content/developer/reference/qweb.rst:66 +#: ../../content/developer/howtos/web.rst:727 +#: ../../content/developer/reference/frontend/qweb.rst:64 msgid "Conditionals" msgstr "" -#: ../../content/developer/howtos/web.rst:726 +#: ../../content/developer/howtos/web.rst:729 msgid "QWeb can have conditional blocks using ``t-if``. The directive takes an arbitrary expression, if the expression is falsy (``false``, ``null``, ``0`` or an empty string) the whole block is suppressed, otherwise it is displayed." msgstr "" -#: ../../content/developer/howtos/web.rst:743 +#: ../../content/developer/howtos/web.rst:746 msgid "QWeb doesn't have an \"else\" structure, use a second ``t-if`` with the original condition inverted. You may want to store the condition in a local variable if it's a complex or expensive expression." msgstr "" -#: ../../content/developer/howtos/web.rst:748 +#: ../../content/developer/howtos/web.rst:751 msgid "Iteration" msgstr "" -#: ../../content/developer/howtos/web.rst:750 +#: ../../content/developer/howtos/web.rst:753 msgid "To iterate on a list, use ``t-foreach`` and ``t-as``. ``t-foreach`` takes an expression returning a list to iterate on ``t-as`` takes a variable name to bind to each item during iteration." msgstr "" -#: ../../content/developer/howtos/web.rst:764 +#: ../../content/developer/howtos/web.rst:767 msgid "``t-foreach`` can also be used with numbers and objects (dictionaries)" msgstr "" -#: ../../content/developer/howtos/web.rst:768 +#: ../../content/developer/howtos/web.rst:771 msgid "Defining attributes" msgstr "" -#: ../../content/developer/howtos/web.rst:770 +#: ../../content/developer/howtos/web.rst:773 msgid "QWeb provides two related directives to define computed attributes: :samp:`t-att-{name}` and :samp:`t-attf-{name}`. In either case, *name* is the name of the attribute to create (e.g. ``t-att-id`` defines the attribute ``id`` after rendering)." msgstr "" -#: ../../content/developer/howtos/web.rst:775 +#: ../../content/developer/howtos/web.rst:778 msgid "``t-att-`` takes a javascript expression whose result is set as the attribute's value, it is most useful if all of the attribute's value is computed:" msgstr "" -#: ../../content/developer/howtos/web.rst:786 +#: ../../content/developer/howtos/web.rst:789 msgid "``t-attf-`` takes a *format string*. A format string is literal text with interpolation blocks inside, an interpolation block is a javascript expression between ``{{`` and ``}}``, which will be replaced by the result of the expression. It is most useful for attributes which are partially literal and partially computed such as a class:" msgstr "" -#: ../../content/developer/howtos/web.rst:799 +#: ../../content/developer/howtos/web.rst:802 msgid "Calling other templates" msgstr "" -#: ../../content/developer/howtos/web.rst:801 +#: ../../content/developer/howtos/web.rst:804 msgid "Templates can be split into sub-templates (for simplicity, maintainability, reusability or to avoid excessive markup nesting)." msgstr "" -#: ../../content/developer/howtos/web.rst:804 +#: ../../content/developer/howtos/web.rst:807 msgid "This is done using the ``t-call`` directive, which takes the name of the template to render:" msgstr "" -#: ../../content/developer/howtos/web.rst:818 +#: ../../content/developer/howtos/web.rst:821 msgid "rendering the ``A`` template will result in:" msgstr "" -#: ../../content/developer/howtos/web.rst:826 +#: ../../content/developer/howtos/web.rst:829 msgid "Sub-templates inherit the rendering context of their caller." msgstr "" -#: ../../content/developer/howtos/web.rst:829 +#: ../../content/developer/howtos/web.rst:832 msgid "To Learn More About QWeb" msgstr "" -#: ../../content/developer/howtos/web.rst:831 +#: ../../content/developer/howtos/web.rst:834 msgid "For a QWeb reference, see :ref:`reference/qweb`." msgstr "" -#: ../../content/developer/howtos/web.rst:834 -#: ../../content/developer/howtos/web.rst:1100 +#: ../../content/developer/howtos/web.rst:837 +#: ../../content/developer/howtos/web.rst:1103 msgid "Exercise" msgstr "" -#: ../../content/developer/howtos/web.rst:836 +#: ../../content/developer/howtos/web.rst:839 msgid "Usage of QWeb in Widgets" msgstr "" -#: ../../content/developer/howtos/web.rst:838 +#: ../../content/developer/howtos/web.rst:841 msgid "Create a widget whose constructor takes two parameters aside from ``parent``: ``product_names`` and ``color``." msgstr "" -#: ../../content/developer/howtos/web.rst:841 +#: ../../content/developer/howtos/web.rst:844 msgid "``product_names`` should an array of strings, each one the name of a product" msgstr "" -#: ../../content/developer/howtos/web.rst:843 +#: ../../content/developer/howtos/web.rst:846 msgid "``color`` is a string containing a color in CSS color format (ie: ``#000000`` for black)." msgstr "" -#: ../../content/developer/howtos/web.rst:846 +#: ../../content/developer/howtos/web.rst:849 msgid "The widget should display the given product names one under the other, each one in a separate box with a background color with the value of ``color`` and a border. You should use QWeb to render the HTML. Any necessary CSS should be in ``oepetstore/static/src/css/petstore.css``." msgstr "" -#: ../../content/developer/howtos/web.rst:851 +#: ../../content/developer/howtos/web.rst:854 msgid "Use the widget in ``HomePage`` with half a dozen products." msgstr "" -#: ../../content/developer/howtos/web.rst:915 +#: ../../content/developer/howtos/web.rst:918 msgid "Widget Helpers" msgstr "" -#: ../../content/developer/howtos/web.rst:918 +#: ../../content/developer/howtos/web.rst:921 msgid "``Widget``'s jQuery Selector" msgstr "" -#: ../../content/developer/howtos/web.rst:920 +#: ../../content/developer/howtos/web.rst:923 msgid "Selecting DOM elements within a widget can be performed by calling the ``find()`` method on the widget's DOM root::" msgstr "" -#: ../../content/developer/howtos/web.rst:925 +#: ../../content/developer/howtos/web.rst:928 msgid "But because it's a common operation, :class:`~odoo.Widget` provides an equivalent shortcut through the :func:`~odoo.Widget.$` method::" msgstr "" -#: ../../content/developer/howtos/web.rst:936 +#: ../../content/developer/howtos/web.rst:939 msgid "The global jQuery function ``$()`` should *never* be used unless it is absolutely necessary: selection on a widget's root are scoped to the widget and local to it, but selections with ``$()`` are global to the page/application and may match parts of other widgets and views, leading to odd or dangerous side-effects. Since a widget should generally act only on the DOM section it owns, there is no cause for global selection." msgstr "" -#: ../../content/developer/howtos/web.rst:944 +#: ../../content/developer/howtos/web.rst:947 msgid "Easier DOM Events Binding" msgstr "" -#: ../../content/developer/howtos/web.rst:946 +#: ../../content/developer/howtos/web.rst:949 msgid "We have previously bound DOM events using normal jQuery event handlers (e.g. ``.click()`` or ``.change()``) on widget elements::" msgstr "" -#: ../../content/developer/howtos/web.rst:961 +#: ../../content/developer/howtos/web.rst:964 msgid "While this works it has a few issues:" msgstr "" -#: ../../content/developer/howtos/web.rst:963 +#: ../../content/developer/howtos/web.rst:966 msgid "it is rather verbose" msgstr "" -#: ../../content/developer/howtos/web.rst:964 +#: ../../content/developer/howtos/web.rst:967 msgid "it does not support replacing the widget's root element at runtime as the binding is only performed when ``start()`` is run (during widget initialization)" msgstr "" -#: ../../content/developer/howtos/web.rst:967 +#: ../../content/developer/howtos/web.rst:970 msgid "it requires dealing with ``this``-binding issues" msgstr "" -#: ../../content/developer/howtos/web.rst:969 +#: ../../content/developer/howtos/web.rst:972 msgid "Widgets thus provide a shortcut to DOM event binding via :attr:`~odoo.Widget.events`::" msgstr "" -#: ../../content/developer/howtos/web.rst:981 +#: ../../content/developer/howtos/web.rst:984 msgid ":attr:`~odoo.Widget.events` is an object (mapping) of an event to the function or method to call when the event is triggered:" msgstr "" -#: ../../content/developer/howtos/web.rst:984 +#: ../../content/developer/howtos/web.rst:987 msgid "the key is an event name, possibly refined with a CSS selector in which case only if the event happens on a selected sub-element will the function or method run: ``click`` will handle all clicks within the widget, but ``click .my_button`` will only handle clicks in elements bearing the ``my_button`` class" msgstr "" -#: ../../content/developer/howtos/web.rst:989 +#: ../../content/developer/howtos/web.rst:992 msgid "the value is the action to perform when the event is triggered" msgstr "" -#: ../../content/developer/howtos/web.rst:991 +#: ../../content/developer/howtos/web.rst:994 msgid "It can be either a function::" msgstr "" -#: ../../content/developer/howtos/web.rst:997 +#: ../../content/developer/howtos/web.rst:1000 msgid "or the name of a method on the object (see example above)." msgstr "" -#: ../../content/developer/howtos/web.rst:999 +#: ../../content/developer/howtos/web.rst:1002 msgid "In either case, the ``this`` is the widget instance and the handler is given a single parameter, the `jQuery event object`_ for the event." msgstr "" -#: ../../content/developer/howtos/web.rst:1003 +#: ../../content/developer/howtos/web.rst:1006 msgid "Widget Events and Properties" msgstr "" -#: ../../content/developer/howtos/web.rst:1006 +#: ../../content/developer/howtos/web.rst:1009 msgid "Events" msgstr "" -#: ../../content/developer/howtos/web.rst:1008 +#: ../../content/developer/howtos/web.rst:1011 msgid "Widgets provide an event system (separate from the DOM/jQuery event system described above): a widget can fire events on itself, and other widgets (or itself) can bind themselves and listen for these events::" msgstr "" -#: ../../content/developer/howtos/web.rst:1028 +#: ../../content/developer/howtos/web.rst:1031 msgid "This widget acts as a facade, transforming user input (through DOM events) into a documentable internal event to which parent widgets can bind themselves." msgstr "" -#: ../../content/developer/howtos/web.rst:1032 +#: ../../content/developer/howtos/web.rst:1035 msgid ":func:`~odoo.Widget.trigger` takes the name of the event to trigger as its first (mandatory) argument, any further arguments are treated as event data and passed directly to listeners." msgstr "" -#: ../../content/developer/howtos/web.rst:1036 +#: ../../content/developer/howtos/web.rst:1039 msgid "We can then set up a parent event instantiating our generic widget and listening to the ``user_chose`` event using :func:`~odoo.Widget.on`::" msgstr "" -#: ../../content/developer/howtos/web.rst:1054 +#: ../../content/developer/howtos/web.rst:1057 msgid ":func:`~odoo.Widget.on` binds a function to be called when the event identified by ``event_name`` is. The ``func`` argument is the function to call and ``object`` is the object to which that function is related if it is a method. The bound function will be called with the additional arguments of :func:`~odoo.Widget.trigger` if it has any. Example::" msgstr "" -#: ../../content/developer/howtos/web.rst:1073 +#: ../../content/developer/howtos/web.rst:1076 msgid "Triggering events on an other widget is generally a bad idea. The main exception to that rule is ``odoo.web.bus`` which exists specifically to broadcasts evens in which any widget could be interested throughout the Odoo web application." msgstr "" -#: ../../content/developer/howtos/web.rst:1079 +#: ../../content/developer/howtos/web.rst:1082 msgid "Properties" msgstr "" -#: ../../content/developer/howtos/web.rst:1081 +#: ../../content/developer/howtos/web.rst:1084 msgid "Properties are very similar to normal object attributes in that they allow storing data on a widget instance, however they have the additional feature that they trigger events when set::" msgstr "" -#: ../../content/developer/howtos/web.rst:1094 +#: ../../content/developer/howtos/web.rst:1097 msgid ":func:`~odoo.Widget.set` sets the value of a property and triggers :samp:`change:{propname}` (where *propname* is the property name passed as first parameter to :func:`~odoo.Widget.set`) and ``change``" msgstr "" -#: ../../content/developer/howtos/web.rst:1097 +#: ../../content/developer/howtos/web.rst:1100 msgid ":func:`~odoo.Widget.get` retrieves the value of a property." msgstr "" -#: ../../content/developer/howtos/web.rst:1102 +#: ../../content/developer/howtos/web.rst:1105 msgid "Widget Properties and Events" msgstr "" -#: ../../content/developer/howtos/web.rst:1104 +#: ../../content/developer/howtos/web.rst:1107 msgid "Create a widget ``ColorInputWidget`` that will display 3 ````. Each of these ```` is dedicated to type a hexadecimal number from 00 to FF. When any of these ```` is modified by the user the widget must query the content of the three ````, concatenate their values to have a complete CSS color code (ie: ``#00FF00``) and put the result in a property named ``color``. Please note the jQuery ``change()`` event that you can bind on any HTML ```` element and the ``val()`` method that can query the current value of that ```` could be useful to you for this exercise." msgstr "" -#: ../../content/developer/howtos/web.rst:1114 +#: ../../content/developer/howtos/web.rst:1117 msgid "Then, modify the ``HomePage`` widget to instantiate ``ColorInputWidget`` and display it. The ``HomePage`` widget should also display an empty rectangle. That rectangle must always, at any moment, have the same background color as the color in the ``color`` property of the ``ColorInputWidget`` instance." msgstr "" -#: ../../content/developer/howtos/web.rst:1120 +#: ../../content/developer/howtos/web.rst:1123 msgid "Use QWeb to generate all HTML." msgstr "" -#: ../../content/developer/howtos/web.rst:1193 +#: ../../content/developer/howtos/web.rst:1196 msgid "Modify existing widgets and classes" msgstr "" -#: ../../content/developer/howtos/web.rst:1195 +#: ../../content/developer/howtos/web.rst:1198 msgid "The class system of the Odoo web framework allows direct modification of existing classes using the :func:`~odoo.web.Class.include` method::" msgstr "" -#: ../../content/developer/howtos/web.rst:1213 +#: ../../content/developer/howtos/web.rst:1216 msgid "This system is similar to the inheritance mechanism, except it will alter the target class in-place instead of creating a new class." msgstr "" -#: ../../content/developer/howtos/web.rst:1216 +#: ../../content/developer/howtos/web.rst:1219 msgid "In that case, ``this._super()`` will call the original implementation of a method being replaced/redefined. If the class already had sub-classes, all calls to ``this._super()`` in sub-classes will call the new implementations defined in the call to :func:`~odoo.web.Class.include`. This will also work if some instances of the class (or of any of its sub-classes) were created prior to the call to :func:`~odoo.Widget.include`." msgstr "" -#: ../../content/developer/howtos/web.rst:1224 -msgid "Translations" -msgstr "" - -#: ../../content/developer/howtos/web.rst:1226 +#: ../../content/developer/howtos/web.rst:1229 msgid "The process to translate text in Python and JavaScript code is very similar. You could have noticed these lines at the beginning of the ``petstore.js`` file::" msgstr "" -#: ../../content/developer/howtos/web.rst:1233 +#: ../../content/developer/howtos/web.rst:1236 msgid "These lines are simply used to import the translation functions in the current JavaScript module. They are used thus::" msgstr "" -#: ../../content/developer/howtos/web.rst:1238 +#: ../../content/developer/howtos/web.rst:1241 msgid "In Odoo, translations files are automatically generated by scanning the source code. All piece of code that calls a certain function are detected and their content is added to a translation file that will then be sent to the translators. In Python, the function is ``_()``. In JavaScript the function is :func:`~odoo.web._t` (and also :func:`~odoo.web._lt`)." msgstr "" -#: ../../content/developer/howtos/web.rst:1244 +#: ../../content/developer/howtos/web.rst:1247 msgid "``_t()`` will return the translation defined for the text it is given. If no translation is defined for that text, it will return the original text as-is." msgstr "" -#: ../../content/developer/howtos/web.rst:1249 +#: ../../content/developer/howtos/web.rst:1252 msgid "To inject user-provided values in translatable strings, it is recommended to use `_.str.sprintf `_ with named arguments *after* the translation::" msgstr "" -#: ../../content/developer/howtos/web.rst:1259 +#: ../../content/developer/howtos/web.rst:1262 msgid "This makes translatable strings more readable to translators, and gives them more flexibility to reorder or ignore parameters." msgstr "" -#: ../../content/developer/howtos/web.rst:1262 +#: ../../content/developer/howtos/web.rst:1265 msgid ":func:`~odoo.web._lt` (\"lazy translate\") is similar but somewhat more complex: instead of translating its parameter immediately, it returns an object which, when converted to a string, will perform the translation." msgstr "" -#: ../../content/developer/howtos/web.rst:1266 +#: ../../content/developer/howtos/web.rst:1269 msgid "It is used to define translatable terms before the translations system is initialized, for class attributes for instance (as modules are loaded before the user's language is configured and translations are downloaded)." msgstr "" -#: ../../content/developer/howtos/web.rst:1271 +#: ../../content/developer/howtos/web.rst:1274 msgid "Communication with the Odoo Server" msgstr "" -#: ../../content/developer/howtos/web.rst:1274 +#: ../../content/developer/howtos/web.rst:1277 msgid "Contacting Models" msgstr "" -#: ../../content/developer/howtos/web.rst:1276 +#: ../../content/developer/howtos/web.rst:1279 msgid "Most operations with Odoo involve communicating with *models* implementing business concern, these models will then (potentially) interact with some storage engine (usually PostgreSQL_)." msgstr "" -#: ../../content/developer/howtos/web.rst:1280 +#: ../../content/developer/howtos/web.rst:1283 msgid "Although jQuery_ provides a `$.ajax`_ function for network interactions, communicating with Odoo requires additional metadata whose setup before every call would be verbose and error-prone. As a result, Odoo web provides higher-level communication primitives." msgstr "" -#: ../../content/developer/howtos/web.rst:1285 +#: ../../content/developer/howtos/web.rst:1288 msgid "To demonstrate this, the file ``petstore.py`` already contains a small model with a sample method:" msgstr "" -#: ../../content/developer/howtos/web.rst:1300 +#: ../../content/developer/howtos/web.rst:1303 msgid "This declares a model with two fields, and a method ``my_method()`` which returns a literal dictionary." msgstr "" -#: ../../content/developer/howtos/web.rst:1303 +#: ../../content/developer/howtos/web.rst:1306 msgid "Here is a sample widget that calls ``my_method()`` and displays the result::" msgstr "" -#: ../../content/developer/howtos/web.rst:1316 +#: ../../content/developer/howtos/web.rst:1319 msgid "The class used to call Odoo models is :class:`odoo.Model`. It is instantiated with the Odoo model's name as first parameter (``oepetstore.message_of_the_day`` here)." msgstr "" -#: ../../content/developer/howtos/web.rst:1320 +#: ../../content/developer/howtos/web.rst:1323 msgid ":func:`~odoo.web.Model.call` can be used to call any (public) method of an Odoo model. It takes the following positional arguments:" msgstr "" -#: ../../content/developer/howtos/web.rst:1323 -#: ../../content/developer/reference/actions.rst:19 -#: ../../content/developer/reference/actions.rst:416 -#: ../../content/developer/reference/data.rst:221 -#: ../../content/developer/reference/views.rst:1456 -#: ../../content/developer/reference/views.rst:1490 -#: ../../content/developer/reference/views.rst:1570 -#: ../../content/developer/reference/views.rst:1680 -#: ../../content/developer/reference/views.rst:1841 -#: ../../content/developer/reference/views.rst:1977 -#: ../../content/developer/webservices/odoo.rst:1014 -#: ../../content/developer/webservices/odoo.rst:1163 -msgid "``name``" -msgstr "" - -#: ../../content/developer/howtos/web.rst:1324 +#: ../../content/developer/howtos/web.rst:1327 msgid "The name of the method to call, ``my_method`` here" msgstr "" -#: ../../content/developer/howtos/web.rst:1340 -#: ../../content/developer/reference/views.rst:1458 +#: ../../content/developer/howtos/web.rst:1343 +#: ../../content/developer/reference/backend/views.rst:1786 msgid "``args``" msgstr "" -#: ../../content/developer/howtos/web.rst:1326 +#: ../../content/developer/howtos/web.rst:1329 msgid "an array of `positional arguments`_ to provide to the method. Because the example has no positional argument to provide, the ``args`` parameter is not provided." msgstr "" -#: ../../content/developer/howtos/web.rst:1330 +#: ../../content/developer/howtos/web.rst:1333 msgid "Here is an other example with positional arguments:" msgstr "" -#: ../../content/developer/howtos/web.rst:1354 +#: ../../content/developer/howtos/web.rst:1357 msgid "``kwargs``" msgstr "" -#: ../../content/developer/howtos/web.rst:1343 +#: ../../content/developer/howtos/web.rst:1346 msgid "a mapping of `keyword arguments`_ to pass. The example provides a single named argument ``context``." msgstr "" -#: ../../content/developer/howtos/web.rst:1356 +#: ../../content/developer/howtos/web.rst:1359 msgid ":func:`~odoo.Widget.call` returns a deferred resolved with the value returned by the model's method as first argument." msgstr "" -#: ../../content/developer/howtos/web.rst:1360 +#: ../../content/developer/howtos/web.rst:1363 msgid "CompoundContext" msgstr "" -#: ../../content/developer/howtos/web.rst:1362 +#: ../../content/developer/howtos/web.rst:1365 msgid "The previous section used a ``context`` argument which was not explained in the method call::" msgstr "" -#: ../../content/developer/howtos/web.rst:1367 +#: ../../content/developer/howtos/web.rst:1370 msgid "The context is like a \"magic\" argument that the web client will always give to the server when calling a method. The context is a dictionary containing multiple keys. One of the most important key is the language of the user, used by the server to translate all the messages of the application. Another one is the time zone of the user, used to compute correctly dates and times if Odoo is used by people in different countries." msgstr "" -#: ../../content/developer/howtos/web.rst:1374 +#: ../../content/developer/howtos/web.rst:1377 msgid "The ``argument`` is necessary in all methods, otherwise bad things could happen (such as the application not being translated correctly). That's why, when you call a model's method, you should always provide that argument. The solution to achieve that is to use :class:`odoo.web.CompoundContext`." msgstr "" -#: ../../content/developer/howtos/web.rst:1379 +#: ../../content/developer/howtos/web.rst:1382 msgid ":class:`~odoo.web.CompoundContext` is a class used to pass the user's context (with language, time zone, etc...) to the server as well as adding new keys to the context (some models' methods use arbitrary keys added to the context). It is created by giving to its constructor any number of dictionaries or other :class:`~odoo.web.CompoundContext` instances. It will merge all those contexts before sending them to the server." msgstr "" -#: ../../content/developer/howtos/web.rst:1397 +#: ../../content/developer/howtos/web.rst:1400 msgid "You can see the dictionary in the argument ``context`` contains some keys that are related to the configuration of the current user in Odoo plus the ``new_key`` key that was added when instantiating :class:`~odoo.web.CompoundContext`." msgstr "" -#: ../../content/developer/howtos/web.rst:1403 +#: ../../content/developer/howtos/web.rst:1406 msgid "Queries" msgstr "" -#: ../../content/developer/howtos/web.rst:1405 +#: ../../content/developer/howtos/web.rst:1408 msgid "While :func:`~odoo.Model.call` is sufficient for any interaction with Odoo models, Odoo Web provides a helper for simpler and clearer querying of models (fetching of records based on various conditions): :func:`~odoo.Model.query` which acts as a shortcut for the common combination of :py:meth:`~odoo.models.Model.search` and ::py:meth:`~odoo.models.Model.read`. It provides a clearer syntax to search and read models::" msgstr "" -#: ../../content/developer/howtos/web.rst:1420 +#: ../../content/developer/howtos/web.rst:1423 msgid "versus::" msgstr "" -#: ../../content/developer/howtos/web.rst:1430 +#: ../../content/developer/howtos/web.rst:1433 msgid ":func:`~odoo.web.Model.query` takes an optional list of fields as parameter (if no field is provided, all fields of the model are fetched). It returns a :class:`odoo.web.Query` which can be further customized before being executed" msgstr "" -#: ../../content/developer/howtos/web.rst:1434 +#: ../../content/developer/howtos/web.rst:1437 msgid ":class:`~odoo.web.Query` represents the query being built. It is immutable, methods to customize the query actually return a modified copy, so it's possible to use the original and the new version side-by-side. See :class:`~odoo.web.Query` for its customization options." msgstr "" -#: ../../content/developer/howtos/web.rst:1439 +#: ../../content/developer/howtos/web.rst:1442 msgid "When the query is set up as desired, simply call :func:`~odoo.web.Query.all` to execute it and return a deferred to its result. The result is the same as :py:meth:`~odoo.models.Model.read`'s, an array of dictionaries where each dictionary is a requested record, with each requested field a dictionary key." msgstr "" -#: ../../content/developer/howtos/web.rst:1446 +#: ../../content/developer/howtos/web.rst:1449 msgid "Exercises" msgstr "" -#: ../../content/developer/howtos/web.rst:1448 +#: ../../content/developer/howtos/web.rst:1451 msgid "Message of the Day" msgstr "" -#: ../../content/developer/howtos/web.rst:1450 +#: ../../content/developer/howtos/web.rst:1453 msgid "Create a ``MessageOfTheDay`` widget displaying the last record of the ``oepetstore.message_of_the_day`` model. The widget should fetch its record as soon as it is displayed." msgstr "" -#: ../../content/developer/howtos/web.rst:1454 +#: ../../content/developer/howtos/web.rst:1457 msgid "Display the widget in the Pet Store home page." msgstr "" -#: ../../content/developer/howtos/web.rst:1514 +#: ../../content/developer/howtos/web.rst:1517 msgid "Pet Toys List" msgstr "" -#: ../../content/developer/howtos/web.rst:1516 +#: ../../content/developer/howtos/web.rst:1519 msgid "Create a ``PetToysList`` widget displaying 5 toys (using their name and their images)." msgstr "" -#: ../../content/developer/howtos/web.rst:1519 +#: ../../content/developer/howtos/web.rst:1522 msgid "The pet toys are not stored in a new model, instead they're stored in ``product.product`` using a special category *Pet Toys*. You can see the pre-generated toys and add new ones by going to :menuselection:`Pet Store --> Pet Store --> Pet Toys`. You will probably need to explore ``product.product`` to create the right domain to select just pet toys." msgstr "" -#: ../../content/developer/howtos/web.rst:1526 +#: ../../content/developer/howtos/web.rst:1529 msgid "In Odoo, images are generally stored in regular fields encoded as base64_, HTML supports displaying images straight from base64 with :samp:``" msgstr "" -#: ../../content/developer/howtos/web.rst:1530 +#: ../../content/developer/howtos/web.rst:1533 msgid "The ``PetToysList`` widget should be displayed on the home page on the right of the ``MessageOfTheDay`` widget. You will need to make some layout with CSS to achieve this." msgstr "" -#: ../../content/developer/howtos/web.rst:1650 +#: ../../content/developer/howtos/web.rst:1653 msgid "Existing web components" msgstr "" -#: ../../content/developer/howtos/web.rst:1653 +#: ../../content/developer/howtos/web.rst:1656 msgid "The Action Manager" msgstr "" -#: ../../content/developer/howtos/web.rst:1655 +#: ../../content/developer/howtos/web.rst:1658 msgid "In Odoo, many operations start from an :ref:`action `: opening a menu item (to a view), printing a report, ..." msgstr "" -#: ../../content/developer/howtos/web.rst:1658 +#: ../../content/developer/howtos/web.rst:1661 msgid "Actions are pieces of data describing how a client should react to the activation of a piece of content. Actions can be stored (and read through a model) or they can be generated on-the fly (locally to the client by javascript code, or remotely by a method of a model)." msgstr "" -#: ../../content/developer/howtos/web.rst:1663 +#: ../../content/developer/howtos/web.rst:1666 msgid "In Odoo Web, the component responsible for handling and reacting to these actions is the *Action Manager*." msgstr "" -#: ../../content/developer/howtos/web.rst:1667 +#: ../../content/developer/howtos/web.rst:1670 msgid "Using the Action Manager" msgstr "" -#: ../../content/developer/howtos/web.rst:1669 +#: ../../content/developer/howtos/web.rst:1672 msgid "The action manager can be invoked explicitly from javascript code by creating a dictionary describing :ref:`an action ` of the right type, and calling an action manager instance with it." msgstr "" -#: ../../content/developer/howtos/web.rst:1673 +#: ../../content/developer/howtos/web.rst:1676 msgid ":func:`~odoo.Widget.do_action` is a shortcut of :class:`~odoo.Widget` looking up the \"current\" action manager and executing the action::" msgstr "" -#: ../../content/developer/howtos/web.rst:1689 +#: ../../content/developer/howtos/web.rst:1692 msgid "The most common action ``type`` is ``ir.actions.act_window`` which provides views to a model (displays a model in various manners), its most common attributes are:" msgstr "" -#: ../../content/developer/howtos/web.rst:1693 -#: ../../content/developer/reference/actions.rst:74 +#: ../../content/developer/howtos/web.rst:1696 +#: ../../content/developer/reference/backend/actions.rst:74 msgid "``res_model``" msgstr "" -#: ../../content/developer/howtos/web.rst:1694 +#: ../../content/developer/howtos/web.rst:1697 msgid "The model to display in views" msgstr "" -#: ../../content/developer/howtos/web.rst:1695 -#: ../../content/developer/reference/actions.rst:86 +#: ../../content/developer/howtos/web.rst:1698 +#: ../../content/developer/reference/backend/actions.rst:86 msgid "``res_id`` (optional)" msgstr "" -#: ../../content/developer/howtos/web.rst:1696 +#: ../../content/developer/howtos/web.rst:1699 msgid "For form views, a preselected record in ``res_model``" msgstr "" -#: ../../content/developer/howtos/web.rst:1701 -#: ../../content/developer/reference/actions.rst:83 +#: ../../content/developer/howtos/web.rst:1704 +#: ../../content/developer/reference/backend/actions.rst:83 msgid "``views``" msgstr "" -#: ../../content/developer/howtos/web.rst:1698 +#: ../../content/developer/howtos/web.rst:1701 msgid "Lists the views available through the action. A list of ``[view_id, view_type]``, ``view_id`` can either be the database identifier of a view of the right type, or ``false`` to use the view by default for the specified type. View types can not be present multiple times. The action will open the first view of the list by default." msgstr "" -#: ../../content/developer/howtos/web.rst:1704 -#: ../../content/developer/reference/actions.rst:197 -#: ../../content/developer/webservices/upgrade.rst:537 +#: ../../content/developer/howtos/web.rst:1707 +#: ../../content/developer/reference/backend/actions.rst:197 msgid "``target``" msgstr "" -#: ../../content/developer/howtos/web.rst:1704 +#: ../../content/developer/howtos/web.rst:1707 msgid "Either ``current`` (the default) which replaces the \"content\" section of the web client by the action, or ``new`` to open the action in a dialog box." msgstr "" -#: ../../content/developer/howtos/web.rst:1707 +#: ../../content/developer/howtos/web.rst:1710 msgid "Additional context data to use within the action." msgstr "" -#: ../../content/developer/howtos/web.rst:1709 +#: ../../content/developer/howtos/web.rst:1712 msgid "Jump to Product" msgstr "" -#: ../../content/developer/howtos/web.rst:1711 +#: ../../content/developer/howtos/web.rst:1714 msgid "Modify the ``PetToysList`` component so clicking on a toy replaces the homepage by the toy's form view." msgstr "" -#: ../../content/developer/howtos/web.rst:1758 +#: ../../content/developer/howtos/web.rst:1761 msgid "Client Actions" msgstr "" -#: ../../content/developer/howtos/web.rst:1760 +#: ../../content/developer/howtos/web.rst:1763 msgid "Throughout this guide, we used a simple ``HomePage`` widget which the web client automatically starts when we select the right menu item. But how did the Odoo web know to start this widget? Because the widget is registered as a *client action*." msgstr "" -#: ../../content/developer/howtos/web.rst:1765 +#: ../../content/developer/howtos/web.rst:1768 msgid "A client action is (as its name implies) an action type defined almost entirely in the client, in javascript for Odoo web. The server simply sends an action tag (an arbitrary name), and optionally adds a few parameters, but beyond that *everything* is handled by custom client code." msgstr "" -#: ../../content/developer/howtos/web.rst:1770 +#: ../../content/developer/howtos/web.rst:1773 msgid "Our widget is registered as the handler for the client action through this::" msgstr "" -#: ../../content/developer/howtos/web.rst:1775 +#: ../../content/developer/howtos/web.rst:1778 msgid "``instance.web.client_actions`` is a :class:`~odoo.web.Registry` in which the action manager looks up client action handlers when it needs to execute one. The first parameter of :class:`~odoo.web.Registry.add` is the name (tag) of the client action, and the second parameter is the path to the widget from the Odoo web client root." msgstr "" -#: ../../content/developer/howtos/web.rst:1781 +#: ../../content/developer/howtos/web.rst:1784 msgid "When a client action must be executed, the action manager looks up its tag in the registry, walks the specified path and displays the widget it finds at the end." msgstr "" -#: ../../content/developer/howtos/web.rst:1785 -msgid "a client action handler can also be a regular function, in whch case it'll be called and its result (if any) will be interpreted as the next action to execute." +#: ../../content/developer/howtos/web.rst:1788 +msgid "a client action handler can also be a regular function, in which case it'll be called and its result (if any) will be interpreted as the next action to execute." msgstr "" -#: ../../content/developer/howtos/web.rst:1789 +#: ../../content/developer/howtos/web.rst:1792 msgid "On the server side, we had simply defined an ``ir.actions.client`` action:" msgstr "" -#: ../../content/developer/howtos/web.rst:1797 +#: ../../content/developer/howtos/web.rst:1800 msgid "and a menu opening the action:" msgstr "" -#: ../../content/developer/howtos/web.rst:1805 +#: ../../content/developer/howtos/web.rst:1808 msgid "Architecture of the Views" msgstr "" -#: ../../content/developer/howtos/web.rst:1807 +#: ../../content/developer/howtos/web.rst:1810 msgid "Much of Odoo web's usefulness (and complexity) resides in views. Each view type is a way of displaying a model in the client." msgstr "" -#: ../../content/developer/howtos/web.rst:1811 +#: ../../content/developer/howtos/web.rst:1814 msgid "The View Manager" msgstr "" -#: ../../content/developer/howtos/web.rst:1813 +#: ../../content/developer/howtos/web.rst:1816 msgid "When an ``ActionManager`` instance receive an action of type ``ir.actions.act_window``, it delegates the synchronization and handling of the views themselves to a *view manager*, which will then set up one or multiple views depending on the original action's requirements:" msgstr "" -#: ../../content/developer/howtos/web.rst:1823 +#: ../../content/developer/howtos/web.rst:1826 msgid "The Views" msgstr "" -#: ../../content/developer/howtos/web.rst:1825 +#: ../../content/developer/howtos/web.rst:1828 msgid "Most :ref:`Odoo views ` are implemented through a subclass of :class:`odoo.web.View` which provides a bit of generic basic structure for handling events and displaying model information." msgstr "" -#: ../../content/developer/howtos/web.rst:1829 +#: ../../content/developer/howtos/web.rst:1832 msgid "The *search view* is considered a view type by the main Odoo framework, but handled separately by the web client (as it's a more permanent fixture and can interact with other views, which regular views don't do)." msgstr "" -#: ../../content/developer/howtos/web.rst:1833 +#: ../../content/developer/howtos/web.rst:1836 msgid "A view is responsible for loading its own description XML (using :py:class:`~odoo.models.Model.fields_view_get`) and any other data source it needs. To that purpose, views are provided with an optional view identifier set as the :attr:`~odoo.web.View.view_id` attribute." msgstr "" -#: ../../content/developer/howtos/web.rst:1838 +#: ../../content/developer/howtos/web.rst:1841 msgid "Views are also provided with a :class:`~odoo.web.DataSet` instance which holds most necessary model information (the model name and possibly various record ids)." msgstr "" -#: ../../content/developer/howtos/web.rst:1842 +#: ../../content/developer/howtos/web.rst:1845 msgid "Views may also want to handle search queries by overriding :func:`~odoo.web.View.do_search`, and updating their :class:`~odoo.web.DataSet` as necessary." msgstr "" -#: ../../content/developer/howtos/web.rst:1847 +#: ../../content/developer/howtos/web.rst:1850 msgid "The Form View Fields" msgstr "" -#: ../../content/developer/howtos/web.rst:1849 +#: ../../content/developer/howtos/web.rst:1852 msgid "A common need is the extension of the web form view to add new ways of displaying fields." msgstr "" -#: ../../content/developer/howtos/web.rst:1852 +#: ../../content/developer/howtos/web.rst:1855 msgid "All built-in fields have a default display implementation, a new form widget may be necessary to correctly interact with a new field type (e.g. a :term:`GIS` field) or to provide new representations and ways to interact with existing field types (e.g. validate :py:class:`~odoo.fields.Char` fields which should contain email addresses and display them as email links)." msgstr "" -#: ../../content/developer/howtos/web.rst:1859 +#: ../../content/developer/howtos/web.rst:1862 msgid "To explicitly specify which form widget should be used to display a field, simply use the ``widget`` attribute in the view's XML description:" msgstr "" -#: ../../content/developer/howtos/web.rst:1868 +#: ../../content/developer/howtos/web.rst:1871 msgid "the same widget is used in both \"view\" (read-only) and \"edit\" modes of a form view, it's not possible to use a widget in one and an other widget in the other" msgstr "" -#: ../../content/developer/howtos/web.rst:1871 +#: ../../content/developer/howtos/web.rst:1874 msgid "and a given field (name) can not be used multiple times in the same form" msgstr "" -#: ../../content/developer/howtos/web.rst:1872 +#: ../../content/developer/howtos/web.rst:1875 msgid "a widget may ignore the current mode of the form view and remain the same in both view and edit modes" msgstr "" -#: ../../content/developer/howtos/web.rst:1875 +#: ../../content/developer/howtos/web.rst:1878 msgid "most of this should probably move to an advanced form view guide" msgstr "" -#: ../../content/developer/howtos/web.rst:1877 +#: ../../content/developer/howtos/web.rst:1880 msgid "Fields are instantiated by the form view after it has read its XML description and constructed the corresponding HTML representing that description. After that, the form view will communicate with the field objects using some methods. These methods are defined by the ``FieldInterface`` interface. Almost all fields inherit the ``AbstractField`` abstract class. That class defines some default mechanisms that need to be implemented by most fields." msgstr "" -#: ../../content/developer/howtos/web.rst:1885 +#: ../../content/developer/howtos/web.rst:1888 msgid "Here are some of the responsibilities of a field class:" msgstr "" -#: ../../content/developer/howtos/web.rst:1887 +#: ../../content/developer/howtos/web.rst:1890 msgid "The field class must display and allow the user to edit the value of the field." msgstr "" -#: ../../content/developer/howtos/web.rst:1888 +#: ../../content/developer/howtos/web.rst:1891 msgid "It must correctly implement the 3 field attributes available in all fields of Odoo. The ``AbstractField`` class already implements an algorithm that dynamically calculates the value of these attributes (they can change at any moment because their value change according to the value of other fields). Their values are stored in *Widget Properties* (the widget properties were explained earlier in this guide). It is the responsibility of each field class to check these widget properties and dynamically adapt depending of their values. Here is a description of each of these attributes:" msgstr "" -#: ../../content/developer/howtos/web.rst:1898 +#: ../../content/developer/howtos/web.rst:1901 msgid "``required``: The field must have a value before saving. If ``required`` is ``true`` and the field doesn't have a value, the method ``is_valid()`` of the field must return ``false``." msgstr "" -#: ../../content/developer/howtos/web.rst:1901 +#: ../../content/developer/howtos/web.rst:1904 msgid "``invisible``: When this is ``true``, the field must be invisible. The ``AbstractField`` class already has a basic implementation of this behavior that fits most fields." msgstr "" -#: ../../content/developer/howtos/web.rst:1904 +#: ../../content/developer/howtos/web.rst:1907 msgid "``readonly``: When ``true``, the field must not be editable by the user. Most fields in Odoo have a completely different behavior depending on the value of ``readonly``. As example, the ``FieldChar`` displays an HTML ```` when it is editable and simply displays the text when it is read-only. This also means it has much more code it would need to implement only one behavior, but this is necessary to ensure a good user experience." msgstr "" -#: ../../content/developer/howtos/web.rst:1912 +#: ../../content/developer/howtos/web.rst:1915 msgid "Fields have two methods, ``set_value()`` and ``get_value()``, which are called by the form view to give it the value to display and get back the new value entered by the user. These methods must be able to handle the value as given by the Odoo server when a ``read()`` is performed on a model and give back a valid value for a ``write()``. Remember that the JavaScript/Python data types used to represent the values given by ``read()`` and given to ``write()`` is not necessarily the same in Odoo. As example, when you read a many2one, it is always a tuple whose first value is the id of the pointed record and the second one is the name get (ie: ``(15, \"Agrolait\")``). But when you write a many2one it must be a single integer, not a tuple anymore. ``AbstractField`` has a default implementation of these methods that works well for simple data type and set a widget property named ``value``." msgstr "" -#: ../../content/developer/howtos/web.rst:1926 +#: ../../content/developer/howtos/web.rst:1929 msgid "Please note that, to better understand how to implement fields, you are strongly encouraged to look at the definition of the ``FieldInterface`` interface and the ``AbstractField`` class directly in the code of the Odoo web client." msgstr "" -#: ../../content/developer/howtos/web.rst:1932 +#: ../../content/developer/howtos/web.rst:1935 msgid "Creating a New Type of Field" msgstr "" -#: ../../content/developer/howtos/web.rst:1934 +#: ../../content/developer/howtos/web.rst:1937 msgid "In this part we will explain how to create a new type of field. The example here will be to re-implement the ``FieldChar`` class and progressively explain each part." msgstr "" -#: ../../content/developer/howtos/web.rst:1939 +#: ../../content/developer/howtos/web.rst:1942 msgid "Simple Read-Only Field" msgstr "" -#: ../../content/developer/howtos/web.rst:1941 +#: ../../content/developer/howtos/web.rst:1944 msgid "Here is a first implementation that will only display text. The user will not be able to modify the content of the field." msgstr "" -#: ../../content/developer/howtos/web.rst:1958 +#: ../../content/developer/howtos/web.rst:1961 msgid "In this example, we declare a class named ``FieldChar2`` inheriting from ``AbstractField``. We also register this class in the registry ``instance.web.form.widgets`` under the key ``char2``. That will allow us to use this new field in any form view by specifying ``widget=\"char2\"`` in the ```` tag in the XML declaration of the view." msgstr "" -#: ../../content/developer/howtos/web.rst:1964 +#: ../../content/developer/howtos/web.rst:1967 msgid "In this example, we define a single method: ``render_value()``. All it does is display the widget property ``value``. Those are two tools defined by the ``AbstractField`` class. As explained before, the form view will call the method ``set_value()`` of the field to set the value to display. This method already has a default implementation in ``AbstractField`` which simply sets the widget property ``value``. ``AbstractField`` also watch the ``change:value`` event on itself and calls the ``render_value()`` when it occurs. So, ``render_value()`` is a convenience method to implement in child classes to perform some operation each time the value of the field changes." msgstr "" -#: ../../content/developer/howtos/web.rst:1974 +#: ../../content/developer/howtos/web.rst:1977 msgid "In the ``init()`` method, we also define the default value of the field if none is specified by the form view (here we assume the default value of a ``char`` field should be an empty string)." msgstr "" -#: ../../content/developer/howtos/web.rst:1979 +#: ../../content/developer/howtos/web.rst:1982 msgid "Read-Write Field" msgstr "" -#: ../../content/developer/howtos/web.rst:1981 +#: ../../content/developer/howtos/web.rst:1984 msgid "Read-only fields, which only display content and don't allow the user to modify it can be useful, but most fields in Odoo also allow editing. This makes the field classes more complicated, mostly because fields are supposed to handle both editable and non-editable mode, those modes are often completely different (for design and usability purpose) and the fields must be able to switch between modes at any moment." msgstr "" -#: ../../content/developer/howtos/web.rst:1988 +#: ../../content/developer/howtos/web.rst:1991 msgid "To know in which mode the current field should be, the ``AbstractField`` class sets a widget property named ``effective_readonly``. The field should watch for changes in that widget property and display the correct mode accordingly. Example::" msgstr "" -#: ../../content/developer/howtos/web.rst:2036 +#: ../../content/developer/howtos/web.rst:2039 msgid "In the ``start()`` method (which is called immediately after a widget has been appended to the DOM), we bind on the event ``change:effective_readonly``. That allows us to redisplay the field each time the widget property ``effective_readonly`` changes. This event handler will call ``display_field()``, which is also called directly in ``start()``. This ``display_field()`` was created specifically for this field, it's not a method defined in ``AbstractField`` or any other class. We can use this method to display the content of the field depending on the current mode." msgstr "" -#: ../../content/developer/howtos/web.rst:2045 +#: ../../content/developer/howtos/web.rst:2048 msgid "From now on the conception of this field is typical, except there is a lot of verifications to know the state of the ``effective_readonly`` property:" msgstr "" -#: ../../content/developer/howtos/web.rst:2048 +#: ../../content/developer/howtos/web.rst:2051 msgid "In the QWeb template used to display the content of the widget, it displays an ```` if we are in read-write mode and nothing in particular in read-only mode." msgstr "" -#: ../../content/developer/howtos/web.rst:2051 +#: ../../content/developer/howtos/web.rst:2054 msgid "In the ``display_field()`` method, we have to bind on the ``change`` event of the ```` to know when the user has changed the value. When it happens, we call the ``internal_set_value()`` method with the new value of the field. This is a convenience method provided by the ``AbstractField`` class. That method will set a new value in the ``value`` property but will not trigger a call to ``render_value()`` (which is not necessary since the ```` already contains the correct value)." msgstr "" -#: ../../content/developer/howtos/web.rst:2059 +#: ../../content/developer/howtos/web.rst:2062 msgid "In ``render_value()``, we use a completely different code to display the value of the field depending if we are in read-only or in read-write mode." msgstr "" -#: ../../content/developer/howtos/web.rst:2062 +#: ../../content/developer/howtos/web.rst:2065 msgid "Create a Color Field" msgstr "" -#: ../../content/developer/howtos/web.rst:2064 +#: ../../content/developer/howtos/web.rst:2067 msgid "Create a ``FieldColor`` class. The value of this field should be a string containing a color code like those used in CSS (example: ``#FF0000`` for red). In read-only mode, this color field should display a little block whose color corresponds to the value of the field. In read-write mode, you should display an ````. That type of ```` is an HTML5 component that doesn't work in all browsers but works well in Google Chrome. So it's OK to use as an exercise." msgstr "" -#: ../../content/developer/howtos/web.rst:2072 +#: ../../content/developer/howtos/web.rst:2075 msgid "You can use that widget in the form view of the ``message_of_the_day`` model for its field named ``color``. As a bonus, you can change the ``MessageOfTheDay`` widget created in the previous part of this guide to display the message of the day with the background color indicated in the ``color`` field." msgstr "" -#: ../../content/developer/howtos/web.rst:2137 +#: ../../content/developer/howtos/web.rst:2140 msgid "The Form View Custom Widgets" msgstr "" -#: ../../content/developer/howtos/web.rst:2139 +#: ../../content/developer/howtos/web.rst:2142 msgid "Form fields are used to edit a single field, and are intrinsically linked to a field. Because this may be limiting, it is also possible to create *form widgets* which are not so restricted and have less ties to a specific lifecycle." msgstr "" -#: ../../content/developer/howtos/web.rst:2144 +#: ../../content/developer/howtos/web.rst:2147 msgid "Custom form widgets can be added to a form view through the ``widget`` tag:" msgstr "" -#: ../../content/developer/howtos/web.rst:2150 +#: ../../content/developer/howtos/web.rst:2153 msgid "This type of widget will simply be created by the form view during the creation of the HTML according to the XML definition. They have properties in common with the fields (like the ``effective_readonly`` property) but they are not assigned a precise field. And so they don't have methods like ``get_value()`` and ``set_value()``. They must inherit from the ``FormWidget`` abstract class." msgstr "" -#: ../../content/developer/howtos/web.rst:2157 +#: ../../content/developer/howtos/web.rst:2160 msgid "Form widgets can interact with form fields by listening for their changes and fetching or altering their values. They can access form fields through their :attr:`~odoo.web.form.FormWidget.field_manager` attribute::" msgstr "" -#: ../../content/developer/howtos/web.rst:2177 +#: ../../content/developer/howtos/web.rst:2180 msgid ":attr:`~odoo.web.form.FormWidget` is generally the :class:`~odoo.web.form.FormView` itself, but features used from it should be limited to those defined by :class:`~odoo.web.form.FieldManagerMixin`, the most useful being:" msgstr "" -#: ../../content/developer/howtos/web.rst:2182 +#: ../../content/developer/howtos/web.rst:2185 msgid ":func:`~odoo.web.form.FieldManagerMixin.get_field_value(field_name)` which returns the value of a field." msgstr "" -#: ../../content/developer/howtos/web.rst:2184 +#: ../../content/developer/howtos/web.rst:2187 msgid ":func:`~odoo.web.form.FieldManagerMixin.set_values(values)` sets multiple field values, takes a mapping of ``{field_name: value_to_set}``" msgstr "" -#: ../../content/developer/howtos/web.rst:2186 +#: ../../content/developer/howtos/web.rst:2189 msgid "An event :samp:`field_changed:{field_name}` is triggered any time the value of the field called ``field_name`` is changed" msgstr "" -#: ../../content/developer/howtos/web.rst:2189 +#: ../../content/developer/howtos/web.rst:2192 msgid "Show Coordinates on Google Map" msgstr "" -#: ../../content/developer/howtos/web.rst:2191 +#: ../../content/developer/howtos/web.rst:2194 msgid "Add two fields to ``product.product`` storing a latitude and a longitude, then create a new form widget to display the latitude and longitude of a product's origin on a map" msgstr "" -#: ../../content/developer/howtos/web.rst:2195 +#: ../../content/developer/howtos/web.rst:2198 msgid "To display the map, use Google Map's embedding:" msgstr "" -#: ../../content/developer/howtos/web.rst:2202 +#: ../../content/developer/howtos/web.rst:2205 msgid "where ``XXX`` should be replaced by the latitude and ``YYY`` by the longitude." msgstr "" -#: ../../content/developer/howtos/web.rst:2205 +#: ../../content/developer/howtos/web.rst:2208 msgid "Display the two position fields and a map widget using them in a new notebook page of the product's form view." msgstr "" -#: ../../content/developer/howtos/web.rst:2237 +#: ../../content/developer/howtos/web.rst:2240 msgid "Get the Current Coordinate" msgstr "" -#: ../../content/developer/howtos/web.rst:2239 +#: ../../content/developer/howtos/web.rst:2242 msgid "Add a button resetting the product's coordinates to the location of the user, you can get these coordinates using the `javascript geolocation API`_." msgstr "" -#: ../../content/developer/howtos/web.rst:2243 +#: ../../content/developer/howtos/web.rst:2246 msgid "Now we would like to display an additional button to automatically set the coordinates to the location of the current user." msgstr "" -#: ../../content/developer/howtos/web.rst:2246 +#: ../../content/developer/howtos/web.rst:2249 msgid "To get the coordinates of the user, an easy way is to use the geolocation JavaScript API. `See the online documentation to know how to use it`_." msgstr "" -#: ../../content/developer/howtos/web.rst:2251 +#: ../../content/developer/howtos/web.rst:2254 msgid "Please also note that the user should not be able to click on that button when the form view is in read-only mode. So, this custom widget should handle correctly the ``effective_readonly`` property just like any field. One way to do this would be to make the button disappear when ``effective_readonly`` is true." msgstr "" -#: ../../content/developer/howtos/web.rst:2302 +#: ../../content/developer/howtos/web.rst:2305 msgid "as a separate concept from instances. In many languages classes are full-fledged objects and themselves instance (of metaclasses) but there remains two fairly separate hierarchies between classes and instances" msgstr "" -#: ../../content/developer/howtos/web.rst:2306 +#: ../../content/developer/howtos/web.rst:2309 msgid "as well as papering over cross-browser differences, although this has become less necessary over time" msgstr "" +#: ../../content/developer/howtos/web_services.rst:3 +msgid "Web Services" +msgstr "" + +#: ../../content/developer/howtos/web_services.rst:5 +msgid "The web-service module offer 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:`../api/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.rst:3 msgid "Building a Website" msgstr "" @@ -4536,10 +14433,6 @@ msgstr "" msgid "In this case we're using demonstration data because an actual user of the system would want to input or import their own teachers list, this list is only useful for testing." msgstr "" -#: ../../content/developer/howtos/website.rst:234 -msgid "Accessing the data" -msgstr "" - #: ../../content/developer/howtos/website.rst:236 msgid "The last step is to alter model and template to use our demonstration data:" msgstr "" @@ -4888,15033 +14781,19222 @@ msgstr "" msgid "With this, the *Product Categories* sidebar will automatically be enabled when the *Academy* module is installed." msgstr "" -#: ../../content/developer/reference.rst:5 -msgid "Reference" -msgstr "" - -#: ../../content/developer/reference/actions.rst:6 -#: ../../content/developer/reference/iot.rst:138 -msgid "Actions" -msgstr "" - -#: ../../content/developer/reference/actions.rst:8 -msgid "Actions define the behavior of the system in response to user actions: login, action button, selection of an invoice, ..." -msgstr "" - -#: ../../content/developer/reference/actions.rst:11 -msgid "Actions can be stored in the database or returned directly as dictionaries in e.g. button methods. All actions share two mandatory attributes:" -msgstr "" - -#: ../../content/developer/reference/actions.rst:15 -#: ../../content/developer/reference/data.rst:135 -#: ../../content/developer/reference/views.rst:1120 -#: ../../content/developer/reference/views.rst:1156 -#: ../../content/developer/reference/views.rst:1454 -#: ../../content/developer/reference/views.rst:1742 -msgid "``type``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:15 -msgid "the category of the current action, determines which fields may be used and how the action is interpreted" -msgstr "" - -#: ../../content/developer/reference/actions.rst:18 -msgid "short user-readable description of the action, may be displayed in the client's interface" -msgstr "" - -#: ../../content/developer/reference/actions.rst:21 -msgid "A client can get actions in 4 forms:" -msgstr "" - -#: ../../content/developer/reference/actions.rst:23 -msgid "``False``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:24 -msgid "if any action dialog is currently open, close it" -msgstr "" - -#: ../../content/developer/reference/actions.rst:26 -msgid "A string" -msgstr "" - -#: ../../content/developer/reference/actions.rst:26 -msgid "if a :ref:`client action ` matches, interpret as a client action's tag, otherwise treat as a number" -msgstr "" - -#: ../../content/developer/reference/actions.rst:29 -msgid "A number" -msgstr "" - -#: ../../content/developer/reference/actions.rst:29 -msgid "read the corresponding action record from the database, may be a database identifier or an :term:`external id`" -msgstr "" - -#: ../../content/developer/reference/actions.rst:32 -msgid "A dictionary" -msgstr "" - -#: ../../content/developer/reference/actions.rst:32 -msgid "treat as a client action descriptor and execute" -msgstr "" - -#: ../../content/developer/reference/actions.rst:37 -msgid "Bindings" -msgstr "" - -#: ../../content/developer/reference/actions.rst:39 -msgid "Aside from their two mandatory attributes, all actions also share *optional* attributes used to present an action in an arbitrary model's contextual menu:" -msgstr "" - -#: ../../content/developer/reference/actions.rst:45 -msgid "``binding_model_id``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:43 -msgid "specifies which model the action is bound to" -msgstr "" - -#: ../../content/developer/reference/actions.rst:45 -msgid "For Server Actions, use ``model_id``." -msgstr "" - -#: ../../content/developer/reference/actions.rst:55 -msgid "``binding_type``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:48 -msgid "specifies the type of binding, which is mostly which contextual menu the action will appear under" -msgstr "" - -#: ../../content/developer/reference/actions.rst:52 -msgid "``action`` (default)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:52 -msgid "Specifies that the action will appear in the :menuselection:`Action` contextual menu of the bound model." -msgstr "" - -#: ../../content/developer/reference/actions.rst:55 -msgid "``report``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:55 -msgid "Specifies that the action will appear in the :menuselection:`Print` contextual menu of the bound model." -msgstr "" - -#: ../../content/developer/reference/actions.rst:60 -msgid "``binding_view_types``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:58 -msgid "a comma-separated list of view types for which the action appears in the contextual menu, mostly \"list\" and / or \"form\". Defaults to ``list,form`` (both list and form )" -msgstr "" - -#: ../../content/developer/reference/actions.rst:65 -msgid "Window Actions (``ir.actions.act_window``)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:67 -msgid "The most common action type, used to present visualisations of a model through :ref:`views `: a window action defines a set of view types (and possibly specific views) for a model (and possibly specific record of the model)." -msgstr "" - -#: ../../content/developer/reference/actions.rst:72 -msgid "Its fields are:" -msgstr "" - -#: ../../content/developer/reference/actions.rst:75 -msgid "model to present views for" -msgstr "" - -#: ../../content/developer/reference/actions.rst:77 -msgid "a list of ``(view_id, view_type)`` pairs. The second element of each pair is the category of the view (tree, form, graph, ...) and the first is an optional database id (or ``False``). If no id is provided, the client should fetch the default view of the specified type for the requested model (this is automatically done by :meth:`~odoo.models.Model.fields_view_get`). The first type of the list is the default view type and will be open by default when the action is executed. Each view type should be present at most once in the list" -msgstr "" - -#: ../../content/developer/reference/actions.rst:86 -msgid "if the default view is ``form``, specifies the record to load (otherwise a new record should be created)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:90 -msgid "``search_view_id`` (optional)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:89 -msgid "``(id, name)`` pair, ``id`` is the database identifier of a specific search view to load for the action. Defaults to fetching the default search view for the model" -msgstr "" - -#: ../../content/developer/reference/actions.rst:95 -#: ../../content/developer/reference/actions.rst:393 -msgid "``target`` (optional)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:93 -msgid "whether the views should be open in the main content area (``current``), in full screen mode (``fullscreen``) or in a dialog/popup (``new``). Use ``main`` instead of ``current`` to clear the breadcrumbs. Defaults to ``current``." -msgstr "" - -#: ../../content/developer/reference/actions.rst:97 -#: ../../content/developer/reference/actions.rst:222 -msgid "``context`` (optional)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:98 -msgid "additional context data to pass to the views" -msgstr "" - -#: ../../content/developer/reference/actions.rst:99 -#: ../../content/developer/reference/views.rst:624 -#: ../../content/developer/reference/views.rst:1891 -msgid "``domain`` (optional)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:100 -msgid "filtering domain to implicitly add to all view search queries" -msgstr "" - -#: ../../content/developer/reference/actions.rst:103 -msgid "``limit`` (optional)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:102 -msgid "number of records to display in lists by default. Defaults to 80 in the web client" -msgstr "" - -#: ../../content/developer/reference/actions.rst:105 -msgid "For instance, to open customers (partner with the ``customer`` flag set) with list and form views::" -msgstr "" - -#: ../../content/developer/reference/actions.rst:115 -msgid "Or to open the form view of a specific product (obtained separately) in a new dialog::" -msgstr "" - -#: ../../content/developer/reference/actions.rst:126 -msgid "In-database window actions have a few different fields which should be ignored by clients, mostly to use in composing the ``views`` list:" -msgstr "" - -#: ../../content/developer/reference/actions.rst:130 -msgid "``view_mode`` (default= ``tree,form`` )" -msgstr "" - -#: ../../content/developer/reference/actions.rst:130 -msgid "comma-separated list of view types as a string (/!\\\\ No spaces /!\\\\). All of these types will be present in the generated ``views`` list (with at least a ``False`` view_id)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:148 -#: ../../content/developer/webservices/odoo.rst:1025 -msgid "``view_ids``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:133 -msgid "M2M\\ [#notquitem2m]_ to view objects, defines the initial content of ``views``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:136 -msgid "Act_window views can also be defined cleanly through ``ir.actions.act_window.view``." -msgstr "" - -#: ../../content/developer/reference/actions.rst:138 -msgid "If you plan to allow multiple views for your model, prefer using ir.actions.act_window.view instead of the action ``view_ids``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:153 -msgid "``view_id``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:151 -msgid "specific view added to the ``views`` list in case its type is part of the ``view_mode`` list and not already filled by one of the views in ``view_ids``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:155 -msgid "These are mostly used when defining actions from :ref:`reference/data`:" -msgstr "" - -#: ../../content/developer/reference/actions.rst:166 -msgid "will use the \"my_specific_view\" view even if that's not the default view for the model." -msgstr "" - -#: ../../content/developer/reference/actions.rst:169 -msgid "The server-side composition of the ``views`` sequence is the following:" -msgstr "" - -#: ../../content/developer/reference/actions.rst:171 -msgid "get each ``(id, type)`` from ``view_ids`` (ordered by ``sequence``)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:172 -msgid "if ``view_id`` is defined and its type isn't already filled, append its ``(id, type)``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:174 -msgid "for each unfilled type in ``view_mode``, append ``(False, type)``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:178 -msgid "``usage``?" -msgstr "" - -#: ../../content/developer/reference/actions.rst:179 -msgid "``groups_id``?" -msgstr "" - -#: ../../content/developer/reference/actions.rst:180 -msgid "``filter``?" -msgstr "" - -#: ../../content/developer/reference/actions.rst:182 -msgid "technically not an M2M: adds a sequence field and may be composed of just a view type, without a view id." -msgstr "" - -#: ../../content/developer/reference/actions.rst:188 -msgid "URL Actions (``ir.actions.act_url``)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:190 -msgid "Allow opening a URL (website/web page) via an Odoo action. Can be customized via two fields:" -msgstr "" - -#: ../../content/developer/reference/actions.rst:193 -msgid "``url``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:194 -msgid "the address to open when activating the action" -msgstr "" - -#: ../../content/developer/reference/actions.rst:196 -msgid "opens the address in a new window/page if ``new``, replaces the current content with the page if ``self``. Defaults to ``new``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:207 -msgid "will replace the current content section by the Odoo home page." -msgstr "" - -#: ../../content/developer/reference/actions.rst:212 -msgid "Server Actions (``ir.actions.server``)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:216 -msgid "Allow triggering complex server code from any valid action location. Only two fields are relevant to clients:" -msgstr "" - -#: ../../content/developer/reference/actions.rst:219 -#: ../../content/developer/reference/data.rst:70 -#: ../../content/developer/reference/data.rst:155 -#: ../../content/developer/reference/data.rst:232 -#: ../../content/developer/reference/data.rst:242 -#: ../../content/developer/reference/views.rst:810 -#: ../../content/developer/webservices/extract_api.rst:107 -#: ../../content/developer/webservices/extract_api.rst:192 -#: ../../content/developer/webservices/extract_api.rst:504 -#: ../../content/developer/webservices/upgrade.rst:531 -msgid "``id``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:220 -msgid "the in-database identifier of the server action to run" -msgstr "" - -#: ../../content/developer/reference/actions.rst:222 -msgid "context data to use when running the server action" -msgstr "" - -#: ../../content/developer/reference/actions.rst:224 -msgid "In-database records are significantly richer and can perform a number of specific or generic actions based on their ``state``. Some fields (and corresponding behaviors) are shared between states:" -msgstr "" - -#: ../../content/developer/reference/actions.rst:229 -#: ../../content/developer/reference/actions.rst:433 -#: ../../content/developer/webservices/odoo.rst:1161 -msgid "``model_id``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:229 -msgid "Odoo model linked to the action." -msgstr "" - -#: ../../content/developer/reference/actions.rst:231 -#: ../../content/developer/webservices/odoo.rst:1019 -#: ../../content/developer/webservices/odoo.rst:1170 -#: ../../content/developer/webservices/upgrade.rst:545 -msgid "``state``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:233 -msgid "``code``: Executes python code given through the ``code`` argument." -msgstr "" - -#: ../../content/developer/reference/actions.rst:235 -msgid "``object_create``: Creates a new record of model ``crud_model_id`` following ``fields_lines`` specifications." -msgstr "" - -#: ../../content/developer/reference/actions.rst:237 -msgid "``object_write``: Updates the current record(s) following ``fields_lines`` specifications" -msgstr "" - -#: ../../content/developer/reference/actions.rst:239 -msgid "``multi``: Executes serveral actions given through the ``child_ids`` argument." -msgstr "" - -#: ../../content/developer/reference/actions.rst:242 -msgid "State fields" -msgstr "" - -#: ../../content/developer/reference/actions.rst:244 -msgid "Depending on its state, the behavior is defined through different fields. The concerned state is given after each field." -msgstr "" - -#: ../../content/developer/reference/actions.rst:289 -msgid "``code`` (code)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:248 -msgid "Specify a piece of Python code to execute when the action is called" -msgstr "" - -#: ../../content/developer/reference/actions.rst:263 -msgid "The code segment can define a variable called ``action``, which will be returned to the client as the next action to execute:" -msgstr "" - -#: ../../content/developer/reference/actions.rst:283 -msgid "will ask the client to open a form for the record if it fulfills some condition" -msgstr "" - -#: ../../content/developer/reference/actions.rst:291 -msgid "``crud_model_id`` (create)(required)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:292 -msgid "model in which to create a new record" -msgstr "" - -#: ../../content/developer/reference/actions.rst:295 -msgid "``link_field_id`` (create)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:294 -msgid "many2one to ``ir.model.fields``, specifies the current record's m2o field on which the newly created record should be set (models should match)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:309 -msgid "``fields_lines`` (create/write)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:298 -msgid "fields to override when creating or copying the record. :class:`~odoo.fields.One2many` with the fields:" -msgstr "" - -#: ../../content/developer/reference/actions.rst:302 -msgid "``col1``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:302 -msgid "``ir.model.fields`` to set in the concerned model (``crud_model_id`` for creates, ``model_id`` for updates)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:304 -#: ../../content/developer/reference/orm.rst:827 -msgid "``value``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:305 -msgid "value for the field, interpreted via ``type``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:309 -msgid "``type`` (value|reference|equation)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:307 -msgid "If ``value``, the ``value`` field is interpreted as a literal value (possibly converted), if ``equation`` the ``value`` field is interpreted as a Python expression and evaluated" -msgstr "" - -#: ../../content/developer/reference/actions.rst:314 -msgid "``child_ids`` (multi)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:312 -msgid "Specify the multiple sub-actions (``ir.actions.server``) to enact in state multi. If sub-actions themselves return actions, the last one will be returned to the client as the multi's own next action" -msgstr "" - -#: ../../content/developer/reference/actions.rst:319 -msgid "Evaluation context" -msgstr "" - -#: ../../content/developer/reference/actions.rst:321 -msgid "A number of keys are available in the evaluation context of or surrounding server actions:" -msgstr "" - -#: ../../content/developer/reference/actions.rst:324 -msgid "``model`` model object linked to the action via ``model_id``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:325 -msgid "``record``/``records`` record/recorset on which the action is triggered, can be void." -msgstr "" - -#: ../../content/developer/reference/actions.rst:326 -msgid "``env`` Odoo Environment" -msgstr "" - -#: ../../content/developer/reference/actions.rst:327 -msgid "``datetime``, ``dateutil``, ``time``, ``timezone`` corresponding Python modules" -msgstr "" - -#: ../../content/developer/reference/actions.rst:328 -msgid "``log: log(message, level='info')`` logging function to record debug information in ir.logging table" -msgstr "" - -#: ../../content/developer/reference/actions.rst:329 -msgid "``Warning`` constructor for the ``Warning`` exception" -msgstr "" - -#: ../../content/developer/reference/actions.rst:334 -msgid "Report Actions (``ir.actions.report``)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:336 -msgid "Triggers the printing of a report." -msgstr "" - -#: ../../content/developer/reference/actions.rst:338 -msgid "If you define your report through a `` instead of a `` tag and want the action to show up in the Print menu of the model's views, you will also need to specify ``binding_model_id`` from :ref:`reference/bindings`. It's not necessary to set ``binding_type`` to ``report``, since ``ir.actions.report`` will implicitly default to that." -msgstr "" - -#: ../../content/developer/reference/actions.rst:347 -#: ../../content/developer/reference/reports.rst:195 -#: ../../content/developer/reference/views.rst:616 -#: ../../content/developer/reference/views.rst:719 -#: ../../content/developer/reference/views.rst:807 -msgid "``name`` (mandatory)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:346 -msgid "used as the file name if ``print_report_name`` is not specified. Otherwise, only useful as a mnemonic/description of the report when looking for one in a list of some sort" -msgstr "" - -#: ../../content/developer/reference/actions.rst:349 -msgid "``model`` (mandatory)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:350 -msgid "the model your report will be about" -msgstr "" - -#: ../../content/developer/reference/actions.rst:351 -msgid "``report_type`` (default=qweb-pdf)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:352 -msgid "either ``qweb-pdf`` for PDF reports or ``qweb-html`` for HTML" -msgstr "" - -#: ../../content/developer/reference/actions.rst:353 -msgid "``report_name`` (mandatory)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:354 -msgid "the name (:term:`external id`) of the qweb template used to render the report" -msgstr "" - -#: ../../content/developer/reference/actions.rst:355 -msgid "``print_report_name``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:356 -msgid "python expression defining the name of the report." -msgstr "" - -#: ../../content/developer/reference/actions.rst:358 -msgid "``groups_id``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:358 -msgid ":class:`~odoo.fields.Many2many` field to the groups allowed to view/use the current report" -msgstr "" - -#: ../../content/developer/reference/actions.rst:360 -msgid "``multi``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:361 -msgid "if set to ``True``, the action will not be displayed on a form view." -msgstr "" - -#: ../../content/developer/reference/actions.rst:363 -msgid "``paperformat_id``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:363 -msgid ":class:`~odoo.fields.Many2one` field to the paper format you wish to use for this report (if not specified, the company format will be used)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:370 -msgid "``attachment_use``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:366 -msgid "if set to ``True``, the report is only generated once the first time it is requested, and re-printed from the stored report afterwards instead of being re-generated every time." -msgstr "" - -#: ../../content/developer/reference/actions.rst:370 -msgid "Can be used for reports which must only be generated once (e.g. for legal reasons)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:374 -msgid "``attachment``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:373 -msgid "python expression that defines the name of the report; the record is accessible as the variable ``object``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:379 -msgid "Client Actions (``ir.actions.client``)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:381 -msgid "Triggers an action implemented entirely in the client." -msgstr "" - -#: ../../content/developer/reference/actions.rst:384 -msgid "``tag``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:384 -msgid "the client-side identifier of the action, an arbitrary string which the client should know how to react to" -msgstr "" - -#: ../../content/developer/reference/actions.rst:387 -msgid "``params`` (optional)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:387 -msgid "a Python dictionary of additional data to send to the client, alongside the client action tag" -msgstr "" - -#: ../../content/developer/reference/actions.rst:390 -msgid "whether the client action should be open in the main content area (``current``), in full screen mode (``fullscreen``) or in a dialog/popup (``new``). Use ``main`` instead of ``current`` to clear the breadcrumbs. Defaults to ``current``." -msgstr "" - -#: ../../content/developer/reference/actions.rst:402 -msgid "tells the client to start the Point of Sale interface, the server has no idea how the POS interface works." -msgstr "" - -#: ../../content/developer/reference/actions.rst:406 -msgid ":ref:`Tutorial: Client Actions `" -msgstr "" - -#: ../../content/developer/reference/actions.rst:411 -msgid "Automated Actions (``ir.cron``)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:413 -msgid "Actions triggered automatically on a predefined frequency." -msgstr "" - -#: ../../content/developer/reference/actions.rst:416 -msgid "Name of the automated action (Mainly used in log display)" -msgstr "" - -#: ../../content/developer/reference/actions.rst:419 -msgid "``interval_number``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:419 -msgid "Number of *interval_type* uom between two executions of the action" -msgstr "" - -#: ../../content/developer/reference/actions.rst:422 -msgid "``interval_type``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:422 -msgid "Unit of measure of frequency interval (``minutes``, ``hours``, ``days``, ``weeks``, ``months``," -msgstr "" - -#: ../../content/developer/reference/actions.rst:426 -msgid "``numbercall``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:425 -msgid "Number of times this action has to be run. If the action is expected to run indefinitely, set to ``-1``." -msgstr "" - -#: ../../content/developer/reference/actions.rst:430 -msgid "``doall``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:429 -msgid "Boolean precising whether the missed actions have to be executed in case of server restarts." -msgstr "" - -#: ../../content/developer/reference/actions.rst:433 -msgid "Model on which this action will be called" -msgstr "" - -#: ../../content/developer/reference/actions.rst:441 -msgid "``code``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:436 -msgid "Code content of the action. Can be a simple call to the model's method :" -msgstr "" - -#: ../../content/developer/reference/actions.rst:443 -msgid "``nextcall``" -msgstr "" - -#: ../../content/developer/reference/actions.rst:444 -msgid "Next planned execution date of this action (date/time format)" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:6 -msgid "Command-line interface: odoo-bin" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:11 -msgid "Running the server" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:17 -msgid "database(s) used when installing or updating modules. Providing a comma-separated list restrict access to databases provided in list." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:21 -msgid "For advanced database options, take a look :ref:`below `." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:25 -msgid "comma-separated list of modules to install before running the server (requires :option:`-d`)." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:30 -msgid "comma-separated list of modules to update before running the server (requires :option:`-d`)." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:35 -msgid "comma-separated list of directories in which modules are stored. These directories are scanned for modules." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:42 -msgid "provide an alternate :ref:`configuration file `" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:46 -msgid "saves the server configuration to the current configuration file (:file:`{$HOME}/.odoorc` by default, and can be overridden using :option:`-c`)." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:52 -msgid "disables demo data loading for modules installed comma-separated, use ``all`` for all modules." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:57 -msgid "runs tests after installing modules" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:61 -msgid "select the tests to run by using tags." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:65 -msgid "Specify directory where to write screenshots when an HttpCase.browser_js test fails. It defaults to :file:`/tmp/odoo_tests/{db_name}/screenshots`" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:70 -msgid "Enable screencasts and specify directory where to write screencasts files. The ``ffmpeg`` utility needs to be installed to encode frames into a video file. Otherwise frames will be kept instead of the video file." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:77 -msgid "Database" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:81 -msgid "database username, used to connect to PostgreSQL." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:85 -msgid "database password, if using `password authentication`_." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:89 -msgid "host for the database server" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:91 -msgid "``localhost`` on Windows" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:92 -msgid "UNIX socket otherwise" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:96 -msgid "port the database listens on, defaults to 5432" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:100 -msgid "hides databases that do not match ````. The filter is a `regular expression`_, with the additions that:" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:103 -msgid "``%h`` is replaced by the whole hostname the request is made on." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:104 -msgid "``%d`` is replaced by the subdomain the request is made on, with the exception of ``www`` (so domain ``odoo.com`` and ``www.odoo.com`` both match the database ``odoo``)." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:108 -msgid "These operations are case sensitive. Add option ``(?i)`` to match all databases (so domain ``odoo.com`` using ``(?i)%d`` matches the database ``Odoo``)." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:112 -msgid "Since version 11, it's also possible to restrict access to a given database listen by using the --database parameter and specifying a comma-separated list of databases" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:116 -msgid "When combining the two parameters, db-filter supersedes the comma-separated database list for restricting database list, while the comma-separated list is used for performing requested operations like upgrade of modules." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:124 -msgid "Restrict access to databases whose name starts with 11" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:130 -msgid "Restrict access to only two databases, 11firstdatabase and 11seconddatabase" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:136 -msgid "Restrict access to only two databases, 11firstdatabase and 11seconddatabase, and update base module on one database: 11firstdatabase. If database 11seconddatabase doesn't exist, the database is created and base modules is installed" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:145 -msgid "Restrict access to databases whose name starts with 11, and update base module on one database: 11firstdatabase. If database 11seconddatabase doesn't exist, the database is created and base modules is installed" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:152 -msgid "when creating new databases from the database-management screens, use the specified `template database`_. Defaults to ``template0``." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:157 -msgid "Path to the PostgreSQL binaries that are used by the database manager to dump and restore databases. You have to specify this option only if these binaries are located in a non-standard directory." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:163 -msgid "Suppresses the ability to list databases available on the system" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:167 -msgid "Control the SSL security of the connection between Odoo and PostgreSQL. Value should bve one of 'disable', 'allow', 'prefer', 'require', 'verify-ca' or 'verify-full' Default value is 'prefer'" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:175 -msgid "Emails" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:179 -msgid "Email address used as when Odoo needs to send mails" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:183 -msgid "Address of the SMTP server to connect to in order to send mails" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:189 -msgid "If set, odoo should use SSL/STARTSSL SMTP connections" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:193 -msgid "Username to connect to the SMTP server" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:197 -msgid "Password to connect to the SMTP server" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:202 -msgid "Internationalisation" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:204 -msgid "Use these options to translate Odoo to another language. See i18n section of the user manual. Option '-d' is mandatory. Option '-l' is mandatory in case of importation" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:210 -msgid "specifies the languages (separated by commas) for the translations you want to be loaded" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:215 -msgid "specify the language of the translation file. Use it with --i18n-export or --i18n-import" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:220 -msgid "export all sentences to be translated to a CSV file, a PO file or a TGZ archive and exit." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:225 -msgid "import a CSV or a PO file with translations and exit. The '-l' option is required." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:230 -msgid "overwrites existing translation terms on updating a module or importing a CSV or a PO file." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:235 -msgid "specify modules to export. Use in combination with --i18n-export" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:240 -msgid "Advanced Options" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:245 -msgid "Developer features" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:249 -msgid "``all``: all the features below are activated" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:251 -msgid "``xml``: read template qweb from xml file directly instead of database. Once a template has been modified in database, it will be not be read from the xml file until the next update/init." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:255 -msgid "``reload``: restart server when python file are updated (may not be detected depending on the text editor used)" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:258 -msgid "``qweb``: break in the evaluation of qweb template when a node contains ``t-debug='debugger'``" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:260 -msgid "``(i)p(u)db``: start the chosen python debugger in the code when an unexpected error is raised before logging and returning the error." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:267 -msgid "HTTP" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:271 -msgid "do not start the HTTP or long-polling workers (may still start :ref:`cron ` workers)" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:274 -msgid "has no effect if :option:`--test-enable` is set, as tests require an accessible HTTP server" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:279 -msgid "TCP/IP address on which the HTTP server listens, defaults to ``0.0.0.0`` (all addresses)" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:284 -msgid "Port on which the HTTP server listens, defaults to 8069." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:288 -msgid "TCP port for long-polling connections in multiprocessing or gevent mode, defaults to 8072. Not used in default (threaded) mode." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:293 -msgid "enables the use of ``X-Forwarded-*`` headers through `Werkzeug's proxy support`_." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:296 -msgid "proxy mode *must not* be enabled outside of a reverse proxy scenario" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:302 -msgid "Logging" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:304 -msgid "By default, Odoo displays all logging of level_ ``info`` except for workflow logging (``warning`` only), and log output is sent to ``stdout``. Various options are available to redirect logging to other destinations and to customize the amount of logging output." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:311 -msgid "sends logging output to the specified file instead of stdout. On Unix, the file `can be managed by external log rotation programs `_ and will automatically be reopened when replaced" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:318 -msgid "logs to the system's event logger: `syslog on unices `_ and `the Event Log on Windows `_." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:321 -msgid "Neither is configurable" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:325 -msgid "logs to the ``ir.logging`` model (``ir_logging`` table) of the specified database. The database can be the name of a database in the \"current\" PostgreSQL, or `a PostgreSQL URI`_ for e.g. log aggregation." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:331 -msgid ":samp:`{LOGGER}:{LEVEL}`, enables ``LOGGER`` at the provided ``LEVEL`` e.g. ``odoo.models:DEBUG`` will enable all logging messages at or above ``DEBUG`` level in the models." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:335 -msgid "The colon ``:`` is mandatory" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:336 -msgid "The logger can be omitted to configure the root (default) handler" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:337 -msgid "If the level is omitted, the logger is set to ``INFO``" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:339 -msgid "The option can be repeated to configure multiple loggers e.g." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:347 -msgid "enable DEBUG logging for RPC requests, equivalent to ``--log-handler=odoo.http.rpc.request:DEBUG``" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:352 -msgid "enable DEBUG logging for RPC responses, equivalent to ``--log-handler=odoo.http.rpc.response:DEBUG``" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:357 -msgid "enables DEBUG logging of HTTP requests and responses, equivalent to ``--log-handler=odoo.http:DEBUG``" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:362 -msgid "enables DEBUG logging of SQL querying, equivalent to ``--log-handler=odoo.sql_db:DEBUG``" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:367 -msgid "Shortcut to more easily set predefined levels on specific loggers. \"real\" levels (``critical``, ``error``, ``warn``, ``debug``) are set on the ``odoo`` and ``werkzeug`` loggers (except for ``debug`` which is only set on ``odoo``)." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:372 -msgid "Odoo also provides debugging pseudo-levels which apply to different sets of loggers:" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:377 -msgid "``debug_sql``" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:376 -msgid "sets the SQL logger to ``debug``" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:378 -msgid "equivalent to ``--log-sql``" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:381 -msgid "``debug_rpc``" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:380 -msgid "sets the ``odoo`` and HTTP request loggers to ``debug``" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:382 -msgid "equivalent to ``--log-level debug --log-request``" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:387 -msgid "``debug_rpc_answer``" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:384 -msgid "sets the ``odoo`` and HTTP request and response loggers to ``debug``" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:387 -msgid "equivalent to ``--log-level debug --log-request --log-response``" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:391 -msgid "In case of conflict between :option:`--log-level` and :option:`--log-handler`, the latter is used" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:397 -msgid "Multiprocessing" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:401 -msgid "if ``count`` is not 0 (the default), enables multiprocessing and sets up the specified number of HTTP workers (sub-processes processing HTTP and RPC requests)." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:405 -msgid "multiprocessing mode is only available on Unix-based systems" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:407 -msgid "A number of options allow limiting and recycling workers:" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:411 -msgid "Number of requests a worker will process before being recycled and restarted." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:414 -msgid "Defaults to *8196*." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:418 -msgid "Maximum allowed virtual memory per worker. If the limit is exceeded, the worker is killed and recycled at the end of the current request." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:421 -msgid "Defaults to *2048MiB*." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:425 -msgid "Hard limit on virtual memory, any worker exceeding the limit will be immediately killed without waiting for the end of the current request processing." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:429 -msgid "Defaults to *2560MiB*." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:433 -msgid "Prevents the worker from using more than CPU seconds for each request. If the limit is exceeded, the worker is killed." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:436 -msgid "Defaults to *60*." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:440 -msgid "Prevents the worker from taking longer than seconds to process a request. If the limit is exceeded, the worker is killed." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:443 -msgid "Differs from :option:`--limit-time-cpu` in that this is a \"wall time\" limit including e.g. SQL queries." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:446 -msgid "Defaults to *120*." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:450 -msgid "number of workers dedicated to :ref:`cron ` jobs. Defaults to *2*. The workers are threads in multi-threading mode and processes in multi-processing mode." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:453 -msgid "For multi-processing mode, this is in addition to the HTTP worker processes." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:458 -msgid "Configuration file" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:462 -msgid "Most of the command-line options can also be specified via a configuration file. Most of the time, they use similar names with the prefix ``-`` removed and other ``-`` are replaced by ``_`` e.g. :option:`--db-template` becomes ``db_template``." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:467 -msgid "Some conversions don't match the pattern:" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:469 -msgid ":option:`--db-filter` becomes ``dbfilter``" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:470 -msgid ":option:`--no-http` corresponds to the ``http_enable`` boolean" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:471 -msgid "logging presets (all options starting with ``--log-`` except for :option:`--log-handler` and :option:`--log-db`) just add content to ``log_handler``, use that directly in the configuration file" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:474 -msgid ":option:`--smtp` is stored as ``smtp_server``" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:475 -msgid ":option:`--database` is stored as ``db_name``" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:476 -msgid ":option:`--i18n-import` and :option:`--i18n-export` aren't available at all from configuration files" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:479 -msgid "The default configuration file is :file:`{$HOME}/.odoorc` which can be overridden using :option:`--config `. Specifying :option:`--save ` will save the current configuration state back to that file. The configuration items relative to the command-line are to be specified in the section ``[options]``." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:485 -msgid "Here is a sample file:" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:509 -msgid "Shell" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:511 -msgid "Odoo command-line also allows to launch odoo as a python console environment. This enables direct interaction with the :ref:`orm ` and its functionalities." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:521 -msgid "Specify a preferred REPL to use in shell mode." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:527 -msgid "Scaffolding" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:531 -msgid "Scaffolding is the automated creation of a skeleton structure to simplify bootstrapping (of new modules, in the case of Odoo). While not necessary it avoids the tedium of setting up basic structures and looking up what all starting requirements are." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:536 -msgid "Scaffolding is available via the :command:`odoo-bin scaffold` subcommand." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:544 -msgid "the name of the module to create, may munged in various manners to generate programmatic names (e.g. module directory name, model names, …)" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:549 -msgid "directory in which to create the new module, defaults to the current directory" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:554 -msgid "a template directory, files are passed through jinja2_ then copied to the ``destination`` directory" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:558 -msgid "This will create module *my_module* in directory */addons/*." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:563 -msgid "Database Population" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:567 -msgid "Odoo CLI supports database population features. If the feature is :ref:`implemented on a given model `, it allows automatic data generation of the model's records to test your modules in databases containing non-trivial amounts of records." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:577 -msgid "list of models for which the database should be filled" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:581 -msgid "population size, the actual records number depends on the model's `_populate_sizes` attribute. The generated records content is specified by the :meth:`~odoo.models._populate_factories` method of a given model (cf. the :file:`populate` folder of modules for further details)." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:587 -msgid ":ref:`reference/testing/populate`" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:591 -msgid "Cloc" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:595 -msgid "Odoo Cloc is a tool to count the number of relevant lines written in Python, Javascript or XML. This can be used as a rough metric for pricing maintenance of extra modules." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:600 -msgid "Command-line options" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:605 -msgid "Process the code of all extra modules installed on the provided database, and of all server actions and computed fields manually created in the provided database." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:607 -msgid "The :option:`--addons-path` option is required to specify the path(s) to the module folder(s)." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:610 -msgid "If combined with :option:`--path`, the count will be that of the sum of both options' results (with possible overlaps). At least one of these two options is required to specify which code to process." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:617 -msgid ":ref:`reference/cmdline/cloc/database-option`" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:622 -msgid "Process the files in the provided path." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:625 -msgid "If combined with :option:`--database`, the count will be that of the sum of both options' results (with possible overlaps). At least one of these two options is required to specify which code to process." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:632 -msgid "Multiple paths can be provided by repeating the option." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:639 -msgid ":ref:`reference/cmdline/cloc/path-option`" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:645 -msgid "Comma-separated list of directories in which modules are stored. These directories are scanned for modules." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:646 -msgid "Required if the :option:`--database` option is used." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:651 -msgid "Specify a configuration file to use in place of the :option:`--addons-path` option." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:660 -msgid "Show the details of lines counted for each file." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:664 -msgid "Processed files" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:669 -msgid "With the :option:`--database` option" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:671 -msgid "Odoo Cloc counts the lines in each file of extra installed modules in a given database. In addition, it counts the Python lines of server actions and custom computed fields that have been directly created in the database or imported." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:676 -msgid "Some files are excluded from the count by default:" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:678 -msgid "The manifest (:file:`__manifest__.py` or :file:`__openerp__.py`)" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:679 -msgid "The contents of the folder :file:`static/lib`" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:680 -msgid "The tests defined in the folder :file:`tests` and :file:`static/tests`" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:681 -msgid "The migrations scripts defined in the folder :file:`migrations`" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:682 -msgid "The XML files declared in the ``demo`` or ``demo_xml`` sections of the manifest" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:684 -msgid "For special cases, a list of files that should be ignored by Odoo Cloc can be defined per module. This is specified by the ``cloc_exclude`` entry of the manifest:" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:696 -msgid "The pattern ``**/*`` can be used to ignore an entire module. This can be useful to exclude a module from maintenance service costs." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:698 -msgid "For more information about the pattern syntax, see `glob `_." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:705 -msgid "With the :option:`--path` option" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:707 -msgid "This method works the same as with the :ref:`--database option ` if a manifest file is present in the given folder. Otherwise, it counts all files." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:713 -msgid "Identifying Extra Modules" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:715 -msgid "To distinguish between standard and extra modules, Odoo Cloc uses the following heuristic: modules that are located (real file system path, after following symbolic links) in the same parent directory as the ``base``, ``web`` or ``web_enterprise`` standard modules are considered standard. Other modules are treated as extra modules." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:722 -msgid "Error Handling" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:724 -msgid "Some file cannot be counted by Odoo Cloc. Those file are reported at the end of the output." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:728 -msgid "Max file size exceeded" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:730 -msgid "Odoo Cloc rejects any file larger than 25MB. Usually, source files are smaller than 1 MB. If a file is rejected, it may be:" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:733 -msgid "A generated XML file that contains lots of data. It should be excluded in the manifest." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:734 -msgid "A JavaScript library that should be placed in the :file:`static/lib` folder." -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:737 -msgid "Syntax Error" -msgstr "" - -#: ../../content/developer/reference/cmdline.rst:739 -msgid "Odoo Cloc cannot count the lines of code of a Python file with a syntax problem. If an extra module contains such files, they should be fixed to allow the module to load. If the module works despite the presence of those files, they are probably not loaded and should therefore be removed from the module, or at least excluded in the manifest via ``cloc_exclude``." -msgstr "" - -#: ../../content/developer/reference/data.rst:6 -msgid "Data Files" -msgstr "" - -#: ../../content/developer/reference/data.rst:8 -msgid "Odoo is greatly data-driven, and a big part of modules definition is thus the definition of the various records it manages: UI (menus and views), security (access rights and access rules), reports and plain data are all defined via records." -msgstr "" - -#: ../../content/developer/reference/data.rst:16 -msgid "The main way to define data in Odoo is via XML data files: The broad structure of an XML data file is the following:" -msgstr "" - -#: ../../content/developer/reference/data.rst:19 -msgid "Any number of operation elements within the root element ``odoo``" -msgstr "" - -#: ../../content/developer/reference/data.rst:30 -msgid "Data files are executed sequentially, operations can only refer to the result of operations defined previously" -msgstr "" - -#: ../../content/developer/reference/data.rst:35 -msgid "If the content of the data file is expected to be applied only once, you can specify the odoo flag ``noupdate`` set to 1. If part of the data in the file is expected to be applied once, you can place this part of the file in a domain." -msgstr "" - -#: ../../content/developer/reference/data.rst:53 -msgid "Core operations" -msgstr "" - -#: ../../content/developer/reference/data.rst:58 -#: ../../content/developer/reference/views.rst:387 -#: ../../content/developer/reference/views.rst:1270 -msgid "``record``" -msgstr "" - -#: ../../content/developer/reference/data.rst:60 -msgid "``record`` appropriately defines or updates a database record, it has the following attributes:" -msgstr "" - -#: ../../content/developer/reference/data.rst:63 -#: ../../content/developer/reference/data.rst:153 -msgid "``model`` (required)" -msgstr "" - -#: ../../content/developer/reference/data.rst:64 -msgid "name of the model to create (or update)" -msgstr "" - -#: ../../content/developer/reference/data.rst:66 -msgid "the :term:`external identifier` for this record. It is strongly recommended to provide one" -msgstr "" - -#: ../../content/developer/reference/data.rst:69 -msgid "for record creation, allows subsequent definitions to either modify or refer to this record" -msgstr "" - -#: ../../content/developer/reference/data.rst:71 -msgid "for record modification, the record to modify" -msgstr "" - -#: ../../content/developer/reference/data.rst:73 -msgid "context to use when creating the record" -msgstr "" - -#: ../../content/developer/reference/data.rst:77 -msgid "``forcecreate``" -msgstr "" - -#: ../../content/developer/reference/data.rst:75 -msgid "in update mode whether the record should be created if it doesn't exist" -msgstr "" - -#: ../../content/developer/reference/data.rst:77 -msgid "Requires an :term:`external id`, defaults to ``True``." -msgstr "" - -#: ../../content/developer/reference/data.rst:80 -#: ../../content/developer/reference/views.rst:369 -#: ../../content/developer/reference/views.rst:881 -#: ../../content/developer/reference/views.rst:1232 -#: ../../content/developer/reference/views.rst:1560 -#: ../../content/developer/reference/views.rst:1878 -msgid "``field``" -msgstr "" - -#: ../../content/developer/reference/data.rst:82 -msgid "Each record can be composed of ``field`` tags, defining values to set when creating the record. A ``record`` with no ``field`` will use all default values (creation) or do nothing (update)." -msgstr "" - -#: ../../content/developer/reference/data.rst:86 -msgid "A ``field`` has a mandatory ``name`` attribute, the name of the field to set, and various methods to define the value itself:" -msgstr "" - -#: ../../content/developer/reference/data.rst:91 -msgid "Nothing" -msgstr "" - -#: ../../content/developer/reference/data.rst:90 -msgid "if no value is provided for the field, an implicit ``False`` will be set on the field. Can be used to clear a field, or avoid using a default value for the field." -msgstr "" - -#: ../../content/developer/reference/data.rst:98 -#: ../../content/developer/reference/data.rst:159 -msgid "``search``" -msgstr "" - -#: ../../content/developer/reference/data.rst:94 -msgid "for :ref:`relational fields `, should be a :ref:`domain ` on the field's model." -msgstr "" - -#: ../../content/developer/reference/data.rst:97 -msgid "Will evaluate the domain, search the field's model using it and set the search's result as the field's value. Will only use the first result if the field is a :class:`~odoo.fields.Many2one`" -msgstr "" - -#: ../../content/developer/reference/data.rst:104 -msgid "``ref``" -msgstr "" - -#: ../../content/developer/reference/data.rst:101 -msgid "if a ``ref`` attribute is provided, its value must be a valid :term:`external id`, which will be looked up and set as the field's value." -msgstr "" - -#: ../../content/developer/reference/data.rst:104 -msgid "Mostly for :class:`~odoo.fields.Many2one` and :class:`~odoo.fields.Reference` fields" -msgstr "" - -#: ../../content/developer/reference/data.rst:107 -msgid "if a ``type`` attribute is provided, it is used to interpret and convert the field's content. The field's content can be provided through an external file using the ``file`` attribute, or through the node's body." -msgstr "" - -#: ../../content/developer/reference/data.rst:111 -msgid "Available types are:" -msgstr "" - -#: ../../content/developer/reference/data.rst:115 -msgid "``xml``, ``html``" -msgstr "" - -#: ../../content/developer/reference/data.rst:114 -msgid "extracts the ``field``'s children as a single document, evaluates any :term:`external id` specified with the form ``%(external_id)s``. ``%%`` can be used to output actual *%* signs." -msgstr "" - -#: ../../content/developer/reference/data.rst:118 -msgid "``file``" -msgstr "" - -#: ../../content/developer/reference/data.rst:118 -msgid "ensures that the field content is a valid file path in the current model, saves the pair :samp:`{module},{path}` as the field value" -msgstr "" - -#: ../../content/developer/reference/data.rst:121 -msgid "``char``" -msgstr "" - -#: ../../content/developer/reference/data.rst:121 -msgid "sets the field content directly as the field's value without alterations" -msgstr "" - -#: ../../content/developer/reference/data.rst:124 -msgid "``base64``" -msgstr "" - -#: ../../content/developer/reference/data.rst:124 -msgid "base64_-encodes the field's content, useful combined with the ``file`` *attribute* to load e.g. image data into attachments" -msgstr "" - -#: ../../content/developer/reference/data.rst:127 -msgid "``int``" -msgstr "" - -#: ../../content/developer/reference/data.rst:127 -msgid "converts the field's content to an integer and sets it as the field's value" -msgstr "" - -#: ../../content/developer/reference/data.rst:130 -msgid "``float``" -msgstr "" - -#: ../../content/developer/reference/data.rst:130 -msgid "converts the field's content to a float and sets it as the field's value" -msgstr "" - -#: ../../content/developer/reference/data.rst:135 -msgid "``list``, ``tuple``" -msgstr "" - -#: ../../content/developer/reference/data.rst:133 -msgid "should contain any number of ``value`` elements with the same properties as ``field``, each element resolves to an item of a generated tuple or list, and the generated collection is set as the field's value" -msgstr "" - -#: ../../content/developer/reference/data.rst:145 -msgid "``eval``" -msgstr "" - -#: ../../content/developer/reference/data.rst:138 -msgid "for cases where the previous methods are unsuitable, the ``eval`` attributes simply evaluates whatever Python expression it is provided and sets the result as the field's value." -msgstr "" - -#: ../../content/developer/reference/data.rst:142 -msgid "The evaluation context contains various modules (``time``, ``datetime``, ``timedelta``, ``relativedelta``), a function to resolve :term:`external identifiers` (``ref``) and the model object for the current field if applicable (``obj``)" -msgstr "" - -#: ../../content/developer/reference/data.rst:148 -#: ../../content/developer/reference/views.rst:1314 -msgid "``delete``" -msgstr "" - -#: ../../content/developer/reference/data.rst:150 -msgid "The ``delete`` tag can remove any number of records previously defined. It has the following attributes:" -msgstr "" - -#: ../../content/developer/reference/data.rst:154 -msgid "the model in which a specified record should be deleted" -msgstr "" - -#: ../../content/developer/reference/data.rst:156 -msgid "the :term:`external id` of a record to remove" -msgstr "" - -#: ../../content/developer/reference/data.rst:158 -msgid "a :ref:`domain ` to find records of the model to remove" -msgstr "" - -#: ../../content/developer/reference/data.rst:161 -msgid "``id`` and ``search`` are exclusive" -msgstr "" - -#: ../../content/developer/reference/data.rst:164 -msgid "``function``" -msgstr "" - -#: ../../content/developer/reference/data.rst:166 -msgid "The ``function`` tag calls a method on a model, with provided parameters. It has two mandatory parameters ``model`` and ``name`` specifying respectively the model and the name of the method to call." -msgstr "" - -#: ../../content/developer/reference/data.rst:170 -msgid "Parameters can be provided using ``eval`` (should evaluate to a sequence of parameters to call the method with) or ``value`` elements (see ``list`` values)." -msgstr "" - -#: ../../content/developer/reference/data.rst:200 -msgid "Shortcuts" -msgstr "" - -#: ../../content/developer/reference/data.rst:202 -msgid "Because some important structural models of Odoo are complex and involved, data files provide shorter alternatives to defining them using :ref:`record tags `:" -msgstr "" - -#: ../../content/developer/reference/data.rst:207 -msgid "``menuitem``" -msgstr "" - -#: ../../content/developer/reference/data.rst:209 -msgid "Defines an ``ir.ui.menu`` record with a number of defaults and fallbacks:" -msgstr "" - -#: ../../content/developer/reference/data.rst:218 -msgid "``parent``" -msgstr "" - -#: ../../content/developer/reference/data.rst:212 -msgid "If a ``parent`` attribute is set, it should be the :term:`external id` of an other menu item, used as the new item's parent" -msgstr "" - -#: ../../content/developer/reference/data.rst:214 -msgid "If no ``parent`` is provided, tries to interpret the ``name`` attribute as a ``/``-separated sequence of menu names and find a place in the menu hierarchy. In that interpretation, intermediate menus are automatically created" -msgstr "" - -#: ../../content/developer/reference/data.rst:218 -msgid "Otherwise the menu is defined as a \"top-level\" menu item (*not* a menu with no parent)" -msgstr "" - -#: ../../content/developer/reference/data.rst:221 -msgid "If no ``name`` attribute is specified, tries to get the menu name from a linked action if any. Otherwise uses the record's ``id``" -msgstr "" - -#: ../../content/developer/reference/data.rst:226 -#: ../../content/developer/reference/data.rst:250 -#: ../../content/developer/reference/views.rst:837 -#: ../../content/developer/reference/views.rst:1499 -#: ../../content/developer/reference/views.rst:1873 -#: ../../content/developer/reference/views.rst:1983 -#: ../../content/developer/webservices/odoo.rst:1175 -msgid "``groups``" -msgstr "" - -#: ../../content/developer/reference/data.rst:224 -msgid "A ``groups`` attribute is interpreted as a comma-separated sequence of :term:`external identifiers` for ``res.groups`` models. If an :term:`external identifier` is prefixed with a minus (``-``), the group is *removed* from the menu's groups" -msgstr "" - -#: ../../content/developer/reference/data.rst:229 -#: ../../content/developer/reference/views.rst:1454 -msgid "``action``" -msgstr "" - -#: ../../content/developer/reference/data.rst:229 -msgid "if specified, the ``action`` attribute should be the :term:`external id` of an action to execute when the menu is open" -msgstr "" - -#: ../../content/developer/reference/data.rst:232 -msgid "the menu item's :term:`external id`" -msgstr "" - -#: ../../content/developer/reference/data.rst:237 -msgid "``template``" -msgstr "" - -#: ../../content/developer/reference/data.rst:239 -msgid "Creates a :ref:`QWeb view ` requiring only the ``arch`` section of the view, and allowing a few *optional* attributes:" -msgstr "" - -#: ../../content/developer/reference/data.rst:243 -msgid "the view's :term:`external identifier`" -msgstr "" - -#: ../../content/developer/reference/data.rst:245 -msgid "``name``, ``inherit_id``, ``priority``" -msgstr "" - -#: ../../content/developer/reference/data.rst:245 -msgid "same as the corresponding field on ``ir.ui.view`` (nb: ``inherit_id`` should be an :term:`external identifier`)" -msgstr "" - -#: ../../content/developer/reference/data.rst:248 -msgid "``primary``" -msgstr "" - -#: ../../content/developer/reference/data.rst:248 -msgid "if set to ``True`` and combined with a ``inherit_id``, defines the view as a primary" -msgstr "" - -#: ../../content/developer/reference/data.rst:251 -msgid "comma-separated list of group :term:`external identifiers`" -msgstr "" - -#: ../../content/developer/reference/data.rst:253 -#: ../../content/developer/webservices/extract_api.rst:282 -msgid "``page``" -msgstr "" - -#: ../../content/developer/reference/data.rst:253 -msgid "if set to ``\"True\"``, the template is a website page (linkable to, deletable)" -msgstr "" - -#: ../../content/developer/reference/data.rst:258 -msgid "``optional``" -msgstr "" - -#: ../../content/developer/reference/data.rst:256 -msgid "``enabled`` or ``disabled``, whether the view can be disabled (in the website interface) and its default status. If unset, the view is always enabled." -msgstr "" - -#: ../../content/developer/reference/data.rst:264 -msgid "CSV data files" -msgstr "" - -#: ../../content/developer/reference/data.rst:266 -msgid "XML data files are flexible and self-descriptive, but very verbose when creating a number of simple records of the same model in bulk." -msgstr "" - -#: ../../content/developer/reference/data.rst:269 -msgid "For this case, data files can also use csv_, this is often the case for :ref:`access rights `:" -msgstr "" - -#: ../../content/developer/reference/data.rst:272 -msgid "the file name is :file:`{model_name}.csv`" -msgstr "" - -#: ../../content/developer/reference/data.rst:273 -msgid "the first row lists the fields to write, with the special field ``id`` for :term:`external identifiers` (used for creation or update)" -msgstr "" - -#: ../../content/developer/reference/data.rst:275 -msgid "each row thereafter creates a new record" -msgstr "" - -#: ../../content/developer/reference/data.rst:277 -msgid "Here's the first lines of the data file defining US states ``res.country.state.csv``" -msgstr "" - -#: ../../content/developer/reference/data.rst:283 -msgid "rendered in a more readable format:" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "id" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "country_id:id" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "name" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "code" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "state_au_1" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -#: ../../content/developer/reference/static/res.country.state.csv:1 -#: ../../content/developer/reference/static/res.country.state.csv:1 -#: ../../content/developer/reference/static/res.country.state.csv:1 -#: ../../content/developer/reference/static/res.country.state.csv:1 -#: ../../content/developer/reference/static/res.country.state.csv:1 -#: ../../content/developer/reference/static/res.country.state.csv:1 -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "au" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "Australian Capital Territory" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "ACT" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "state_au_2" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "New South Wales" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "NSW" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "state_au_3" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "Northern Territory" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "NT" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "state_au_4" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "Queensland" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "QLD" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "state_au_5" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "South Australia" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "SA" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "state_au_6" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "Tasmania" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "TAS" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "state_au_7" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "Victoria" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "VIC" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "state_au_8" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "Western Australia" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "WA" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "state_us_1" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -#: ../../content/developer/reference/static/res.country.state.csv:1 -#: ../../content/developer/reference/static/res.country.state.csv:1 -#: ../../content/developer/reference/static/res.country.state.csv:1 -#: ../../content/developer/reference/static/res.country.state.csv:1 -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "us" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "Alabama" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "AL" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "state_us_2" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "Alaska" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "AK" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "state_us_3" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "Arizona" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "AZ" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "state_us_4" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "Arkansas" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "AR" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "state_us_5" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "California" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "CA" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "state_us_6" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "Colorado" -msgstr "" - -#: ../../content/developer/reference/static/res.country.state.csv:1 -msgid "CO" -msgstr "" - -#: ../../content/developer/reference/data.rst:290 -msgid "For each row (record):" -msgstr "" - -#: ../../content/developer/reference/data.rst:292 -msgid "the first column is the :term:`external id` of the record to create or update" -msgstr "" - -#: ../../content/developer/reference/data.rst:294 -msgid "the second column is the :term:`external id` of the country object to link to (country objects must have been defined beforehand)" -msgstr "" - -#: ../../content/developer/reference/data.rst:296 -msgid "the third column is the ``name`` field for ``res.country.state``" -msgstr "" - -#: ../../content/developer/reference/data.rst:297 -msgid "the fourth column is the ``code`` field for ``res.country.state``" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:8 -msgid "Odoo Guidelines" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:10 -msgid "This page introduces the Odoo Coding Guidelines. Those aim to improve the quality of Odoo Apps code. Indeed proper code improves readability, eases maintenance, helps debugging, lowers complexity and promotes reliability. These guidelines should be applied to every new module and to all new development." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:17 -msgid "When modifying existing files in **stable version** the original file style strictly supersedes any other style guidelines. In other words please never modify existing files in order to apply these guidelines. It avoids disrupting the revision history of code lines. Diff should be kept minimal. For more details, see our `pull request guide `_." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:25 -msgid "When modifying existing files in **master (development) version** apply those guidelines to existing code only for modified code or if most of the file is under revision. In other words modify existing files structure only if it is going under major changes. In that case first do a **move** commit then apply the changes related to the feature." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:35 -msgid "Directories" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:36 -msgid "A module is organized in important directories. Those contain the business logic; having a look at them should make you understand the purpose of the module." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:39 -msgid "*data/* : demo and data xml" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:40 -msgid "*models/* : models definition" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:41 -msgid "*controllers/* : contains controllers (HTTP routes)" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:42 -msgid "*views/* : contains the views and templates" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:43 -msgid "*static/* : contains the web assets, separated into *css/, js/, img/, lib/, ...*" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:45 -msgid "Other optional directories compose the module." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:47 -msgid "*wizard/* : regroups the transient models (``models.TransientModel``) and their views" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:48 -msgid "*report/* : contains the printable reports and models based on SQL views. Python objects and XML views are included in this directory" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:49 -msgid "*tests/* : contains the Python tests" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:53 -msgid "File naming" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:55 -msgid "File naming is important to quickly find information through all odoo addons. This section explains how to name files in a standard odoo module. As an example we use a `plant nursery `_ application. It holds two main models *plant.nursery* and *plant.order*." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:60 -msgid "Concerning *models*, split the business logic by sets of models belonging to a same main model. Each set lies in a given file named based on its main model. If there is only one model, its name is the same as the module name. Each inherited model should be in its own file to help understanding of impacted models." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:74 -msgid "Concerning *security* and access rights and rules two main files should be used. First one is the definition of access rights done in a ``ir.model.access.csv`` file. User groups are defined in ``_groups.xml``. Access rules are defined in ``_security.xml``." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:88 -msgid "Concerning *views*, backend views should be split like models and suffixed by ``_views.xml``. Backend views are list, form, kanban, activity, graph, pivot, .. views. To ease split by model in views main menus not linked to specific actions may be extracted into an optional ``_menus.xml`` file. Templates (QWeb pages used notably for portal / website display) and bundles (import of JS and CSS assets) are put in separate files. Those are respectively ``_templates.xml`` and ``assets.xml`` files." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:108 -msgid "Concerning *data*, split them by purpose (demo or data) and main model. Filenames will be the main_model name suffixed by ``_demo.xml`` or ``_data.xml``. For instance for an application having demo and data for its main model as well as subtypes, activities and mail templates all related to mail module:" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:121 -msgid "Concerning *controllers*, generally all controllers belong to a single controller contained in a file named ``.py``. An old convention in Odoo is to name this file ``main.py`` but it is considered as outdated. If you need to inherit an existing controller from another module do it in ``.py``. For example adding portal controller in an application is done in ``portal.py``." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:135 -msgid "Concerning *static files*, Javascript files follow globally the same logic as python models. Each component should be in its own file with a meaningful name. For instance, the activity widgets are located in ``activity.js`` of mail module. Subdirectories can also be created to structure the 'package' (see web module for more details). The same logic should be applied for the templates of JS widgets (static XML files) and for their styles (scss files). Don't link data (image, libraries) outside Odoo: do not use an URL to an image but copy it in the codebase instead." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:144 -msgid "Concerning *wizards*, naming convention is the same of for python models: ``.py`` and ``_views.xml``. Both are put in the wizard directory. This naming comes from old odoo applications using the wizard keyword for transient models." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:156 -msgid "Concerning *statistics reports* done with python / SQL views and classic views naming is the following :" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:166 -msgid "Concerning *printable reports* which contain mainly data preparation and Qweb templates naming is the following :" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:176 -msgid "The complete tree of our Odoo module therefore looks like" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:235 -msgid "File names should only contain ``[a-z0-9_]`` (lowercase alphanumerics and ``_``)" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:238 -msgid "Use correct file permissions : folder 755 and file 644." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:243 -msgid "XML files" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:246 -msgid "Format" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:247 -msgid "To declare a record in XML, the **record** notation (using **) is recommended:" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:249 -msgid "Place ``id`` attribute before ``model``" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:250 -msgid "For field declaration, ``name`` attribute is first. Then place the *value* either in the ``field`` tag, either in the ``eval`` attribute, and finally other attributes (widget, options, ...) ordered by importance." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:255 -msgid "Try to group the record by model. In case of dependencies between action/menu/views, this convention may not be applicable." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:257 -msgid "Use naming convention defined at the next point" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:258 -msgid "The tag ** is only used to set not-updatable data with ``noupdate=1``. If there is only not-updatable data in the file, the ``noupdate=1`` can be set on the ```` tag and do not set a ```` tag." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:276 -msgid "Odoo supports custom tags acting as syntactic sugar:" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:278 -msgid "menuitem: use it as a shortcut to declare a ``ir.ui.menu``" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:279 -msgid "template: use it to declare a QWeb View requiring only the ``arch`` section of the view." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:280 -msgid "report: use to declare a :ref:`report action `" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:281 -msgid "act_window: use it if the record notation can't do what you want" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:283 -msgid "The 4 first tags are preferred over the *record* notation." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:287 -msgid "XML IDs and naming" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:290 -msgid "Security, View and Action" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:292 -msgid "Use the following pattern :" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:294 -msgid "For a menu: :samp:`{}_menu`, or :samp:`{}_menu_{do_stuff}` for submenus." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:295 -msgid "For a view: :samp:`{}_view_{}`, where *view_type* is ``kanban``, ``form``, ``tree``, ``search``, ..." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:297 -msgid "For an action: the main action respects :samp:`{}_action`. Others are suffixed with :samp:`_{}`, where *detail* is a lowercase string briefly explaining the action. This is used only if multiple actions are declared for the model." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:301 -msgid "For window actions: suffix the action name by the specific view information like :samp:`{}_action_view_{}`." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:303 -msgid "For a group: :samp:`{}_group_{}` where *group_name* is the name of the group, generally 'user', 'manager', ..." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:305 -msgid "For a rule: :samp:`{}_rule_{}` where *concerned_group* is the short name of the concerned group ('user' for the 'model_name_group_user', 'public' for public user, 'company' for multi-company rules, ...)." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:310 -msgid "Name should be identical to xml id with dots replacing underscores. Actions should have a real naming as it is used as display name." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:364 -msgid "Inheriting XML" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:366 -msgid "Xml Ids of inheriting views should use the same ID as the original record. It helps finding all inheritance at a glance. As final Xml Ids are prefixed by the module that creates them there is no overlap." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:370 -msgid "Naming should contain an ``.inherit.{details}`` suffix to ease understanding the override purpose when looking at its name." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:381 -msgid "New primary views do not require the inherit suffix as those are new records based upon the first one." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:396 -#: ../../content/developer/reference/qweb.rst:332 -#: ../../content/developer/reference/security.rst:355 -#: ../../content/developer/reference/security.rst:357 -msgid "Python" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:400 -msgid "Do not forget to read the :ref:`Security Pitfalls ` section as well to write secure code." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:404 -msgid "PEP8 options" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:406 -msgid "Using a linter can help show syntax and semantic warnings or errors. Odoo source code tries to respect Python standard, but some of them can be ignored." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:409 -msgid "E501: line too long" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:410 -msgid "E301: expected 1 blank line, found 0" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:411 -msgid "E302: expected 2 blank lines, found 1" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:414 -msgid "Imports" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:415 -msgid "The imports are ordered as" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:417 -msgid "External libraries (one per line sorted and split in python stdlib)" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:418 -msgid "Imports of ``odoo``" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:419 -msgid "Imports from Odoo modules (rarely, and only if necessary)" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:421 -msgid "Inside these 3 groups, the imported lines are alphabetically sorted." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:439 -msgid "Idiomatics of Programming (Python)" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:441 -msgid "Each python file should have ``# -*- coding: utf-8 -*-`` as first line." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:442 -msgid "Always favor *readability* over *conciseness* or using the language features or idioms." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:443 -msgid "Don't use ``.clone()``" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:454 -msgid "Python dictionary : creation and update" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:479 -msgid "Use meaningful variable/class/method names" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:480 -msgid "Useless variable : Temporary variables can make the code clearer by giving names to objects, but that doesn't mean you should create temporary variables all the time:" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:492 -msgid "Multiple return points are OK, when they're simpler" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:512 -msgid "Know your builtins : You should at least have a basic understanding of all the Python builtins (http://docs.python.org/library/functions.html)" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:520 -msgid "Also, ``if 'key' in my_dict`` and ``if my_dict.get('key')`` have very different meaning, be sure that you're using the right one." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:523 -msgid "Learn list comprehensions : Use list comprehension, dict comprehension, and basic manipulation using ``map``, ``filter``, ``sum``, ... They make the code easier to read." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:536 -msgid "Collections are booleans too : In python, many objects have \"boolean-ish\" value when evaluated in a boolean context (such as an if). Among these are collections (lists, dicts, sets, ...) which are \"falsy\" when empty and \"truthy\" when containing items:" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:547 -msgid "So, you can write ``if some_collection:`` instead of ``if len(some_collection):``." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:550 -msgid "Iterate on iterables" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:564 -msgid "Use dict.setdefault" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:580 -msgid "As a good developer, document your code (docstring on methods, simple comments for tricky part of code)" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:582 -msgid "In additions to these guidelines, you may also find the following link interesting: http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html (a little bit outdated, but quite relevant)" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:587 -msgid "Programming in Odoo" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:589 -msgid "Avoid to create generators and decorators: only use the ones provided by the Odoo API." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:591 -msgid "As in python, use ``filtered``, ``mapped``, ``sorted``, ... methods to ease code reading and performance." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:596 -msgid "Make your method work in batch" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:597 -msgid "When adding a function, make sure it can process multiple records by iterating on self to treat each record." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:606 -msgid "For performance issue, when developing a 'stat button' (for instance), do not perform a ``search`` or a ``search_count`` in a loop. It is recommended to use ``read_group`` method, to compute all value in only one request." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:621 -msgid "Propagate the context" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:622 -msgid "The context is a ``frozendict`` that cannot be modified. To call a method with a different context, the ``with_context`` method should be used :" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:631 -msgid "Passing parameter in context can have dangerous side-effects." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:633 -msgid "Since the values are propagated automatically, some unexpected behavior may appear. Calling ``create()`` method of a model with *default_my_field* key in context will set the default value of *my_field* for the concerned model. But if during this creation, other objects (such as sale.order.line, on sale.order creation) having a field name *my_field* are created, their default value will be set too." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:639 -msgid "If you need to create a key context influencing the behavior of some object, choice a good name, and eventually prefix it by the name of the module to isolate its impact. A good example are the keys of ``mail`` module : *mail_create_nosubscribe*, *mail_notrack*, *mail_notify_user_signature*, ..." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:646 -msgid "Think extendable" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:648 -msgid "Functions and methods should not contain too much logic: having a lot of small and simple methods is more advisable than having few large and complex methods. A good rule of thumb is to split a method as soon as it has more than one responsibility (see http://en.wikipedia.org/wiki/Single_responsibility_principle)." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:653 -msgid "Hardcoding a business logic in a method should be avoided as it prevents to be easily extended by a submodule." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:679 -msgid "The above code is over extendable for the sake of example but the readability must be taken into account and a tradeoff must be made." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:682 -msgid "Also, name your functions accordingly: small and properly named functions are the starting point of readable/maintainable code and tighter documentation." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:685 -msgid "This recommendation is also relevant for classes, files, modules and packages. (See also http://en.wikipedia.org/wiki/Cyclomatic_complexity)" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:690 -msgid "Never commit the transaction" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:691 -msgid "The Odoo framework is in charge of providing the transactional context for all RPC calls. The principle is that a new database cursor is opened at the beginning of each RPC call, and committed when the call has returned, just before transmitting the answer to the RPC client, approximately like this:" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:712 -msgid "If any error occurs during the execution of the RPC call, the transaction is rolled back atomically, preserving the state of the system." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:715 -msgid "Similarly, the system also provides a dedicated transaction during the execution of tests suites, so it can be rolled back or not depending on the server startup options." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:719 -msgid "The consequence is that if you manually call ``cr.commit()`` anywhere there is a very high chance that you will break the system in various ways, because you will cause partial commits, and thus partial and unclean rollbacks, causing among others:" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:724 -msgid "inconsistent business data, usually data loss" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:725 -msgid "workflow desynchronization, documents stuck permanently" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:726 -msgid "tests that can't be rolled back cleanly, and will start polluting the database, and triggering error (this is true even if no error occurs during the transaction)" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:737 -msgid "Here is the very simple rule:" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:731 -msgid "You should **NEVER** call ``cr.commit()`` yourself, **UNLESS** you have created your own database cursor explicitly! And the situations where you need to do that are exceptional!" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:735 -msgid "And by the way if you did create your own cursor, then you need to handle error cases and proper rollback, as well as properly close the cursor when you're done with it." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:739 -msgid "And contrary to popular belief, you do not even need to call ``cr.commit()`` in the following situations: - in the ``_auto_init()`` method of an *models.Model* object: this is taken care of by the addons initialization method, or by the ORM transaction when creating custom models - in reports: the ``commit()`` is handled by the framework too, so you can update the database even from within a report - within *models.Transient* methods: these methods are called exactly like regular *models.Model* ones, within a transaction and with the corresponding ``cr.commit()/rollback()`` at the end - etc. (see general rule above if you have in doubt!)" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:751 -msgid "All ``cr.commit()`` calls outside of the server framework from now on must have an **explicit comment** explaining why they are absolutely necessary, why they are indeed correct, and why they do not break the transactions. Otherwise they can and will be removed !" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:758 -msgid "Use translation method correctly" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:760 -msgid "Odoo uses a GetText-like method named \"underscore\" ``_( )`` to indicate that a static string used in the code needs to be translated at runtime using the language of the context. This pseudo-method is accessed within your code by importing as follows:" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:769 -msgid "A few very important rules must be followed when using it, in order for it to work and to avoid filling the translations with useless junk." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:772 -msgid "Basically, this method should only be used for static strings written manually in the code, it will not work to translate field values, such as Product names, etc. This must be done instead using the translate flag on the corresponding field." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:777 -msgid "The method accepts optional positional or named parameter The rule is very simple: calls to the underscore method should always be in the form ``_('literal string')`` and nothing else:" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:820 -msgid "Also, keep in mind that translators will have to work with the literal values that are passed to the underscore function, so please try to make them easy to understand and keep spurious characters and formatting to a minimum. Translators must be aware that formatting patterns such as ``%s`` or ``%d``, newlines, etc. need to be preserved, but it's important to use these in a sensible and obvious manner:" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:840 -msgid "In general in Odoo, when manipulating strings, prefer ``%`` over ``.format()`` (when only one variable to replace in a string), and prefer ``%(varname)`` instead of position (when multiple variables have to be replaced). This makes the translation easier for the community translators." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:847 -msgid "Symbols and Conventions" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:857 -msgid "Model name (using the dot notation, prefix by the module name) :" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:850 -msgid "When defining an Odoo Model : use singular form of the name (*res.partner* and *sale.order* instead of *res.partnerS* and *saleS.orderS*)" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:852 -msgid "When defining an Odoo Transient (wizard) : use ``.`` where *related_base_model* is the base model (defined in *models/*) related to the transient, and *action* is the short name of what the transient do. Avoid the *wizard* word. For instance : ``account.invoice.make``, ``project.task.delegate.batch``, ..." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:856 -msgid "When defining *report* model (SQL views e.i.) : use ``.report.``, based on the Transient convention." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:859 -msgid "Odoo Python Class : use camelcase (Object-oriented style)." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:870 -msgid "Variable name :" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:868 -msgid "use camelcase for model variable" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:869 -msgid "use underscore lowercase notation for common variable." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:870 -msgid "suffix your variable name with *_id* or *_ids* if it contains a record id or list of id. Don't use ``partner_id`` to contain a record of res.partner" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:878 -msgid "``One2Many`` and ``Many2Many`` fields should always have *_ids* as suffix (example: sale_order_line_ids)" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:879 -msgid "``Many2One`` fields should have *_id* as suffix (example : partner_id, user_id, ...)" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:889 -msgid "Method conventions" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:881 -msgid "Compute Field : the compute method pattern is *_compute_*" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:882 -msgid "Search method : the search method pattern is *_search_*" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:883 -msgid "Default method : the default method pattern is *_default_*" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:884 -msgid "Selection method: the selection method pattern is *_selection_*" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:885 -msgid "Onchange method : the onchange method pattern is *_onchange_*" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:886 -msgid "Constraint method : the constraint method pattern is *_check_*" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:887 -msgid "Action method : an object action method is prefix with *action_*. Since it uses only one record, add ``self.ensure_one()`` at the beginning of the method." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:900 -msgid "In a Model attribute order should be" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:892 -msgid "Private attributes (``_name``, ``_description``, ``_inherit``, ...)" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:893 -msgid "Default method and ``_default_get``" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:894 -msgid "Field declarations" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:895 -msgid "Compute, inverse and search methods in the same order as field declaration" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:896 -msgid "Selection method (methods used to return computed values for selection fields)" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:897 -msgid "Constrains methods (``@api.constrains``) and onchange methods (``@api.onchange``)" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:898 -msgid "CRUD methods (ORM overrides)" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:899 -msgid "Action methods" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:900 -msgid "And finally, other business methods." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:956 -msgid "Javascript and CSS" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:959 -msgid "Static files organization" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:961 -msgid "Odoo addons have some conventions on how to structure various files. We explain here in more details how web assets are supposed to be organized." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:964 -msgid "The first thing to know is that the Odoo server will serve (statically) all files located in a *static/* folder, but prefixed with the addon name. So, for example, if a file is located in *addons/web/static/src/js/some_file.js*, then it will be statically available at the url *your-odoo-server.com/web/static/src/js/some_file.js*" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:969 -msgid "The convention is to organize the code according to the following structure:" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:971 -msgid "*static*: all static files in general" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:973 -msgid "*static/lib*: this is the place where js libs should be located, in a sub folder. So, for example, all files from the *jquery* library are in *addons/web/static/lib/jquery*" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:975 -msgid "*static/src*: the generic static source code folder" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:977 -msgid "*static/src/css*: all css files" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:978 -msgid "*static/src/fonts*" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:979 -msgid "*static/src/img*" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:980 -msgid "*static/src/js*" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:982 -msgid "*static/src/js/tours*: end user tour files (tutorials, not tests)" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:984 -msgid "*static/src/scss*: scss files" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:985 -msgid "*static/src/xml*: all qweb templates that will be rendered in JS" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:987 -msgid "*static/tests*: this is where we put all test related files." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:989 -msgid "*static/tests/tours*: this is where we put all tour test files (not tutorials)." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:992 -msgid "Javascript coding guidelines" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:994 -msgid "``use strict;`` is recommended for all javascript files" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:995 -msgid "Use a linter (jshint, ...)" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:996 -msgid "Never add minified Javascript Libraries" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:997 -msgid "Use camelcase for class declaration" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:999 -msgid "More precise JS guidelines are detailed in the `github wiki `_. You may also have a look at existing API in Javascript by looking Javascript References." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1004 -msgid "CSS coding guidelines" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1006 -msgid "Prefix all your classes with *o_* where *module_name* is the technical name of the module ('sale', 'im_chat', ...) or the main route reserved by the module (for website module mainly, i.e. : 'o_forum' for *website_forum* module). The only exception for this rule is the webclient: it simply uses *o_* prefix." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1011 -msgid "Avoid using *id* tag" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1012 -msgid "Use Bootstrap native classes" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1013 -msgid "Use underscore lowercase notation to name class" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1018 -msgid "Git" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1021 -msgid "Configure your git" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1023 -msgid "Based on ancestral experience and oral tradition, the following things go a long way towards making your commits more helpful:" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1026 -msgid "Be sure to define both the user.email and user.name in your local git config" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1032 -msgid "Be sure to add your full name to your Github profile here. Please feel fancy and add your team, avatar, your favorite quote, and whatnot ;-)" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1036 -msgid "Commit message structure" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1038 -msgid "Commit message has four parts: tag, module, short description and full description. Try to follow the preferred structure for your commit messages" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1061 -msgid "Tag and module name" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1063 -msgid "Tags are used to prefix your commit. They should be one of the following" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1065 -msgid "**[FIX]** for bug fixes: mostly used in stable version but also valid if you are fixing a recent bug in development version;" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1067 -msgid "**[REF]** for refactoring: when a feature is heavily rewritten;" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1068 -msgid "**[ADD]** for adding new modules;" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1069 -msgid "**[REM]** for removing resources: removing dead code, removing views, removing modules, ...;" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1071 -msgid "**[REV]** for reverting commits: if a commit causes issues or is not wanted reverting it is done using this tag;" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1073 -msgid "**[MOV]** for moving files: use git move and do not change content of moved file otherwise Git may loose track and history of the file; also used when moving code from one file to another;" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1076 -msgid "**[REL]** for release commits: new major or minor stable versions;" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1077 -msgid "**[IMP]** for improvements: most of the changes done in development version are incremental improvements not related to another tag;" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1079 -msgid "**[MERGE]** for merge commits: used in forward port of bug fixes but also as main commit for feature involving several separated commits;" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1081 -msgid "**[CLA]** for signing the Odoo Individual Contributor License;" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1082 -msgid "**[I18N]** for changes in translation files;" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1084 -msgid "After tag comes the modified module name. Use the technical name as functional name may change with time. If several modules are modified, list them or use various to tell it is cross-modules. Unless really required or easier avoid modifying code across several modules in the same commit. Understanding module history may become difficult." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1091 -msgid "Commit message header" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1093 -msgid "After tag and module name comes a meaningful commit message header. It should be self explanatory and include the reason behind the change. Do not use single words like \"bugfix\" or \"improvements\". Try to limit the header length to about 50 characters for readability." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1098 -msgid "Commit message header should make a valid sentence once concatenated with ``if applied, this commit will
``. For example ``[IMP] base: prevent to archive users linked to active partners`` is correct as it makes a valid sentence ``if applied, this commit will prevent users to archive...``." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1104 -msgid "Commit message full description" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1106 -msgid "In the message description specify the part of the code impacted by your changes (module name, lib, transversal object, ...) and a description of the changes." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1109 -msgid "First explain WHY you are modifying code. What is important if someone goes back to your commit in about 4 decades (or 3 days) is why you did it. It is the purpose of the change." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1113 -msgid "What you did can be found in the commit itself. If there was some technical choices involved it is a good idea to explain it also in the commit message after the why. For Odoo R&D developers \"PO team asked me to do it\" is not a valid why, by the way." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1117 -msgid "Please avoid commits which simultaneously impact multiple modules. Try to split into different commits where impacted modules are different. It will be helpful if we need to revert changes in a given module separately." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1121 -msgid "Don't hesitate to be a bit verbose. Most people will only see your commit message and judge everything you did in your life just based on those few sentences. No pressure at all." -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1125 -msgid "**You spend several hours, days or weeks working on meaningful features. Take some time to calm down and write clear and understandable commit messages.**" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1128 -msgid "If you are an Odoo R&D developer the WHY should be the purpose of the task you are working on. Full specifications make the core of the commit message. **If you are working on a task that lacks purpose and specifications please consider making them clear before continuing.**" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1133 -msgid "Finally here are some examples of correct commit messages :" -msgstr "" - -#: ../../content/developer/reference/guidelines.rst:1156 -msgid "Use the long description to explain the *why* not the *what*, the *what* can be seen in the diff" -msgstr "" - -#: ../../content/developer/reference/http.rst:6 -msgid "Web Controllers" -msgstr "" - -#: ../../content/developer/reference/http.rst:9 -msgid "Controllers" -msgstr "" - -#: ../../content/developer/reference/http.rst:11 -msgid "Controllers need to provide extensibility, much like :class:`~odoo.models.Model`, but can't use the same mechanism as the pre-requisites (a database with loaded modules) may not be available yet (e.g. no database created, or no database selected)." -msgstr "" - -#: ../../content/developer/reference/http.rst:16 -msgid "Controllers thus provide their own extension mechanism, separate from that of models:" -msgstr "" - -#: ../../content/developer/reference/http.rst:19 -msgid "Controllers are created by :ref:`inheriting ` from :class:`~odoo.http.Controller`. Routes are defined through methods decorated with :func:`~odoo.http.route`::" -msgstr "" - -#: ../../content/developer/reference/http.rst:27 -msgid "To *override* a controller, :ref:`inherit ` from its class and override relevant methods, re-exposing them if necessary::" -msgstr "" - -#: ../../content/developer/reference/http.rst:36 -msgid "decorating with :func:`~odoo.http.route` is necessary to keep the method (and route) visible: if the method is redefined without decorating, it will be \"unpublished\"" -msgstr "" - -#: ../../content/developer/reference/http.rst:39 -msgid "the decorators of all methods are combined, if the overriding method's decorator has no argument all previous ones will be kept, any provided argument will override previously defined ones e.g.::" -msgstr "" - -#: ../../content/developer/reference/http.rst:48 -msgid "will change ``/some_url`` from public authentication to user (requiring a log-in)" -msgstr "" - -#: ../../content/developer/reference/http.rst:52 -#: ../../content/developer/reference/orm.rst:48 -#: ../../content/developer/reference/qweb.rst:590 -msgid "API" -msgstr "" - -#: ../../content/developer/reference/http.rst:57 -msgid "Routing" -msgstr "" - -#: ../../content/developer/reference/http.rst:64 -msgid "Request" -msgstr "" - -#: ../../content/developer/reference/http.rst:66 -msgid "The request object is automatically set on :data:`odoo.http.request` at the start of the request" -msgstr "" - -#: ../../content/developer/reference/http.rst:78 -#: ../../content/developer/webservices/extract_api.rst:103 -#: ../../content/developer/webservices/extract_api.rst:188 -#: ../../content/developer/webservices/extract_api.rst:500 -msgid "Response" -msgstr "" - -#: ../../content/developer/reference/iot.rst:4 +#: ../../content/developer/iot.rst:4 msgid "Internet of Things" msgstr "" -#: ../../content/developer/reference/iot.rst:6 +#: ../../content/developer/iot.rst:6 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/reference/iot.rst:11 +#: ../../content/developer/iot.rst:11 msgid "To add support for a device, all we need is:" msgstr "" -#: ../../content/developer/reference/iot.rst:13 +#: ../../content/developer/iot.rst:13 msgid "an `Interface`, to detect connected devices of a specific type" msgstr "" -#: ../../content/developer/reference/iot.rst:14 +#: ../../content/developer/iot.rst:14 msgid "a `Driver`, to communicate with an individual device" msgstr "" -#: ../../content/developer/reference/iot.rst:16 +#: ../../content/developer/iot.rst:16 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/reference/iot.rst:35 +#: ../../content/developer/iot.rst:35 msgid "Detect Devices" msgstr "" -#: ../../content/developer/reference/iot.rst:37 +#: ../../content/developer/iot.rst:37 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/reference/iot.rst:42 +#: ../../content/developer/iot.rst:42 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/reference/iot.rst:46 +#: ../../content/developer/iot.rst:46 msgid "Interface" msgstr "" -#: ../../content/developer/reference/iot.rst:48 +#: ../../content/developer/iot.rst:48 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/reference/iot.rst:51 +#: ../../content/developer/iot.rst:51 msgid "Extending the `Interface` class" msgstr "" -#: ../../content/developer/reference/iot.rst:52 +#: ../../content/developer/iot.rst:52 msgid "Setting the `connection_type` class attribute" msgstr "" -#: ../../content/developer/reference/iot.rst:53 +#: ../../content/developer/iot.rst:53 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/reference/iot.rst:58 +#: ../../content/developer/iot.rst:58 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/reference/iot.rst:75 +#: ../../content/developer/iot.rst:75 msgid "Driver" msgstr "" -#: ../../content/developer/reference/iot.rst:77 +#: ../../content/developer/iot.rst:77 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/reference/iot.rst:84 +#: ../../content/developer/iot.rst:84 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/reference/iot.rst:89 +#: ../../content/developer/iot.rst:89 msgid "Creating a new Driver requires:" msgstr "" -#: ../../content/developer/reference/iot.rst:91 +#: ../../content/developer/iot.rst:91 msgid "Extending `Driver`" msgstr "" -#: ../../content/developer/reference/iot.rst:92 +#: ../../content/developer/iot.rst:92 msgid "Setting the `connection_type` class attribute." msgstr "" -#: ../../content/developer/reference/iot.rst:93 +#: ../../content/developer/iot.rst:93 msgid "Setting the `device_type`, `device_connection` and `device_name` attributes." msgstr "" -#: ../../content/developer/reference/iot.rst:94 +#: ../../content/developer/iot.rst:94 msgid "Defining the `supported` method" msgstr "" -#: ../../content/developer/reference/iot.rst:114 +#: ../../content/developer/iot.rst:114 msgid "Communicate With Devices" msgstr "" -#: ../../content/developer/reference/iot.rst:116 +#: ../../content/developer/iot.rst:116 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/reference/iot.rst:121 +#: ../../content/developer/iot.rst:121 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/reference/iot.rst:125 +#: ../../content/developer/iot.rst:125 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/reference/iot.rst:140 +#: ../../content/developer/iot.rst:140 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/reference/iot.rst:144 +#: ../../content/developer/iot.rst:144 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/reference/iot.rst:148 +#: ../../content/developer/iot.rst:148 msgid "An action can be performed on the DeviceProxy Object." msgstr "" -#: ../../content/developer/reference/iot.rst:154 +#: ../../content/developer/iot.rst:154 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/reference/iot.rst:163 +#: ../../content/developer/iot.rst:163 msgid "Longpolling" msgstr "" -#: ../../content/developer/reference/iot.rst:165 +#: ../../content/developer/iot.rst:165 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/reference/iot.rst:178 +#: ../../content/developer/iot.rst:178 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/reference/javascript_cheatsheet.rst:6 -msgid "Javascript Cheatsheet" +#: ../../content/developer/reference.rst:5 +#: ../../content/developer/reference/frontend/odoo_editor.rst:135 +msgid "Reference" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:8 -msgid "There are many ways to solve a problem in JavaScript, and in Odoo. However, the Odoo framework was designed to be extensible (this is a pretty big constraint), and some common problems have a nice standard solution. The standard solution has probably the advantage of being easy to understand for an odoo developers, and will probably keep working when Odoo is modified." +#: ../../content/developer/reference/backend.rst:5 +msgid "Python framework" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:14 -msgid "This document tries to explain the way one could solve some of these issues. Note that this is not a reference. This is just a random collection of recipes, or explanations on how to proceed in some cases." +#: ../../content/developer/reference/backend/actions.rst:8 +msgid "Actions define the behavior of the system in response to user actions: login, action button, selection of an invoice, ..." msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:19 -msgid "First of all, remember that the first rule of customizing odoo with JS is: *try to do it in python*. This may seem strange, but the python framework is quite extensible, and many behaviours can be done simply with a touch of xml or python. This has usually a lower cost of maintenance than working with JS:" +#: ../../content/developer/reference/backend/actions.rst:11 +msgid "Actions can be stored in the database or returned directly as dictionaries in e.g. button methods. All actions share two mandatory attributes:" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:24 -msgid "the JS framework tends to change more, so JS code needs to be more frequently updated" +#: ../../content/developer/reference/backend/actions.rst:15 +#: ../../content/developer/reference/backend/data.rst:135 +#: ../../content/developer/reference/backend/views.rst:1782 +msgid "``type``" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:26 -msgid "it is often more difficult to implement a customized behaviour if it needs to communicate with the server and properly integrate with the javascript framework. There are many small details taken care by the framework that customized code needs to replicate. For example, responsiveness, or updating the url, or displaying data without flickering." +#: ../../content/developer/reference/backend/actions.rst:15 +msgid "the category of the current action, determines which fields may be used and how the action is interpreted" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:33 -msgid "This document does not really explain any concepts. This is more a cookbook. For more details, please consult the javascript reference page (see :doc:`javascript_reference`)" +#: ../../content/developer/reference/backend/actions.rst:18 +msgid "short user-readable description of the action, may be displayed in the client's interface" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:38 -msgid "Creating a new field widget" +#: ../../content/developer/reference/backend/actions.rst:21 +msgid "A client can get actions in 4 forms:" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:40 -msgid "This is probably a really common usecase: we want to display some information in a form view in a really specific (maybe business dependent) way. For example, assume that we want to change the text color depending on some business condition." +#: ../../content/developer/reference/backend/actions.rst:23 +msgid "``False``" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:44 -msgid "This can be done in three steps: creating a new widget, registering it in the field registry, then adding the widget to the field in the form view" +#: ../../content/developer/reference/backend/actions.rst:24 +msgid "if any action dialog is currently open, close it" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:58 -msgid "creating a new widget:" +#: ../../content/developer/reference/backend/actions.rst:26 +msgid "A string" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:48 -msgid "This can be done by extending a widget:" +#: ../../content/developer/reference/backend/actions.rst:26 +msgid "if a :ref:`client action ` matches, interpret as a client action's tag, otherwise treat as a number" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:68 -msgid "registering it in the field registry:" +#: ../../content/developer/reference/backend/actions.rst:29 +msgid "A number" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:61 -msgid "The web client needs to know the mapping between a widget name and its actual class. This is done by a registry:" +#: ../../content/developer/reference/backend/actions.rst:29 +msgid "read the corresponding action record from the database, may be a database identifier or an :term:`external id`" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:77 -msgid "adding the widget in the form view" +#: ../../content/developer/reference/backend/actions.rst:32 +msgid "A dictionary" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:75 -msgid "Note that only the form, list and kanban views use this field widgets registry. These views are tightly integrated, because the list and kanban views can appear inside a form view)." +#: ../../content/developer/reference/backend/actions.rst:32 +msgid "treat as a client action descriptor and execute" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:80 -msgid "Modifying an existing field widget" +#: ../../content/developer/reference/backend/actions.rst:37 +msgid "Bindings" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:82 -msgid "Another use case is that we want to modify an existing field widget. For example, the voip addon in odoo need to modify the FieldPhone widget to add the possibility to easily call the given number on voip. This is done by *including* the FieldPhone widget, so there is no need to change any existing form view." +#: ../../content/developer/reference/backend/actions.rst:39 +msgid "Aside from their two mandatory attributes, all actions also share *optional* attributes used to present an action in an arbitrary model's contextual menu:" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:87 -msgid "Field Widgets (instances of (subclass of) AbstractField) are like every other widgets, so they can be monkey patched. This looks like this:" +#: ../../content/developer/reference/backend/actions.rst:45 +msgid "``binding_model_id``" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:109 -msgid "Note that there is no need to add the widget to the registry, since it is already registered." +#: ../../content/developer/reference/backend/actions.rst:43 +msgid "specifies which model the action is bound to" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:113 -msgid "Modifying a main widget from the interface" +#: ../../content/developer/reference/backend/actions.rst:45 +msgid "For Server Actions, use ``model_id``." msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:115 -msgid "Another common usecase is the need to customize some elements from the user interface. For example, adding a message in the home menu. The usual process in this case is again to *include* the widget. This is the only way to do it, since there are no registries for those widgets." +#: ../../content/developer/reference/backend/actions.rst:55 +msgid "``binding_type``" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:120 -msgid "This is usually done with code looking like this:" +#: ../../content/developer/reference/backend/actions.rst:48 +msgid "specifies the type of binding, which is mostly which contextual menu the action will appear under" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:136 -msgid "Creating a new view (from scratch)" +#: ../../content/developer/reference/backend/actions.rst:52 +msgid "``action`` (default)" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:138 -msgid "Creating a new view is a more advanced topic. This cheatsheet will only highlight the steps that will probably need to be done (in no particular order):" +#: ../../content/developer/reference/backend/actions.rst:52 +msgid "Specifies that the action will appear in the :menuselection:`Action` contextual menu of the bound model." msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:141 -msgid "adding a new view type to the field ``type`` of ``ir.ui.view``::" +#: ../../content/developer/reference/backend/actions.rst:55 +msgid "``report``" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:148 -msgid "adding the new view type to the field ``view_mode`` of ``ir.actions.act_window.view``::" +#: ../../content/developer/reference/backend/actions.rst:55 +msgid "Specifies that the action will appear in the :menuselection:`Print` contextual menu of the bound model." msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:179 -msgid "creating the four main pieces which makes a view (in JavaScript):" +#: ../../content/developer/reference/backend/actions.rst:60 +msgid "``binding_view_types``" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:157 -msgid "we need a view (a subclass of ``AbstractView``, this is the factory), a renderer (from ``AbstractRenderer``), a controller (from ``AbstractController``) and a model (from ``AbstractModel``). I suggest starting by simply extending the superclasses:" +#: ../../content/developer/reference/backend/actions.rst:58 +msgid "a comma-separated list of view types for which the action appears in the contextual menu, mostly \"list\" and / or \"form\". Defaults to ``list,form`` (both list and form )" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:189 -msgid "adding the view to the registry:" +#: ../../content/developer/reference/backend/actions.rst:65 +msgid "Window Actions (``ir.actions.act_window``)" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:182 -msgid "As usual, the mapping between a view type and the actual class needs to be updated:" +#: ../../content/developer/reference/backend/actions.rst:67 +msgid "The most common action type, used to present visualisations of a model through :ref:`views `: a window action defines a set of view types (and possibly specific views) for a model (and possibly specific record of the model)." msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:196 -msgid "implementing the four main classes:" +#: ../../content/developer/reference/backend/actions.rst:72 +msgid "Its fields are:" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:192 -msgid "The ``View`` class needs to parse the ``arch`` field and setup the other three classes. The ``Renderer`` is in charge of representing the data in the user interface, the ``Model`` is supposed to talk to the server, to load data and process it. And the ``Controller`` is there to coordinate, to talk to the web client, ..." +#: ../../content/developer/reference/backend/actions.rst:75 +msgid "model to present views for" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:210 -msgid "creating some views in the database:" +#: ../../content/developer/reference/backend/actions.rst:77 +msgid "a list of ``(view_id, view_type)`` pairs. The second element of each pair is the category of the view (tree, form, graph, ...) and the first is an optional database id (or ``False``). If no id is provided, the client should fetch the default view of the specified type for the requested model (this is automatically done by :meth:`~odoo.models.Model.fields_view_get`). The first type of the list is the default view type and will be open by default when the action is executed. Each view type should be present at most once in the list" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:213 -msgid "Customizing an existing view" +#: ../../content/developer/reference/backend/actions.rst:86 +msgid "if the default view is ``form``, specifies the record to load (otherwise a new record should be created)" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:215 -msgid "Assume we need to create a custom version of a generic view. For example, a kanban view with some extra *ribbon-like* widget on top (to display some specific custom information). In that case, this can be done with 3 steps: extend the kanban view (which also probably mean extending controllers/renderers and/or models), then registering the view in the view registry, and finally, using the view in the kanban arch (a specific example is the helpdesk dashboard)." +#: ../../content/developer/reference/backend/actions.rst:90 +msgid "``search_view_id`` (optional)" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:245 -msgid "extending a view:" +#: ../../content/developer/reference/backend/actions.rst:89 +msgid "``(id, name)`` pair, ``id`` is the database identifier of a specific search view to load for the action. Defaults to fetching the default search view for the model" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:223 -msgid "Here is what it could look like:" +#: ../../content/developer/reference/backend/actions.rst:95 +#: ../../content/developer/reference/backend/actions.rst:393 +msgid "``target`` (optional)" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:254 -msgid "adding it to the view registry:" +#: ../../content/developer/reference/backend/actions.rst:93 +msgid "whether the views should be open in the main content area (``current``), in full screen mode (``fullscreen``) or in a dialog/popup (``new``). Use ``main`` instead of ``current`` to clear the breadcrumbs. Defaults to ``current``." msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:248 -msgid "as usual, we need to inform the web client of the mapping between the name of the views and the actual class." +#: ../../content/developer/reference/backend/actions.rst:97 +#: ../../content/developer/reference/backend/actions.rst:222 +msgid "``context`` (optional)" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:273 -msgid "using it in an actual view:" +#: ../../content/developer/reference/backend/actions.rst:98 +msgid "additional context data to pass to the views" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:257 -msgid "we now need to inform the web client that a specific ``ir.ui.view`` needs to use our new class. Note that this is a web client specific concern. From the point of view of the server, we still have a kanban view. The proper way to do this is by using a special attribute ``js_class`` (which will be renamed someday into ``widget``, because this is really not a good name) on the root node of the arch:" +#: ../../content/developer/reference/backend/actions.rst:99 +#: ../../content/developer/reference/backend/views.rst:666 +#: ../../content/developer/reference/backend/views.rst:2252 +msgid "``domain`` (optional)" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:277 -msgid "Note: you can change the way the view interprets the arch structure. However, from the server point of view, this is still a view of the same base type, subjected to the same rules (rng validation, for example). So, your views still need to have a valid arch field." +#: ../../content/developer/reference/backend/actions.rst:100 +msgid "filtering domain to implicitly add to all view search queries" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:283 -msgid "Promises and asynchronous code" +#: ../../content/developer/reference/backend/actions.rst:103 +msgid "``limit`` (optional)" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:285 -msgid "For a very good and complete introduction to promises, please read this excellent article https://github.com/getify/You-Dont-Know-JS/blob/1st-ed/async%20%26%20performance/ch3.md" +#: ../../content/developer/reference/backend/actions.rst:102 +msgid "number of records to display in lists by default. Defaults to 80 in the web client" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:288 -msgid "Creating new Promises" +#: ../../content/developer/reference/backend/actions.rst:105 +msgid "For instance, to open customers (partner with the ``customer`` flag set) with list and form views::" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:307 -msgid "turn a constant into a promise" +#: ../../content/developer/reference/backend/actions.rst:115 +msgid "Or to open the form view of a specific product (obtained separately) in a new dialog::" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:290 -msgid "There are 2 static functions on Promise that create a resolved or rejected promise based on a constant:" +#: ../../content/developer/reference/backend/actions.rst:126 +msgid "In-database window actions have a few different fields which should be ignored by clients, mostly to use in composing the ``views`` list:" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:306 -msgid "Note that even if the promises are created already resolved or rejected, the `then` or `catch` handlers will still be called asynchronously." +#: ../../content/developer/reference/backend/actions.rst:130 +msgid "``view_mode`` (default= ``tree,form`` )" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:320 -msgid "based on an already asynchronous code" +#: ../../content/developer/reference/backend/actions.rst:130 +msgid "comma-separated list of view types as a string (/!\\\\ No spaces /!\\\\). All of these types will be present in the generated ``views`` list (with at least a ``False`` view_id)" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:310 -msgid "Suppose that in a function you must do a rpc, and when it is completed set the result on this. The `this._rpc` is a function that returns a `Promise`." +#: ../../content/developer/reference/backend/actions.rst:133 +msgid "M2M\\ [#notquitem2m]_ to view objects, defines the initial content of ``views``" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:350 -msgid "for callback based function" +#: ../../content/developer/reference/backend/actions.rst:136 +msgid "Act_window views can also be defined cleanly through ``ir.actions.act_window.view``." msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:323 -msgid "Suppose that you were using a function `this.close` that takes as parameter a callback that is called when the closing is finished. Now suppose that you are doing that in a method that must send a promise that is resolved when the closing is finished." +#: ../../content/developer/reference/backend/actions.rst:138 +msgid "If you plan to allow multiple views for your model, prefer using ir.actions.act_window.view instead of the action ``view_ids``" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:336 -msgid "line 2: we save the `this` into a variable so that in an inner function, we can access the scope of our component" +#: ../../content/developer/reference/backend/actions.rst:153 +msgid "``view_id``" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:338 -msgid "line 3: we create and return a new promise. The constructor of a promise takes a function as parameter. This function itself has 2 parameters that we called here `resolve` and `reject`" +#: ../../content/developer/reference/backend/actions.rst:151 +msgid "specific view added to the ``views`` list in case its type is part of the ``view_mode`` list and not already filled by one of the views in ``view_ids``" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:338 -msgid "`resolve` is a function that, when called, puts the promise in the resolved state." +#: ../../content/developer/reference/backend/actions.rst:155 +msgid "These are mostly used when defining actions from :ref:`reference/data`:" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:339 -msgid "`reject` is a function that, when called, puts the promise in the rejected state. We do not use reject here and it can be omitted." +#: ../../content/developer/reference/backend/actions.rst:166 +msgid "will use the \"my_specific_view\" view even if that's not the default view for the model." msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:340 -msgid "line 4: we are calling the function close on our object. It takes a function as parameter (the callback) and it happens that resolve is already a function, so we can pass it directly. To be clearer, we could have written:" +#: ../../content/developer/reference/backend/actions.rst:169 +msgid "The server-side composition of the ``views`` sequence is the following:" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:366 -msgid "creating a promise generator (calling one promise after the other *in sequence* and waiting for the last one)" +#: ../../content/developer/reference/backend/actions.rst:171 +msgid "get each ``(id, type)`` from ``view_ids`` (ordered by ``sequence``)" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:353 -msgid "Suppose that you need to loop over an array, do an operation *in sequence* and resolve a promise when the last operation is done." +#: ../../content/developer/reference/backend/actions.rst:172 +msgid "if ``view_id`` is defined and its type isn't already filled, append its ``(id, type)``" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:367 -msgid "This way, the promise you return is effectively the last promise." +#: ../../content/developer/reference/backend/actions.rst:174 +msgid "for each unfilled type in ``view_mode``, append ``(False, type)``" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:382 -msgid "creating a promise, then resolving it outside the scope of its definition (anti-pattern)" +#: ../../content/developer/reference/backend/actions.rst:178 +msgid "``usage``?" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:369 -msgid "we do not recommend using this, but sometimes it is useful. Think carefully for alternatives first..." +#: ../../content/developer/reference/backend/actions.rst:179 +msgid "``groups_id``?" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:385 -msgid "Waiting for Promises" +#: ../../content/developer/reference/backend/actions.rst:180 +msgid "``filter``?" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:404 -msgid "waiting for a number of Promises" +#: ../../content/developer/reference/backend/actions.rst:182 +msgid "technically not an M2M: adds a sequence field and may be composed of just a view type, without a view id." msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:387 -msgid "if you have multiple promises that all need to be waited, you can convert them into a single promise that will be resolved when all the promises are resolved using Promise.all(arrayOfPromises)." +#: ../../content/developer/reference/backend/actions.rst:188 +msgid "URL Actions (``ir.actions.act_url``)" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:419 -msgid "waiting for a part of a promise chain, but not another part" +#: ../../content/developer/reference/backend/actions.rst:190 +msgid "Allow opening a URL (website/web page) via an Odoo action. Can be customized via two fields:" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:407 -msgid "If you have an asynchronous process that you want to wait to do something, but you also want to return to the caller before that something is done." +#: ../../content/developer/reference/backend/actions.rst:193 +msgid "``url``" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:422 -msgid "Error handling" +#: ../../content/developer/reference/backend/actions.rst:194 +msgid "the address to open when activating the action" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:446 -msgid "in general in promises" +#: ../../content/developer/reference/backend/actions.rst:196 +msgid "opens the address in a new window/page if ``new``, replaces the current content with the page if ``self``. Defaults to ``new``" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:425 -msgid "The general idea is that a promise should not be rejected for control flow, but should only be rejected for errors. When that is the case, you would have multiple resolutions of your promise with, for instance status codes that you would have to check in the `then` handlers and a single `catch` handler at the end of the promise chain." +#: ../../content/developer/reference/backend/actions.rst:207 +msgid "will replace the current content section by the Odoo home page." msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:486 -msgid "in Odoo specifically" +#: ../../content/developer/reference/backend/actions.rst:212 +msgid "Server Actions (``ir.actions.server``)" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:449 -msgid "In Odoo, it happens that we use promise rejection for control flow, like in mutexes and other concurrency primitives defined in module `web.concurrency` We also want to execute the catch for *business* reasons, but not when there is a coding error in the definition of the promise or of the handlers. For this, we have introduced the concept of `guardedCatch`. It is called like `catch` but not when the rejected reason is an error" +#: ../../../odoo/odoo/addons/base/models/ir_actions.py:docstring of odoo.addons.base.models.ir_actions.IrActionsServer:1 +msgid "Server actions model. Server action work on a base model and offer various type of actions that can be executed automatically, for example using base action rules, of manually, by adding the action in the 'More' contextual menu." msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:489 -msgid "Testing asynchronous code" +#: ../../../odoo/odoo/addons/base/models/ir_actions.py:docstring of odoo.addons.base.models.ir_actions.IrActionsServer:6 +msgid "Since Odoo 8.0 a button 'Create Menu Action' button is available on the action form view. It creates an entry in the More menu of the base model. This allows to create server actions and run them in mass mode easily through the interface." msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:543 -msgid "using promises in tests" +#: ../../../odoo/odoo/addons/base/models/ir_actions.py:docstring of odoo.addons.base.models.ir_actions.IrActionsServer:11 +msgid "The available actions are :" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:492 -msgid "In the tests code, we support the latest version of Javascript, including primitives like `async` and `await`. This makes using and waiting for promises very easy. Most helper methods also return a promise (either by being marked `async` or by returning a promise directly." +#: ../../../odoo/odoo/addons/base/models/ir_actions.py:docstring of odoo.addons.base.models.ir_actions.IrActionsServer:13 +msgid "'Execute Python Code': a block of python code that will be executed" msgstr "" -#: ../../content/developer/reference/javascript_cheatsheet.rst:544 -msgid "as you can see, the nicer form is to use `async/await` as it is clearer and shorter to write." +#: ../../../odoo/odoo/addons/base/models/ir_actions.py:docstring of odoo.addons.base.models.ir_actions.IrActionsServer:14 +msgid "'Create a new Record': create a new record with new values" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:8 -msgid "Javascript Reference" +#: ../../../odoo/odoo/addons/base/models/ir_actions.py:docstring of odoo.addons.base.models.ir_actions.IrActionsServer:15 +msgid "'Write on a Record': update the values of a record" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:10 -msgid "This document presents the Odoo Javascript framework. This framework is not a large application in term of lines of code, but it is quite generic, because it is basically a machine to turn a declarative interface description into a live application, able to interact with every model and records in the database. It is even possible to use the web client to modify the interface of the web client." +#: ../../../odoo/odoo/addons/base/models/ir_actions.py:docstring of odoo.addons.base.models.ir_actions.IrActionsServer:16 +msgid "'Execute several actions': define an action that triggers several other server actions" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:18 -#: ../../content/developer/webservices/iap.rst:26 -msgid "Overview" +#: ../../content/developer/reference/backend/actions.rst:216 +msgid "Allow triggering complex server code from any valid action location. Only two fields are relevant to clients:" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:20 -msgid "The Javascript framework is designed to work with three main use cases:" +#: ../../content/developer/reference/backend/actions.rst:220 +msgid "the in-database identifier of the server action to run" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:22 -msgid "the *web client*: this is the private web application, where one can view and edit business data. This is a single page application (the page is never reloaded, only the new data is fetched from the server whenever it is needed)" +#: ../../content/developer/reference/backend/actions.rst:222 +msgid "context data to use when running the server action" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:25 -msgid "the *website*: this is the public part of Odoo. It allows an unidentified user to browse some content, to shop or to perform many actions, as a client. This is a classical website: various routes with controllers and some javascript to make it work." +#: ../../content/developer/reference/backend/actions.rst:224 +msgid "In-database records are significantly richer and can perform a number of specific or generic actions based on their ``state``. Some fields (and corresponding behaviors) are shared between states:" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:29 -msgid "the *point of sale*: this is the interface for the point of sale. It is a specialized single page application." +#: ../../content/developer/reference/backend/actions.rst:229 +msgid "Odoo model linked to the action." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:32 -msgid "Some javascript code is common to these three use cases, and is bundled together (see below in the assets section). This document will focus mostly on the web client design." +#: ../../content/developer/reference/backend/actions.rst:233 +msgid "``code``: Executes python code given through the ``code`` argument." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:37 -msgid "Web client" +#: ../../content/developer/reference/backend/actions.rst:235 +msgid "``object_create``: Creates a new record of model ``crud_model_id`` following ``fields_lines`` specifications." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:40 -msgid "Single Page Application" +#: ../../content/developer/reference/backend/actions.rst:237 +msgid "``object_write``: Updates the current record(s) following ``fields_lines`` specifications" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:42 -msgid "In short, the *webClient*, instance of *WebClient* is the root component of the whole user interface. Its responsibility is to orchestrate all various subcomponents, and to provide services, such as rpcs, local storage and more." +#: ../../content/developer/reference/backend/actions.rst:239 +msgid "``multi``: Executes several actions given through the ``child_ids`` argument." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:46 -msgid "In runtime, the web client is a single page application. It does not need to request a full page from the server each time the user perform an action. Instead, it only requests what it needs, and then replaces/updates the view. Also, it manages the url: it is kept in sync with the web client state." +#: ../../content/developer/reference/backend/actions.rst:242 +msgid "State fields" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:51 -msgid "It means that while a user is working on Odoo, the web client class (and the action manager) actually creates and destroys many sub components. The state is highly dynamic, and each widget could be destroyed at any time." +#: ../../content/developer/reference/backend/actions.rst:244 +msgid "Depending on its state, the behavior is defined through different fields. The concerned state is given after each field." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:56 -msgid "Overview of web client JS code" +#: ../../content/developer/reference/backend/actions.rst:289 +msgid "``code`` (code)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:58 -msgid "Here, we give a very quick overview on the web client code, in the *web/static/src/js* addon. Note that it is deliberately not exhaustive. We only cover the most important files/folders." +#: ../../content/developer/reference/backend/actions.rst:248 +msgid "Specify a piece of Python code to execute when the action is called" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:62 -msgid "*boot.js*: this is the file that defines the module system. It needs to be loaded first." +#: ../../content/developer/reference/backend/actions.rst:263 +msgid "The code segment can define a variable called ``action``, which will be returned to the client as the next action to execute:" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:64 -msgid "*core/*: this is a collection of lower level building blocks. Notably, it contains the class system, the widget system, concurrency utilities, and many other class/functions." +#: ../../content/developer/reference/backend/actions.rst:283 +msgid "will ask the client to open a form for the record if it fulfills some condition" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:67 -msgid "*chrome/*: in this folder, we have most large widgets which make up most of the user interface." +#: ../../content/developer/reference/backend/actions.rst:291 +msgid "``crud_model_id`` (create)(required)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:69 -msgid "*chrome/abstract_web_client.js* and *chrome/web_client.js*: together, these files define the WebClient widget, which is the root widget for the web client." +#: ../../content/developer/reference/backend/actions.rst:292 +msgid "model in which to create a new record" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:71 -msgid "*chrome/action_manager.js*: this is the code that will convert an action into a widget (for example a kanban or a form view)" +#: ../../content/developer/reference/backend/actions.rst:295 +msgid "``link_field_id`` (create)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:73 -msgid "*chrome/search_X.js* all these files define the search view (it is not a view in the point of view of the web client, only from the server point of view)" +#: ../../content/developer/reference/backend/actions.rst:294 +msgid "many2one to ``ir.model.fields``, specifies the current record's m2o field on which the newly created record should be set (models should match)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:75 -msgid "*fields*: all main view field widgets are defined here" +#: ../../content/developer/reference/backend/actions.rst:309 +msgid "``fields_lines`` (create/write)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:76 -msgid "*views*: this is where the views are located" +#: ../../content/developer/reference/backend/actions.rst:298 +msgid "fields to override when creating or copying the record. :class:`~odoo.fields.One2many` with the fields:" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:79 -msgid "Assets Management" +#: ../../content/developer/reference/backend/actions.rst:302 +msgid "``col1``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:81 -msgid "Managing assets in Odoo is not as straightforward as it is in some other apps. One of the reason is that we have a variety of situations where some, but not all the assets are required. For example, the needs of the web client, the point of sale, the website or even the mobile application are different. Also, some assets may be large, but are seldom needed. In that case, we sometimes want them to be loaded lazily." +#: ../../content/developer/reference/backend/actions.rst:302 +msgid "``ir.model.fields`` to set in the concerned model (``crud_model_id`` for creates, ``model_id`` for updates)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:88 -msgid "The main idea is that we define a set of *bundles* in xml. A bundle is here defined as a collection of files (javascript, css, scss). In Odoo, the most important bundles are defined in the file *addons/web/views/webclient_templates.xml*. It looks like this:" +#: ../../content/developer/reference/backend/actions.rst:304 +#: ../../content/developer/reference/backend/orm.rst:937 +#: ../../content/developer/reference/backend/views.rst:1424 +msgid "``value``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:103 -msgid "The files in a bundle can then be inserted into a template by using the *t-call-assets* directive:" +#: ../../content/developer/reference/backend/actions.rst:305 +msgid "value for the field, interpreted via ``type``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:111 -msgid "Here is what happens when a template is rendered by the server with these directives:" +#: ../../content/developer/reference/backend/actions.rst:309 +msgid "``type`` (value|reference|equation)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:113 -msgid "all the *scss* files described in the bundle are compiled into css files. A file named *file.scss* will be compiled in a file named *file.scss.css*." +#: ../../content/developer/reference/backend/actions.rst:307 +msgid "If ``value``, the ``value`` field is interpreted as a literal value (possibly converted), if ``equation`` the ``value`` field is interpreted as a Python expression and evaluated" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:116 -msgid "if we are in *debug=assets* mode" +#: ../../content/developer/reference/backend/actions.rst:314 +msgid "``child_ids`` (multi)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:118 -msgid "the *t-call-assets* directive with the *t-js* attribute set to false will be replaced by a list of stylesheet tags pointing to the css files" +#: ../../content/developer/reference/backend/actions.rst:312 +msgid "Specify the multiple sub-actions (``ir.actions.server``) to enact in state multi. If sub-actions themselves return actions, the last one will be returned to the client as the multi's own next action" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:121 -msgid "the *t-call-assets* directive with the *t-css* attribute set to false will be replaced by a list of script tags pointing to the js files" +#: ../../content/developer/reference/backend/actions.rst:319 +msgid "Evaluation context" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:124 -msgid "if we are not in *debug=assets* mode" +#: ../../content/developer/reference/backend/actions.rst:321 +msgid "A number of keys are available in the evaluation context of or surrounding server actions:" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:126 -msgid "the css files will be concatenated and minified, then a stylesheet tag is generated" +#: ../../content/developer/reference/backend/actions.rst:324 +msgid "``model`` model object linked to the action via ``model_id``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:129 -msgid "the js files are concatenated and minified, then a script tag is generated" +#: ../../content/developer/reference/backend/actions.rst:325 +msgid "``record``/``records`` record/recorset on which the action is triggered, can be void." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:131 -msgid "Note that the assets files are cached, so in theory, a browser should only load them once." +#: ../../content/developer/reference/backend/actions.rst:326 +msgid "``env`` Odoo Environment" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:135 -msgid "Main bundles" +#: ../../content/developer/reference/backend/actions.rst:327 +msgid "``datetime``, ``dateutil``, ``time``, ``timezone`` corresponding Python modules" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:136 -msgid "When the Odoo server is started, it checks the timestamp of each file in a bundle, and if necessary, will create/recreate the corresponding bundles." +#: ../../content/developer/reference/backend/actions.rst:328 +msgid "``log: log(message, level='info')`` logging function to record debug information in ir.logging table" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:139 -msgid "Here are some important bundles that most developers will need to know:" +#: ../../content/developer/reference/backend/actions.rst:329 +msgid "``Warning`` constructor for the ``Warning`` exception" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:141 -msgid "*web.assets_common*: this bundle contains most assets which are common to the web client, the website, and also the point of sale. This is supposed to contain lower level building blocks for the odoo framework. Note that it contains the *boot.js* file, which defines the odoo module system." +#: ../../content/developer/reference/backend/actions.rst:334 +msgid "Report Actions (``ir.actions.report``)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:146 -msgid "*web.assets_backend*: this bundle contains the code specific to the web client (notably the web client/action manager/views)" +#: ../../content/developer/reference/backend/actions.rst:336 +msgid "Triggers the printing of a report." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:149 -msgid "*web.assets_frontend*: this bundle is about all that is specific to the public website: ecommerce, forum, blog, event management, ..." +#: ../../content/developer/reference/backend/actions.rst:338 +msgid "If you define your report through a `` instead of a `` tag and want the action to show up in the Print menu of the model's views, you will also need to specify ``binding_model_id`` from :ref:`reference/bindings`. It's not necessary to set ``binding_type`` to ``report``, since ``ir.actions.report`` will implicitly default to that." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:154 -msgid "Adding files in an asset bundle" +#: ../../content/developer/reference/backend/actions.rst:347 +#: ../../content/developer/reference/backend/reports.rst:195 +#: ../../content/developer/reference/backend/views.rst:554 +#: ../../content/developer/reference/backend/views.rst:658 +#: ../../content/developer/reference/backend/views.rst:765 +#: ../../content/developer/reference/backend/views.rst:863 +#: ../../content/developer/reference/backend/views.rst:1226 +#: ../../content/developer/reference/backend/views.rst:2074 +#: ../../content/developer/reference/backend/views.rst:2399 +msgid "``name`` (mandatory)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:156 -msgid "The proper way to add a file located in *addons/web* to a bundle is simple: it is just enough to add a *script* or a *stylesheet* tag to the bundle in the file *webclient_templates.xml*. But when we work in a different addon, we need to add a file from that addon. In that case, it should be done in three steps:" +#: ../../content/developer/reference/backend/actions.rst:346 +msgid "used as the file name if ``print_report_name`` is not specified. Otherwise, only useful as a mnemonic/description of the report when looking for one in a list of some sort" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:161 -msgid "add a *assets.xml* file in the *views/* folder" +#: ../../content/developer/reference/backend/actions.rst:349 +msgid "``model`` (mandatory)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:162 -msgid "add the string 'views/assets.xml' in the 'data' key in the manifest file" +#: ../../content/developer/reference/backend/actions.rst:350 +msgid "the model your report will be about" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:163 -msgid "create an inherited view of the desired bundle, and add the file(s) with an xpath expression. For example," +#: ../../content/developer/reference/backend/actions.rst:351 +msgid "``report_type`` (default=qweb-pdf)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:178 -msgid "Note that the files in a bundle are all loaded immediately when the user loads the odoo web client. This means that the files are transferred through the network everytime (except when the browser cache is active). In some cases, it may be better to lazyload some assets. For example, if a widget requires a large library, and that widget is not a core part of the experience, then it may be a good idea to only load the library when the widget is actually created. The widget class has actually builtin support just for this use case. (see section :ref:`reference/javascript_reference/qweb`)" +#: ../../content/developer/reference/backend/actions.rst:352 +msgid "either ``qweb-pdf`` for PDF reports or ``qweb-html`` for HTML" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:188 -msgid "What to do if a file is not loaded/updated" +#: ../../content/developer/reference/backend/actions.rst:353 +msgid "``report_name`` (mandatory)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:190 -msgid "There are many different reasons why a file may not be properly loaded. Here are a few things you can try to solve the issue:" +#: ../../content/developer/reference/backend/actions.rst:354 +msgid "the name (:term:`external id`) of the qweb template used to render the report" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:193 -msgid "once the server is started, it does not know if an asset file has been modified. So, you can simply restart the server to regenerate the assets." +#: ../../content/developer/reference/backend/actions.rst:355 +msgid "``print_report_name``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:195 -msgid "check the console (in the dev tools, usually opened with F12) to make sure there are no obvious errors" +#: ../../content/developer/reference/backend/actions.rst:356 +msgid "python expression defining the name of the report." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:197 -msgid "try to add a console.log at the beginning of your file (before any module definition), so you can see if a file has been loaded or not" +#: ../../content/developer/reference/backend/actions.rst:358 +msgid "``groups_id``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:199 -msgid "in the user interface, in debug mode (INSERT LINK HERE TO DEBUG MODE), there is an option to force the server to update its assets files." +#: ../../content/developer/reference/backend/actions.rst:358 +msgid ":class:`~odoo.fields.Many2many` field to the groups allowed to view/use the current report" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:201 -msgid "use the *debug=assets* mode. This will actually bypass the asset bundles (note that it does not actually solve the issue. The server still uses outdated bundles)" +#: ../../content/developer/reference/backend/actions.rst:360 +msgid "``multi``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:203 -msgid "finally, the most convenient way to do it, for a developer, is to start the server with the *--dev=all* option. This activates the file watcher options, which will automatically invalidate assets when necessary. Note that it does not work very well if the OS is Windows." +#: ../../content/developer/reference/backend/actions.rst:361 +msgid "if set to ``True``, the action will not be displayed on a form view." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:207 -msgid "remember to refresh your page!" +#: ../../content/developer/reference/backend/actions.rst:363 +msgid "``paperformat_id``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:208 -msgid "or maybe to save your code file..." +#: ../../content/developer/reference/backend/actions.rst:363 +msgid ":class:`~odoo.fields.Many2one` field to the paper format you wish to use for this report (if not specified, the company format will be used)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:211 -msgid "Once an asset file has been recreated, you need to refresh the page, to reload the proper files (if that does not work, the files may be cached)." +#: ../../content/developer/reference/backend/actions.rst:370 +msgid "``attachment_use``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:216 -msgid "Javascript Module System" +#: ../../content/developer/reference/backend/actions.rst:366 +msgid "if set to ``True``, the report is only generated once the first time it is requested, and re-printed from the stored report afterwards instead of being re-generated every time." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:218 -msgid "Once we are able to load our javascript files into the browser, we need to make sure they are loaded in the correct order. In order to do that, Odoo has defined a small module system (located in the file *addons/web/static/src/js/boot.js*, which needs to be loaded first)." +#: ../../content/developer/reference/backend/actions.rst:370 +msgid "Can be used for reports which must only be generated once (e.g. for legal reasons)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:223 -msgid "The Odoo module system, inspired by AMD, works by defining the function *define* on the global odoo object. We then define each javascript module by calling that function. In the Odoo framework, a module is a piece of code that will be executed as soon as possible. It has a name and potentially some dependencies. When its dependencies are loaded, a module will then be loaded as well. The value of the module is then the return value of the function defining the module." +#: ../../content/developer/reference/backend/actions.rst:374 +msgid "``attachment``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:231 -msgid "As an example, it may look like this:" +#: ../../content/developer/reference/backend/actions.rst:373 +msgid "python expression that defines the name of the report; the record is accessible as the variable ``object``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:256 -msgid "An alternative way to define a module is to give explicitly a list of dependencies in the second argument." +#: ../../content/developer/reference/backend/actions.rst:379 +msgid "Client Actions (``ir.actions.client``)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:271 -msgid "If some dependencies are missing/non ready, then the module will simply not be loaded. There will be a warning in the console after a few seconds." +#: ../../content/developer/reference/backend/actions.rst:381 +msgid "Triggers an action implemented entirely in the client." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:274 -msgid "Note that circular dependencies are not supported. It makes sense, but it means that one needs to be careful." +#: ../../content/developer/reference/backend/actions.rst:384 +msgid "``tag``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:278 -msgid "Defining a module" +#: ../../content/developer/reference/backend/actions.rst:384 +msgid "the client-side identifier of the action, an arbitrary string which the client should know how to react to" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:280 -msgid "The *odoo.define* method is given three arguments:" +#: ../../content/developer/reference/backend/actions.rst:387 +msgid "``params`` (optional)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:282 -msgid "*moduleName*: the name of the javascript module. It should be a unique string. The convention is to have the name of the odoo addon followed by a specific description. For example, 'web.Widget' describes a module defined in the *web* addon, which exports a *Widget* class (because the first letter is capitalized)" +#: ../../content/developer/reference/backend/actions.rst:387 +msgid "a Python dictionary of additional data to send to the client, alongside the client action tag" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:287 -msgid "If the name is not unique, an exception will be thrown and displayed in the console." +#: ../../content/developer/reference/backend/actions.rst:390 +msgid "whether the client action should be open in the main content area (``current``), in full screen mode (``fullscreen``) or in a dialog/popup (``new``). Use ``main`` instead of ``current`` to clear the breadcrumbs. Defaults to ``current``." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:290 -msgid "*dependencies*: the second argument is optional. If given, it should be a list of strings, each corresponding to a javascript module. This describes the dependencies that are required to be loaded before the module is executed. If the dependencies are not explicitly given here, then the module system will extract them from the function by calling toString on it, then using a regexp to find all *require* statements." +#: ../../content/developer/reference/backend/actions.rst:402 +msgid "tells the client to start the Point of Sale interface, the server has no idea how the POS interface works." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:308 -msgid "finally, the last argument is a function which defines the module. Its return value is the value of the module, which may be passed to other modules requiring it. Note that there is a small exception for asynchronous modules, see the next section." +#: ../../content/developer/reference/backend/actions.rst:406 +msgid ":ref:`Tutorial: Client Actions `" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:313 -msgid "If an error happens, it will be logged (in debug mode) in the console:" +#: ../../content/developer/reference/backend/actions.rst:411 +msgid "Automated Actions (``ir.cron``)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:315 -msgid "``Missing dependencies``: These modules do not appear in the page. It is possible that the JavaScript file is not in the page or that the module name is wrong" +#: ../../content/developer/reference/backend/actions.rst:413 +msgid "Actions triggered automatically on a predefined frequency." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:318 -msgid "``Failed modules``: A javascript error is detected" +#: ../../content/developer/reference/backend/actions.rst:416 +msgid "Name of the automated action (Mainly used in log display)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:320 -msgid "``Rejected modules``: The module returns a rejected Promise. It (and its dependent modules) is not loaded." +#: ../../content/developer/reference/backend/actions.rst:419 +msgid "``interval_number``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:323 -msgid "``Rejected linked modules``: Modules who depend on a rejected module" +#: ../../content/developer/reference/backend/actions.rst:419 +msgid "Number of *interval_type* uom between two executions of the action" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:325 -msgid "``Non loaded modules``: Modules who depend on a missing or a failed module" +#: ../../content/developer/reference/backend/actions.rst:422 +msgid "``interval_type``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:331 -msgid "Asynchronous modules" +#: ../../content/developer/reference/backend/actions.rst:422 +msgid "Unit of measure of frequency interval (``minutes``, ``hours``, ``days``, ``weeks``, ``months``," msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:333 -msgid "It can happen that a module needs to perform some work before it is ready. For example, it could do a rpc to load some data. In that case, the module can simply return a promise. In that case, the module system will simply wait for the promise to complete before registering the module." +#: ../../content/developer/reference/backend/actions.rst:426 +msgid "``numbercall``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:353 -msgid "Best practices" +#: ../../content/developer/reference/backend/actions.rst:425 +msgid "Number of times this action has to be run. If the action is expected to run indefinitely, set to ``-1``." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:355 -msgid "remember the convention for a module name: *addon name* suffixed with *module name*." +#: ../../content/developer/reference/backend/actions.rst:430 +msgid "``doall``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:357 -msgid "declare all your dependencies at the top of the module. Also, they should be sorted alphabetically by module name. This makes it easier to understand your module." +#: ../../content/developer/reference/backend/actions.rst:429 +msgid "Boolean precising whether the missed actions have to be executed in case of server restarts." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:359 -msgid "declare all exported values at the end" +#: ../../content/developer/reference/backend/actions.rst:433 +msgid "Model on which this action will be called" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:360 -msgid "try to avoid exporting too many things from one module. It is usually better to simply export one thing in one (small/smallish) module." +#: ../../content/developer/reference/backend/actions.rst:441 +msgid "``code``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:362 -msgid "asynchronous modules can be used to simplify some use cases. For example, the *web.dom_ready* module returns a promise which will be resolved when the dom is actually ready. So, another module that needs the DOM could simply have a `require('web.dom_ready')` statement somewhere, and the code will only be executed when the DOM is ready." +#: ../../content/developer/reference/backend/actions.rst:436 +msgid "Code content of the action. Can be a simple call to the model's method :" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:367 -msgid "try to avoid defining more than one module in one file. It may be convenient in the short term, but this is actually harder to maintain." +#: ../../content/developer/reference/backend/actions.rst:443 +msgid "``nextcall``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:372 -msgid "Class System" +#: ../../content/developer/reference/backend/actions.rst:444 +msgid "Next planned execution date of this action (date/time format)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:374 -msgid "Odoo was developed before ECMAScript 6 classes were available. In Ecmascript 5, the standard way to define a class is to define a function and to add methods on its prototype object. This is fine, but it is slightly complex when we want to use inheritance, mixins." +#: ../../content/developer/reference/backend/data.rst:6 +msgid "Data Files" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:379 -msgid "For these reasons, Odoo decided to use its own class system, inspired by John Resig. The base Class is located in *web.Class*, in the file *class.js*." +#: ../../content/developer/reference/backend/data.rst:8 +msgid "Odoo is greatly data-driven, and a big part of modules definition is thus the definition of the various records it manages: UI (menus and views), security (access rights and record rules), reports and plain data are all defined via records." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:383 -msgid "Creating a subclass" +#: ../../content/developer/reference/backend/data.rst:16 +msgid "The main way to define data in Odoo is via XML data files: The broad structure of an XML data file is the following:" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:385 -msgid "Let us discuss how classes are created. The main mechanism is to use the *extend* method (this is more or less the equivalent of *extend* in ES6 classes)." +#: ../../content/developer/reference/backend/data.rst:19 +msgid "Any number of operation elements within the root element ``odoo``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:407 -msgid "In this example, the *init* function is the constructor. It will be called when an instance is created. Making an instance is done by using the *new* keyword." +#: ../../content/developer/reference/backend/data.rst:30 +msgid "Data files are executed sequentially, operations can only refer to the result of operations defined previously" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:413 -msgid "It is convenient to be able to inherit an existing class. This is simply done by using the *extend* method on the superclass. When a method is called, the framework will secretly rebind a special method: *_super* to the currently called method. This allows us to use *this._super* whenever we need to call a parent method." +#: ../../content/developer/reference/backend/data.rst:35 +msgid "If the content of the data file is expected to be applied only once, you can specify the odoo flag ``noupdate`` set to 1. If part of the data in the file is expected to be applied once, you can place this part of the file in a domain." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:438 -msgid "Mixins" +#: ../../content/developer/reference/backend/data.rst:53 +msgid "Core operations" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:440 -msgid "The odoo Class system does not support multiple inheritance, but for those cases when we need to share some behaviour, we have a mixin system: the *extend* method can actually take an arbitrary number of arguments, and will combine all of them in the new class." +#: ../../content/developer/reference/backend/data.rst:58 +#: ../../content/developer/reference/backend/views.rst:402 +#: ../../content/developer/reference/backend/views.rst:1632 +msgid "``record``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:460 -msgid "In this example, the *Hamster* class is a subclass of Animal, but it also mix the DanceMixin in." +#: ../../content/developer/reference/backend/data.rst:60 +msgid "``record`` appropriately defines or updates a database record, it has the following attributes:" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:465 -msgid "Patching an existing class" +#: ../../content/developer/reference/backend/data.rst:63 +#: ../../content/developer/reference/backend/data.rst:153 +msgid "``model`` (required)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:467 -msgid "It is not common, but we sometimes need to modify another class *in place*. The goal is to have a mechanism to change a class and all future/present instances. This is done by using the *include* method:" +#: ../../content/developer/reference/backend/data.rst:64 +msgid "name of the model to create (or update)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:483 -msgid "This is obviously a dangerous operation and should be done with care. But with the way Odoo is structured, it is sometimes necessary in one addon to modify the behavior of a widget/class defined in another addon. Note that it will modify all instances of the class, even if they have already been created." +#: ../../content/developer/reference/backend/data.rst:66 +msgid "the :term:`external identifier` for this record. It is strongly recommended to provide one" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:490 -msgid "Widgets" +#: ../../content/developer/reference/backend/data.rst:69 +msgid "for record creation, allows subsequent definitions to either modify or refer to this record" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:492 -msgid "The *Widget* class is really an important building block of the user interface. Pretty much everything in the user interface is under the control of a widget. The Widget class is defined in the module *web.Widget*, in *widget.js*." +#: ../../content/developer/reference/backend/data.rst:71 +msgid "for record modification, the record to modify" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:496 -msgid "In short, the features provided by the Widget class include:" +#: ../../content/developer/reference/backend/data.rst:73 +msgid "context to use when creating the record" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:498 -msgid "parent/child relationships between widgets (*PropertiesMixin*)" +#: ../../content/developer/reference/backend/data.rst:77 +msgid "``forcecreate``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:499 -msgid "extensive lifecycle management with safety features (e.g. automatically destroying children widgets during the destruction of a parent)" +#: ../../content/developer/reference/backend/data.rst:75 +msgid "in update mode whether the record should be created if it doesn't exist" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:501 -msgid "automatic rendering with :ref:`qweb `" +#: ../../content/developer/reference/backend/data.rst:77 +msgid "Requires an :term:`external id`, defaults to ``True``." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:502 -msgid "various utility functions to help interacting with the outside environment." +#: ../../content/developer/reference/backend/data.rst:80 +#: ../../content/developer/reference/backend/views.rst:382 +#: ../../content/developer/reference/backend/views.rst:939 +#: ../../content/developer/reference/backend/views.rst:1590 +#: ../../content/developer/reference/backend/views.rst:1892 +#: ../../content/developer/reference/backend/views.rst:2237 +msgid "``field``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:504 -msgid "Here is an example of a basic counter widget:" +#: ../../content/developer/reference/backend/data.rst:82 +msgid "Each record can be composed of ``field`` tags, defining values to set when creating the record. A ``record`` with no ``field`` will use all default values (creation) or do nothing (update)." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:525 -msgid "For this example, assume that the template *some.template* (and is properly loaded: the template is in a file, which is properly defined in the *qweb* key in the module manifest) is given by:" +#: ../../content/developer/reference/backend/data.rst:86 +msgid "A ``field`` has a mandatory ``name`` attribute, the name of the field to set, and various methods to define the value itself:" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:536 -msgid "This example widget can be used in the following manner:" +#: ../../content/developer/reference/backend/data.rst:91 +msgid "Nothing" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:545 -msgid "This example illustrates a few of the features of the *Widget* class, including the event system, the template system, the constructor with the initial *parent* argument." +#: ../../content/developer/reference/backend/data.rst:90 +msgid "if no value is provided for the field, an implicit ``False`` will be set on the field. Can be used to clear a field, or avoid using a default value for the field." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:549 -msgid "Widget Lifecycle" +#: ../../content/developer/reference/backend/data.rst:94 +msgid "for :ref:`relational fields `, should be a :ref:`domain ` on the field's model." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:551 -msgid "Like many component systems, the widget class has a well defined lifecycle. The usual lifecycle is the following: *init* is called, then *willStart*, then the rendering takes place, then *start* and finally *destroy*." +#: ../../content/developer/reference/backend/data.rst:97 +msgid "Will evaluate the domain, search the field's model using it and set the search's result as the field's value. Will only use the first result if the field is a :class:`~odoo.fields.Many2one`" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:557 -msgid "this is the constructor. The init method is supposed to initialize the base state of the widget. It is synchronous and can be overridden to take more parameters from the widget's creator/parent" +#: ../../content/developer/reference/backend/data.rst:101 +msgid "if a ``ref`` attribute is provided, its value must be a valid :term:`external id`, which will be looked up and set as the field's value." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:0 -#: ../../content/developer/reference/javascript_reference.rst:0 -#: ../../content/developer/reference/javascript_reference.rst:0 -#: ../../content/developer/reference/mobile.rst:0 -#: ../../content/developer/reference/mobile.rst:0 -#: ../../content/developer/reference/mobile.rst:0 -#: ../../content/developer/reference/mobile.rst:0 -#: ../../content/developer/reference/mobile.rst:0 -#: ../../content/developer/reference/qweb.rst:0 -msgid "Arguments" +#: ../../content/developer/reference/backend/data.rst:104 +msgid "Mostly for :class:`~odoo.fields.Many2one` and :class:`~odoo.fields.Reference` fields" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:561 -msgid "the new widget's parent, used to handle automatic destruction and event propagation. Can be ``null`` for the widget to have no parent." +#: ../../content/developer/reference/backend/data.rst:107 +msgid "if a ``type`` attribute is provided, it is used to interpret and convert the field's content. The field's content can be provided through an external file using the ``file`` attribute, or through the node's body." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:568 -msgid "this method will be called once by the framework when a widget is created and in the process of being appended to the DOM. The *willStart* method is a hook that should return a promise. The JS framework will wait for this promise to complete before moving on to the rendering step. Note that at this point, the widget does not have a DOM root element. The *willStart* hook is mostly useful to perform some asynchronous work, such as fetching data from the server" +#: ../../content/developer/reference/backend/data.rst:111 +msgid "Available types are:" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:577 -msgid "This step is automatically done by the framework. What happens is that the framework checks if a template key is defined on the widget. If that is the case, then it will render that template with the *widget* key bound to the widget in the rendering context (see the example above: we use *widget.count* in the QWeb template to read the value from the widget). If no template is defined, we read the *tagName* key and create a corresponding DOM element. When the rendering is done, we set the result as the $el property of the widget. After this, we automatically bind all events in the events and custom_events keys." +#: ../../content/developer/reference/backend/data.rst:115 +msgid "``xml``, ``html``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:589 -msgid "when the rendering is complete, the framework will automatically call the *start* method. This is useful to perform some specialized post-rendering work. For example, setting up a library." +#: ../../content/developer/reference/backend/data.rst:114 +msgid "extracts the ``field``'s children as a single document, evaluates any :term:`external id` specified with the form ``%(external_id)s``. ``%%`` can be used to output actual *%* signs." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:593 -msgid "Must return a promise to indicate when its work is done." +#: ../../content/developer/reference/backend/data.rst:118 +msgid "``file``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:0 -#: ../../content/developer/reference/javascript_reference.rst:0 -#: ../../content/developer/reference/javascript_reference.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mobile.rst:0 -#: ../../content/developer/reference/mobile.rst:0 -#: ../../content/developer/reference/qweb.rst:0 -#: ../../content/developer/webservices/iap.rst:0 -#: ../../content/developer/webservices/upgrade.rst:0 -#: ../../content/developer/webservices/upgrade.rst:0 -#: ../../content/developer/webservices/upgrade.rst:0 -#: ../../content/developer/webservices/upgrade.rst:0 -#: ../../content/developer/webservices/upgrade.rst:0 -#: ../../content/developer/webservices/upgrade.rst:0 -msgid "Returns" +#: ../../content/developer/reference/backend/data.rst:118 +msgid "ensures that the field content is a valid file path in the current model, saves the pair :samp:`{module},{path}` as the field value" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:595 -msgid "promise" +#: ../../content/developer/reference/backend/data.rst:121 +msgid "``char``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:599 -msgid "This is always the final step in the life of a widget. When a widget is destroyed, we basically perform all necessary cleanup operations: removing the widget from the component tree, unbinding all events, ..." +#: ../../content/developer/reference/backend/data.rst:121 +msgid "sets the field content directly as the field's value without alterations" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:603 -msgid "Automatically called when the widget's parent is destroyed, must be called explicitly if the widget has no parent or if it is removed but its parent remains." +#: ../../content/developer/reference/backend/data.rst:124 +msgid "``base64``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:607 -msgid "Note that the willStart and start method are not necessarily called. A widget can be created (the *init* method will be called) and then destroyed (*destroy* method) without ever having been appended to the DOM. If that is the case, the willStart and start will not even be called." +#: ../../content/developer/reference/backend/data.rst:124 +msgid "base64_-encodes the field's content, useful combined with the ``file`` *attribute* to load e.g. image data into attachments" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:613 -msgid "Widget API" +#: ../../content/developer/reference/backend/data.rst:127 +msgid "``int``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:617 -msgid "Used if the widget has no template defined. Defaults to ``div``, will be used as the tag name to create the DOM element to set as the widget's DOM root. It is possible to further customize this generated DOM root with the following attributes:" +#: ../../content/developer/reference/backend/data.rst:127 +msgid "converts the field's content to an integer and sets it as the field's value" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:625 -msgid "Used to generate an ``id`` attribute on the generated DOM root. Note that this is rarely needed, and is probably not a good idea if a widget can be used more than once." +#: ../../content/developer/reference/backend/data.rst:130 +msgid "``float``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:631 -msgid "Used to generate a ``class`` attribute on the generated DOM root. Note that it can actually contain more than one css class: *'some-class other-class'*" +#: ../../content/developer/reference/backend/data.rst:130 +msgid "converts the field's content to a float and sets it as the field's value" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:637 -msgid "Mapping (object literal) of attribute names to attribute values. Each of these k:v pairs will be set as a DOM attribute on the generated DOM root." +#: ../../content/developer/reference/backend/data.rst:135 +msgid "``list``, ``tuple``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:643 -msgid "raw DOM element set as root to the widget (only available after the start lifecycle method)" +#: ../../content/developer/reference/backend/data.rst:133 +msgid "should contain any number of ``value`` elements with the same properties as ``field``, each element resolves to an item of a generated tuple or list, and the generated collection is set as the field's value" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:648 -msgid "jQuery wrapper around :attr:`~Widget.el`. (only available after the start lifecycle method)" +#: ../../content/developer/reference/backend/data.rst:138 +msgid "for cases where the previous methods are unsuitable, the ``eval`` attributes simply evaluates whatever Python expression it is provided and sets the result as the field's value." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:653 -msgid "Should be set to the name of a :ref:`QWeb template `. If set, the template will be rendered after the widget has been initialized but before it has been started. The root element generated by the template will be set as the DOM root of the widget." +#: ../../content/developer/reference/backend/data.rst:142 +msgid "The evaluation context contains various modules (``time``, ``datetime``, ``timedelta``, ``relativedelta``), a function to resolve :term:`external identifiers` (``ref``) and the model object for the current field if applicable (``obj``)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:660 -msgid "List of paths to xml files that need to be loaded before the widget can be rendered. This will not induce loading anything that has already been loaded. This is useful when you want to load your templates lazily, or if you want to share a widget between the website and the web client interface." +#: ../../content/developer/reference/backend/data.rst:148 +#: ../../content/developer/reference/backend/views.rst:1680 +msgid "``delete``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:674 -msgid "Events are a mapping of an event selector (an event name and an optional CSS selector separated by a space) to a callback. The callback can be the name of a widget's method or a function object. In either case, the ``this`` will be set to the widget:" +#: ../../content/developer/reference/backend/data.rst:150 +msgid "The ``delete`` tag can remove any number of records previously defined. It has the following attributes:" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:688 -msgid "The selector is used for jQuery's event delegation, the callback will only be triggered for descendants of the DOM root matching the selector. If the selector is left out (only an event name is specified), the event will be set directly on the widget's DOM root." +#: ../../content/developer/reference/backend/data.rst:154 +msgid "the model in which a specified record should be deleted" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:694 -msgid "Note: the use of an inline function is discouraged, and will probably be removed sometimes in the future." +#: ../../content/developer/reference/backend/data.rst:156 +msgid "the :term:`external id` of a record to remove" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:699 -msgid "this is almost the same as the *events* attribute, but the keys are arbitrary strings. They represent business events triggered by some sub widgets. When an event is triggered, it will 'bubble up' the widget tree (see the section on component communication for more details)." +#: ../../content/developer/reference/backend/data.rst:158 +msgid "a :ref:`domain ` to find records of the model to remove" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:706 -msgid "``true`` if the widget is being or has been destroyed, ``false`` otherwise" +#: ../../content/developer/reference/backend/data.rst:161 +msgid "``id`` and ``search`` are exclusive" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:711 -msgid "Applies the CSS selector specified as parameter to the widget's DOM root:" +#: ../../content/developer/reference/backend/data.rst:166 +msgid "The ``function`` tag calls a method on a model, with provided parameters. It has two mandatory parameters ``model`` and ``name`` specifying respectively the model and the name of the method to call." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:718 -msgid "is functionally identical to:" +#: ../../content/developer/reference/backend/data.rst:170 +msgid "Parameters can be provided using ``eval`` (should evaluate to a sequence of parameters to call the method with) or ``value`` elements (see ``list`` values)." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:724 -msgid "CSS selector" +#: ../../content/developer/reference/backend/data.rst:200 +msgid "Shortcuts" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:725 -msgid "jQuery object" +#: ../../content/developer/reference/backend/data.rst:202 +msgid "Because some important structural models of Odoo are complex and involved, data files provide shorter alternatives to defining them using :ref:`record tags `:" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:727 -msgid "this helper method is similar to ``Backbone.View.$``" +#: ../../content/developer/reference/backend/data.rst:207 +msgid "``menuitem``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:731 -msgid "Re-sets the widget's DOM root to the provided element, also handles re-setting the various aliases of the DOM root as well as unsetting and re-setting delegated events." +#: ../../content/developer/reference/backend/data.rst:209 +msgid "Defines an ``ir.ui.menu`` record with a number of defaults and fallbacks:" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:735 -msgid "a DOM element or jQuery object to set as the widget's DOM root" +#: ../../content/developer/reference/backend/data.rst:218 +msgid "``parent``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:740 -msgid "Inserting a widget in the DOM" +#: ../../content/developer/reference/backend/data.rst:212 +msgid "If a ``parent`` attribute is set, it should be the :term:`external id` of an other menu item, used as the new item's parent" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:744 -msgid "Renders the widget and inserts it as the last child of the target, uses `.appendTo()`_" +#: ../../content/developer/reference/backend/data.rst:214 +msgid "If no ``parent`` is provided, tries to interpret the ``name`` attribute as a ``/``-separated sequence of menu names and find a place in the menu hierarchy. In that interpretation, intermediate menus are automatically created" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:749 -msgid "Renders the widget and inserts it as the first child of the target, uses `.prependTo()`_" +#: ../../content/developer/reference/backend/data.rst:218 +msgid "Otherwise the menu is defined as a \"top-level\" menu item (*not* a menu with no parent)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:754 -msgid "Renders the widget and inserts it as the preceding sibling of the target, uses `.insertAfter()`_" +#: ../../content/developer/reference/backend/data.rst:221 +msgid "If no ``name`` attribute is specified, tries to get the menu name from a linked action if any. Otherwise uses the record's ``id``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:759 -msgid "Renders the widget and inserts it as the following sibling of the target, uses `.insertBefore()`_" +#: ../../content/developer/reference/backend/data.rst:224 +msgid "A ``groups`` attribute is interpreted as a comma-separated sequence of :term:`external identifiers` for ``res.groups`` models. If an :term:`external identifier` is prefixed with a minus (``-``), the group is *removed* from the menu's groups" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:762 -msgid "All of these methods accept whatever the corresponding jQuery method accepts (CSS selectors, DOM nodes or jQuery objects). They all return a promise and are charged with three tasks:" +#: ../../content/developer/reference/backend/data.rst:229 +#: ../../content/developer/reference/backend/views.rst:1782 +msgid "``action``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:766 -msgid "rendering the widget's root element via :func:`~Widget.renderElement`" +#: ../../content/developer/reference/backend/data.rst:229 +msgid "if specified, the ``action`` attribute should be the :term:`external id` of an action to execute when the menu is open" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:767 -msgid "inserting the widget's root element in the DOM using whichever jQuery method they match" +#: ../../content/developer/reference/backend/data.rst:232 +msgid "the menu item's :term:`external id`" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:769 -msgid "starting the widget, and returning the result of starting it" +#: ../../content/developer/reference/backend/data.rst:237 +msgid "``template``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:772 -msgid "Widget Guidelines" +#: ../../content/developer/reference/backend/data.rst:239 +msgid "Creates a :ref:`QWeb view ` requiring only the ``arch`` section of the view, and allowing a few *optional* attributes:" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:774 -msgid "Identifiers (``id`` attribute) should be avoided. In generic applications and modules, ``id`` limits the re-usability of components and tends to make code more brittle. Most of the time, they can be replaced with nothing, classes or keeping a reference to a DOM node or jQuery element." +#: ../../content/developer/reference/backend/data.rst:243 +msgid "the view's :term:`external identifier`" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:779 -msgid "If an ``id`` is absolutely necessary (because a third-party library requires one), the id should be partially generated using ``_.uniqueId()`` e.g.:" +#: ../../content/developer/reference/backend/data.rst:245 +msgid "``name``, ``inherit_id``, ``priority``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:786 -msgid "Avoid predictable/common CSS class names. Class names such as \"content\" or \"navigation\" might match the desired meaning/semantics, but it is likely an other developer will have the same need, creating a naming conflict and unintended behavior. Generic class names should be prefixed with e.g. the name of the component they belong to (creating \"informal\" namespaces, much as in C or Objective-C)." +#: ../../content/developer/reference/backend/data.rst:245 +msgid "same as the corresponding field on ``ir.ui.view`` (nb: ``inherit_id`` should be an :term:`external identifier`)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:793 -msgid "Global selectors should be avoided. Because a component may be used several times in a single page (an example in Odoo is dashboards), queries should be restricted to a given component's scope. Unfiltered selections such as ``$(selector)`` or ``document.querySelectorAll(selector)`` will generally lead to unintended or incorrect behavior. Odoo Web's :class:`~Widget` has an attribute providing its DOM root (:attr:`~Widget.$el`), and a shortcut to select nodes directly (:func:`~Widget.$`)." +#: ../../content/developer/reference/backend/data.rst:248 +msgid "``primary``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:802 -msgid "More generally, never assume your components own or controls anything beyond its own personal :attr:`~Widget.$el` (so, avoid using a reference to the parent widget)" +#: ../../content/developer/reference/backend/data.rst:248 +msgid "if set to ``True`` and combined with a ``inherit_id``, defines the view as a primary" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:806 -msgid "Html templating/rendering should use QWeb unless absolutely trivial." +#: ../../content/developer/reference/backend/data.rst:251 +msgid "comma-separated list of group :term:`external identifiers`" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:808 -msgid "All interactive components (components displaying information to the screen or intercepting DOM events) must inherit from :class:`~Widget` and correctly implement and use its API and life cycle." +#: ../../content/developer/reference/backend/data.rst:253 +msgid "if set to ``\"True\"``, the template is a website page (linkable to, deletable)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:812 -msgid "Make sure to wait for start to be finished before using $el e.g.:" +#: ../../content/developer/reference/backend/data.rst:258 +msgid "``optional``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:844 -msgid "QWeb Template Engine" +#: ../../content/developer/reference/backend/data.rst:256 +msgid "``enabled`` or ``disabled``, whether the view can be disabled (in the website interface) and its default status. If unset, the view is always enabled." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:846 -msgid "The web client uses the :doc:`qweb` template engine to render widgets (unless they override the *renderElement* method to do something else). The Qweb JS template engine is based on XML, and is mostly compatible with the python implementation." +#: ../../content/developer/reference/backend/data.rst:266 +msgid "CSV data files" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:851 -msgid "Now, let us explain how the templates are loaded. Whenever the web client starts, a rpc is made to the */web/webclient/qweb* route. The server will then return a list of all templates defined in data files for each installed modules. The correct files are listed in the *qweb* entry in each module manifest." +#: ../../content/developer/reference/backend/data.rst:268 +msgid "XML data files are flexible and self-descriptive, but very verbose when creating a number of simple records of the same model in bulk." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:856 -msgid "The web client will wait for that list of template to be loaded, before starting its first widget." +#: ../../content/developer/reference/backend/data.rst:271 +msgid "For this case, data files can also use csv_, this is often the case for :ref:`access rights `:" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:859 -msgid "This mechanism works quite well for our needs, but sometimes, we want to lazy load a template. For example, imagine that we have a widget which is rarely used. In that case, maybe we prefer to not load its template in the main file, in order to make the web client slightly lighter. In that case, we can use the *xmlDependencies* key of the Widget:" +#: ../../content/developer/reference/backend/data.rst:274 +msgid "the file name is :file:`{model_name}.csv`" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:877 -msgid "With this, the *Counter* widget will load the xmlDependencies files in its *willStart* method, so the template will be ready when the rendering is performed." +#: ../../content/developer/reference/backend/data.rst:275 +msgid "the first row lists the fields to write, with the special field ``id`` for :term:`external identifiers` (used for creation or update)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:882 -msgid "Event system" +#: ../../content/developer/reference/backend/data.rst:277 +msgid "each row thereafter creates a new record" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:884 -msgid "There are currently two event systems supported by Odoo: a simple system which allows adding listeners and triggering events, and a more complete system that also makes events 'bubble up'." +#: ../../content/developer/reference/backend/data.rst:279 +msgid "Here's the first lines of the data file defining country states ``res.country.state.csv``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:888 -msgid "Both of these event systems are implemented in the *EventDispatcherMixin*, in the file *mixins.js*. This mixin is included in the *Widget* class." +#: ../../content/developer/reference/backend/data.rst:285 +msgid "rendered in a more readable format:" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:892 -msgid "Base Event system" +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "country_id:id" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:894 -msgid "This event system was historically the first. It implements a simple bus pattern. We have 4 main methods:" +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "code" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:897 -msgid "*on*: this is used to register a listener on an event." +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "state_au_1" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:898 -msgid "*off*: useful to remove events listener." +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "au" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:899 -msgid "*once*: this is used to register a listener that will only be called once." +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "Australian Capital Territory" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:900 -msgid "*trigger*: trigger an event. This will cause each listeners to be called." +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "ACT" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:902 -msgid "Here is an example on how this event system could be used:" +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "state_au_2" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:927 -msgid "the use of this event system is discouraged, we plan to replace each *trigger* method by the *trigger_up* method from the extended event system" +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "New South Wales" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:931 -msgid "Extended Event System" +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "NSW" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:933 -msgid "The custom event widgets is a more advanced system, which mimic the DOM events API. Whenever an event is triggered, it will 'bubble up' the component tree, until it reaches the root widget, or is stopped." +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "state_au_3" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:937 -msgid "*trigger_up*: this is the method that will create a small *OdooEvent* and dispatch it in the component tree. Note that it will start with the component that triggered the event" +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "Northern Territory" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:940 -msgid "*custom_events*: this is the equivalent of the *event* dictionary, but for odoo events." +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "NT" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:943 -msgid "The OdooEvent class is very simple. It has three public attributes: *target* (the widget that triggered the event), *name* (the event name) and *data* (the payload). It also has 2 methods: *stopPropagation* and *is_stopped*." +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "state_au_4" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:947 -msgid "The previous example can be updated to use the custom event system:" +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "Queensland" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:974 -msgid "Registries" +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "QLD" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:976 -msgid "A common need in the Odoo ecosystem is to extend/change the behaviour of the base system from the outside (by installing an application, i.e. a different module). For example, one may need to add a new widget type in some views. In that case, and many others, the usual process is to create the desired component, then add it to a registry (registering step), to make the rest of the web client aware of its existence." +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "state_au_5" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:983 -msgid "There are a few registries available in the system:" +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "South Australia" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:998 -msgid "field registry (exported by :js:data:`web.field_registry`)" +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "SA" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:986 -msgid "The field registry contains all field widgets known to the web client. Whenever a view (typically form or list/kanban) needs a field widget, this is where it will look. A typical use case look like this:" +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "state_au_6" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:998 -msgid "Note that each value should be a subclass of *AbstractField*" +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "Tasmania" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1003 -msgid "view registry" +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "TAS" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1001 -msgid "This registry contains all JS views known to the web client (and in particular, the view manager). Each value of this registry should be a subclass of *AbstractView*." +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "state_au_7" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1010 -msgid "action registry" +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "Victoria" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1006 -msgid "We keep track of all client actions in this registry. This is where the action manager looks up whenever it needs to create a client action. In version 11, each value should simply be a subclass of *Widget*. However, in version 12, the values are required to be *AbstractAction*." +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "VIC" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1013 -msgid "Communication between widgets" +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "state_au_8" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1015 -msgid "There are many ways to communicate between components." +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "Western Australia" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1023 -msgid "From a parent to its child" +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "WA" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1018 -msgid "This is a simple case. The parent widget can simply call a method on its child:" +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "state_us_1" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1050 -msgid "From a widget to its parent/some ancestor" +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "us" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1026 -msgid "In this case, the widget's job is simply to notify its environment that something happened. Since we do not want the widget to have a reference to its parent (this would couple the widget with its parent's implementation), the best way to proceed is usually to trigger an event, which will bubble up the component tree, by using the ``trigger_up`` method:" +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "Alabama" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1036 -msgid "This event will be triggered on the widget, then will bubble up and be eventually caught by some upstream widget:" +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "AL" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1081 -msgid "Cross component" +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "state_us_2" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1053 -msgid "Cross component communication can be achieved by using a bus. This is not the preferred form of communication, because it has the disadvantage of making the code harder to maintain. However, it has the advantage of decoupling the components. In that case, this is simply done by triggering and listening to events on a bus. For example:" +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "Alaska" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1084 -msgid "Services" +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "AK" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1086 -msgid "In version 11.0, we introduced the notion of *service*. The main idea is to give to sub components a controlled way to access their environment, in a way that allow the framework enough control, and which is testable." +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "state_us_3" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1090 -msgid "The service system is organized around three ideas: services, service providers and widgets. The way it works is that widgets trigger (with *trigger_up*) events, these events bubble up to a service provider, which will ask a service to perform a task, then maybe return an answer." +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "Arizona" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1096 -#: ../../content/developer/webservices/iap.rst:354 -msgid "Service" +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "AZ" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1098 -msgid "A service is an instance of the *AbstractService* class. It basically only has a name and a few methods. Its job is to perform some work, typically something depending on the environment." +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "state_us_4" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1102 -msgid "For example, we have the *ajax* service (job is to perform a rpc), the *localStorage* (interact with the browser local storage) and many others." +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "Arkansas" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1105 -msgid "Here is a simplified example on how the ajax service is implemented:" +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "AR" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1118 -msgid "This service is named 'ajax' and define one method, *rpc*." +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "state_us_5" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1121 -msgid "Service Provider" +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "California" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1123 -msgid "For services to work, it is necessary that we have a service provider ready to dispatch the custom events. In the *backend* (web client), this is done by the main web client instance. Note that the code for the service provider comes from the *ServiceProviderMixin*." +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "CA" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1130 -msgid "Widget" +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "state_us_6" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1132 -msgid "The widget is the part that requests a service. In order to do that, it simply triggers an event *call_service* (typically by using the helper function *call*). This event will bubble up and communicate the intent to the rest of the system." +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "Colorado" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1136 -msgid "In practice, some functions are so frequently called that we have some helpers functions to make them easier to use. For example, the *_rpc* method is a helper that helps making a rpc." +#: ../../content/developer/reference/backend/data/res.country.state.csv:1 +msgid "CO" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1152 -msgid "If a widget is destroyed, it will be detached from the main component tree and will not have a parent. In that case, the events will not bubble up, which means that the work will not be done. This is usually exactly what we want from a destroyed widget." +#: ../../content/developer/reference/backend/data.rst:292 +msgid "For each row (record):" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1158 -msgid "RPCs" +#: ../../content/developer/reference/backend/data.rst:294 +msgid "the first column is the :term:`external id` of the record to create or update" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1160 -msgid "The rpc functionality is supplied by the ajax service. But most people will probably only interact with the *_rpc* helpers." +#: ../../content/developer/reference/backend/data.rst:296 +msgid "the second column is the :term:`external id` of the country object to link to (country objects must have been defined beforehand)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1163 -msgid "There are typically two usecases when working on Odoo: one may need to call a method on a (python) model (this goes through a controller *call_kw*), or one may need to directly call a controller (available on some route)." +#: ../../content/developer/reference/backend/data.rst:298 +msgid "the third column is the ``name`` field for ``res.country.state``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1167 -msgid "Calling a method on a python model:" +#: ../../content/developer/reference/backend/data.rst:299 +msgid "the fourth column is the ``code`` field for ``res.country.state``" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1177 -msgid "Directly calling a controller:" +#: ../../content/developer/reference/backend/http.rst:6 +msgid "Web Controllers" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1187 -msgid "Notifications" +#: ../../content/developer/reference/backend/http.rst:9 +msgid "Controllers" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1189 -msgid "The Odoo framework has a standard way to communicate various information to the user: notifications, which are displayed on the top right of the user interface." +#: ../../content/developer/reference/backend/http.rst:11 +msgid "Controllers need to provide extensibility, much like :class:`~odoo.models.Model`, but can't use the same mechanism as the pre-requisites (a database with loaded modules) may not be available yet (e.g. no database created, or no database selected)." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1192 -msgid "There are two types of notifications:" +#: ../../content/developer/reference/backend/http.rst:16 +msgid "Controllers thus provide their own extension mechanism, separate from that of models:" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1194 -msgid "*notification*: useful to display some feedback. For example, whenever a user unsubscribed to a channel." +#: ../../content/developer/reference/backend/http.rst:19 +msgid "Controllers are created by :ref:`inheriting ` from :class:`~odoo.http.Controller`. Routes are defined through methods decorated with :func:`~odoo.http.route`::" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1197 -msgid "*warning*: useful to display some important/urgent information. Typically most kind of (recoverable) errors in the system." +#: ../../content/developer/reference/backend/http.rst:27 +msgid "To *override* a controller, :ref:`inherit ` from its class and override relevant methods, re-exposing them if necessary::" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1200 -msgid "Also, notifications can be used to ask a question to the user without disturbing its workflow. Imagine a phone call received through VOIP: a sticky notification could be displayed with two buttons *Accept* and *Decline*." +#: ../../content/developer/reference/backend/http.rst:36 +msgid "decorating with :func:`~odoo.http.route` is necessary to keep the method (and route) visible: if the method is redefined without decorating, it will be \"unpublished\"" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1205 -msgid "Notification system" +#: ../../content/developer/reference/backend/http.rst:39 +msgid "the decorators of all methods are combined, if the overriding method's decorator has no argument all previous ones will be kept, any provided argument will override previously defined ones e.g.::" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1207 -msgid "The notification system in Odoo is designed with the following components:" +#: ../../content/developer/reference/backend/http.rst:48 +msgid "will change ``/some_url`` from public authentication to user (requiring a log-in)" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1209 -msgid "a *Notification* widget: this is a simple widget that is meant to be created and displayed with the desired information" +#: ../../content/developer/reference/backend/http.rst:57 +msgid "Routing" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1212 -msgid "a *NotificationService*: a service whose responsibility is to create and destroy notifications whenever a request is done (with a custom_event). Note that the web client is a service provider." +#: ../../../odoo/odoo/http.py:docstring of odoo.http.route:1 +msgid "Decorate a controller method in order to route incoming requests matching the given URL and options to the decorated method." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1216 -msgid "a client action *display_notification*: this allows to trigger the display of a notification from python (e.g. in the method called when the user clicked on a button of type object)." +#: ../../../odoo/odoo/http.py:docstring of odoo.http.route:5 +msgid "It is mandatory to re-decorate any method that is overridden in controller extensions but the arguments can be omitted. See :class:`~odoo.http.Controller` for more details." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1220 -msgid "two helper functions in *ServiceMixin*: *do_notify* and *do_warn*" +#: ../../../odoo/odoo/http.py:docstring of odoo.http.route:9 +msgid "The paths that the decorated method is serving. Incoming HTTP request paths matching this route will be routed to this decorated method. See `werkzeug routing documentation `_ for the format of route expressions." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1224 -msgid "Displaying a notification" +#: ../../../odoo/odoo/http.py:docstring of odoo.http.route:14 +msgid "The type of request, either ``'json'`` or ``'http'``. It describes where to find the request parameters and how to serialize the response." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1225 -msgid "The most common way to display a notification is by using two methods that come from the *ServiceMixin*:" +#: ../../../odoo/odoo/http.py:docstring of odoo.http.route:17 +msgid "The authentication method, one of the following: * ``'user'``: The user must be authenticated and the current request will be executed using the rights of the user. * ``'public'``: The user may or may not be authenticated. If he isn't, the current request will be executed using the shared Public user. * ``'none'``: The method is always active, even if there is no database. Mainly used by the framework and authentication modules. The request code will not have any facilities to access the current user." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1241 -msgid "*do_notify(title, message, sticky, className)*:" +#: ../../../odoo/odoo/http.py:docstring of odoo.http.route:17 +msgid "The authentication method, one of the following:" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1229 -msgid "Display a notification of type *notification*." +#: ../../../odoo/odoo/http.py:docstring of odoo.http.route:19 +msgid "``'user'``: The user must be authenticated and the current request will be executed using the rights of the user." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1231 -#: ../../content/developer/reference/javascript_reference.rst:1246 -msgid "*title*: string. This will be displayed on the top as a title" +#: ../../../odoo/odoo/http.py:docstring of odoo.http.route:21 +msgid "``'public'``: The user may or may not be authenticated. If he isn't, the current request will be executed using the shared Public user." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1233 -#: ../../content/developer/reference/javascript_reference.rst:1248 -msgid "*message*: string, the content of the notification" +#: ../../../odoo/odoo/http.py:docstring of odoo.http.route:24 +msgid "``'none'``: The method is always active, even if there is no database. Mainly used by the framework and authentication modules. The request code will not have any facilities to access the current user." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1235 -#: ../../content/developer/reference/javascript_reference.rst:1250 -msgid "*sticky*: boolean, optional. If true, the notification will stay until the user dismisses it. Otherwise, the notification will be automatically closed after a short delay." +#: ../../../odoo/odoo/http.py:docstring of odoo.http.route:28 +msgid "A list of http methods (verbs) this route applies to. If not specified, all methods are allowed." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1239 -#: ../../content/developer/reference/javascript_reference.rst:1254 -msgid "*className*: string, optional. This is a css class name that will be automatically added to the notification. This could be useful for styling purpose, even though its use is discouraged." +#: ../../../odoo/odoo/http.py:docstring of odoo.http.route:30 +msgid "The Access-Control-Allow-Origin cors directive value." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1256 -msgid "*do_warn(title, message, sticky, className)*:" +#: ../../../odoo/odoo/http.py:docstring of odoo.http.route:31 +msgid "Whether CSRF protection should be enabled for the route. Enabled by default for ``'http'``-type requests, disabled by default for ``'json'``-type requests." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1244 -msgid "Display a notification of type *warning*." +#: ../../content/developer/reference/backend/http.rst:64 +msgid "Request" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1258 -msgid "Here are two examples on how to use these methods:" +#: ../../content/developer/reference/backend/http.rst:66 +msgid "The request object is automatically set on :data:`odoo.http.request` at the start of the request." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1267 -msgid "Here an example in python:" +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request:1 +msgid "Wrapper around the incomming HTTP request with deserialized request parameters, session utilities and request dispatching logic." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1284 -msgid "Systray" +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.update_env:1 +msgid "Update the environment of the current request." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1286 -msgid "The Systray is the right part of the menu bar in the interface, where the web client displays a few widgets, such as a messaging menu." +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.update_context:1 +msgid "Override the environment context of the current request with the values of ``overrides``. To replace the entire context, please use :meth:`~update_env`: instead." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1289 -msgid "When the SystrayMenu is created by the menu, it will look for all registered widgets and add them as a sub widget at the proper place." +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.geoip:1 +msgid "Get the remote address geolocalisation." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1292 -msgid "There is currently no specific API for systray widgets. They are supposed to be simple widgets, and can communicate with their environment just like other widgets with the *trigger_up* method." +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.geoip:3 +msgid "When geolocalization is successful, the return value is a dictionary whoose format is:" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1297 -msgid "Adding a new Systray Item" +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.geoip:8 +msgid "{'city': str, 'country_code': str, 'country_name': str," msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1299 -msgid "There is no systray registry. The proper way to add a widget is to add it to the class variable SystrayMenu.items." +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.geoip:7 +msgid "'latitude': float, 'longitude': float, 'region': str, 'time_zone': str}" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1314 -msgid "Ordering" +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.geoip:10 +msgid "When geolocalization fails, an empty dict is returned." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1316 -msgid "Before adding the widget to himself, the Systray Menu will sort the items by a sequence property. If that property is not present on the prototype, it will use 50 instead. So, to position a systray item to be on the right, one can set a very high sequence number (and conversely, a low number to put it on the left)." +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.csrf_token:1 +msgid "Generates and returns a CSRF token for the current session" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1328 -msgid "Translation management" +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.csrf_token:3 +msgid "the CSRF token should only be valid for the specified duration (in second), by default 48h, ``None`` for the token to be valid as long as the current user's session is." msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1330 -msgid "Some translations are made on the server side (basically all text strings rendered or processed by the server), but there are strings in the static files that need to be translated. The way it currently works is the following:" +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.csrf_token:7 +msgid "ASCII token string" msgstr "" -#: ../../content/developer/reference/javascript_reference.rst:1334 -msgid "each translatable string is tagged with the special function *_t* (available in the JS module *web.core*" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1336 -msgid "these strings are used by the server to generate the proper PO files" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1337 -msgid "whenever the web client is loaded, it will call the route */web/webclient/translations*, which returns a list of all translatable terms" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1339 -msgid "in runtime, whenever the function *_t* is called, it will look up in this list in order to find a translation, and return it or the original string if none is found." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1343 -msgid "Note that translations are explained in more details, from the server point of view, in the document :doc:`translations`." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1346 -msgid "There are two important functions for the translations in javascript: *_t* and *_lt*. The difference is that *_lt* is lazily evaluated." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1365 -msgid "In this example, the *_lt* is necessary because the translations are not ready when the module is loaded." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1368 -msgid "Note that translation functions need some care. The string given in argument should not be dynamic." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1372 -msgid "Session" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1374 -msgid "There is a specific module provided by the web client which contains some information specific to the user current *session*. Some notable keys are" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1377 -msgid "uid: the current user ID (its ID as a *res.users*)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1378 -msgid "user_name: the user name, as a string" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1379 -msgid "the user context (user ID, language and timezone)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1380 -msgid "partner_id: the ID of the partner associated to the current user" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1381 -msgid "db: the name of the database currently being in use" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1384 -msgid "Adding information to the session" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1386 -msgid "When the /web route is loaded, the server will inject some session information in the template a script tag. The information will be read from the method *session_info* of the model *ir.http*. So, if one wants to add a specific information, it can be done by overriding the session_info method and adding it to the dictionary." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1406 -msgid "Now, the value can be obtained in javascript by reading it in the session:" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1414 -msgid "Note that this mechanism is designed to reduce the amount of communication needed by the web client to be ready. It is more appropriate for data which is cheap to compute (a slow session_info call will delay the loading for the web client for everyone), and for data which is required early in the initialization process." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1423 -msgid "The word 'view' has more than one meaning. This section is about the design of the javascript code of the views, not the structure of the *arch* or anything else." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1427 -msgid "In 2017, Odoo replaced the previous view code with a new architecture. The main need was to separate the rendering logic from the model logic." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1431 -msgid "Views (in a generic sense) are now described with 4 pieces: a View, a Controller, a Renderer and a Model. The API of these 4 pieces is described in the AbstractView, AbstractController, AbstractRenderer and AbstractModel classes." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1452 -msgid "the View is the factory. Its job is to get a set of fields, arch, context and some other parameters, then to construct a Controller/Renderer/Model triplet." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1455 -msgid "The view's role is to properly setup each piece of the MVC pattern, with the correct information. Usually, it has to process the arch string and extract the data necessary for each other parts of the view." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1459 -msgid "Note that the view is a class, not a widget. Once its job has been done, it can be discarded." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1462 -msgid "the Renderer has one job: representing the data being viewed in a DOM element. Each view can render the data in a different way. Also, it should listen on appropriate user actions and notify its parent (the Controller) if necessary." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1466 -msgid "The Renderer is the V in the MVC pattern." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1468 -msgid "the Model: its job is to fetch and hold the state of the view. Usually, it represents in some way a set of records in the database. The Model is the owner of the 'business data'. It is the M in the MVC pattern." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1472 -msgid "the Controller: its job is to coordinate the renderer and the model. Also, it is the main entry point for the rest of the web client. For example, when the user changes something in the search view, the *update* method of the controller will be called with the appropriate information." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1477 -msgid "It is the C in the MVC pattern." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1480 -msgid "The JS code for the views has been designed to be usable outside of the context of a view manager/action manager. They could be used in a client action, or, they could be displayed in the public website (with some work on the assets)." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1487 -msgid "Field Widgets" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1489 -msgid "A good part of the web client experience is about editing and creating data. Most of that work is done with the help of field widgets, which are aware of the field type and of the specific details on how a value should be displayed and edited." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1494 -msgid "AbstractField" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1496 -msgid "The *AbstractField* class is the base class for all widgets in a view, for all views that support them (currently: Form, List, Kanban)." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1499 -msgid "There are many differences between the v11 field widgets and the previous versions. Let us mention the most important ones:" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1502 -msgid "the widgets are shared between all views (well, Form/List/Kanban). No need to duplicate the implementation anymore. Note that it is possible to have a specialized version of a widget for a view, by prefixing it with the view name in the view registry: *list.many2one* will be chosen in priority over *many2one*." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1506 -msgid "the widgets are no longer the owner of the field value. They only represent the data and communicate with the rest of the view." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1508 -msgid "the widgets do no longer need to be able to switch between edit and readonly mode. Now, when such a change is necessary, the widget will be destroyed and rerendered again. It is not a problem, since they do not own their value anyway" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1512 -msgid "the field widgets can be used outside of a view. Their API is slightly awkward, but they are designed to be standalone." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1516 -msgid "Decorations" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1518 -msgid "Like the list view, field widgets have a simple support for decorations. The goal of decorations is to have a simple way to specify a text color depending on the record current state. For example," -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1526 -msgid "The valid decoration names are:" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1528 -msgid "decoration-bf" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1529 -msgid "decoration-it" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1530 -msgid "decoration-danger" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1531 -msgid "decoration-info" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1532 -msgid "decoration-muted" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1533 -msgid "decoration-primary" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1534 -msgid "decoration-success" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1535 -msgid "decoration-warning" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1537 -msgid "Each decoration *decoration-X* will be mapped to a css class *text-X*, which is a standard bootstrap css class (except for *text-it* and *text-bf*, which are handled by odoo and correspond to italic and bold, respectively). Note that the value of the decoration attribute should be a valid python expression, which will be evaluated with the record as evaluation context." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1544 -msgid "Non relational fields" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1546 -msgid "We document here all non relational fields available by default, in no particular order." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1580 -msgid "integer (FieldInteger)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1550 -msgid "This is the default field type for fields of type *integer*." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1552 -#: ../../content/developer/reference/javascript_reference.rst:1741 -msgid "Supported field types: *integer*" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1554 -#: ../../content/developer/reference/javascript_reference.rst:1595 -#: ../../content/developer/reference/javascript_reference.rst:1667 -#: ../../content/developer/reference/javascript_reference.rst:1680 -#: ../../content/developer/reference/javascript_reference.rst:1693 -#: ../../content/developer/reference/javascript_reference.rst:1720 -#: ../../content/developer/reference/javascript_reference.rst:1805 -#: ../../content/developer/reference/javascript_reference.rst:1823 -#: ../../content/developer/reference/javascript_reference.rst:1888 -#: ../../content/developer/reference/javascript_reference.rst:1932 -#: ../../content/developer/reference/javascript_reference.rst:1951 -#: ../../content/developer/reference/javascript_reference.rst:1983 -#: ../../content/developer/reference/javascript_reference.rst:2004 -#: ../../content/developer/reference/javascript_reference.rst:2076 -#: ../../content/developer/reference/javascript_reference.rst:2106 -#: ../../content/developer/reference/javascript_reference.rst:2180 -#: ../../content/developer/reference/javascript_reference.rst:2195 -#: ../../content/developer/reference/javascript_reference.rst:2205 -#: ../../content/developer/reference/javascript_reference.rst:2253 -msgid "Options:" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1556 -#: ../../content/developer/reference/javascript_reference.rst:1597 -msgid "type: setting the input type (*text* by default, can be set on *number*)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1558 -#: ../../content/developer/reference/javascript_reference.rst:1599 -msgid "On edit mode, the field is rendered as an input with the HTML attribute type setted on *number* (so user can benefit the native support, especially on mobile). In this case, the default formatting is disabled to avoid incompability." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1566 -#: ../../content/developer/reference/javascript_reference.rst:1607 -msgid "step: set the step to the value up and down when the user click on buttons (only for input of type number, 1 by default)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1573 -msgid "format: should the number be formatted. (true by default)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1576 -msgid "By default, numbers are formatted according to locale parameters." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1576 -msgid "This option will prevent the field's value from being formatted." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1621 -msgid "float (FieldFloat)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1583 -msgid "This is the default field type for fields of type *float*." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1585 -#: ../../content/developer/reference/javascript_reference.rst:1628 -#: ../../content/developer/reference/javascript_reference.rst:1635 -#: ../../content/developer/reference/javascript_reference.rst:1644 -msgid "Supported field types: *float*" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1587 -#: ../../content/developer/reference/javascript_reference.rst:2100 -#: ../../content/developer/reference/javascript_reference.rst:2175 -msgid "Attributes:" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1589 -msgid "digits: displayed precision" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1628 -msgid "float_time (FieldFloatTime)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1624 -msgid "The goal of this widget is to display properly a float value that represents a time interval (in hours). So, for example, 0.5 should be formatted as 0:30, or 4.75 correspond to 4:45." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1635 -msgid "float_factor (FieldFloatFactor)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1631 -msgid "This widget aims to display properly a float value that converted using a factor given in its options. So, for example, the value saved in database is 0.5 and the factor is 3, the widget value should be formatted as 1.5." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1648 -msgid "float_toggle (FieldFloatToggle)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1638 -msgid "The goal of this widget is to replace the input field by a button containing a range of possible values (given in the options). Each click allows the user to loop in the range. The purpose here is to restrict the field value to a predefined selection. Also, the widget support the factor conversion as the *float_factor* widget (Range values should be the result of the conversion)." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1653 -msgid "boolean (FieldBoolean)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1651 -msgid "This is the default field type for fields of type *boolean*." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1653 -#: ../../content/developer/reference/javascript_reference.rst:1920 -#: ../../content/developer/reference/javascript_reference.rst:1930 -#: ../../content/developer/reference/javascript_reference.rst:2002 -msgid "Supported field types: *boolean*" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1658 -msgid "char (FieldChar)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1656 -msgid "This is the default field type for fields of type *char*." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1658 -#: ../../content/developer/reference/javascript_reference.rst:1748 -#: ../../content/developer/reference/javascript_reference.rst:1756 -#: ../../content/developer/reference/javascript_reference.rst:1787 -#: ../../content/developer/reference/javascript_reference.rst:1794 -#: ../../content/developer/reference/javascript_reference.rst:2021 -msgid "Supported field types: *char*" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1673 -msgid "date (FieldDate)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1661 -msgid "This is the default field type for fields of type *date*. Note that it also works with datetime fields. It uses the session timezone when formatting dates." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1665 -#: ../../content/developer/reference/javascript_reference.rst:1678 -#: ../../content/developer/reference/javascript_reference.rst:1691 -#: ../../content/developer/reference/javascript_reference.rst:1711 -msgid "Supported field types: *date*, *datetime*" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1669 -#: ../../content/developer/reference/javascript_reference.rst:1682 -msgid "datepicker: extra settings for the datepicker_ widget." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1686 -msgid "datetime (FieldDateTime)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1676 -msgid "This is the default field type for fields of type *datetime*." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1703 -msgid "daterange (FieldDateRange)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1689 -msgid "This widget allows the user to select start and end date into a single picker." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1695 -msgid "related_start_date: apply on end date field to get start date value which is used to display range in the picker." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1697 -msgid "related_end_date: apply on start date field to get end date value which is used to display range in the picker." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1699 -msgid "picker_options: extra settings for picker." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1711 -msgid "remaining_days (RemainingDays)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1706 -msgid "This widget can be used on date and datetime fields. In readonly, it displays the delta (in days) between the value of the field and today. The widget is intended to be used for informative purpose: therefore the value cannot be modified in edit mode." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1726 -msgid "monetary (FieldMonetary)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1714 -msgid "This is the default field type for fields of type 'monetary'. It is used to display a currency. If there is a currency fields given in option, it will use that, otherwise it will fall back to the default currency (in the session)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1718 -msgid "Supported field types: *monetary*, *float*" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1722 -msgid "currency_field: another field name which should be a many2one on currency." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1732 -msgid "text (FieldText)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1729 -msgid "This is the default field type for fields of type *text*." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1731 -msgid "Supported field types: *text*" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1742 -msgid "handle (HandleWidget)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1735 -msgid "This field's job is to be displayed as a *handle*, and allows reordering the various records by drag and dropping them." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1738 -msgid "It has to be specified on the field by which records are sorted." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1739 -msgid "Having more than one field with a handle widget on the same list is not supported." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1748 -msgid "email (FieldEmail)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1745 -msgid "This field displays email address. The main reason to use it is that it is rendered as an anchor tag with the proper href, in readonly mode." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1756 -msgid "phone (FieldPhone)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1751 -msgid "This field displays a phone number. The main reason to use it is that it is rendered as an anchor tag with the proper href, in readonly mode, but only in some cases: we only want to make it clickable if the device can call this particular number." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1775 -msgid "url (UrlWidget)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1759 -msgid "This field displays an url (in readonly mode). The main reason to use it is that it is rendered as an anchor tag with the proper css classes and href." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1762 -msgid "Also, the text of the anchor tag can be customized with the *text* attribute (it won't change the href value)." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1787 -msgid "domain (FieldDomain)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1778 -msgid "The \"Domain\" field allows the user to construct a technical-prefix domain thanks to a tree-like interface and see the selected records in real time. In debug mode, an input is also there to be able to enter the prefix char domain directly (or to build advanced domains the tree-like interface does not allow to)." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1784 -msgid "Note that this is limited to 'static' domain (no dynamic expression, or access to context variable)." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1794 -msgid "link_button (LinkButton)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1790 -msgid "The LinkButton widget actually simply displays a span with an icon and the text value as content. The link is clickable and will open a new browser window with its value as url." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1816 -msgid "image (FieldBinaryImage)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1797 -msgid "This widget is used to represent a binary value as an image. In some cases, the server returns a 'bin_size' instead of the real image (a bin_size is a string representing a file size, such as 6.5kb). In that case, the widget will make an image with a source attribute corresponding to an image on the server." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1803 -#: ../../content/developer/reference/javascript_reference.rst:1821 -msgid "Supported field types: *binary*" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1807 -msgid "preview_image: if the image is only loaded as a 'bin_size', then this option is useful to inform the web client that the default field name is not the name of the current field, but the name of another field." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1811 -msgid "accepted_file_extensions: the file extension the user can pick from the file input dialog box (default value is `image/\\*`) (cf: ``accept`` attribute on )" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1836 -msgid "binary (FieldBinaryFile)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1819 -msgid "Generic widget to allow saving/downloading a binary file." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1825 -#: ../../content/developer/reference/javascript_reference.rst:2197 -msgid "accepted_file_extensions: the file extension the user can pick from the file input dialog box (cf: ``accept`` attribute on )" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1828 -msgid "Attribute:" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1830 -msgid "filename: saving a binary file will lose its file name, since it only saves the binary value. The filename can be saved in another field. To do that, an attribute filename should be set to a field present in the view." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1845 -msgid "priority (PriorityWidget)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1839 -msgid "This widget is rendered as a set of stars, allowing the user to click on it to select a value or not. This is useful for example to mark a task as high priority." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1843 -msgid "Note that this widget also works in 'readonly' mode, which is unusual." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1845 -#: ../../content/developer/reference/javascript_reference.rst:1862 -#: ../../content/developer/reference/javascript_reference.rst:1886 -#: ../../content/developer/reference/javascript_reference.rst:1905 -#: ../../content/developer/reference/javascript_reference.rst:1914 -#: ../../content/developer/reference/javascript_reference.rst:2057 -msgid "Supported field types: *selection*" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1857 -msgid "attachment_image (AttachmentImage)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1848 -msgid "Image widget for many2one fields. If the field is set, this widget will be rendered as an image with the proper src url. This widget does not have a different behaviour in edit or readonly mode, it is only useful to view an image." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1853 -#: ../../content/developer/reference/javascript_reference.rst:2098 -#: ../../content/developer/reference/javascript_reference.rst:2130 -#: ../../content/developer/reference/javascript_reference.rst:2141 -#: ../../content/developer/reference/javascript_reference.rst:2150 -#: ../../content/developer/reference/javascript_reference.rst:2168 -msgid "Supported field types: *many2one*" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1880 -msgid "image_selection (ImageSelection)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1860 -msgid "Allow the user to select a value by clicking on an image." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1864 -msgid "Options: a dictionary with a mapping from a selection value to an object with the url for an image (*image_link*) and a preview image (*preview_link*)." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1867 -msgid "Note that this option is not optional!" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1896 -msgid "label_selection (LabelSelection)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1883 -msgid "This widget renders a simple non-editable label. This is only useful to display some information, not to edit it." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1890 -msgid "classes: a mapping from a selection value to a css class" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1909 -msgid "state_selection (StateSelectionWidget)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1899 -msgid "This is a specialized selection widget. It assumes that the record has some hardcoded fields, present in the view: *stage_id*, *legend_normal*, *legend_blocked*, *legend_done*. This is mostly used to display and change the state of a task in a project, with additional information displayed in the dropdown." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1914 -msgid "kanban_state_selection (StateSelectionWidget)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1912 -msgid "This is exactly the same widget as state_selection" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1920 -msgid "boolean_favorite (FavoriteWidget)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1917 -msgid "This widget is displayed as an empty (or not) star, depending on a boolean value. Note that it also can be edited in readonly mode." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1939 -msgid "boolean_button (FieldBooleanButton)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1923 -msgid "The Boolean Button widget is meant to be used in a stat button in a form view. The goal is to display a nice button with the current state of a boolean field (for example, 'Active'), and allow the user to change that field when clicking on it." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1928 -msgid "Note that it also can be edited in readonly mode." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1934 -msgid "terminology: it can be either 'active', 'archive', 'close' or a customized mapping with the keys *string_true*, *string_false*, *hover_true*, *hover_false*" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1943 -msgid "boolean_toggle (BooleanToggle)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1942 -msgid "Displays a toggle switch to represent a boolean. This is a subfield of FieldBoolean, mostly used to have a different look." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1964 -msgid "statinfo (StatInfo)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1946 -msgid "This widget is meant to represent statistical information in a *stat button*. It is basically just a label with a number." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1949 -#: ../../content/developer/reference/javascript_reference.rst:1972 -#: ../../content/developer/reference/javascript_reference.rst:1981 -msgid "Supported field types: *integer, float*" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1953 -msgid "label_field: if given, the widget will use the value of the label_field as text." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1976 -msgid "percentpie (FieldPercentPie)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1967 -msgid "This widget is meant to represent statistical information in a *stat button*. This is similar to a statinfo widget, but the information is represented in a *pie* chart (empty to full). Note that the value is interpreted as a percentage (a number between 0 and 100)." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1995 -msgid "progressbar (FieldProgressBar)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1979 -msgid "Represent a value as a progress bar (from 0 to some value)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1985 -msgid "editable: boolean if value is editable" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1986 -msgid "current_value: get the current_value from the field that must be present in the view" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1987 -msgid "max_value: get the max_value from the field that must be present in the view" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1988 -msgid "edit_max_value: boolean if the max_value is editable" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1989 -msgid "title: title of the bar, displayed on top of the bar --> not translated, use parameter (not option) \"title\" instead" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2013 -msgid "toggle_button (FieldToggleBoolean)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:1998 -msgid "This widget is intended to be used on boolean fields. It toggles a button switching between a green bullet / gray bullet. It also set up a tooltip, depending on the value and some options." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2006 -msgid "active: the string for the tooltip that should be set when boolean is true" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2007 -msgid "inactive: the tooltip that should be set when boolean is false" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2031 -msgid "dashboard_graph (JournalDashboardGraph)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2016 -msgid "This is a more specialized widget, useful to display a graph representing a set of data. For example, it is used in the accounting dashboard kanban view." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2019 -msgid "It assumes that the field is a JSON serialization of a set of data." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2023 -msgid "Attribute" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2025 -msgid "graph_type: string, can be either 'line' or 'bar'" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2037 -msgid "ace (AceEditor)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2034 -msgid "This widget is intended to be used on Text fields. It provides Ace Editor for editing XML and Python." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2037 -msgid "Supported field types: *char, text*" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2050 -msgid "badge (FieldBadge)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2040 -msgid "Displays the value inside a bootstrap badge pill." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2042 -msgid "Supported field types: *char*, *selection*, *many2one*" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2044 -msgid "By default, the badge has a lightgrey background, but it can be customized by using the decoration-X mechanism. For instance, to display a red badge under a given condition:" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2061 -msgid "a string which is used to display some info when no value is selected" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2083 -msgid "radio (FieldRadio)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2068 -msgid "This is a subfield of FielSelection, but specialized to display all the valid choices as radio buttons." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2071 -msgid "Note that if used on a many2one records, then more rpcs will be done to fetch the name_gets of the related records." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2074 -#: ../../content/developer/reference/javascript_reference.rst:2089 -#: ../../content/developer/reference/javascript_reference.rst:2273 -msgid "Supported field types: *selection, many2one*" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2078 -msgid "horizontal: if true, radio buttons will be displayed horizontally." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2093 -msgid "selection_badge (FieldSelectionBadge)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2086 -msgid "This is a subfield of FieldSelection, but specialized to display all the valid choices as rectangular badges." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2121 -msgid "many2one (FieldMany2One)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2096 -msgid "Default widget for many2one fields." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2102 -msgid "can_create: allow the creation of related records (take precedence over no_create option)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2104 -msgid "can_write: allow the editing of related records (default: true)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2108 -msgid "no_create: prevent the creation of related records" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2109 -msgid "quick_create: allow the quick creation of related records (default: true)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2110 -msgid "no_quick_create: prevent the quick creation of related records (don't ask me)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2111 -msgid "no_create_edit: same as no_create, maybe..." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2112 -msgid "create_name_field: when creating a related record, if this option is set, the value of the *create_name_field* will be filled with the value of the input (default: *name*)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2113 -msgid "always_reload: boolean, default to false. If true, the widget will always do an additional name_get to fetch its name value. This is used for the situations where the name_get method is overridden (please do not do that)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2116 -msgid "no_open: boolean, default to false. If set to true, the many2one will not redirect on the record when clicking on it (in readonly mode)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2130 -msgid "list.many2one (ListFieldMany2One)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2124 -msgid "Default widget for many2one fields (in list view)." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2126 -msgid "Specialization of many2one field for list views. The main reason is that we need to render many2one fields (in readonly mode) as a text, which does not allow opening the related records." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2141 -msgid "many2one_barcode (FieldMany2OneBarcode)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2133 -msgid "Widget for many2one fields allows to open the camera from a mobile device (Android/iOS) to scan a barcode." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2135 -msgid "Specialization of many2one field where the user is allowed to use the native camera to scan a barcode. Then it uses name_search to search this value." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2138 -msgid "If this widget is set and user is not using the mobile application, it will fallback to regular many2one (FieldMany2One)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2150 -msgid "many2one_avatar (Many2OneAvatar)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2144 -msgid "This widget is only supported on many2one fields pointing to a model which inherits from 'image.mixin'. In readonly, it displays the image of the related record next to its display_name. Note that the display_name isn't a clickable link in this case. In edit, it behaves exactly like the regular many2one." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2157 -msgid "many2one_avatar_user (Many2OneAvatarUser)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2153 -msgid "This widget is a specialization of the Many2OneAvatar. When the avatar is clicked, we open a chat window with the corresponding user. This widget can only be set on many2one fields pointing to the 'res.users' model." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2157 -msgid "Supported field types: *many2one* (pointing to 'res.users')" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2162 -msgid "many2one_avatar_employee (Many2OneAvatarEmployee)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2160 -msgid "Same as Many2OneAvatarUser, but for many2one fields pointing to 'hr.employee'." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2162 -msgid "Supported field types: *many2one* (pointing to 'hr.employee')" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2168 -msgid "kanban.many2one (KanbanFieldMany2One)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2165 -msgid "Default widget for many2one fields (in kanban view). We need to disable all editing in kanban views." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2185 -msgid "many2many (FieldMany2Many)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2171 -msgid "Default widget for many2many fields." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2173 -#: ../../content/developer/reference/javascript_reference.rst:2193 -#: ../../content/developer/reference/javascript_reference.rst:2203 -#: ../../content/developer/reference/javascript_reference.rst:2230 -#: ../../content/developer/reference/javascript_reference.rst:2235 -#: ../../content/developer/reference/javascript_reference.rst:2244 -msgid "Supported field types: *many2many*" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2177 -msgid "mode: string, default view to display" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2178 -msgid "domain: restrict the data to a specific domain" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2182 -msgid "create_text: allow the customization of the text displayed when adding a new record" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2184 -msgid "link: domain determining whether or not records can be added to the relation (default: True)." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2185 -msgid "unlink: domain determining whether or not records can be removed from the relation (default: True)." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2198 -msgid "many2many_binary (FieldMany2ManyBinaryMultiFiles)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2188 -msgid "This widget helps the user to upload or delete one or more files at the same time." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2191 -msgid "Note that this widget is specific to the model 'ir.attachment'." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2224 -msgid "many2many_tags (FieldMany2ManyTags)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2201 -msgid "Display many2many as a list of tags." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2207 -msgid "create: domain determining whether or not new tags can be created (default: True)." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2213 -msgid "color_field: the name of a numeric field, which should be present in the view. A color will be chosen depending on its value." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2220 -msgid "no_edit_color: set to True to remove the possibility to change the color of the tags (default: False)." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2230 -msgid "form.many2many_tags (FormFieldMany2ManyTags)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2227 -msgid "Specialization of many2many_tags widget for form views. It has some extra code to allow editing the color of a tag." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2235 -msgid "kanban.many2many_tags (KanbanFieldMany2ManyTags)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2233 -msgid "Specialization of many2many_tags widget for kanban views." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2244 -msgid "many2many_checkboxes (FieldMany2ManyCheckBoxes)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2238 -msgid "This field displays a list of checkboxes and allows the user to select a subset of the choices. Note that the number of displayed values is limited to 100. This limit isn't customizable. It simply allows to handle extreme cases where this widget is wrongly set on a field with a huge comodel. In those cases, a list view is more adequate as it allows pagination and filtering." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2267 -msgid "one2many (FieldOne2Many)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2247 -msgid "Default widget for one2many fields." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2249 -msgid "It usually displays data in a sub list view, or a sub kanban view." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2251 -msgid "Supported field types: *one2many*" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2255 -msgid "create: domain determining whether or not related records can be created (default: True)." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2257 -msgid "delete: domain determining whether or not related records can be deleted (default: True)." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2263 -msgid "create_text: a string that is used to customize the 'Add' label/text." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2273 -msgid "statusbar (FieldStatus)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2270 -msgid "This is a really specialized widget for the form views. It is the bar on top of many forms which represent a flow, and allow selecting a specific state." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2281 -msgid "reference (FieldReference)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2276 -msgid "The FieldReference is a combination of a select (for the model) and a FieldMany2One (for its value). It allows the selection of a record on an arbitrary model." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2280 -msgid "Supported field types: *char, reference*" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2284 -msgid "Client actions" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2286 -msgid "The idea of a client action is a customized widget that is integrated in the web client interface, just like a *act_window_action*. This is useful when you need a component that is not closely linked to an existing view or a specific model. For example, the Discuss application is actually a client action." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2292 -msgid "A client action is a term that has various meanings, depending on the context:" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2294 -msgid "from the perspective of the server, it is a record of the model *ir_action*, with a field *tag* of type char" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2296 -msgid "from the perspective of the web client, it is a widget, which inherit from the class AbstractAction, and is supposed to be registered in the action registry under the corresponding key (from the field char)" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2300 -msgid "Whenever a menu item is associated to a client action, opening it will simply fetch the action definition from the server, then lookup into its action registry to get the Widget definition at the appropriate key, and finally, it will instantiate and append the widget to the proper place in the DOM." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2306 -msgid "Adding a client action" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2308 -msgid "A client action is a widget which will control the part of the screen below the menu bar. It can have a control panel, if necessary. Defining a client action can be done in two steps: implementing a new widget, and registering the widget in the action registry." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2323 -msgid "Implementing a new client action." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2314 -msgid "This is done by creating a widget:" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2346 -msgid "Registering the client action:" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2326 -msgid "As usual, we need to make the web client aware of the mapping between client actions and the actual class:" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2336 -msgid "Then, to use the client action in the web client, we need to create a client action record (a record of the model ``ir.actions.client``) with the proper ``tag`` attribute:" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2349 -msgid "Using the control panel" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2351 -msgid "By default, the client action does not display a control panel. In order to do that, several steps should be done." -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2354 -msgid "Set the *hasControlPanel* to *true*. In the widget code:" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2366 -msgid "when the ``loadControlPanel`` is set to true, the client action will automatically get the content of a search view or a control panel view. In this case, a model name should be specified like this:" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2377 -msgid "Call the method *updateControlPanel* whenever we need to update the control panel. For example:" -msgstr "" - -#: ../../content/developer/reference/javascript_reference.rst:2406 -msgid "The ``updateControlPanel`` is the main method to customize the content in controlpanel. For more information, look into the `control_panel_renderer.js `_ file." -msgstr "" - -#: ../../content/developer/reference/mixins.rst:6 -msgid "Mixins and Useful Classes" -msgstr "" - -#: ../../content/developer/reference/mixins.rst:8 -msgid "Odoo implements some useful classes and mixins that make it easy for you to add often-used behaviours on your objects. This guide will details most of them, with examples and use cases." -msgstr "" - -#: ../../content/developer/reference/mixins.rst:15 -msgid "Messaging features" -msgstr "" - -#: ../../content/developer/reference/mixins.rst:20 -msgid "Messaging integration" -msgstr "" - -#: ../../content/developer/reference/mixins.rst:23 -msgid "Basic messaging system" -msgstr "" - -#: ../../content/developer/reference/mixins.rst:25 -msgid "Integrating messaging features to your model is extremely easy. Simply inheriting the ``mail.thread`` model and adding the messaging fields (and their appropriate widgets) to your form view will get you up and running in no time." -msgstr "" - -#: ../../content/developer/reference/mixins.rst:29 -#: ../../content/developer/reference/mixins.rst:203 -#: ../../content/developer/reference/mixins.rst:275 -#: ../../content/developer/reference/mixins.rst:425 -#: ../../content/developer/reference/mixins.rst:612 -#: ../../content/developer/reference/mixins.rst:741 -#: ../../content/developer/reference/orm.rst:177 -#: ../../content/developer/reference/orm.rst:843 -#: ../../content/developer/reference/views.rst:1004 -msgid "Example" -msgstr "" - -#: ../../content/developer/reference/mixins.rst:31 -msgid "Let's create a simplistic model representing a business trip. Since organizing this kind of trip usually involves a lot of people and a lot of discussion, let's add support for message exchange on the model." -msgstr "" - -#: ../../content/developer/reference/mixins.rst:46 -msgid "In the form view:" -msgstr "" - -#: ../../content/developer/reference/mixins.rst:66 -msgid "Once you've added chatter support on your model, users can easily add messages or internal notes on any record of your model; every one of those will send a notification (to all followers for messages, to employee (*base.group_user*) users for internal notes). If your mail gateway and catchall address are correctly configured, these notifications will be sent by e-mail and can be replied-to directly from your mail client; the automatic routing system will route the answer to the correct thread." -msgstr "" - -#: ../../content/developer/reference/mixins.rst:74 -msgid "Server-side, some helper functions are there to help you easily send messages and to manage followers on your record:" -msgstr "" - -#: ../../content/developer/reference/mixins.rst:78 -msgid "Posting messages" -msgstr "" - -#: ../../content/developer/reference/mixins.rst:81 -msgid "Post a new message in an existing thread, returning the new mail.message ID." -msgstr "" - -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/qweb.rst:0 -#: ../../content/developer/webservices/iap.rst:0 -#: ../../content/developer/webservices/iap.rst:0 -#: ../../content/developer/webservices/iap.rst:0 -#: ../../content/developer/webservices/iap.rst:0 -#: ../../content/developer/webservices/iap.rst:0 -#: ../../content/developer/webservices/iap.rst:0 -#: ../../content/developer/webservices/iap.rst:0 -#: ../../content/developer/webservices/upgrade.rst:0 -#: ../../content/developer/webservices/upgrade.rst:0 -#: ../../content/developer/webservices/upgrade.rst:0 -#: ../../content/developer/webservices/upgrade.rst:0 -#: ../../content/developer/webservices/upgrade.rst:0 -#: ../../content/developer/webservices/upgrade.rst:0 -msgid "Parameters" -msgstr "" - -#: ../../content/developer/reference/mixins.rst:84 -msgid "body of the message, usually raw HTML that will be sanitized" -msgstr "" - -#: ../../content/developer/reference/mixins.rst:86 -msgid "see mail_message.message_type field" -msgstr "" - -#: ../../content/developer/reference/mixins.rst:87 -msgid "handle reply to a previous message by adding the parent partners to the message in case of private discussion" -msgstr "" - -#: ../../content/developer/reference/mixins.rst:89 -msgid "list of attachment tuples in the form ``(name,content)``, where content is NOT base64 encoded" -msgstr "" - -#: ../../content/developer/reference/mixins.rst:91 -msgid "extra keyword arguments will be used as default column values for the new mail.message record" -msgstr "" - -#: ../../content/developer/reference/mixins.rst:93 -msgid "ID of newly created mail.message" -msgstr "" - -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/reference/mixins.rst:0 -#: ../../content/developer/webservices/upgrade.rst:0 -#: ../../content/developer/webservices/upgrade.rst:0 -#: ../../content/developer/webservices/upgrade.rst:0 -#: ../../content/developer/webservices/upgrade.rst:0 -#: ../../content/developer/webservices/upgrade.rst:0 -#: ../../content/developer/webservices/upgrade.rst:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.csrf_token:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.validate_csrf:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.default_lang:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.get_http_params:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.make_response:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.make_json_response:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.JsonRPCDispatcher.handle_error:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.HttpDispatcher.handle_error:0 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response.load:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../content/developer/reference/backend/mixins.rst:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Date.context_today:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Date.to_date:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Date.to_string:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Datetime.context_timestamp:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Datetime.to_datetime:0 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Datetime.to_string:0 +#: ../../../odoo/odoo/api.py:docstring of odoo.api.Environment.lang:0 +#: ../../../odoo/odoo/api.py:docstring of odoo.api.Environment.user:0 +#: ../../../odoo/odoo/api.py:docstring of odoo.api.Environment.company:0 +#: ../../../odoo/odoo/api.py:docstring of odoo.api.Environment.companies:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.default_get:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.name_create:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.name_search:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read_group:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.fields_get:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.get_view:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.name_get:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.get_metadata:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.mapped:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.Model._populate_dependencies:0 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel._populate_factories:0 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.cartesian:0 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.compute:0 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.constant:0 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.iterate:0 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.randint:0 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.randomize:0 msgid "Return type" msgstr "" -#: ../../content/developer/reference/mixins.rst:98 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.validate_csrf:1 +msgid "Is the given csrf token valid ?" +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.validate_csrf:3 +msgid "The token to validate." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.validate_csrf:4 +msgid "``True`` when valid, ``False`` when not." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.default_lang:1 +msgid "Returns default user language according to request specification" +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.default_lang:3 +msgid "Preferred language if specified or 'en_US'" +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.get_http_params:1 +msgid "Extract key=value pairs from the query string and the forms present in the body (both application/x-www-form-urlencoded and multipart/form-data)." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.get_http_params:5 +msgid "The merged key-value pairs." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.make_response:1 +msgid "Helper for non-HTML responses, or HTML responses with custom response headers or cookies." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.make_response:4 +msgid "While handlers can just return the HTML markup of a page they want to send as a string if non-HTML data is returned they need to create a complete response object, or the returned data will not be correctly interpreted by the clients." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.make_response:9 +msgid "response body" +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.make_response:10 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.make_json_response:5 +msgid "http status code" +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.make_response:11 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.make_json_response:6 +msgid "HTTP headers to set on the response" +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.make_response:13 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.make_json_response:7 +msgid "cookies to set on the client" +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.make_response:14 +msgid "a response object." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.make_response:15 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.make_json_response:8 +msgid ":class:`~odoo.http.Response`" +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.make_json_response:1 +msgid "Helper for JSON responses, it json-serializes ``data`` and sets the Content-Type header accordingly if none is provided." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.make_json_response:4 +msgid "the data that will be json-serialized into the response body" +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.not_found:1 +msgid "Shortcut for a `HTTP 404 `_ (Not Found) response" +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.render:1 +msgid "Lazy render of a QWeb template." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.render:3 +msgid "The actual rendering of the given template will occur at then end of the dispatching. Meanwhile, the template and/or qcontext can be altered or even replaced by a static response." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.render:7 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response:6 +msgid "template to render" +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.render:8 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response:7 +msgid "Rendering context to use" +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.render:9 +msgid "whether the template rendering should be deferred until the last possible moment" +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Request.render:11 +msgid "forwarded to werkzeug's Response object" +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.JsonRPCDispatcher.is_compatible_with:1 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.HttpDispatcher.is_compatible_with:1 +msgid "Determine if the current request is compatible with this dispatcher." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.JsonRPCDispatcher.dispatch:1 +msgid "`JSON-RPC 2 `_ over HTTP." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.JsonRPCDispatcher.dispatch:3 +msgid "Our implementation differs from the specification on two points:" +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.JsonRPCDispatcher.dispatch:5 +msgid "The ``method`` member of the JSON-RPC request payload is ignored as the HTTP path is already used to route the request to the controller." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.JsonRPCDispatcher.dispatch:8 +msgid "We only support parameter structures by-name, i.e. the ``params`` member of the JSON-RPC request payload MUST be a JSON Object and not a JSON Array." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.JsonRPCDispatcher.dispatch:12 +msgid "In addition, it is possible to pass a context that replaces the session context via a special ``context`` argument that is removed prior to calling the endpoint." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.JsonRPCDispatcher.dispatch:16 +msgid "Sucessful request::" +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.JsonRPCDispatcher.dispatch:22 +msgid "Request producing a error::" +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.JsonRPCDispatcher.handle_error:1 +msgid "Handle any exception that occured while dispatching a request to a `type='json'` route. Also handle exceptions that occured when no route matched the request path, that no fallback page could be delivered and that the request ``Content-Type`` was json." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.JsonRPCDispatcher.handle_error:6 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.HttpDispatcher.handle_error:7 +msgid "the exception that occured." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.JsonRPCDispatcher.handle_error:7 +#: ../../../odoo/odoo/http.py:docstring of odoo.http.HttpDispatcher.handle_error:8 +msgid "an HTTP error response" +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.HttpDispatcher.dispatch:1 +msgid "Perform http-related actions such as deserializing the request body and query-string and checking cors/csrf while dispatching a request to a ``type='http'`` route." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.HttpDispatcher.dispatch:5 +msgid "See :meth:`~odoo.http.Response.load`: method for the compatible endpoint return types." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.HttpDispatcher.handle_error:1 +msgid "Handle any exception that occurred while dispatching a request to a `type='http'` route. Also handle exceptions that occurred when no route matched the request path, when no fallback page could be delivered and that the request ``Content-Type`` was not json." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response:1 +msgid "Outgoing HTTP response with body, status, headers and qweb support. In addition to the :class:`werkzeug.wrappers.Response` parameters, this class's constructor can take the following additional parameters for QWeb Lazy Rendering." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response:8 +msgid "User id to use for the ir.ui.view render call, ``None`` to use the request's user (the default)" +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response:11 +msgid "these attributes are available as parameters on the Response object and can be altered at any time before rendering" +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response:14 +msgid "Also exposes all the attributes and methods of :class:`werkzeug.wrappers.Response`." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response.load:1 +msgid "Convert the return value of an endpoint into a Response." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response.load:3 +msgid "The endpoint return value to load the Response from." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response.load:6 +msgid "The endpoint function name wherefrom the result emanated, used for logging." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response.load:8 +msgid "The created :class:`~odoo.http.Response`." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response.load:10 +msgid "When ``result`` type is none of the above- mentioned type." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response.render:1 +msgid "Renders the Response's template, returns the result." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response.flatten:1 +msgid "Forces the rendering of the response's template, sets the result as response body and unsets :attr:`.template`" +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response.set_cookie:1 +msgid "Sets a cookie. The parameters are the same as in the cookie `Morsel` object in the Python standard library but it accepts unicode data, too." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response.set_cookie:4 +msgid "A warning is raised if the size of the cookie header exceeds :attr:`max_cookie_size`, but the header will still be set." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response.set_cookie:7 +msgid "the key (name) of the cookie to be set." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response.set_cookie:8 +msgid "the value of the cookie." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response.set_cookie:9 +msgid "should be a number of seconds, or `None` (default) if the cookie should last only as long as the client's browser session." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response.set_cookie:12 +msgid "should be a `datetime` object or UNIX timestamp." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response.set_cookie:13 +msgid "limits the cookie to a given path, per default it will span the whole domain." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response.set_cookie:15 +msgid "if you want to set a cross-domain cookie. For example, ``domain=\".example.com\"`` will set a cookie that is readable by the domain ``www.example.com``, ``foo.example.com`` etc. Otherwise, a cookie will only be readable by the domain that set it." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response.set_cookie:20 +msgid "If `True`, the cookie will only be available via HTTPS" +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response.set_cookie:21 +msgid "disallow JavaScript to access the cookie. This is an extension to the cookie standard and probably not supported by all browsers." +msgstr "" + +#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response.set_cookie:24 +msgid "Limits the scope of the cookie such that it will only be attached to requests if those requests are \"same-site\"." +msgstr "" + +#: ../../content/developer/reference/backend/mixins.rst:6 +msgid "Mixins and Useful Classes" +msgstr "" + +#: ../../content/developer/reference/backend/mixins.rst:8 +msgid "Odoo implements some useful classes and mixins that make it easy for you to add often-used behaviours on your objects. This guide will details most of them, with examples and use cases." +msgstr "" + +#: ../../content/developer/reference/backend/mixins.rst:15 +msgid "Messaging features" +msgstr "" + +#: ../../content/developer/reference/backend/mixins.rst:20 +msgid "Messaging integration" +msgstr "" + +#: ../../content/developer/reference/backend/mixins.rst:23 +msgid "Basic messaging system" +msgstr "" + +#: ../../content/developer/reference/backend/mixins.rst:25 +msgid "Integrating messaging features to your model is extremely easy. Simply inheriting the ``mail.thread`` model and adding the messaging fields (and their appropriate widgets) to your form view will get you up and running in no time." +msgstr "" + +#: ../../content/developer/reference/backend/mixins.rst:31 +msgid "Let's create a simplistic model representing a business trip. Since organizing this kind of trip usually involves a lot of people and a lot of discussion, let's add support for message exchange on the model." +msgstr "" + +#: ../../content/developer/reference/backend/mixins.rst:46 +msgid "In the form view:" +msgstr "" + +#: ../../content/developer/reference/backend/mixins.rst:66 +msgid "Once you've added chatter support on your model, users can easily add messages or internal notes on any record of your model; every one of those will send a notification (to all followers for messages, to employee (*base.group_user*) users for internal notes). If your mail gateway and catchall address are correctly configured, these notifications will be sent by e-mail and can be replied-to directly from your mail client; the automatic routing system will route the answer to the correct thread." +msgstr "" + +#: ../../content/developer/reference/backend/mixins.rst:74 +msgid "Server-side, some helper functions are there to help you easily send messages and to manage followers on your record:" +msgstr "" + +#: ../../content/developer/reference/backend/mixins.rst:78 +msgid "Posting messages" +msgstr "" + +#: ../../content/developer/reference/backend/mixins.rst:81 +msgid "Post a new message in an existing thread, returning the new mail.message ID." +msgstr "" + +#: ../../content/developer/reference/backend/mixins.rst:84 +msgid "body of the message, usually raw HTML that will be sanitized" +msgstr "" + +#: ../../content/developer/reference/backend/mixins.rst:86 +msgid "see mail_message.message_type field" +msgstr "" + +#: ../../content/developer/reference/backend/mixins.rst:87 +msgid "handle reply to a previous message by adding the parent partners to the message in case of private discussion" +msgstr "" + +#: ../../content/developer/reference/backend/mixins.rst:89 +msgid "list of attachment tuples in the form ``(name,content)``, where content is NOT base64 encoded" +msgstr "" + +#: ../../content/developer/reference/backend/mixins.rst:91 +msgid "extra keyword arguments will be used as default column values for the new mail.message record" +msgstr "" + +#: ../../content/developer/reference/backend/mixins.rst:93 +msgid "ID of newly created mail.message" +msgstr "" + +#: ../../content/developer/reference/backend/mixins.rst:98 msgid "Helper method to send a mail / post a message using a view_id to render using the ir.qweb engine. This method is stand alone, because there is nothing in template and composer that allows to handle views in batch. This method will probably disappear when templates handle ir ui views." msgstr "" -#: ../../content/developer/reference/mixins.rst:104 +#: ../../content/developer/reference/backend/mixins.rst:104 msgid "external id or record of the view that should be sent" msgstr "" -#: ../../content/developer/reference/mixins.rst:109 +#: ../../content/developer/reference/backend/mixins.rst:109 msgid "Helper method to send a mail with a template" msgstr "" -#: ../../content/developer/reference/mixins.rst:111 +#: ../../content/developer/reference/backend/mixins.rst:111 msgid "the id of the template to render to create the body of the message" msgstr "" -#: ../../content/developer/reference/mixins.rst:112 -msgid "parameter to create a mail.compose.message wizzard (which inherit from mail.message)" +#: ../../content/developer/reference/backend/mixins.rst:112 +msgid "parameter to create a mail.compose.message wizard (which inherit from mail.message)" msgstr "" -#: ../../content/developer/reference/mixins.rst:115 +#: ../../content/developer/reference/backend/mixins.rst:115 msgid "Receiving messages" msgstr "" -#: ../../content/developer/reference/mixins.rst:116 +#: ../../content/developer/reference/backend/mixins.rst:116 msgid "These methods are called when a new e-mail is processed by the mail gateway. These e-mails can either be new thread (if they arrive via an :ref:`alias `) or simply replies from an existing thread. Overriding them allows you to set values on the thread's record depending on some values from the email itself (i.e. update a date or an e-mail address, add CC's addresses as followers, etc.)." msgstr "" -#: ../../content/developer/reference/mixins.rst:124 +#: ../../content/developer/reference/backend/mixins.rst:124 msgid "Called by ``message_process`` when a new message is received for a given thread model, if the message did not belong to an existing thread." msgstr "" -#: ../../content/developer/reference/mixins.rst:128 +#: ../../content/developer/reference/backend/mixins.rst:128 msgid "The default behavior is to create a new record of the corresponding model (based on some very basic info extracted from the message). Additional behavior may be implemented by overriding this method." msgstr "" -#: ../../content/developer/reference/mixins.rst:132 +#: ../../content/developer/reference/backend/mixins.rst:132 msgid "a map containing the email details and attachments. See ``message_process`` and ``mail.message.parse`` for details" msgstr "" -#: ../../content/developer/reference/mixins.rst:134 +#: ../../content/developer/reference/backend/mixins.rst:134 msgid "optional dictionary of additional field values to pass to create() when creating the new thread record; be careful, these values may override any other values coming from the message" msgstr "" -#: ../../content/developer/reference/mixins.rst:139 +#: ../../content/developer/reference/backend/mixins.rst:139 msgid "the id of the newly created thread object" msgstr "" -#: ../../content/developer/reference/mixins.rst:143 +#: ../../content/developer/reference/backend/mixins.rst:143 msgid "Called by ``message_process`` when a new message is received for an existing thread. The default behavior is to update the record with ``update_vals`` taken from the incoming email." msgstr "" -#: ../../content/developer/reference/mixins.rst:147 +#: ../../content/developer/reference/backend/mixins.rst:147 msgid "Additional behavior may be implemented by overriding this method." msgstr "" -#: ../../content/developer/reference/mixins.rst:150 +#: ../../content/developer/reference/backend/mixins.rst:150 msgid "a map containing the email details and attachments; see ``message_process`` and ``mail.message.parse()`` for details." msgstr "" -#: ../../content/developer/reference/mixins.rst:152 +#: ../../content/developer/reference/backend/mixins.rst:152 msgid "a dict containing values to update records given their ids; if the dict is None or is void, no write operation is performed." msgstr "" -#: ../../content/developer/reference/mixins.rst:154 -#: ../../content/developer/reference/mixins.rst:182 -#: ../../content/developer/reference/mixins.rst:192 -msgid "True" -msgstr "" - -#: ../../content/developer/reference/mixins.rst:157 +#: ../../content/developer/reference/backend/mixins.rst:157 msgid "Followers management" msgstr "" -#: ../../content/developer/reference/mixins.rst:160 +#: ../../content/developer/reference/backend/mixins.rst:160 msgid "Add partners to the records followers." msgstr "" -#: ../../content/developer/reference/mixins.rst:162 -#: ../../content/developer/reference/mixins.rst:178 +#: ../../content/developer/reference/backend/mixins.rst:162 +#: ../../content/developer/reference/backend/mixins.rst:178 msgid "IDs of the partners that will be subscribed to the record" msgstr "" -#: ../../content/developer/reference/mixins.rst:164 -#: ../../content/developer/reference/mixins.rst:180 +#: ../../content/developer/reference/backend/mixins.rst:164 +#: ../../content/developer/reference/backend/mixins.rst:180 msgid "IDs of the channels that will be subscribed to the record" msgstr "" -#: ../../content/developer/reference/mixins.rst:166 +#: ../../content/developer/reference/backend/mixins.rst:166 msgid "IDs of the subtypes that the channels/partners will be subscribed to (defaults to the default subtypes if ``None``)" msgstr "" -#: ../../content/developer/reference/mixins.rst:168 +#: ../../content/developer/reference/backend/mixins.rst:168 msgid "if True, delete existing followers before creating new one using the subtypes given in the parameters" msgstr "" -#: ../../content/developer/reference/mixins.rst:170 +#: ../../content/developer/reference/backend/mixins.rst:170 msgid "Success/Failure" msgstr "" -#: ../../content/developer/reference/mixins.rst:176 +#: ../../content/developer/reference/backend/mixins.rst:176 msgid "Remove partners from the record's followers." msgstr "" -#: ../../content/developer/reference/mixins.rst:188 +#: ../../content/developer/reference/backend/mixins.rst:188 msgid "Wrapper on message_subscribe, using users." msgstr "" -#: ../../content/developer/reference/mixins.rst:190 +#: ../../content/developer/reference/backend/mixins.rst:190 msgid "IDs of the users that will be unsubscribed to the record; if None, unsubscribe the current user instead." msgstr "" -#: ../../content/developer/reference/mixins.rst:197 +#: ../../content/developer/reference/backend/mixins.rst:197 msgid "Logging changes" msgstr "" -#: ../../content/developer/reference/mixins.rst:199 +#: ../../content/developer/reference/backend/mixins.rst:199 msgid "The ``mail`` module adds a powerful tracking system on fields, allowing you to log changes to specific fields in the record's chatter. To add tracking to a field, simple set the tracking attribute to True." msgstr "" -#: ../../content/developer/reference/mixins.rst:205 +#: ../../content/developer/reference/backend/mixins.rst:205 msgid "Let's track changes on the name and responsible of our business trips:" msgstr "" -#: ../../content/developer/reference/mixins.rst:219 +#: ../../content/developer/reference/backend/mixins.rst:219 msgid "From now on, every change to a trip's name or responsible will log a note on the record. The ``name`` field will be displayed in the notification as well to give more context about the notification (even if the name did not change)." msgstr "" -#: ../../content/developer/reference/mixins.rst:226 +#: ../../content/developer/reference/backend/mixins.rst:226 msgid "Subtypes" msgstr "" -#: ../../content/developer/reference/mixins.rst:228 +#: ../../content/developer/reference/backend/mixins.rst:228 msgid "Subtypes give you more granular control over messages. Subtypes act as a classification system for notifications, allowing subscribers to a document to customize the subtype of notifications they wish to receive." msgstr "" -#: ../../content/developer/reference/mixins.rst:232 +#: ../../content/developer/reference/backend/mixins.rst:232 msgid "Subtypes are created as data in your module; the model has the following fields:" msgstr "" -#: ../../content/developer/reference/mixins.rst:235 +#: ../../content/developer/reference/backend/mixins.rst:235 msgid "``name`` (mandatory) - :class:`~odoo.fields.Char`" msgstr "" -#: ../../content/developer/reference/mixins.rst:235 +#: ../../content/developer/reference/backend/mixins.rst:235 msgid "name of the subtype, will be displayed in the notification customization popup" msgstr "" -#: ../../content/developer/reference/mixins.rst:238 +#: ../../content/developer/reference/backend/mixins.rst:238 msgid "``description`` - :class:`~odoo.fields.Char`" msgstr "" -#: ../../content/developer/reference/mixins.rst:238 +#: ../../content/developer/reference/backend/mixins.rst:238 msgid "description that will be added in the message posted for this subtype. If void, the name will be added instead" msgstr "" -#: ../../content/developer/reference/mixins.rst:241 +#: ../../content/developer/reference/backend/mixins.rst:241 msgid "``internal`` - :class:`~odoo.fields.Boolean`" msgstr "" -#: ../../content/developer/reference/mixins.rst:241 +#: ../../content/developer/reference/backend/mixins.rst:241 msgid "messages with internal subtypes will be visible only by employees, aka members of the ``base.group_user`` group" msgstr "" -#: ../../content/developer/reference/mixins.rst:246 +#: ../../content/developer/reference/backend/mixins.rst:246 msgid "``parent_id`` - :class:`~odoo.fields.Many2one`" msgstr "" -#: ../../content/developer/reference/mixins.rst:244 +#: ../../content/developer/reference/backend/mixins.rst:244 msgid "link subtypes for automatic subscription; for example project subtypes are linked to task subtypes through this link. When someone is subscribed to a project, he will be subscribed to all tasks of this project with subtypes found using the parent subtype" msgstr "" -#: ../../content/developer/reference/mixins.rst:249 +#: ../../content/developer/reference/backend/mixins.rst:249 msgid "``relation_field`` - :class:`~odoo.fields.Char`" msgstr "" -#: ../../content/developer/reference/mixins.rst:249 +#: ../../content/developer/reference/backend/mixins.rst:249 msgid "as an example, when linking project and tasks subtypes, the relation field is the project_id field of tasks" msgstr "" -#: ../../content/developer/reference/mixins.rst:251 +#: ../../content/developer/reference/backend/mixins.rst:251 msgid "``res_model`` - :class:`~odoo.fields.Char`" msgstr "" -#: ../../content/developer/reference/mixins.rst:252 +#: ../../content/developer/reference/backend/mixins.rst:252 msgid "model the subtype applies to; if False, this subtype applies to all models" msgstr "" -#: ../../content/developer/reference/mixins.rst:253 +#: ../../content/developer/reference/backend/mixins.rst:253 msgid "``default`` - :class:`~odoo.fields.Boolean`" msgstr "" -#: ../../content/developer/reference/mixins.rst:254 -msgid "wether the subtype is activated by default when subscribing" +#: ../../content/developer/reference/backend/mixins.rst:254 +msgid "whether the subtype is activated by default when subscribing" msgstr "" -#: ../../content/developer/reference/mixins.rst:255 +#: ../../content/developer/reference/backend/mixins.rst:255 msgid "``sequence`` - :class:`~odoo.fields.Integer`" msgstr "" -#: ../../content/developer/reference/mixins.rst:256 +#: ../../content/developer/reference/backend/mixins.rst:256 msgid "used to order subtypes in the notification customization popup" msgstr "" -#: ../../content/developer/reference/mixins.rst:259 +#: ../../content/developer/reference/backend/mixins.rst:259 msgid "``hidden`` - :class:`~odoo.fields.Boolean`" msgstr "" -#: ../../content/developer/reference/mixins.rst:258 -msgid "wether the subtype is hidden in the notification customization popup" +#: ../../content/developer/reference/backend/mixins.rst:258 +msgid "whether the subtype is hidden in the notification customization popup" msgstr "" -#: ../../content/developer/reference/mixins.rst:261 +#: ../../content/developer/reference/backend/mixins.rst:261 msgid "Interfacing subtypes with field tracking allows to subscribe to different kind of notifications depending on what might interest users. To do this, you can override the ``_track_subtype()`` function:" msgstr "" -#: ../../content/developer/reference/mixins.rst:267 -#: ../../content/developer/reference/mixins.rst:349 +#: ../../content/developer/reference/backend/mixins.rst:267 +#: ../../content/developer/reference/backend/mixins.rst:349 msgid "Give the subtype triggered by the changes on the record according to values that have been updated." msgstr "" -#: ../../content/developer/reference/mixins.rst:270 +#: ../../content/developer/reference/backend/mixins.rst:270 msgid "the original values of the record; only modified fields are present in the dict" msgstr "" -#: ../../content/developer/reference/mixins.rst:272 -#: ../../content/developer/reference/mixins.rst:391 +#: ../../content/developer/reference/backend/mixins.rst:272 +#: ../../content/developer/reference/backend/mixins.rst:391 msgid "a subtype's full external id or False if no subtype is triggered" msgstr "" -#: ../../content/developer/reference/mixins.rst:277 +#: ../../content/developer/reference/backend/mixins.rst:277 msgid "Let's add a ``state`` field on our example class and trigger a notification with a specific subtype when this field change values." msgstr "" -#: ../../content/developer/reference/mixins.rst:280 +#: ../../content/developer/reference/backend/mixins.rst:280 msgid "First, let's define our subtype:" msgstr "" -#: ../../content/developer/reference/mixins.rst:292 +#: ../../content/developer/reference/backend/mixins.rst:292 msgid "Then, we need to override the ``track_subtype()`` function. This function is called by the tracking system to know which subtype should be used depending on the change currently being applied. In our case, we want to use our shiny new subtype when the ``state`` field changes from *draft* to *confirmed*:" msgstr "" -#: ../../content/developer/reference/mixins.rst:323 +#: ../../content/developer/reference/backend/mixins.rst:323 msgid "Customizing notifications" msgstr "" -#: ../../content/developer/reference/mixins.rst:325 +#: ../../content/developer/reference/backend/mixins.rst:325 msgid "When sending notifications to followers, it can be quite useful to add buttons in the template to allow quick actions directly from the e-mail. Even a simple button to link directly to the record's form view can be useful; however in most cases you don't want to display these buttons to portal users." msgstr "" -#: ../../content/developer/reference/mixins.rst:330 +#: ../../content/developer/reference/backend/mixins.rst:330 msgid "The notification system allows customizing notification templates in the following ways:" msgstr "" -#: ../../content/developer/reference/mixins.rst:333 +#: ../../content/developer/reference/backend/mixins.rst:333 msgid "Display *Access Buttons*: these buttons are visible at the top of the notification e-mail and allow the recipient to directly access the form view of the record" msgstr "" -#: ../../content/developer/reference/mixins.rst:335 +#: ../../content/developer/reference/backend/mixins.rst:335 msgid "Display *Follow Buttons*: these buttons allow the recipient to directly quickly subscribe from the record" msgstr "" -#: ../../content/developer/reference/mixins.rst:337 +#: ../../content/developer/reference/backend/mixins.rst:337 msgid "Display *Unfollow Buttons*: these buttons allow the recipient to directly quickly unsubscribe from the record" msgstr "" -#: ../../content/developer/reference/mixins.rst:339 +#: ../../content/developer/reference/backend/mixins.rst:339 msgid "Display *Custom Action Buttons*: these buttons are calls to specific routes and allow you to make some useful actions directly available from the e-mail (i.e. converting a lead to an opportunity, validating an expense sheet for an Expense Manager, etc.)" msgstr "" -#: ../../content/developer/reference/mixins.rst:344 -msgid "These buttons settings can be applied to different groups that you can define yourself by overriding the function ``_notification_recipients``." +#: ../../content/developer/reference/backend/mixins.rst:344 +msgid "These buttons settings can be applied to different groups that you can define yourself by overriding the function ``_notify_get_groups``." msgstr "" -#: ../../content/developer/reference/mixins.rst:352 +#: ../../content/developer/reference/backend/mixins.rst:352 msgid "``mail.message`` record currently being sent" msgstr "" -#: ../../content/developer/reference/mixins.rst:353 -msgid "list of tuple of the form (group_name, group_func,group_data) where: group_name is an identifier used only to be able to override and manipulate groups. Default groups are ``user`` (recipients linked to an employee user), ``portal`` (recipients linked to a portal user) and ``customer`` (recipients not linked to any user). An example of override use would be to add a group linked to a res.groups like Hr Officers to set specific action buttons to them. group_func is a function pointer taking a partner record as parameter. This method will be applied on recipients to know whether they belong to a given group or not. Only first matching group is kept. Evaluation order is the list order. group_data is a dict containing parameters for the notification email with the following possible keys - values: - has_button_access whether to display Access in email. True by default for new groups, False for portal / customer. - button_access dict with url and title of the button - has_button_follow whether to display Follow in email (if recipient is not currently following the thread). True by default for new groups, False for portal / customer. - button_follow dict with url adn title of the button - has_button_unfollow whether to display Unfollow in email (if recipient is currently following the thread). True by default for new groups, False for portal / customer. - button_unfollow dict with url and title of the button - actions list of action buttons to display in the notification email. Each action is a dict containing url and title of the button." +#: ../../content/developer/reference/backend/mixins.rst:353 +msgid "list of tuple of the form (group_name, group_func,group_data) where: group_name is an identifier used only to be able to override and manipulate groups. Default groups are ``user`` (recipients linked to an employee user), ``portal`` (recipients linked to a portal user) and ``customer`` (recipients not linked to any user). An example of override use would be to add a group linked to a res.groups like Hr Officers to set specific action buttons to them. group_func is a function pointer taking a partner record as parameter. This method will be applied on recipients to know whether they belong to a given group or not. Only first matching group is kept. Evaluation order is the list order. group_data is a dict containing parameters for the notification email with the following possible keys - values: - has_button_access whether to display Access in email. True by default for new groups, False for portal / customer. - button_access dict with url and title of the button - has_button_follow whether to display Follow in email (if recipient is not currently following the thread). True by default for new groups, False for portal / customer. - button_follow dict with url and title of the button - has_button_unfollow whether to display Unfollow in email (if recipient is currently following the thread). True by default for new groups, False for portal / customer. - button_unfollow dict with url and title of the button - actions list of action buttons to display in the notification email. Each action is a dict containing url and title of the button." msgstr "" -#: ../../content/developer/reference/mixins.rst:353 +#: ../../content/developer/reference/backend/mixins.rst:353 msgid "list of tuple of the form (group_name, group_func,group_data) where:" msgstr "" -#: ../../content/developer/reference/mixins.rst:360 +#: ../../content/developer/reference/backend/mixins.rst:360 msgid "group_name" msgstr "" -#: ../../content/developer/reference/mixins.rst:356 +#: ../../content/developer/reference/backend/mixins.rst:356 msgid "is an identifier used only to be able to override and manipulate groups. Default groups are ``user`` (recipients linked to an employee user), ``portal`` (recipients linked to a portal user) and ``customer`` (recipients not linked to any user). An example of override use would be to add a group linked to a res.groups like Hr Officers to set specific action buttons to them." msgstr "" -#: ../../content/developer/reference/mixins.rst:365 +#: ../../content/developer/reference/backend/mixins.rst:365 msgid "group_func" msgstr "" -#: ../../content/developer/reference/mixins.rst:363 +#: ../../content/developer/reference/backend/mixins.rst:363 msgid "is a function pointer taking a partner record as parameter. This method will be applied on recipients to know whether they belong to a given group or not. Only first matching group is kept. Evaluation order is the list order." msgstr "" -#: ../../content/developer/reference/mixins.rst:389 +#: ../../content/developer/reference/backend/mixins.rst:389 msgid "group_data" msgstr "" -#: ../../content/developer/reference/mixins.rst:368 +#: ../../content/developer/reference/backend/mixins.rst:368 msgid "is a dict containing parameters for the notification email with the following possible keys - values:" msgstr "" -#: ../../content/developer/reference/mixins.rst:372 +#: ../../content/developer/reference/backend/mixins.rst:372 msgid "has_button_access" msgstr "" -#: ../../content/developer/reference/mixins.rst:372 +#: ../../content/developer/reference/backend/mixins.rst:372 msgid "whether to display Access in email. True by default for new groups, False for portal / customer." msgstr "" -#: ../../content/developer/reference/mixins.rst:374 +#: ../../content/developer/reference/backend/mixins.rst:374 msgid "button_access" msgstr "" -#: ../../content/developer/reference/mixins.rst:375 -#: ../../content/developer/reference/mixins.rst:386 +#: ../../content/developer/reference/backend/mixins.rst:375 +#: ../../content/developer/reference/backend/mixins.rst:381 +#: ../../content/developer/reference/backend/mixins.rst:386 msgid "dict with url and title of the button" msgstr "" -#: ../../content/developer/reference/mixins.rst:378 +#: ../../content/developer/reference/backend/mixins.rst:378 msgid "has_button_follow" msgstr "" -#: ../../content/developer/reference/mixins.rst:377 +#: ../../content/developer/reference/backend/mixins.rst:377 msgid "whether to display Follow in email (if recipient is not currently following the thread). True by default for new groups, False for portal / customer." msgstr "" -#: ../../content/developer/reference/mixins.rst:380 +#: ../../content/developer/reference/backend/mixins.rst:380 msgid "button_follow" msgstr "" -#: ../../content/developer/reference/mixins.rst:381 -msgid "dict with url adn title of the button" -msgstr "" - -#: ../../content/developer/reference/mixins.rst:383 +#: ../../content/developer/reference/backend/mixins.rst:383 msgid "has_button_unfollow" msgstr "" -#: ../../content/developer/reference/mixins.rst:383 +#: ../../content/developer/reference/backend/mixins.rst:383 msgid "whether to display Unfollow in email (if recipient is currently following the thread). True by default for new groups, False for portal / customer." msgstr "" -#: ../../content/developer/reference/mixins.rst:385 +#: ../../content/developer/reference/backend/mixins.rst:385 msgid "button_unfollow" msgstr "" -#: ../../content/developer/reference/mixins.rst:389 +#: ../../content/developer/reference/backend/mixins.rst:389 msgid "actions" msgstr "" -#: ../../content/developer/reference/mixins.rst:388 +#: ../../content/developer/reference/backend/mixins.rst:388 msgid "list of action buttons to display in the notification email. Each action is a dict containing url and title of the button." msgstr "" -#: ../../content/developer/reference/mixins.rst:394 -msgid "The urls in the actions list can be generated automatically by calling the ``_notification_link_helper()`` function:" +#: ../../content/developer/reference/backend/mixins.rst:394 +msgid "The urls in the actions list can be generated automatically by calling the ``_notify_get_action_link()`` function:" msgstr "" -#: ../../content/developer/reference/mixins.rst:400 +#: ../../content/developer/reference/backend/mixins.rst:400 msgid "Generate a link for the given type on the current record (or on a specific record if the kwargs ``model`` and ``res_id`` are set)." msgstr "" -#: ../../content/developer/reference/mixins.rst:403 +#: ../../content/developer/reference/backend/mixins.rst:403 msgid "link type to be generated; can be any of these values: ``view`` link to form view of the record ``assign`` assign the logged user to the ``user_id`` field of the record (if it exists) ``follow`` self-explanatory ``unfollow`` self-explanatory ``method`` call a method on the record; the method's name should be provided as the kwarg ``method`` ``new`` open an empty form view for a new record; you can specify a specific action by providing its id (database id or fully resolved external id) in the kwarg ``action_id``" msgstr "" -#: ../../content/developer/reference/mixins.rst:403 +#: ../../content/developer/reference/backend/mixins.rst:403 msgid "link type to be generated; can be any of these values:" msgstr "" -#: ../../content/developer/reference/mixins.rst:405 -#: ../../content/developer/reference/views.rst:579 +#: ../../content/developer/reference/backend/mixins.rst:405 +#: ../../content/developer/reference/backend/views.rst:617 msgid "``view``" msgstr "" -#: ../../content/developer/reference/mixins.rst:406 +#: ../../content/developer/reference/backend/mixins.rst:406 msgid "link to form view of the record" msgstr "" -#: ../../content/developer/reference/mixins.rst:408 +#: ../../content/developer/reference/backend/mixins.rst:408 msgid "``assign``" msgstr "" -#: ../../content/developer/reference/mixins.rst:408 +#: ../../content/developer/reference/backend/mixins.rst:408 msgid "assign the logged user to the ``user_id`` field of the record (if it exists)" msgstr "" -#: ../../content/developer/reference/mixins.rst:410 +#: ../../content/developer/reference/backend/mixins.rst:410 msgid "``follow``" msgstr "" -#: ../../content/developer/reference/mixins.rst:411 -#: ../../content/developer/reference/mixins.rst:413 -#: ../../content/developer/reference/views.rst:1276 -#: ../../content/developer/reference/views.rst:1278 +#: ../../content/developer/reference/backend/mixins.rst:411 +#: ../../content/developer/reference/backend/mixins.rst:413 +#: ../../content/developer/reference/backend/views.rst:1638 +#: ../../content/developer/reference/backend/views.rst:1640 msgid "self-explanatory" msgstr "" -#: ../../content/developer/reference/mixins.rst:412 +#: ../../content/developer/reference/backend/mixins.rst:412 msgid "``unfollow``" msgstr "" -#: ../../content/developer/reference/mixins.rst:415 +#: ../../content/developer/reference/backend/mixins.rst:415 msgid "``method``" msgstr "" -#: ../../content/developer/reference/mixins.rst:415 +#: ../../content/developer/reference/backend/mixins.rst:415 msgid "call a method on the record; the method's name should be provided as the kwarg ``method``" msgstr "" -#: ../../content/developer/reference/mixins.rst:420 +#: ../../content/developer/reference/backend/mixins.rst:420 msgid "``new``" msgstr "" -#: ../../content/developer/reference/mixins.rst:418 +#: ../../content/developer/reference/backend/mixins.rst:418 msgid "open an empty form view for a new record; you can specify a specific action by providing its id (database id or fully resolved external id) in the kwarg ``action_id``" msgstr "" -#: ../../content/developer/reference/mixins.rst:422 +#: ../../content/developer/reference/backend/mixins.rst:422 msgid "link of the type selected for the record" msgstr "" -#: ../../content/developer/reference/mixins.rst:427 +#: ../../content/developer/reference/backend/mixins.rst:427 msgid "Let's add a custom button to the Business Trip state change notification; this button will reset the state to Draft and will be only visible to a member of the (imaginary) group Travel Manager (``business.group_trip_manager``)" msgstr "" -#: ../../content/developer/reference/mixins.rst:466 +#: ../../content/developer/reference/backend/mixins.rst:466 msgid "Note that that I could have defined my evaluation function outside of this method and define a global function to do it instead of a lambda, but for the sake of being more brief and less verbose in these documentation files that can sometimes be boring, I choose the former instead of the latter." msgstr "" -#: ../../content/developer/reference/mixins.rst:472 +#: ../../content/developer/reference/backend/mixins.rst:472 msgid "Overriding defaults" msgstr "" -#: ../../content/developer/reference/mixins.rst:474 +#: ../../content/developer/reference/backend/mixins.rst:474 msgid "There are several ways you can customize the behaviour of ``mail.thread`` models, including (but not limited to):" msgstr "" -#: ../../content/developer/reference/mixins.rst:479 +#: ../../content/developer/reference/backend/mixins.rst:479 msgid "``_mail_post_access`` - :class:`~odoo.models.Model` attribute" msgstr "" -#: ../../content/developer/reference/mixins.rst:478 +#: ../../content/developer/reference/backend/mixins.rst:478 msgid "the required access rights to be able to post a message on the model; by default a ``write`` access is needed, can be set to ``read`` as well" msgstr "" -#: ../../content/developer/reference/mixins.rst:499 +#: ../../content/developer/reference/backend/mixins.rst:499 msgid "Context keys:" msgstr "" -#: ../../content/developer/reference/mixins.rst:482 +#: ../../content/developer/reference/backend/mixins.rst:482 msgid "These context keys can be used to somewhat control ``mail.thread`` features like auto-subscription or field tracking during calls to ``create()`` or ``write()`` (or any other method where it may be useful)." msgstr "" -#: ../../content/developer/reference/mixins.rst:486 +#: ../../content/developer/reference/backend/mixins.rst:486 msgid "``mail_create_nosubscribe``: at create or message_post, do not subscribe the current user to the record thread" msgstr "" -#: ../../content/developer/reference/mixins.rst:488 +#: ../../content/developer/reference/backend/mixins.rst:488 msgid "``mail_create_nolog``: at create, do not log the automatic ' created' message" msgstr "" -#: ../../content/developer/reference/mixins.rst:490 +#: ../../content/developer/reference/backend/mixins.rst:490 msgid "``mail_notrack``: at create and write, do not perform the value tracking creating messages" msgstr "" -#: ../../content/developer/reference/mixins.rst:492 +#: ../../content/developer/reference/backend/mixins.rst:492 msgid "``tracking_disable``: at create and write, perform no MailThread features (auto subscription, tracking, post, ...)" msgstr "" -#: ../../content/developer/reference/mixins.rst:494 +#: ../../content/developer/reference/backend/mixins.rst:494 msgid "``mail_auto_delete``: auto delete mail notifications; True by default" msgstr "" -#: ../../content/developer/reference/mixins.rst:495 +#: ../../content/developer/reference/backend/mixins.rst:495 msgid "``mail_notify_force_send``: if less than 50 email notifications to send, send them directly instead of using the queue; True by default" msgstr "" -#: ../../content/developer/reference/mixins.rst:497 +#: ../../content/developer/reference/backend/mixins.rst:497 msgid "``mail_notify_user_signature``: add the current user signature in email notifications; True by default" msgstr "" -#: ../../content/developer/reference/mixins.rst:504 +#: ../../content/developer/reference/backend/mixins.rst:504 msgid "Mail alias" msgstr "" -#: ../../content/developer/reference/mixins.rst:506 +#: ../../content/developer/reference/backend/mixins.rst:506 msgid "Aliases are configurable email addresses that are linked to a specific record (which usually inherits the ``mail.alias.mixin`` model) that will create new records when contacted via e-mail. They are an easy way to make your system accessible from the outside, allowing users or customers to quickly create records in your database without needing to connect to Odoo directly." msgstr "" -#: ../../content/developer/reference/mixins.rst:513 +#: ../../content/developer/reference/backend/mixins.rst:513 msgid "Aliases vs. Incoming Mail Gateway" msgstr "" -#: ../../content/developer/reference/mixins.rst:515 +#: ../../content/developer/reference/backend/mixins.rst:515 msgid "Some people use the Incoming Mail Gateway for this same purpose. You still need a correctly configured mail gateway to use aliases, however a single catchall domain will be sufficient since all routing will be done inside Odoo. Aliases have several advantages over Mail Gateways:" msgstr "" -#: ../../content/developer/reference/mixins.rst:523 +#: ../../content/developer/reference/backend/mixins.rst:523 msgid "Easier to configure" msgstr "" -#: ../../content/developer/reference/mixins.rst:521 +#: ../../content/developer/reference/backend/mixins.rst:521 msgid "A single incoming gateway can be used by many aliases; this avoids having to configure multiple emails on your domain name (all configuration is done inside Odoo)" msgstr "" -#: ../../content/developer/reference/mixins.rst:524 +#: ../../content/developer/reference/backend/mixins.rst:524 msgid "No need for System access rights to configure aliases" msgstr "" -#: ../../content/developer/reference/mixins.rst:525 +#: ../../content/developer/reference/backend/mixins.rst:525 msgid "More coherent" msgstr "" -#: ../../content/developer/reference/mixins.rst:526 +#: ../../content/developer/reference/backend/mixins.rst:526 msgid "Configurable on the related record, not in a Settings submenu" msgstr "" -#: ../../content/developer/reference/mixins.rst:531 +#: ../../content/developer/reference/backend/mixins.rst:531 msgid "Easier to override server-side" msgstr "" -#: ../../content/developer/reference/mixins.rst:528 +#: ../../content/developer/reference/backend/mixins.rst:528 msgid "Mixin model is built to be extended from the start, allowing you to extract useful data from incoming e-mails more easily than with a mail gateway." msgstr "" -#: ../../content/developer/reference/mixins.rst:534 +#: ../../content/developer/reference/backend/mixins.rst:534 msgid "Alias support integration" msgstr "" -#: ../../content/developer/reference/mixins.rst:536 +#: ../../content/developer/reference/backend/mixins.rst:536 msgid "Aliases are usually configured on a parent model which will then create specific record when contacted by e-mail. For example, Project have aliases to create tasks or issues, Sales Team have aliases to generate Leads." msgstr "" -#: ../../content/developer/reference/mixins.rst:540 +#: ../../content/developer/reference/backend/mixins.rst:540 msgid "The model that will be created by the alias **must** inherit the ``mail_thread`` model." msgstr "" -#: ../../content/developer/reference/mixins.rst:543 +#: ../../content/developer/reference/backend/mixins.rst:543 msgid "Alias support is added by inheriting ``mail.alias.mixin``; this mixin will generate a new ``mail.alias`` record for each record of the parent class that gets created (for example, every ``project.project`` record having its ``mail.alias`` record initialized on creation)." msgstr "" -#: ../../content/developer/reference/mixins.rst:548 +#: ../../content/developer/reference/backend/mixins.rst:548 msgid "Aliases can also be created manually and supported by a simple :class:`~odoo.fields.Many2one` field. This guide assumes you wish a more complete integration with automatic creation of the alias, record-specific default values, etc." msgstr "" -#: ../../content/developer/reference/mixins.rst:553 +#: ../../content/developer/reference/backend/mixins.rst:553 msgid "Unlike ``mail.thread`` inheritance, the ``mail.alias.mixin`` **requires** some specific overrides to work correctly. These overrides will specify the values of the created alias, like the kind of record it must create and possibly some default values these records may have depending on the parent object:" msgstr "" -#: ../../content/developer/reference/mixins.rst:560 +#: ../../content/developer/reference/backend/mixins.rst:560 msgid "Return the model name for the alias. Incoming emails that are not replies to existing records will cause the creation of a new record of this alias model. The value may depend on ``vals``, the dict of values passed to ``create`` when a record of this model is created." msgstr "" -#: ../../content/developer/reference/mixins.rst:565 +#: ../../content/developer/reference/backend/mixins.rst:565 msgid "values of the newly created record that will holding the alias" msgstr "" -#: ../../content/developer/reference/mixins.rst:567 +#: ../../content/developer/reference/backend/mixins.rst:567 msgid "model name" msgstr "" -#: ../../content/developer/reference/mixins.rst:572 +#: ../../content/developer/reference/backend/mixins.rst:572 msgid "Return values to create an alias, or to write on the alias after its creation. While not completely mandatory, it is usually required to make sure that newly created records will be linked to the alias' parent (i.e. tasks getting created in the right project) by setting a dictionary of default values in the alias' ``alias_defaults`` field." msgstr "" -#: ../../content/developer/reference/mixins.rst:578 -msgid "dictionnary of values that will be written to the new alias" +#: ../../content/developer/reference/backend/mixins.rst:578 +msgid "dictionary of values that will be written to the new alias" msgstr "" -#: ../../content/developer/reference/mixins.rst:581 +#: ../../content/developer/reference/backend/mixins.rst:581 msgid "The ``_get_alias_values()`` override is particularly interesting as it allows you to modify the behaviour of your aliases easily. Among the fields that can be set on the alias, the following are of particular interest:" msgstr "" -#: ../../content/developer/reference/mixins.rst:586 +#: ../../content/developer/reference/backend/mixins.rst:586 msgid "``alias_name`` - :class:`~odoo.fields.Char`" msgstr "" -#: ../../content/developer/reference/mixins.rst:586 +#: ../../content/developer/reference/backend/mixins.rst:586 msgid "name of the email alias, e.g. 'jobs' if you want to catch emails for " msgstr "" -#: ../../content/developer/reference/mixins.rst:591 +#: ../../content/developer/reference/backend/mixins.rst:591 msgid "``alias_user_id`` - :class:`~odoo.fields.Many2one` (``res.users``)" msgstr "" -#: ../../content/developer/reference/mixins.rst:589 +#: ../../content/developer/reference/backend/mixins.rst:589 msgid "owner of records created upon receiving emails on this alias; if this field is not set the system will attempt to find the right owner based on the sender (From) address, or will use the Administrator account if no system user is found for that address" msgstr "" -#: ../../content/developer/reference/mixins.rst:594 +#: ../../content/developer/reference/backend/mixins.rst:594 msgid "``alias_defaults`` - :class:`~odoo.fields.Text`" msgstr "" -#: ../../content/developer/reference/mixins.rst:594 +#: ../../content/developer/reference/backend/mixins.rst:594 msgid "Python dictionary that will be evaluated to provide default values when creating new records for this alias" msgstr "" -#: ../../content/developer/reference/mixins.rst:598 +#: ../../content/developer/reference/backend/mixins.rst:598 msgid "``alias_force_thread_id`` - :class:`~odoo.fields.Integer`" msgstr "" -#: ../../content/developer/reference/mixins.rst:597 +#: ../../content/developer/reference/backend/mixins.rst:597 msgid "optional ID of a thread (record) to which all incoming messages will be attached, even if they did not reply to it; if set, this will disable the creation of new records completely" msgstr "" -#: ../../content/developer/reference/mixins.rst:605 +#: ../../content/developer/reference/backend/mixins.rst:605 msgid "``alias_contact`` - :class:`~odoo.fields.Selection`" msgstr "" -#: ../../content/developer/reference/mixins.rst:601 +#: ../../content/developer/reference/backend/mixins.rst:601 msgid "Policy to post a message on the document using the mailgateway" msgstr "" -#: ../../content/developer/reference/mixins.rst:603 +#: ../../content/developer/reference/backend/mixins.rst:603 msgid "*everyone*: everyone can post" msgstr "" -#: ../../content/developer/reference/mixins.rst:604 +#: ../../content/developer/reference/backend/mixins.rst:604 msgid "*partners*: only authenticated partners" msgstr "" -#: ../../content/developer/reference/mixins.rst:605 +#: ../../content/developer/reference/backend/mixins.rst:605 msgid "*followers*: only followers of the related document or members of following channels" msgstr "" -#: ../../content/developer/reference/mixins.rst:607 +#: ../../content/developer/reference/backend/mixins.rst:607 msgid "Note that aliases make use of :ref:`delegation inheritance `, which means that while the alias is stored in another table, you have access to all these fields directly from your parent object. This allows you to make your alias easily configurable from the record's form view." msgstr "" -#: ../../content/developer/reference/mixins.rst:614 +#: ../../content/developer/reference/backend/mixins.rst:614 msgid "Let's add aliases on our business trip class to create expenses on the fly via e-mail." msgstr "" -#: ../../content/developer/reference/mixins.rst:662 +#: ../../content/developer/reference/backend/mixins.rst:662 msgid "We would like our alias to be easily configurable from the form view of our business trips, so let's add the following to our form view:" msgstr "" -#: ../../content/developer/reference/mixins.rst:687 +#: ../../content/developer/reference/backend/mixins.rst:687 msgid "Now we can change the alias address directly from the form view and change who can send e-mails to the alias." msgstr "" -#: ../../content/developer/reference/mixins.rst:690 +#: ../../content/developer/reference/backend/mixins.rst:690 msgid "We can then override ``message_new()`` on our expense model to fetch the values from our email when the expense will be created:" msgstr "" -#: ../../content/developer/reference/mixins.rst:727 +#: ../../content/developer/reference/backend/mixins.rst:727 msgid "Activities tracking" msgstr "" -#: ../../content/developer/reference/mixins.rst:729 +#: ../../content/developer/reference/backend/mixins.rst:729 msgid "Activities are actions users have to take on a document like making a phone call or organizing a meeting. Activities come with the mail module as they are integrated in the Chatter but are *not bundled with mail.thread*. Activities are records of the ``mail.activity`` class, which have a type (``mail.activity.type``), name, description, scheduled time (among others). Pending activities are visible above the message history in the chatter widget." msgstr "" -#: ../../content/developer/reference/mixins.rst:736 +#: ../../content/developer/reference/backend/mixins.rst:736 msgid "You can integrate activities using the ``mail.activity.mixin`` class on your object and the specific widgets to display them (via the field ``activity_ids``) in the form view and kanban view of your records (``mail_activity`` and ``kanban_activity`` widgets, respectively)." msgstr "" -#: ../../content/developer/reference/mixins.rst:743 +#: ../../content/developer/reference/backend/mixins.rst:743 msgid "Organizing a business trip is a tedious process and tracking needed activities like ordering plane tickets or a cab for the airport could be useful. To do so, we will add the activities mixin on our model and display the next planned activities in the message history of our trip." msgstr "" -#: ../../content/developer/reference/mixins.rst:758 -msgid "We modify the form view of our trips to display their next activites:" +#: ../../content/developer/reference/backend/mixins.rst:758 +msgid "We modify the form view of our trips to display their next activities:" msgstr "" -#: ../../content/developer/reference/mixins.rst:777 -#: ../../content/developer/reference/mixins.rst:853 -#: ../../content/developer/reference/mixins.rst:1072 +#: ../../content/developer/reference/backend/mixins.rst:777 +#: ../../content/developer/reference/backend/mixins.rst:853 +#: ../../content/developer/reference/backend/mixins.rst:1072 msgid "You can find concrete examples of integration in the following models:" msgstr "" -#: ../../content/developer/reference/mixins.rst:779 -#: ../../content/developer/reference/mixins.rst:855 +#: ../../content/developer/reference/backend/mixins.rst:779 +#: ../../content/developer/reference/backend/mixins.rst:855 msgid "``crm.lead`` in the CRM (*crm*) Application" msgstr "" -#: ../../content/developer/reference/mixins.rst:780 +#: ../../content/developer/reference/backend/mixins.rst:780 msgid "``sale.order`` in the Sales (*sale*) Application" msgstr "" -#: ../../content/developer/reference/mixins.rst:781 -msgid "``project.task`` in the Project (*poject*) Application" +#: ../../content/developer/reference/backend/mixins.rst:781 +msgid "``project.task`` in the Project (*project*) Application" msgstr "" -#: ../../content/developer/reference/mixins.rst:787 +#: ../../content/developer/reference/backend/mixins.rst:787 msgid "Website features" msgstr "" -#: ../../content/developer/reference/mixins.rst:792 +#: ../../content/developer/reference/backend/mixins.rst:792 msgid "Visitor tracking" msgstr "" -#: ../../content/developer/reference/mixins.rst:794 +#: ../../content/developer/reference/backend/mixins.rst:794 msgid "The ``utm.mixin`` class can be used to track online marketing/communication campaigns through arguments in links to specified resources. The mixin adds 3 fields to your model:" msgstr "" -#: ../../content/developer/reference/mixins.rst:798 +#: ../../content/developer/reference/backend/mixins.rst:798 msgid "``campaign_id``: :class:`~odoo.fields.Many2one` field to a ``utm.campaign`` object (i.e. Christmas_Special, Fall_Collection, etc.)" msgstr "" -#: ../../content/developer/reference/mixins.rst:800 +#: ../../content/developer/reference/backend/mixins.rst:800 msgid "``source_id``: :class:`~odoo.fields.Many2one` field to a ``utm.source`` object (i.e. Search Engine, mailing list, etc.)" msgstr "" -#: ../../content/developer/reference/mixins.rst:802 +#: ../../content/developer/reference/backend/mixins.rst:802 msgid "``medium_id``: :class:`~odoo.fields.Many2one` field to a ``utm.medium`` object (i.e. Snail Mail, e-Mail, social network update, etc.)" msgstr "" -#: ../../content/developer/reference/mixins.rst:805 +#: ../../content/developer/reference/backend/mixins.rst:805 msgid "These models have a single field ``name`` (i.e. they are simply there to distinguish campaigns but don't have any specific behaviour)." msgstr "" -#: ../../content/developer/reference/mixins.rst:808 +#: ../../content/developer/reference/backend/mixins.rst:808 msgid "Once a customer visits your website with these parameters set in the url (i.e. https://www.odoo.com/?campaign_id=mixin_talk&source_id=www.odoo.com&medium_id=website), three cookies are set in the visitor's website for these parameters. Once a object that inherits the utm.mixin is created from the website (i.e. lead form, job application, etc.), the utm.mixin code kicks in and fetches the values from the cookies to set them in the new record. Once this is done, you can then use the campaign/source/medium fields as any other field when defining reports and views (group by, etc.)." msgstr "" -#: ../../content/developer/reference/mixins.rst:817 +#: ../../content/developer/reference/backend/mixins.rst:817 msgid "To extend this behaviour, simply add a relational field to a simple model (the model should support the *quick create* (i.e. call to ``create()`` with a single ``name`` value) and extend the function ``tracking_fields()``:" msgstr "" -#: ../../content/developer/reference/mixins.rst:846 +#: ../../content/developer/reference/backend/mixins.rst:846 msgid "This will tell the system to create a cookie named *odoo_utm_my_field* with the value found in the url parameter ``my_field``; once a new record of this model is created by a call from a website form, the generic override of the ``create()`` method of ``utm.mixin`` will fetch the default values for this field from the cookie (and the ``my_module.my_track`` record will be creatwed on the fly if it does not exist yet)." msgstr "" -#: ../../content/developer/reference/mixins.rst:856 +#: ../../content/developer/reference/backend/mixins.rst:856 msgid "``hr.applicant`` in the Recruitment Process (*hr_recruitment*) Application" msgstr "" -#: ../../content/developer/reference/mixins.rst:857 -#: ../../content/developer/reference/mixins.rst:1075 +#: ../../content/developer/reference/backend/mixins.rst:857 +#: ../../content/developer/reference/backend/mixins.rst:1075 msgid "``helpdesk.ticket`` in the Helpdesk (*helpdesk* - Odoo Enterprise only) Application" msgstr "" -#: ../../content/developer/reference/mixins.rst:862 +#: ../../content/developer/reference/backend/mixins.rst:862 msgid "Website visibility" msgstr "" -#: ../../content/developer/reference/mixins.rst:864 +#: ../../content/developer/reference/backend/mixins.rst:864 msgid "You can quite easily add a website visibility toggle on any of your record. While this mixin is quite easy to implement manually, it is the most often-used after the ``mail.thread`` inheritance; a testament to its usefulness. The typical use case for this mixin is any object that has a frontend-page; being able to control the visibility of the page allows you to take your time while editing the page and only publish it when you're satisfied." msgstr "" -#: ../../content/developer/reference/mixins.rst:871 -msgid "To include the functionnality, you only need to inherit ``website.published.mixin``:" +#: ../../content/developer/reference/backend/mixins.rst:871 +msgid "To include the functionality, you only need to inherit ``website.published.mixin``:" msgstr "" -#: ../../content/developer/reference/mixins.rst:880 +#: ../../content/developer/reference/backend/mixins.rst:880 msgid "This mixin adds 2 fields on your model:" msgstr "" -#: ../../content/developer/reference/mixins.rst:882 +#: ../../content/developer/reference/backend/mixins.rst:882 msgid "``website_published``: :class:`~odoo.fields.Boolean` field which represents the status of the publication" msgstr "" -#: ../../content/developer/reference/mixins.rst:884 +#: ../../content/developer/reference/backend/mixins.rst:884 msgid "``website_url``: :class:`~odoo.fields.Char` field which represents the URL through which the object is accessed" msgstr "" -#: ../../content/developer/reference/mixins.rst:887 +#: ../../content/developer/reference/backend/mixins.rst:887 msgid "Note that this last field is a computed field and must be implemented for your class:" msgstr "" -#: ../../content/developer/reference/mixins.rst:895 +#: ../../content/developer/reference/backend/mixins.rst:895 msgid "Once the mechanism is in place, you just have to adapt your frontend and backend views to make it accessible. In the backend, adding a button in the button box is usually the way to go:" msgstr "" -#: ../../content/developer/reference/mixins.rst:906 +#: ../../content/developer/reference/backend/mixins.rst:906 msgid "In the frontend, some security checks are needed to avoid showing 'Editing' buttons to website visitors:" msgstr "" -#: ../../content/developer/reference/mixins.rst:920 +#: ../../content/developer/reference/backend/mixins.rst:920 msgid "Note that you must pass your object as the variable ``object`` to the template; in this example, the ``blog.post`` record was passed as the ``blog_post`` variable to the ``qweb`` rendering engine, it is necessary to specify this to the publish management template. The ``publish_edit`` variable allow the frontend button to link to the backend (allowing you to switch from frontend to backend and vice-versa easily); if set, you must specify the full external id of the action you want to call in the backend in the ``action`` variable (note that a Form View must exist for the model)." msgstr "" -#: ../../content/developer/reference/mixins.rst:929 +#: ../../content/developer/reference/backend/mixins.rst:929 msgid "The action ``website_publish_button`` is defined in the mixin and adapts its behaviour to your object: if the class has a valid ``website_url`` compute function, the user is redirected to the frontend when he clicks on the button; the user can then publish the page directly from the frontend. This ensures that no online publication can happen by accident. If there is not compute function, the boolean ``website_published`` is simply triggered." msgstr "" -#: ../../content/developer/reference/mixins.rst:939 +#: ../../content/developer/reference/backend/mixins.rst:939 msgid "Website metadata" msgstr "" -#: ../../content/developer/reference/mixins.rst:941 +#: ../../content/developer/reference/backend/mixins.rst:941 msgid "This simple mixin simply allows you to easily inject metadata in your frontend pages." msgstr "" -#: ../../content/developer/reference/mixins.rst:951 +#: ../../content/developer/reference/backend/mixins.rst:951 msgid "This mixin adds 3 fields on your model:" msgstr "" -#: ../../content/developer/reference/mixins.rst:953 +#: ../../content/developer/reference/backend/mixins.rst:953 msgid "``website_meta_title``: :class:`~odoo.fields.Char` field that allow you to set an additional title to your page" msgstr "" -#: ../../content/developer/reference/mixins.rst:955 +#: ../../content/developer/reference/backend/mixins.rst:955 msgid "``website_meta_description``: :class:`~odoo.fields.Char` field that contains a short description of the page (sometimes used in search engines results)" msgstr "" -#: ../../content/developer/reference/mixins.rst:957 +#: ../../content/developer/reference/backend/mixins.rst:957 msgid "``website_meta_keywords``: :class:`~odoo.fields.Char` field that contains some keywords to help your page to be classified more precisely by search engines; the \"Promote\" tool will help you select lexically-related keywords easily" msgstr "" -#: ../../content/developer/reference/mixins.rst:961 +#: ../../content/developer/reference/backend/mixins.rst:961 msgid "These fields are editable in the frontend using the \"Promote\" tool from the Editor toolbar. Setting these fields can help search engines to better index your pages. Note that search engines do not base their results only on these metadata; the best SEO practice should still be to get referenced by reliable sources." msgstr "" -#: ../../content/developer/reference/mixins.rst:969 +#: ../../content/developer/reference/backend/mixins.rst:969 msgid "Others" msgstr "" -#: ../../content/developer/reference/mixins.rst:974 +#: ../../content/developer/reference/backend/mixins.rst:974 msgid "Customer Rating" msgstr "" -#: ../../content/developer/reference/mixins.rst:976 +#: ../../content/developer/reference/backend/mixins.rst:976 msgid "The rating mixin allows sending email to ask for customer rating, automatic transitioning in a kanban processes and aggregating statistics on your ratings." msgstr "" -#: ../../content/developer/reference/mixins.rst:980 +#: ../../content/developer/reference/backend/mixins.rst:980 msgid "Adding rating on your model" msgstr "" -#: ../../content/developer/reference/mixins.rst:982 +#: ../../content/developer/reference/backend/mixins.rst:982 msgid "To add rating support, simply inherit the ``rating.mixin`` model:" msgstr "" -#: ../../content/developer/reference/mixins.rst:993 +#: ../../content/developer/reference/backend/mixins.rst:993 msgid "The behaviour of the mixin adapts to your model:" msgstr "" -#: ../../content/developer/reference/mixins.rst:995 +#: ../../content/developer/reference/backend/mixins.rst:995 msgid "The ``rating.rating`` record will be linked to the ``partner_id`` field of your model (if the field is present)." msgstr "" -#: ../../content/developer/reference/mixins.rst:998 +#: ../../content/developer/reference/backend/mixins.rst:998 msgid "this behaviour can be overridden with the function ``rating_get_partner_id()`` if you use another field than ``partner_id``" msgstr "" -#: ../../content/developer/reference/mixins.rst:1001 +#: ../../content/developer/reference/backend/mixins.rst:1001 msgid "The ``rating.rating`` record will be linked to the partner of the ``user_id`` field of your model (if the field is present) (i.e. the partner who is rated)" msgstr "" -#: ../../content/developer/reference/mixins.rst:1004 +#: ../../content/developer/reference/backend/mixins.rst:1004 msgid "this behaviour can be overridden with the function ``rating_get_rated_partner_id()`` if you use another field than ``user_id`` (note that the function must return a ``res.partner``, for ``user_id`` the system automatically fetches the partner of the user)" msgstr "" -#: ../../content/developer/reference/mixins.rst:1009 +#: ../../content/developer/reference/backend/mixins.rst:1009 msgid "The chatter history will display the rating event (if your model inherits from ``mail.thread``)" msgstr "" -#: ../../content/developer/reference/mixins.rst:1013 +#: ../../content/developer/reference/backend/mixins.rst:1013 msgid "Send rating requests by e-mail" msgstr "" -#: ../../content/developer/reference/mixins.rst:1015 +#: ../../content/developer/reference/backend/mixins.rst:1015 msgid "If you wish to send emails to request a rating, simply generate an e-mail with links to the rating object. A very basic email template could look like this:" msgstr "" -#: ../../content/developer/reference/mixins.rst:1039 +#: ../../content/developer/reference/backend/mixins.rst:1039 msgid "Your customer will then receive an e-mail with links to a simple webpage allowing them to provide a feedback on their interaction with your users (including a free-text feedback message)." msgstr "" -#: ../../content/developer/reference/mixins.rst:1043 +#: ../../content/developer/reference/backend/mixins.rst:1043 msgid "You can then quite easily integrate your ratings with your form view by defining an action for the ratings:" msgstr "" -#: ../../content/developer/reference/mixins.rst:1069 +#: ../../content/developer/reference/backend/mixins.rst:1069 msgid "Note that there are default views (kanban,pivot,graph) for ratings which allow you a quick bird's eye view of your customer ratings." msgstr "" -#: ../../content/developer/reference/mixins.rst:1074 +#: ../../content/developer/reference/backend/mixins.rst:1074 msgid "``project.task`` in the Project (*rating_project*) Application" msgstr "" -#: ../../content/developer/reference/mobile.rst:6 -msgid "Mobile JavaScript" -msgstr "" - -#: ../../content/developer/reference/mobile.rst:11 -msgid "In Odoo 10.0 we released a mobile app which allows you to access all **Odoo apps** (even your customized modules)." -msgstr "" - -#: ../../content/developer/reference/mobile.rst:14 -msgid "The application is a combination of **Odoo Web** and **Native Mobile components**. In other words it is a Odoo Web instance loaded inside a native, mobile, WebView container." -msgstr "" - -#: ../../content/developer/reference/mobile.rst:17 -msgid "This page documents how you can access mobile native components like Camera, Vibration, Notification and Toast through Odoo Web (via JavaScript). For this, you do not need to be a mobile developer, if you know Odoo JavaScript API you can access all available mobile features." -msgstr "" - -#: ../../content/developer/reference/mobile.rst:22 -msgid "These features work with **Odoo Enterprise 10.0+** only" -msgstr "" - -#: ../../content/developer/reference/mobile.rst:25 -msgid "How does it work?" -msgstr "" - -#: ../../content/developer/reference/mobile.rst:27 -msgid "Internal workings of the mobile application:" -msgstr "" - -#: ../../content/developer/reference/mobile.rst:31 -msgid "Of course, it is a web page that loads on a Mobile Native Web container. But it is integrated in such a way that you can access native resources from your web JavaScript." -msgstr "" - -#: ../../content/developer/reference/mobile.rst:35 -msgid "WebPages (Odoo Web) is on the top of each layer, where the second layer is a Bridge between Odoo Web (JS) and the native mobile components." -msgstr "" - -#: ../../content/developer/reference/mobile.rst:38 -msgid "When any call from JavaScript is triggered it passes through Bridge and Bridge passes it to the native invoker to perform that action." -msgstr "" - -#: ../../content/developer/reference/mobile.rst:41 -msgid "When the native component has done its work, it is passed to the Bridge again and you get the output in JavaScript." -msgstr "" - -#: ../../content/developer/reference/mobile.rst:44 -msgid "Process time taken by the Native component depends on what you are requesting from the Native resources. For example the Camera or GPS Location." -msgstr "" - -#: ../../content/developer/reference/mobile.rst:48 -msgid "How to use it?" -msgstr "" - -#: ../../content/developer/reference/mobile.rst:50 -msgid "Just like the Odoo Web Framework, the Mobile API can be used anywhere by getting the object from **web_mobile.rpc**" -msgstr "" - -#: ../../content/developer/reference/mobile.rst:55 -msgid "The mobile RPC object provides a list of methods that are available (this only works with the mobile app)." -msgstr "" - -#: ../../content/developer/reference/mobile.rst:58 -msgid "Check if the method is available and then execute it." -msgstr "" - -#: ../../content/developer/reference/mobile.rst:61 -msgid "Methods" -msgstr "" - -#: ../../content/developer/reference/mobile.rst:63 -msgid "Each of the methods returns a JQuery Deffered object which returns a data JSON dictionary" -msgstr "" - -#: ../../content/developer/reference/mobile.rst:67 -msgid "Show Toast in device" -msgstr "" - -#: ../../content/developer/reference/mobile.rst:71 -msgid "**message** text to display" -msgstr "" - -#: ../../content/developer/reference/mobile.rst:73 -msgid "A toast provides simple feedback about an operation in a small popup. It only fills the amount of space required for the message and the current activity remains visible and interactive." -msgstr "" - -#: ../../content/developer/reference/mobile.rst:85 -msgid "Vibrating device" -msgstr "" - -#: ../../content/developer/reference/mobile.rst:90 -msgid "Vibrates constantly for the specified period of time (in milliseconds)." -msgstr "" - -#: ../../content/developer/reference/mobile.rst:93 -msgid "Vibrate mobile device with given duration." -msgstr "" - -#: ../../content/developer/reference/mobile.rst:100 -msgid "Show snackbar with action" -msgstr "" - -#: ../../content/developer/reference/mobile.rst:104 -msgid "(*required*) **Message** to show in snackbar and action **button label** in Snackbar (optional)" -msgstr "" - -#: ../../content/developer/reference/mobile.rst:105 -msgid "``True`` if the user clicks on the Action button, ``False`` if SnackBar auto dismissed after some time." -msgstr "" - -#: ../../content/developer/reference/mobile.rst:107 -msgid "Snackbars provide lightweight feedback about an operation. They show a brief message at the bottom of the screen on mobile or in the lower left corner on larger devices. Snackbars appear above all the other elements on the screen and only one can be displayed at a time." -msgstr "" - -#: ../../content/developer/reference/mobile.rst:125 -msgid "Showing notification" -msgstr "" - -#: ../../content/developer/reference/mobile.rst:129 -msgid "**title** (first row) of the notification, **message** (second row) of the notification, in a standard notification." -msgstr "" - -#: ../../content/developer/reference/mobile.rst:131 -msgid "A notification is a message you can display to the user outside of your application's normal UI. When you tell the system to issue a notification, it first appears as an icon in the notification area. To see the details of the notification, the user opens the notification drawer. Both the notification area and the notification drawer are system-controlled areas that the user can view at any time." -msgstr "" - -#: ../../content/developer/reference/mobile.rst:146 -msgid "Create contact in device" -msgstr "" - -#: ../../content/developer/reference/mobile.rst:150 -msgid "Dictionary with contact details. Possible keys (name, mobile, phone, fax, email, website, street, street2, country_id, state_id, city, zip, parent_id, function and image)" -msgstr "" - -#: ../../content/developer/reference/mobile.rst:152 -msgid "Create a new device contact with the given contact details." -msgstr "" - -#: ../../content/developer/reference/mobile.rst:179 -msgid "Scanning barcodes" -msgstr "" - -#: ../../content/developer/reference/mobile.rst:183 -msgid "Scanned ``code`` from any barcode" -msgstr "" - -#: ../../content/developer/reference/mobile.rst:185 -msgid "The barcode API detects barcodes in real-time, on the device, in any orientation." -msgstr "" - -#: ../../content/developer/reference/mobile.rst:187 -msgid "The barcode API can read the following barcode formats:" -msgstr "" - -#: ../../content/developer/reference/mobile.rst:189 -msgid "1D barcodes: EAN-13, EAN-8, UPC-A, UPC-E, Code-39, Code-93, Code-128, ITF, Codabar" -msgstr "" - -#: ../../content/developer/reference/mobile.rst:190 -msgid "2D barcodes: QR Code, Data Matrix, PDF-417, AZTEC" -msgstr "" - -#: ../../content/developer/reference/mobile.rst:201 -msgid "Switching account in device" -msgstr "" - -#: ../../content/developer/reference/mobile.rst:205 -msgid "Use switchAccount to switch from one account to another on the device." -msgstr "" - -#: ../../content/developer/reference/module.rst:4 +#: ../../content/developer/reference/backend/module.rst:4 msgid "Module Manifests" msgstr "" -#: ../../content/developer/reference/module.rst:11 -msgid "Manifest" -msgstr "" - -#: ../../content/developer/reference/module.rst:13 +#: ../../content/developer/reference/backend/module.rst:13 msgid "The manifest file serves to declare a python package as an Odoo module and to specify module metadata." msgstr "" -#: ../../content/developer/reference/module.rst:16 +#: ../../content/developer/reference/backend/module.rst:16 msgid "It is a file called ``__manifest__.py`` and contains a single Python dictionary, where each key specifies module metadatum." msgstr "" -#: ../../content/developer/reference/module.rst:40 +#: ../../content/developer/reference/backend/module.rst:40 msgid "Available manifest fields are:" msgstr "" -#: ../../content/developer/reference/module.rst:42 +#: ../../content/developer/reference/backend/module.rst:42 msgid "``name`` (``str``, required)" msgstr "" -#: ../../content/developer/reference/module.rst:43 +#: ../../content/developer/reference/backend/module.rst:43 msgid "the human-readable name of the module" msgstr "" -#: ../../content/developer/reference/module.rst:44 +#: ../../content/developer/reference/backend/module.rst:44 msgid "``version`` (``str``)" msgstr "" -#: ../../content/developer/reference/module.rst:45 +#: ../../content/developer/reference/backend/module.rst:45 msgid "this module's version, should follow `semantic versioning`_ rules" msgstr "" -#: ../../content/developer/reference/module.rst:46 +#: ../../content/developer/reference/backend/module.rst:46 msgid "``description`` (``str``)" msgstr "" -#: ../../content/developer/reference/module.rst:47 +#: ../../content/developer/reference/backend/module.rst:47 msgid "extended description for the module, in reStructuredText" msgstr "" -#: ../../content/developer/reference/module.rst:48 +#: ../../content/developer/reference/backend/module.rst:48 msgid "``author`` (``str``)" msgstr "" -#: ../../content/developer/reference/module.rst:49 +#: ../../content/developer/reference/backend/module.rst:49 msgid "name of the module author" msgstr "" -#: ../../content/developer/reference/module.rst:50 +#: ../../content/developer/reference/backend/module.rst:50 msgid "``website`` (``str``)" msgstr "" -#: ../../content/developer/reference/module.rst:51 +#: ../../content/developer/reference/backend/module.rst:51 msgid "website URL for the module author" msgstr "" -#: ../../content/developer/reference/module.rst:65 +#: ../../content/developer/reference/backend/module.rst:65 msgid "``license`` (``str``, defaults: ``LGPL-3``)" msgstr "" -#: ../../content/developer/reference/module.rst:53 +#: ../../content/developer/reference/backend/module.rst:53 msgid "distribution license for the module. Possible values:" msgstr "" -#: ../../content/developer/reference/module.rst:56 +#: ../../content/developer/reference/backend/module.rst:56 msgid "`GPL-2`" msgstr "" -#: ../../content/developer/reference/module.rst:57 +#: ../../content/developer/reference/backend/module.rst:57 msgid "`GPL-2 or any later version`" msgstr "" -#: ../../content/developer/reference/module.rst:58 +#: ../../content/developer/reference/backend/module.rst:58 msgid "`GPL-3`" msgstr "" -#: ../../content/developer/reference/module.rst:59 +#: ../../content/developer/reference/backend/module.rst:59 msgid "`GPL-3 or any later version`" msgstr "" -#: ../../content/developer/reference/module.rst:60 +#: ../../content/developer/reference/backend/module.rst:60 msgid "`AGPL-3`" msgstr "" -#: ../../content/developer/reference/module.rst:61 +#: ../../content/developer/reference/backend/module.rst:61 msgid "`LGPL-3`" msgstr "" -#: ../../content/developer/reference/module.rst:62 +#: ../../content/developer/reference/backend/module.rst:62 msgid "`Other OSI approved licence`" msgstr "" -#: ../../content/developer/reference/module.rst:63 +#: ../../content/developer/reference/backend/module.rst:63 msgid "`OEEL-1` (Odoo Enterprise Edition License v1.0)" msgstr "" -#: ../../content/developer/reference/module.rst:64 +#: ../../content/developer/reference/backend/module.rst:64 msgid "`OPL-1` (Odoo Proprietary License v1.0)" msgstr "" -#: ../../content/developer/reference/module.rst:65 +#: ../../content/developer/reference/backend/module.rst:65 msgid "`Other proprietary`" msgstr "" -#: ../../content/developer/reference/module.rst:73 +#: ../../content/developer/reference/backend/module.rst:73 msgid "``category`` (``str``, default: ``Uncategorized``)" msgstr "" -#: ../../content/developer/reference/module.rst:68 +#: ../../content/developer/reference/backend/module.rst:68 msgid "classification category within Odoo, rough business domain for the module." msgstr "" -#: ../../content/developer/reference/module.rst:70 +#: ../../content/developer/reference/backend/module.rst:70 msgid "Although using `existing categories`_ is recommended, the field is freeform and unknown categories are created on-the-fly. Category hierarchies can be created using the separator ``/`` e.g. ``Foo / Bar`` will create a category ``Foo``, a category ``Bar`` as child category of ``Foo``, and will set ``Bar`` as the module's category." msgstr "" -#: ../../content/developer/reference/module.rst:80 +#: ../../content/developer/reference/backend/module.rst:81 msgid "``depends`` (``list(str)``)" msgstr "" -#: ../../content/developer/reference/module.rst:76 +#: ../../content/developer/reference/backend/module.rst:76 msgid "Odoo modules which must be loaded before this one, either because this module uses features they create or because it alters resources they define." msgstr "" -#: ../../content/developer/reference/module.rst:80 +#: ../../content/developer/reference/backend/module.rst:80 msgid "When a module is installed, all of its dependencies are installed before it. Likewise dependencies are loaded before a module is loaded." msgstr "" -#: ../../content/developer/reference/module.rst:83 +#: ../../content/developer/reference/backend/module.rst:84 +msgid "Module `base` is always installed in any Odoo instance. But you still need to specify it as dependency to make sure your module is updated when `base` is updated." +msgstr "" + +#: ../../content/developer/reference/backend/module.rst:88 msgid "``data`` (``list(str)``)" msgstr "" -#: ../../content/developer/reference/module.rst:83 +#: ../../content/developer/reference/backend/module.rst:88 msgid "List of data files which must always be installed or updated with the module. A list of paths from the module root directory" msgstr "" -#: ../../content/developer/reference/module.rst:86 +#: ../../content/developer/reference/backend/module.rst:91 msgid "``demo`` (``list(str)``)" msgstr "" -#: ../../content/developer/reference/module.rst:86 +#: ../../content/developer/reference/backend/module.rst:91 msgid "List of data files which are only installed or updated in *demonstration mode*" msgstr "" -#: ../../content/developer/reference/module.rst:97 -msgid "``auto_install`` (``bool``, default: ``False``)" +#: ../../content/developer/reference/backend/module.rst:109 +msgid "``auto_install`` (``bool`` or ``list(str)``, default: ``False``)" msgstr "" -#: ../../content/developer/reference/module.rst:89 +#: ../../content/developer/reference/backend/module.rst:94 msgid "If ``True``, this module will automatically be installed if all of its dependencies are installed." msgstr "" -#: ../../content/developer/reference/module.rst:92 -msgid "It is generally used for \"link modules\" implementing synergic integration between two otherwise independent modules." +#: ../../content/developer/reference/backend/module.rst:97 +msgid "It is generally used for \"link modules\" implementing synergetic integration between two otherwise independent modules." msgstr "" -#: ../../content/developer/reference/module.rst:95 -msgid "For instance ``sale_crm`` depends on both ``sale`` and ``crm`` and is set to ``auto_install``. When both ``sale`` and ``crm`` are installed, it automatically adds CRM campaigns tracking to sale orders without either ``sale`` or ``crm`` being aware of one another" +#: ../../content/developer/reference/backend/module.rst:100 +msgid "For instance ``sale_crm`` depends on both ``sale`` and ``crm`` and is set to ``auto_install``. When both ``sale`` and ``crm`` are installed, it automatically adds CRM campaigns tracking to sale orders without either ``sale`` or ``crm`` being aware of one another." msgstr "" -#: ../../content/developer/reference/module.rst:110 +#: ../../content/developer/reference/backend/module.rst:105 +msgid "If it is a list, it must contain a subset of the dependencies. This module will automatically be installed as soon as all the dependencies in the subset are installed. The remaining dependencies will be automatically installed as well. If the list is empty, this module will always be automatically installed regardless of its dependencies and these will be installed as well." +msgstr "" + +#: ../../content/developer/reference/backend/module.rst:122 msgid "``external_dependencies`` (``dict(key=list(str))``)" msgstr "" -#: ../../content/developer/reference/module.rst:100 +#: ../../content/developer/reference/backend/module.rst:112 msgid "A dictionary containing python and/or binary dependencies." msgstr "" -#: ../../content/developer/reference/module.rst:102 +#: ../../content/developer/reference/backend/module.rst:114 msgid "For python dependencies, the ``python`` key must be defined for this dictionary and a list of python modules to be imported should be assigned to it." msgstr "" -#: ../../content/developer/reference/module.rst:106 +#: ../../content/developer/reference/backend/module.rst:118 msgid "For binary dependencies, the ``bin`` key must be defined for this dictionary and a list of binary executable names should be assigned to it." msgstr "" -#: ../../content/developer/reference/module.rst:109 +#: ../../content/developer/reference/backend/module.rst:121 msgid "The module won't be installed if either the python module is not installed in the host machine or the binary executable is not found within the host machine's PATH environment variable." msgstr "" -#: ../../content/developer/reference/module.rst:114 +#: ../../content/developer/reference/backend/module.rst:126 msgid "``application`` (``bool``, default: ``False``)" msgstr "" -#: ../../content/developer/reference/module.rst:113 +#: ../../content/developer/reference/backend/module.rst:125 msgid "Whether the module should be considered as a fully-fledged application (``True``) or is just a technical module (``False``) that provides some extra functionality to an existing application module." msgstr "" -#: ../../content/developer/reference/module.rst:117 -msgid "``css`` (``list(str)``)" +#: ../../content/developer/reference/backend/module.rst:130 +msgid "``assets`` (``dict``)" msgstr "" -#: ../../content/developer/reference/module.rst:117 -msgid "Specify css files with custom rules to be imported, these files should be located in ``static/src/css`` inside the module." +#: ../../content/developer/reference/backend/module.rst:129 +msgid "A definition of how all static files are loaded in various assets bundles. See the :ref:`assets ` page for more details on how to describe bundles." msgstr "" -#: ../../content/developer/reference/module.rst:119 -msgid "``images`` (``list(str)``)" -msgstr "" - -#: ../../content/developer/reference/module.rst:120 -msgid "Specify image files to be used by the module." -msgstr "" - -#: ../../content/developer/reference/module.rst:121 +#: ../../content/developer/reference/backend/module.rst:132 msgid "``installable`` (``bool`` default: ``True``)" msgstr "" -#: ../../content/developer/reference/module.rst:122 +#: ../../content/developer/reference/backend/module.rst:133 msgid "Whether a user should be able to install the module from the Web UI or not." msgstr "" -#: ../../content/developer/reference/module.rst:124 +#: ../../content/developer/reference/backend/module.rst:135 msgid "``maintainer`` (``str``)" msgstr "" -#: ../../content/developer/reference/module.rst:124 +#: ../../content/developer/reference/backend/module.rst:135 msgid "Person or entity in charge of the maintenance of this module, by default it is assumed that the author is the maintainer." msgstr "" -#: ../../content/developer/reference/module.rst:140 +#: ../../content/developer/reference/backend/module.rst:151 msgid "``{pre_init, post_init, uninstall}_hook`` (``str``)" msgstr "" -#: ../../content/developer/reference/module.rst:127 +#: ../../content/developer/reference/backend/module.rst:138 msgid "Hooks for module installation/uninstallation, their value should be a string representing the name of a function defined inside the module's ``__init__.py``." msgstr "" -#: ../../content/developer/reference/module.rst:131 +#: ../../content/developer/reference/backend/module.rst:142 msgid "``pre_init_hook`` takes a cursor as its only argument, this function is executed prior to the module's installation." msgstr "" -#: ../../content/developer/reference/module.rst:134 +#: ../../content/developer/reference/backend/module.rst:145 msgid "``post_init_hook`` takes a cursor and a registry as its arguments, this function is executed right after the module's installation." msgstr "" -#: ../../content/developer/reference/module.rst:137 +#: ../../content/developer/reference/backend/module.rst:148 msgid "``uninstall_hook`` takes a cursor and a registry as its arguments, this function is executed after the module's uninstallation." msgstr "" -#: ../../content/developer/reference/module.rst:140 +#: ../../content/developer/reference/backend/module.rst:151 msgid "These hooks should only be used when setup/cleanup required for this module is either extremely difficult or impossible through the api." msgstr "" -#: ../../content/developer/reference/module.rst:143 +#: ../../content/developer/reference/backend/module.rst:154 msgid "``active`` (``bool``)" msgstr "" -#: ../../content/developer/reference/module.rst:143 -msgid "This indicates whether this module must install automatically or not." +#: ../../content/developer/reference/backend/module.rst:154 +msgid "Deprecated. Replaced by ``auto_install``." msgstr "" -#: ../../content/developer/reference/orm.rst:6 +#: ../../content/developer/reference/backend/orm.rst:7 msgid "ORM API" msgstr "" -#: ../../content/developer/reference/orm.rst:14 +#: ../../../odoo/odoo/models.py:docstring of odoo.models:15 +msgid "Object Relational Mapping module:" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models:2 +msgid "Hierarchical structure" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models:3 +msgid "Constraints consistency and validation" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models:4 +msgid "Object metadata depends on its status" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models:5 +msgid "Optimised processing by complex query (multiple actions at once)" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models:6 +msgid "Default field values" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models:7 +msgid "Permissions optimisation" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models:8 +msgid "Persistent object: DB postgresql" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models:9 +msgid "Data conversion" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models:10 +msgid "Multi-level caching system" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models:11 +msgid "Two different inheritance mechanisms" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models:15 +msgid "Rich set of field types:" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models:13 +msgid "classical (varchar, integer, boolean, ...)" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models:14 +msgid "relational (one2many, many2one, many2many)" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models:15 +msgid "functional" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:20 msgid "Models" msgstr "" -#: ../../content/developer/reference/orm.rst:16 +#: ../../content/developer/reference/backend/orm.rst:22 msgid "Model fields are defined as attributes on the model itself::" msgstr "" -#: ../../content/developer/reference/orm.rst:24 +#: ../../content/developer/reference/backend/orm.rst:30 msgid "this means you cannot define a field and a method with the same name, the last one will silently overwrite the former ones." msgstr "" -#: ../../content/developer/reference/orm.rst:27 +#: ../../content/developer/reference/backend/orm.rst:33 msgid "By default, the field's label (user-visible name) is a capitalized version of the field name, this can be overridden with the ``string`` parameter. ::" msgstr "" -#: ../../content/developer/reference/orm.rst:32 +#: ../../content/developer/reference/backend/orm.rst:38 msgid "For the list of field types and parameters, see :ref:`the fields reference `." msgstr "" -#: ../../content/developer/reference/orm.rst:35 +#: ../../content/developer/reference/backend/orm.rst:41 msgid "Default values are defined as parameters on fields, either as a value::" msgstr "" -#: ../../content/developer/reference/orm.rst:39 +#: ../../content/developer/reference/backend/orm.rst:45 msgid "or as a function called to compute the default value, which should return that value::" msgstr "" -#: ../../content/developer/reference/orm.rst:85 -msgid "AbstractModel" +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel:1 +msgid "Base class for Odoo models." msgstr "" -#: ../../content/developer/reference/orm.rst:90 -msgid "Model" +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel:3 +msgid "Odoo models are created by inheriting one of the following:" msgstr "" -#: ../../content/developer/reference/orm.rst:99 -msgid "TransientModel" +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel:5 +msgid ":class:`Model` for regular database-persisted models" msgstr "" -#: ../../content/developer/reference/orm.rst:111 -#: ../../content/developer/reference/views.rst:36 -msgid "Fields" +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel:7 +msgid ":class:`TransientModel` for temporary data, stored in the database but automatically vacuumed every so often" msgstr "" -#: ../../content/developer/reference/orm.rst:123 -msgid "Basic Fields" +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel:10 +msgid ":class:`AbstractModel` for abstract super classes meant to be shared by multiple inheriting models" msgstr "" -#: ../../content/developer/reference/orm.rst:136 -msgid "Advanced Fields" +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel:13 +msgid "The system automatically instantiates every model once per database. Those instances represent the available models on each database, and depend on which modules are installed on that database. The actual class of each instance is built from the Python classes that create and inherit from the corresponding model." msgstr "" -#: ../../content/developer/reference/orm.rst:153 -msgid "Date(time) Fields" +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel:19 +msgid "Every model instance is a \"recordset\", i.e., an ordered collection of records of the model. Recordsets are returned by methods like :meth:`~.browse`, :meth:`~.search`, or field accesses. Records have no explicit representation: a record is represented as a recordset of one record." msgstr "" -#: ../../content/developer/reference/orm.rst:155 -msgid ":class:`Dates ` and :class:`Datetimes ` are very important fields in any kind of business application. Their misuse can create invisible yet painful bugs, this section aims to provide Odoo developers with the knowledge required to avoid misusing these fields." +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel:25 +msgid "To create a class that should not be instantiated, the :attr:`~odoo.models.BaseModel._register` attribute may be set to False." msgstr "" -#: ../../content/developer/reference/orm.rst:161 -msgid "When assigning a value to a Date/Datetime field, the following options are valid:" +#: ../../docstring of odoo.models.BaseModel._auto:1 +#: ../../docstring of odoo.models.Model._auto:1 +msgid "Whether a database table should be created. If set to ``False``, override :meth:`~odoo.models.BaseModel.init` to create the database table." msgstr "" -#: ../../content/developer/reference/orm.rst:163 -msgid "A `date` or `datetime` object." +#: ../../docstring of odoo.models.BaseModel._auto:5 +#: ../../docstring of odoo.models.Model._auto:5 +msgid "Automatically defaults to `True` for :class:`Model` and :class:`TransientModel`, `False` for :class:`AbstractModel`." msgstr "" -#: ../../content/developer/reference/orm.rst:164 -msgid "A string in the proper server format:" +#: ../../docstring of odoo.models.BaseModel._auto:8 +#: ../../docstring of odoo.models.Model._auto:8 +msgid "To create a model without any table, inherit from :class:`~odoo.models.AbstractModel`." msgstr "" -#: ../../content/developer/reference/orm.rst:166 -msgid "``YYYY-MM-DD`` for :class:`~odoo.fields.Date` fields," +#: ../../content/developer/reference/backend/orm.rst:60 +msgid "Whether the ORM should automatically generate and update the :ref:`reference/fields/automatic/log_access`." msgstr "" -#: ../../content/developer/reference/orm.rst:167 -msgid "``YYYY-MM-DD HH:MM:SS`` for :class:`~odoo.fields.Datetime` fields." +#: ../../content/developer/reference/backend/orm.rst:63 +msgid "Defaults to whatever value was set for :attr:`~._auto`." msgstr "" -#: ../../content/developer/reference/orm.rst:169 -msgid "`False` or `None`." +#: ../../docstring of odoo.models.BaseModel._table:1 +msgid "SQL table name used by model if :attr:`_auto`" msgstr "" -#: ../../content/developer/reference/orm.rst:171 -msgid "The Date and Datetime fields class have helper methods to attempt conversion into a compatible type:" +#: ../../docstring of odoo.models.BaseModel._sql_constraints:1 +msgid "SQL constraints [(name, sql_def, message)]" msgstr "" -#: ../../content/developer/reference/orm.rst:174 -msgid ":func:`~odoo.fields.Date.to_date` will convert to a :class:`datetime.date`" +#: ../../docstring of odoo.models.BaseModel._register:1 +msgid "registry visibility" msgstr "" -#: ../../content/developer/reference/orm.rst:175 -msgid ":func:`~odoo.fields.Datetime.to_datetime` will convert to a :class:`datetime.datetime`." +#: ../../docstring of odoo.models.BaseModel._abstract:1 +#: ../../docstring of odoo.models.Model._abstract:1 +msgid "Whether the model is *abstract*." msgstr "" -#: ../../content/developer/reference/orm.rst:179 -msgid "To parse date/datetimes coming from external sources::" +#: ../../docstring of odoo.models.BaseModel._abstract:3 +#: ../../docstring of odoo.models.Model._abstract:3 +msgid ":class:`AbstractModel`" msgstr "" -#: ../../content/developer/reference/orm.rst:183 -msgid "Date / Datetime comparison best practices:" +#: ../../docstring of odoo.models.BaseModel._transient:1 +msgid "Whether the model is *transient*." msgstr "" -#: ../../content/developer/reference/orm.rst:185 -msgid "Date fields can **only** be compared to date objects." +#: ../../docstring of odoo.models.BaseModel._transient:3 +msgid ":class:`TransientModel`" msgstr "" -#: ../../content/developer/reference/orm.rst:186 -msgid "Datetime fields can **only** be compared to datetime objects." +#: ../../docstring of odoo.models.BaseModel._name:1 +msgid "the model name (in dot-notation, module namespace)" msgstr "" -#: ../../content/developer/reference/orm.rst:188 -msgid "Strings representing dates and datetimes can be compared between each other, however the result may not be the expected result, as a datetime string will always be greater than a date string, therefore this practice is **heavily** discouraged." +#: ../../docstring of odoo.models.BaseModel._description:1 +msgid "the model's informal name" msgstr "" -#: ../../content/developer/reference/orm.rst:194 -msgid "Common operations with dates and datetimes such as addition, substraction or fetching the start/end of a period are exposed through both :class:`~odoo.fields.Date` and :class:`~odoo.fields.Datetime`. These helpers are also available by importing `odoo.tools.date_utils`." +#: ../../docstring of odoo.models.BaseModel._inherit:1 +msgid "Python-inherited models:" msgstr "" -#: ../../content/developer/reference/orm.rst:199 -msgid "Timezones" -msgstr "" - -#: ../../content/developer/reference/orm.rst:201 -msgid "Datetime fields are stored as `timestamp without timezone` columns in the database and are stored in the UTC timezone. This is by design, as it makes the Odoo database independent from the timezone of the hosting server system. Timezone conversion is managed entirely by the client side." -msgstr "" - -#: ../../content/developer/reference/orm.rst:214 -msgid "Relational Fields" -msgstr "" - -#: ../../content/developer/reference/orm.rst:223 -msgid "Pseudo-relational fields" -msgstr "" - -#: ../../content/developer/reference/orm.rst:232 -msgid "Computed Fields" -msgstr "" - -#: ../../content/developer/reference/orm.rst:234 -msgid "Fields can be computed (instead of read straight from the database) using the ``compute`` parameter. **It must assign the computed value to the field**. If it uses the values of other *fields*, it should specify those fields using :func:`~odoo.api.depends`. ::" -msgstr "" - -#: ../../content/developer/reference/orm.rst:247 -msgid "dependencies can be dotted paths when using sub-fields::" -msgstr "" - -#: ../../content/developer/reference/orm.rst:254 -msgid "computed fields are not stored by default, they are computed and returned when requested. Setting ``store=True`` will store them in the database and automatically enable searching." -msgstr "" - -#: ../../content/developer/reference/orm.rst:257 -msgid "searching on a computed field can also be enabled by setting the ``search`` parameter. The value is a method name returning a :ref:`reference/orm/domains`. ::" -msgstr "" - -#: ../../content/developer/reference/orm.rst:268 -msgid "The search method is invoked when processing domains before doing an actual search on the model. It must return a domain equivalent to the condition: ``field operator value``." -msgstr "" - -#: ../../content/developer/reference/orm.rst:274 -msgid "Computed fields are readonly by default. To allow *setting* values on a computed field, use the ``inverse`` parameter. It is the name of a function reversing the computation and setting the relevant fields::" -msgstr "" - -#: ../../content/developer/reference/orm.rst:290 -msgid "multiple fields can be computed at the same time by the same method, just use the same method on all fields and set all of them::" -msgstr "" - -#: ../../content/developer/reference/orm.rst:306 -msgid "While it is possible to use the same compute method for multiple fields, it is not recommended to do the same for the inverse method." -msgstr "" - -#: ../../content/developer/reference/orm.rst:310 -msgid "During the computation of the inverse, **all** fields that use said inverse are protected, meaning that they can't be computed, even if their value is not in the cache." -msgstr "" - -#: ../../content/developer/reference/orm.rst:314 -msgid "If any of those fields is accessed and its value is not in cache, the ORM will simply return a default value of `False` for these fields. This means that the value of the inverse fields (other than the one triggering the inverse method) may not give their correct value and this will probably break the expected behavior of the inverse method." -msgstr "" - -#: ../../content/developer/reference/orm.rst:323 -msgid "Related fields" -msgstr "" - -#: ../../content/developer/reference/orm.rst:325 -msgid "A special case of computed fields are *related* (proxy) fields, which provide the value of a sub-field on the current record. They are defined by setting the ``related`` parameter and like regular computed fields they can be stored::" -msgstr "" - -#: ../../content/developer/reference/orm.rst:332 -msgid "The value of a related field is given by following a sequence of relational fields and reading a field on the reached model. The complete sequence of fields to traverse is specified by the ``related`` attribute." -msgstr "" - -#: ../../content/developer/reference/orm.rst:336 -msgid "Some field attributes are automatically copied from the source field if they are not redefined: ``string``, ``help``, ``readonly``, ``required`` (only if all fields in the sequence are required), ``groups``, ``digits``, ``size``, ``translate``, ``sanitize``, ``selection``, ``comodel_name``, ``domain``, ``context``. All semantic-free attributes are copied from the source field." -msgstr "" - -#: ../../content/developer/reference/orm.rst:343 -msgid "By default, the values of related fields are not stored to the database. Add the attribute ``store=True`` to make it stored, just like computed fields. Related fields are automatically recomputed when their dependencies are modified." -msgstr "" - -#: ../../content/developer/reference/orm.rst:348 -msgid "The related fields are computed in sudo mode." -msgstr "" - -#: ../../content/developer/reference/orm.rst:352 -msgid "You cannot chain :class:`~odoo.fields.Many2many` or :class:`~odoo.fields.One2many` fields in ``related`` fields dependencies." -msgstr "" - -#: ../../content/developer/reference/orm.rst:354 -msgid "``related`` can be used to refer to a :class:`~odoo.fields.One2many` or :class:`~odoo.fields.Many2many` field on another model on the condition that it's done through a ``Many2one`` relation on the current model. ``One2many`` and ``Many2many`` are not supported and the results will not be aggregated correctly::" -msgstr "" - -#: ../../content/developer/reference/orm.rst:375 -msgid "Automatic fields" -msgstr "" - -#: ../../content/developer/reference/orm.rst:379 -msgid "Identifier :class:`field `" -msgstr "" - -#: ../../content/developer/reference/orm.rst:381 -msgid "If length of current recordset is 1, return id of unique record in it." -msgstr "" - -#: ../../content/developer/reference/orm.rst:383 -msgid "Raise an Error otherwise." -msgstr "" - -#: ../../content/developer/reference/orm.rst:388 -msgid "Access Log fields" -msgstr "" - -#: ../../content/developer/reference/orm.rst:390 -msgid "These fields are automatically set and updated if :attr:`~odoo.models.BaseModel._log_access` is enabled. It can be disabled to avoid creating or updating those fields on tables for which they are not useful." -msgstr "" - -#: ../../content/developer/reference/orm.rst:395 -msgid "By default, :attr:`~odoo.models.BaseModel._log_access` is set to the same value as :attr:`~odoo.models.BaseModel._auto`" -msgstr "" - -#: ../../content/developer/reference/orm.rst:400 -msgid "Stores when the record was created, :class:`~odoo.fields.Datetime`" -msgstr "" - -#: ../../content/developer/reference/orm.rst:404 -msgid "Stores *who* created the record, :class:`~odoo.fields.Many2one` to a ``res.users``." -msgstr "" - -#: ../../content/developer/reference/orm.rst:409 -msgid "Stores when the record was last updated, :class:`~odoo.fields.Datetime`" -msgstr "" - -#: ../../content/developer/reference/orm.rst:413 -msgid "Stores who last updated the record, :class:`~odoo.fields.Many2one` to a ``res.users``." -msgstr "" - -#: ../../content/developer/reference/orm.rst:416 -msgid ":attr:`~odoo.models.BaseModel._log_access` *must* be enabled on :class:`~odoo.models.TransientModel`." -msgstr "" - -#: ../../content/developer/reference/orm.rst:422 -msgid "Reserved Field names" -msgstr "" - -#: ../../content/developer/reference/orm.rst:424 -msgid "A few field names are reserved for pre-defined behaviors beyond that of automated fields. They should be defined on a model when the related behavior is desired:" -msgstr "" - -#: ../../content/developer/reference/orm.rst:430 -msgid "default value for :attr:`~odoo.models.BaseModel._rec_name`, used to display records in context where a representative \"naming\" is necessary." -msgstr "" - -#: ../../content/developer/reference/orm.rst:434 -#: ../../content/developer/reference/orm.rst:472 -msgid ":class:`~odoo.fields.Char`" -msgstr "" - -#: ../../content/developer/reference/orm.rst:438 -msgid "toggles the global visibility of the record, if ``active`` is set to ``False`` the record is invisible in most searches and listing." -msgstr "" - -#: ../../content/developer/reference/orm.rst:441 -msgid ":class:`~odoo.fields.Boolean`" -msgstr "" - -#: ../../content/developer/reference/orm.rst:452 -msgid "lifecycle stages of the object, used by the ``states`` attribute on :class:`fields `." -msgstr "" - -#: ../../content/developer/reference/orm.rst:455 -msgid ":class:`~odoo.fields.Selection`" -msgstr "" - -#: ../../content/developer/reference/orm.rst:459 -msgid "default_value of :attr:`~._parent_name`, used to organize records in a tree structure and enables the ``child_of`` and ``parent_of`` operators in domains." -msgstr "" - -#: ../../content/developer/reference/orm.rst:463 -msgid ":class:`~odoo.fields.Many2one`" -msgstr "" - -#: ../../content/developer/reference/orm.rst:467 -msgid "When :attr:`~._parent_store` is set to True, used to store a value reflecting the tree structure of :attr:`~._parent_name`, and to optimize the operators ``child_of`` and ``parent_of`` in search domains. It must be declared with ``index=True`` for proper operation." -msgstr "" - -#: ../../content/developer/reference/orm.rst:476 -msgid "Main field name used for Odoo multi-company behavior." -msgstr "" - -#: ../../content/developer/reference/orm.rst:478 -msgid "Used by `:meth:~odoo.models._check_company` to check multi company consistency. Defines whether a record is shared between companies (no value) or only accessible by the users of a given company." -msgstr "" - -#: ../../content/developer/reference/orm.rst:482 -msgid ":class:`~odoo.fields.Many2one` :type: :class:`~odoo.addons.base.models.res_company`" -msgstr "" - -#: ../../content/developer/reference/orm.rst:486 -msgid "Recordsets" -msgstr "" - -#: ../../content/developer/reference/orm.rst:488 -msgid "Interactions with models and records are performed through recordsets, an ordered collection of records of the same model." -msgstr "" - -#: ../../content/developer/reference/orm.rst:491 -msgid "Contrary to what the name implies, it is currently possible for recordsets to contain duplicates. This may change in the future." -msgstr "" - -#: ../../content/developer/reference/orm.rst:494 -msgid "Methods defined on a model are executed on a recordset, and their ``self`` is a recordset::" -msgstr "" - -#: ../../content/developer/reference/orm.rst:504 -msgid "Iterating on a recordset will yield new sets of *a single record* (\"singletons\"), much like iterating on a Python string yields strings of a single characters::" -msgstr "" - -#: ../../content/developer/reference/orm.rst:514 -msgid "Field access" -msgstr "" - -#: ../../content/developer/reference/orm.rst:516 -msgid "Recordsets provide an \"Active Record\" interface: model fields can be read and written directly from the record as attributes." -msgstr "" - -#: ../../content/developer/reference/orm.rst:521 -msgid "When accessing non-relational fields on a recordset of potentially multiple records, use :meth:`~odoo.models.BaseModel.mapped`::" -msgstr "" - -#: ../../content/developer/reference/orm.rst:526 -msgid "Field values can also be accessed like dict items, which is more elegant and safer than ``getattr()`` for dynamic field names. Setting a field's value triggers an update to the database::" -msgstr "" - -#: ../../content/developer/reference/orm.rst:541 -msgid "Trying to read a field on multiple records will raise an error for non relational fields." -msgstr "" - -#: ../../content/developer/reference/orm.rst:544 -msgid "Accessing a relational field (:class:`~odoo.fields.Many2one`, :class:`~odoo.fields.One2many`, :class:`~odoo.fields.Many2many`) *always* returns a recordset, empty if the field is not set." -msgstr "" - -#: ../../content/developer/reference/orm.rst:549 -msgid "Record cache and prefetching" -msgstr "" - -#: ../../content/developer/reference/orm.rst:551 -msgid "Odoo maintains a cache for the fields of the records, so that not every field access issues a database request, which would be terrible for performance. The following example queries the database only for the first statement::" -msgstr "" - -#: ../../content/developer/reference/orm.rst:558 -msgid "To avoid reading one field on one record at a time, Odoo *prefetches* records and fields following some heuristics to get good performance. Once a field must be read on a given record, the ORM actually reads that field on a larger recordset, and stores the returned values in cache for later use. The prefetched recordset is usually the recordset from which the record comes by iteration. Moreover, all simple stored fields (boolean, integer, float, char, text, date, datetime, selection, many2one) are fetched altogether; they correspond to the columns of the model's table, and are fetched efficiently in the same query." -msgstr "" - -#: ../../content/developer/reference/orm.rst:567 -msgid "Consider the following example, where ``partners`` is a recordset of 1000 records. Without prefetching, the loop would make 2000 queries to the database. With prefetching, only one query is made::" -msgstr "" - -#: ../../content/developer/reference/orm.rst:576 -msgid "The prefetching also works on *secondary records*: when relational fields are read, their values (which are records) are subscribed for future prefetching. Accessing one of those secondary records prefetches all secondary records from the same model. This makes the following example generate only two queries, one for partners and one for countries::" -msgstr "" - -#: ../../content/developer/reference/orm.rst:591 -msgid "Method decorators" -msgstr "" - -#: ../../content/developer/reference/orm.rst:605 -msgid "With sphinx 2.0 : autodecorator" -msgstr "" - -#: ../../content/developer/reference/orm.rst:607 -msgid "Add in Views reference * It is possible to suppress the trigger from a specific field by adding ``on_change=\"0\"`` in a view::" -msgstr "" - -#: ../../content/developer/reference/orm.rst:613 -msgid "will not trigger any interface update when the field is edited by the user, even if there are function fields or explicit onchange depending on that field." -msgstr "" - -#: ../../content/developer/reference/orm.rst:620 -msgid "Environment" -msgstr "" - -#: ../../content/developer/reference/orm.rst:622 -msgid "The :class:`~odoo.api.Environment` stores various contextual data used by the ORM: the database cursor (for database queries), the current user (for access rights checking) and the current context (storing arbitrary metadata). The environment also stores caches." -msgstr "" - -#: ../../content/developer/reference/orm.rst:627 -msgid "All recordsets have an environment, which is immutable, can be accessed using :attr:`~odoo.models.Model.env` and gives access to:" -msgstr "" - -#: ../../content/developer/reference/orm.rst:630 -msgid "the current user (:attr:`~odoo.api.Environment.user`)" -msgstr "" - -#: ../../content/developer/reference/orm.rst:631 -msgid "the cursor (:attr:`~odoo.api.Environment.cr`)" -msgstr "" - -#: ../../content/developer/reference/orm.rst:632 -msgid "the superuser flag (:attr:`~odoo.api.Environment.su`)" -msgstr "" - -#: ../../content/developer/reference/orm.rst:633 -msgid "or the context (:attr:`~odoo.api.Environment.context`)" -msgstr "" - -#: ../../content/developer/reference/orm.rst:644 -msgid "When creating a recordset from an other recordset, the environment is inherited. The environment can be used to get an empty recordset in an other model, and query that model::" -msgstr "" - -#: ../../content/developer/reference/orm.rst:668 -msgid "Altering the environment" -msgstr "" - -#: ../../content/developer/reference/orm.rst:685 -msgid "SQL Execution" -msgstr "" - -#: ../../content/developer/reference/orm.rst:687 -msgid "The :attr:`~odoo.api.Environment.cr` attribute on environments is the cursor for the current database transaction and allows executing SQL directly, either for queries which are difficult to express using the ORM (e.g. complex joins) or for performance reasons::" -msgstr "" - -#: ../../content/developer/reference/orm.rst:694 -msgid "Because models use the same cursor and the :class:`~odoo.api.Environment` holds various caches, these caches must be invalidated when *altering* the database in raw SQL, or further uses of models may become incoherent. It is necessary to clear caches when using ``CREATE``, ``UPDATE`` or ``DELETE`` in SQL, but not ``SELECT`` (which simply reads the database)." -msgstr "" - -#: ../../content/developer/reference/orm.rst:701 -msgid "Clearing caches can be performed using the :meth:`~odoo.models.Model.invalidate_cache` method." -msgstr "" - -#: ../../content/developer/reference/orm.rst:707 -msgid "Executing raw SQL bypasses the ORM, and by consequent, Odoo security rules. Please make sure your queries are sanitized when using user input and prefer using ORM utilities if you don't really need to use SQL queries." -msgstr "" - -#: ../../content/developer/reference/orm.rst:715 -msgid "Common ORM methods" -msgstr "" - -#: ../../content/developer/reference/orm.rst:720 -msgid "Create/update" -msgstr "" - -#: ../../content/developer/reference/orm.rst:722 -msgid "api.model_create_multi information" -msgstr "" - -#: ../../content/developer/reference/orm.rst:737 -msgid "Search/Read" -msgstr "" - -#: ../../content/developer/reference/orm.rst:752 -msgid "Fields/Views" -msgstr "" - -#: ../../content/developer/reference/orm.rst:761 -msgid "Search domains" -msgstr "" - -#: ../../content/developer/reference/orm.rst:763 -msgid "A domain is a list of criteria, each criterion being a triple (either a ``list`` or a ``tuple``) of ``(field_name, operator, value)`` where:" -msgstr "" - -#: ../../content/developer/reference/orm.rst:769 -msgid "``field_name`` (``str``)" -msgstr "" - -#: ../../content/developer/reference/orm.rst:767 -msgid "a field name of the current model, or a relationship traversal through a :class:`~odoo.fields.Many2one` using dot-notation e.g. ``'street'`` or ``'partner_id.country'``" -msgstr "" - -#: ../../content/developer/reference/orm.rst:823 -msgid "``operator`` (``str``)" -msgstr "" - -#: ../../content/developer/reference/orm.rst:772 -msgid "an operator used to compare the ``field_name`` with the ``value``. Valid operators are:" -msgstr "" - -#: ../../content/developer/reference/orm.rst:775 -msgid "``=``" -msgstr "" - -#: ../../content/developer/reference/orm.rst:776 -msgid "equals to" -msgstr "" - -#: ../../content/developer/reference/orm.rst:777 -msgid "``!=``" -msgstr "" - -#: ../../content/developer/reference/orm.rst:778 -msgid "not equals to" -msgstr "" - -#: ../../content/developer/reference/orm.rst:779 -msgid "``>``" -msgstr "" - -#: ../../content/developer/reference/orm.rst:780 -msgid "greater than" -msgstr "" - -#: ../../content/developer/reference/orm.rst:781 -msgid "``>=``" -msgstr "" - -#: ../../content/developer/reference/orm.rst:782 -msgid "greater than or equal to" -msgstr "" - -#: ../../content/developer/reference/orm.rst:783 -msgid "``<``" -msgstr "" - -#: ../../content/developer/reference/orm.rst:784 -msgid "less than" -msgstr "" - -#: ../../content/developer/reference/orm.rst:785 -msgid "``<=``" -msgstr "" - -#: ../../content/developer/reference/orm.rst:786 -msgid "less than or equal to" -msgstr "" - -#: ../../content/developer/reference/orm.rst:788 -msgid "``=?``" -msgstr "" - -#: ../../content/developer/reference/orm.rst:788 -msgid "unset or equals to (returns true if ``value`` is either ``None`` or ``False``, otherwise behaves like ``=``)" -msgstr "" - -#: ../../content/developer/reference/orm.rst:792 -msgid "``=like``" -msgstr "" - -#: ../../content/developer/reference/orm.rst:791 -msgid "matches ``field_name`` against the ``value`` pattern. An underscore ``_`` in the pattern stands for (matches) any single character; a percent sign ``%`` matches any string of zero or more characters." -msgstr "" - -#: ../../content/developer/reference/orm.rst:795 -msgid "``like``" -msgstr "" - -#: ../../content/developer/reference/orm.rst:795 -msgid "matches ``field_name`` against the ``%value%`` pattern. Similar to ``=like`` but wraps ``value`` with '%' before matching" -msgstr "" - -#: ../../content/developer/reference/orm.rst:797 -msgid "``not like``" -msgstr "" - -#: ../../content/developer/reference/orm.rst:798 -msgid "doesn't match against the ``%value%`` pattern" -msgstr "" - -#: ../../content/developer/reference/orm.rst:799 -msgid "``ilike``" -msgstr "" - -#: ../../content/developer/reference/orm.rst:800 -msgid "case insensitive ``like``" -msgstr "" - -#: ../../content/developer/reference/orm.rst:801 -msgid "``not ilike``" -msgstr "" - -#: ../../content/developer/reference/orm.rst:802 -msgid "case insensitive ``not like``" -msgstr "" - -#: ../../content/developer/reference/orm.rst:803 -msgid "``=ilike``" -msgstr "" - -#: ../../content/developer/reference/orm.rst:804 -msgid "case insensitive ``=like``" -msgstr "" - -#: ../../content/developer/reference/orm.rst:806 -msgid "``in``" -msgstr "" - -#: ../../content/developer/reference/orm.rst:806 -msgid "is equal to any of the items from ``value``, ``value`` should be a list of items" -msgstr "" - -#: ../../content/developer/reference/orm.rst:808 -msgid "``not in``" -msgstr "" - -#: ../../content/developer/reference/orm.rst:809 -msgid "is unequal to all of the items from ``value``" -msgstr "" - -#: ../../content/developer/reference/orm.rst:815 -msgid "``child_of``" -msgstr "" - -#: ../../content/developer/reference/orm.rst:811 -msgid "is a child (descendant) of a ``value`` record (value can be either one item or a list of items)." -msgstr "" - -#: ../../content/developer/reference/orm.rst:814 -#: ../../content/developer/reference/orm.rst:821 -msgid "Takes the semantics of the model into account (i.e following the relationship field named by :attr:`~odoo.models.Model._parent_name`)." -msgstr "" - -#: ../../content/developer/reference/orm.rst:823 -msgid "``parent_of``" -msgstr "" - -#: ../../content/developer/reference/orm.rst:818 -msgid "is a parent (ascendant) of a ``value`` record (value can be either one item or a list of items)." -msgstr "" - -#: ../../content/developer/reference/orm.rst:826 -msgid "variable type, must be comparable (through ``operator``) to the named field." -msgstr "" - -#: ../../content/developer/reference/orm.rst:829 -msgid "Domain criteria can be combined using logical operators in *prefix* form:" -msgstr "" - -#: ../../content/developer/reference/orm.rst:832 -msgid "``'&'``" -msgstr "" - -#: ../../content/developer/reference/orm.rst:832 -msgid "logical *AND*, default operation to combine criteria following one another. Arity 2 (uses the next 2 criteria or combinations)." -msgstr "" - -#: ../../content/developer/reference/orm.rst:834 -msgid "``'|'``" -msgstr "" - -#: ../../content/developer/reference/orm.rst:835 -msgid "logical *OR*, arity 2." -msgstr "" - -#: ../../content/developer/reference/orm.rst:841 -msgid "``'!'``" -msgstr "" - -#: ../../content/developer/reference/orm.rst:837 -msgid "logical *NOT*, arity 1." -msgstr "" - -#: ../../content/developer/reference/orm.rst:839 -msgid "Mostly to negate combinations of criteria Individual criterion generally have a negative form (e.g. ``=`` -> ``!=``, ``<`` -> ``>=``) which is simpler than negating the positive." -msgstr "" - -#: ../../content/developer/reference/orm.rst:845 -msgid "To search for partners named *ABC*, from belgium or germany, whose language is not english::" -msgstr "" - -#: ../../content/developer/reference/orm.rst:853 -msgid "This domain is interpreted as:" -msgstr "" - -#: ../../content/developer/reference/orm.rst:862 -msgid "Unlink" -msgstr "" - -#: ../../content/developer/reference/orm.rst:869 -msgid "Record(set) information" -msgstr "" - -#: ../../content/developer/reference/orm.rst:875 -msgid "Returns the environment of the given recordset." -msgstr "" - -#: ../../content/developer/reference/orm.rst:0 +#: ../../docstring of odoo.models.BaseModel._inherit:0 +#: ../../content/developer/reference/backend/orm.rst:0 msgid "type" msgstr "" -#: ../../content/developer/reference/orm.rst:877 +#: ../../docstring of odoo.models.BaseModel._inherit:3 +msgid "str or list(str)" +msgstr "" + +#: ../../docstring of odoo.models.BaseModel._inherit:7 +msgid "If :attr:`._name` is set, name(s) of parent models to inherit from" +msgstr "" + +#: ../../docstring of odoo.models.BaseModel._inherit:8 +msgid "If :attr:`._name` is unset, name of a single model to extend in-place" +msgstr "" + +#: ../../docstring of odoo.models.BaseModel._inherits:1 +msgid "dictionary {'parent_model': 'm2o_field'} mapping the _name of the parent business objects to the names of the corresponding foreign key fields to use::" +msgstr "" + +#: ../../docstring of odoo.models.BaseModel._inherits:9 +msgid "implements composition-based inheritance: the new model exposes all the fields of the inherited models but stores none of them: the values themselves remain stored on the linked record." +msgstr "" + +#: ../../docstring of odoo.models.BaseModel._inherits:15 +msgid "if multiple fields with the same name are defined in the :attr:`~odoo.models.Model._inherits`-ed models, the inherited field will correspond to the last one (in the inherits list order)." +msgstr "" + +#: ../../docstring of odoo.models.BaseModel._rec_name:1 +msgid "field to use for labeling records, default: ``name``" +msgstr "" + +#: ../../docstring of odoo.models.BaseModel._order:1 +msgid "default order field for searching results" +msgstr "" + +#: ../../docstring of odoo.models.BaseModel._check_company_auto:1 +msgid "On write and create, call ``_check_company`` to ensure companies consistency on the relational fields having ``check_company=True`` as attribute." +msgstr "" + +#: ../../docstring of odoo.models.BaseModel._parent_name:1 +msgid "the many2one field used as parent field" +msgstr "" + +#: ../../docstring of odoo.models.BaseModel._parent_store:1 +msgid "set to True to compute parent_path field." +msgstr "" + +#: ../../docstring of odoo.models.BaseModel._parent_store:3 +msgid "Alongside a :attr:`~.parent_path` field, sets up an indexed storage of the tree structure of records, to enable faster hierarchical queries on the records of the current model using the ``child_of`` and ``parent_of`` domain operators." +msgstr "" + +#: ../../docstring of odoo.models.BaseModel._date_name:1 +msgid "field to use for default calendar view" +msgstr "" + +#: ../../docstring of odoo.models.BaseModel._fold_name:1 +msgid "field to determine folded groups in kanban views" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:90 +msgid "AbstractModel" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.Model:1 +msgid "Main super-class for regular database-persisted Odoo models." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.Model:3 +msgid "Odoo models are created by inheriting from this class::" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.Model:8 +msgid "The system will later instantiate the class once per database (on which the class' module is installed)." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:103 +msgid "TransientModel" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.TransientModel:1 +msgid "Model super-class for transient records, meant to be temporarily persistent, and regularly vacuum-cleaned." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.TransientModel:4 +msgid "A TransientModel has a simplified access rights management, all users can create new records, and may only access the records they created. The superuser has unrestricted access to all TransientModel records." +msgstr "" + +#: ../../docstring of odoo.models.TransientModel._transient_max_count:1 +msgid "maximum number of transient records, unlimited if ``0``" +msgstr "" + +#: ../../docstring of odoo.models.TransientModel._transient_max_hours:1 +msgid "maximum idle lifetime (in hours), unlimited if ``0``" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.TransientModel._transient_vacuum:1 +msgid "Clean the transient records." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.TransientModel._transient_vacuum:3 +msgid "This unlinks old records from the transient model tables whenever the :attr:`_transient_max_count` or :attr:`_transient_max_hours` conditions (if any) are reached." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.TransientModel._transient_vacuum:7 +msgid "Actual cleaning will happen only once every 5 minutes. This means this method can be called frequently (e.g. whenever a new record is created)." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.TransientModel._transient_vacuum:10 +msgid "Example with both max_hours and max_count active:" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.TransientModel._transient_vacuum:12 +msgid "Suppose max_hours = 0.2 (aka 12 minutes), max_count = 20, there are 55 rows in the table, 10 created/changed in the last 5 minutes, an additional 12 created/changed between 5 and 10 minutes ago, the rest created/changed more than 12 minutes ago." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.TransientModel._transient_vacuum:17 +msgid "age based vacuum will leave the 22 rows created/changed in the last 12 minutes" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.TransientModel._transient_vacuum:19 +msgid "count based vacuum will wipe out another 12 rows. Not just 2, otherwise each addition would immediately cause the maximum to be reached again." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.TransientModel._transient_vacuum:22 +msgid "the 10 rows that have been created/changed the last 5 minutes will NOT be deleted" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:115 +#: ../../content/developer/reference/backend/views.rst:36 +msgid "Fields" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:1 +msgid "The field descriptor contains the field definition, and manages accesses and assignments of the corresponding field on records. The following attributes may be provided when instantiating a field:" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:5 +msgid "the label of the field seen by users; if not set, the ORM takes the field name in the class (capitalized)." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:8 +msgid "the tooltip of the field seen by users" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:10 +msgid "whether the field is invisible (boolean, by default ``False``)" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:12 +msgid "whether the field is readonly (default: ``False``) This only has an impact on the UI. Any field assignation in code will work (if the field is a stored field or an inversable one)." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:12 +msgid "whether the field is readonly (default: ``False``)" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:14 +msgid "This only has an impact on the UI. Any field assignation in code will work (if the field is a stored field or an inversable one)." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:17 +msgid "whether the value of the field is required (default: ``False``)" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:19 +msgid "whether the field is indexed in database, and the kind of index. Note: this has no effect on non-stored and virtual fields. The possible values are: * ``\"btree\"`` or ``True``: standard index, good for many2one * ``\"btree_not_null\"``: BTREE index without NULL values (useful when most values are NULL, or when NULL is never searched for) * ``\"trigram\"``: Generalized Inverted Index (GIN) with trigrams (good for full-text search) * ``None`` or ``False``: no index (default)" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:19 +msgid "whether the field is indexed in database, and the kind of index. Note: this has no effect on non-stored and virtual fields. The possible values are:" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:23 +msgid "``\"btree\"`` or ``True``: standard index, good for many2one" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:24 +msgid "``\"btree_not_null\"``: BTREE index without NULL values (useful when most" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:25 +msgid "values are NULL, or when NULL is never searched for)" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:26 +msgid "``\"trigram\"``: Generalized Inverted Index (GIN) with trigrams (good for full-text search)" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:27 +msgid "``None`` or ``False``: no index (default)" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:29 +msgid "the default value for the field; this is either a static value, or a function taking a recordset and returning a value; use ``default=None`` to discard default values for the field" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:34 +msgid "a dictionary mapping state values to lists of UI attribute-value pairs; possible attributes are: ``readonly``, ``required``, ``invisible``. .. warning:: Any state-based condition requires the ``state`` field value to be available on the client-side UI. This is typically done by including it in the relevant views, possibly made invisible if not relevant for the end-user." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:34 +msgid "a dictionary mapping state values to lists of UI attribute-value pairs; possible attributes are: ``readonly``, ``required``, ``invisible``." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:37 +msgid "Any state-based condition requires the ``state`` field value to be available on the client-side UI. This is typically done by including it in the relevant views, possibly made invisible if not relevant for the end-user." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:42 +msgid "comma-separated list of group xml ids (string); this restricts the field access to the users of the given groups only" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:45 +msgid "whether the field value is dependent of the current company; The value isn't stored on the model table. It is registered as `ir.property`. When the value of the company_dependent field is needed, an `ir.property` is searched, linked to the current company (and current record if one property exists). If the value is changed on the record, it either modifies the existing property for the current record (if one exists), or creates a new one for the current company and res_id. If the value is changed on the company side, it will impact all records on which the value hasn't been changed." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:45 +msgid "whether the field value is dependent of the current company;" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:47 +msgid "The value isn't stored on the model table. It is registered as `ir.property`. When the value of the company_dependent field is needed, an `ir.property` is searched, linked to the current company (and current record if one property exists)." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:52 +msgid "If the value is changed on the record, it either modifies the existing property for the current record (if one exists), or creates a new one for the current company and res_id." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:56 +msgid "If the value is changed on the company side, it will impact all records on which the value hasn't been changed." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:59 +msgid "whether the field value should be copied when the record is duplicated (default: ``True`` for normal fields, ``False`` for ``one2many`` and computed fields, including property fields and related fields)" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:64 +msgid "whether the field is stored in database (default:``True``, ``False`` for computed fields)" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:67 +msgid "aggregate function used by :meth:`~odoo.models.Model.read_group` when grouping on this field. Supported aggregate functions are: * ``array_agg`` : values, including nulls, concatenated into an array * ``count`` : number of rows * ``count_distinct`` : number of distinct rows * ``bool_and`` : true if all values are true, otherwise false * ``bool_or`` : true if at least one value is true, otherwise false * ``max`` : maximum value of all values * ``min`` : minimum value of all values * ``avg`` : the average (arithmetic mean) of all values * ``sum`` : sum of all values" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:67 +msgid "aggregate function used by :meth:`~odoo.models.Model.read_group` when grouping on this field." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:70 +msgid "Supported aggregate functions are:" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:72 +msgid "``array_agg`` : values, including nulls, concatenated into an array" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:73 +msgid "``count`` : number of rows" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:74 +msgid "``count_distinct`` : number of distinct rows" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:75 +msgid "``bool_and`` : true if all values are true, otherwise false" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:76 +msgid "``bool_or`` : true if at least one value is true, otherwise false" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:77 +msgid "``max`` : maximum value of all values" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:78 +msgid "``min`` : minimum value of all values" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:79 +msgid "``avg`` : the average (arithmetic mean) of all values" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:80 +msgid "``sum`` : sum of all values" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:82 +msgid "function used to expand read_group results when grouping on the current field. .. code-block:: python @api.model def _read_group_selection_field(self, values, domain, order): return ['choice1', 'choice2', ...] # available selection choices. @api.model def _read_group_many2one_field(self, records, domain, order): return records + self.search([custom_domain])" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:82 +msgid "function used to expand read_group results when grouping on the current field." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:97 +msgid "name of a method that computes the field .. seealso:: :ref:`Advanced Fields/Compute fields `" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:97 +msgid "name of a method that computes the field" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:99 +msgid ":ref:`Advanced Fields/Compute fields `" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:101 +msgid "whether the field should be computed before record insertion in database. Should be used to specify manually some fields as precompute=True when the field can be computed before record insertion. (e.g. avoid statistics fields based on search/read_group), many2one linking to the previous record, ... (default: `False`) .. warning:: Precomputation only happens when no explicit value and no default value is provided to create(). This means that a default value disables the precomputation, even if the field is specified as precompute=True. Precomputing a field can be counterproductive if the records of the given model are not created in batch. Consider the situation were many records are created one by one. If the field is not precomputed, it will normally be computed in batch at the flush(), and the prefetching mechanism will help making the computation efficient. On the other hand, if the field is precomputed, the computation will be made one by one, and will therefore not be able to take advantage of the prefetching mechanism. Following the remark above, precomputed fields can be interesting on the lines of a one2many, which are usually created in batch by the ORM itself, provided that they are created by writing on the record that contains them." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:101 +msgid "whether the field should be computed before record insertion in database. Should be used to specify manually some fields as precompute=True when the field can be computed before record insertion. (e.g. avoid statistics fields based on search/read_group), many2one linking to the previous record, ... (default: `False`)" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:109 +msgid "Precomputation only happens when no explicit value and no default value is provided to create(). This means that a default value disables the precomputation, even if the field is specified as precompute=True." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:114 +msgid "Precomputing a field can be counterproductive if the records of the given model are not created in batch. Consider the situation were many records are created one by one. If the field is not precomputed, it will normally be computed in batch at the flush(), and the prefetching mechanism will help making the computation efficient. On the other hand, if the field is precomputed, the computation will be made one by one, and will therefore not be able to take advantage of the prefetching mechanism." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:123 +msgid "Following the remark above, precomputed fields can be interesting on the lines of a one2many, which are usually created in batch by the ORM itself, provided that they are created by writing on the record that contains them." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:128 +msgid "whether the field should be recomputed as superuser to bypass access rights (by default ``True`` for stored fields, ``False`` for non stored fields)" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:132 +msgid "name of a method that inverses the field (optional)" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:134 +msgid "name of a method that implement search on the field (optional)" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:136 +msgid "sequence of field names" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:138 +msgid "whether the field must be exported by default in an import-compatible export .. seealso:: :ref:`Advanced fields/Related fields `" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:138 +msgid "whether the field must be exported by default in an import-compatible export" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Field:140 +msgid ":ref:`Advanced fields/Related fields `" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:127 +msgid "Basic Fields" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Boolean:1 +msgid "Encapsulates a :class:`bool`." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Char:1 +msgid "Basic string field, can be length-limited, usually displayed as a single-line string in clients." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Char:4 +msgid "the maximum size of values stored for that field" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Char:6 +msgid "states whether the value is trimmed or not (by default, ``True``). Note that the trim operation is applied only by the web client." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Char:9 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Text:4 +msgid "enable the translation of the field's values; use ``translate=True`` to translate field values as a whole; ``translate`` may also be a callable such that ``translate(callback, value)`` translates ``value`` by using ``callback(term)`` to retrieve the translation of terms." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Float:1 +msgid "Encapsulates a :class:`float`." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Float:3 +msgid "The precision digits are given by the (optional) ``digits`` attribute." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Float:5 +msgid "a pair (total, decimal) or a string referencing a :class:`~odoo.addons.base.models.decimal_precision.DecimalPrecision` record name." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Float:9 +msgid "When a float is a quantity associated with an unit of measure, it is important to use the right tool to compare or round values with the correct precision." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Float:12 +msgid "The Float class provides some static methods for this purpose:" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Float:14 +msgid ":func:`~odoo.fields.Float.round()` to round a float with the given precision. :func:`~odoo.fields.Float.is_zero()` to check if a float equals zero at the given precision. :func:`~odoo.fields.Float.compare()` to compare two floats at the given precision." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Float:18 +#: ../../../odoo/odoo/exceptions.py:docstring of odoo.exceptions.AccessDenied:7 +#: ../../../odoo/odoo/exceptions.py:docstring of odoo.exceptions.AccessError:3 +#: ../../../odoo/odoo/exceptions.py:docstring of odoo.exceptions.CacheMiss:3 +#: ../../../odoo/odoo/exceptions.py:docstring of odoo.exceptions.MissingError:3 +#: ../../../odoo/odoo/exceptions.py:docstring of odoo.exceptions.ValidationError:3 +#: ../../content/developer/reference/frontend/services.rst:309 +#: ../../content/developer/reference/frontend/services.rst:393 +msgid "Example" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Float:20 +msgid "To round a quantity with the precision of the unit of measure::" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Float:24 +msgid "To check if the quantity is zero with the precision of the unit of measure::" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Float:28 +msgid "To compare two quantities::" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Float:32 +msgid "The compare helper uses the __cmp__ semantics for historic purposes, therefore the proper, idiomatic way to use this helper is like so:" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Float:35 +msgid "if result == 0, the first and second floats are equal if result < 0, the first float is lower than the second if result > 0, the first float is greater than the second" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Integer:1 +msgid "Encapsulates an :class:`int`." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:140 +msgid "Advanced Fields" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Binary:1 +msgid "Encapsulates a binary content (e.g. a file)." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Binary:3 +msgid "whether the field should be stored as `ir_attachment` or in a column of the model's table (default: ``True``)." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Html:1 +msgid "Encapsulates an html code content." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Html:3 +msgid "whether value must be sanitized (default: ``True``)" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Html:4 +msgid "whether the sanitation can be bypassed by the users part of the `base.group_sanitize_override` group (default: ``False``)" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Html:6 +msgid "whether to sanitize tags (only a white list of attributes is accepted, default: ``True``)" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Html:8 +msgid "whether to sanitize attributes (only a white list of attributes is accepted, default: ``True``)" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Html:10 +msgid "whether to sanitize style attributes (default: ``False``)" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Html:11 +msgid "whether to strip style attributes (removed and therefore not sanitized, default: ``False``)" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Html:13 +msgid "whether to strip classes attributes (default: ``False``)" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Image:1 +msgid "Encapsulates an image, extending :class:`Binary`." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Image:3 +msgid "If image size is greater than the ``max_width``/``max_height`` limit of pixels, the image will be resized to the limit by keeping aspect ratio." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Image:6 +msgid "the maximum width of the image (default: ``0``, no limit)" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Image:7 +msgid "the maximum height of the image (default: ``0``, no limit)" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Image:8 +msgid "whether the image resolution should be verified to ensure it doesn't go over the maximum image resolution (default: ``True``). See :class:`odoo.tools.image.ImageProcess` for maximum image resolution (default: ``45e6``)." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Image:14 +msgid "If no ``max_width``/``max_height`` is specified (or is set to 0) and ``verify_resolution`` is False, the field content won't be verified at all and a :class:`Binary` field should be used." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Monetary:1 +msgid "Encapsulates a :class:`float` expressed in a given :class:`res_currency`." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Monetary:4 +msgid "The decimal precision and currency symbol are taken from the ``currency_field`` attribute." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Monetary:6 +msgid "name of the :class:`Many2one` field holding the :class:`res_currency ` this monetary field is expressed in (default: `'currency_id'`)" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Selection:1 +msgid "Encapsulates an exclusive choice between different values." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Selection:3 +msgid "specifies the possible values for this field. It is given as either a list of pairs ``(value, label)``, or a model method, or a method name." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Selection:8 +msgid "provides an extension of the selection in the case of an overridden field. It is a list of pairs ``(value, label)`` or singletons ``(value,)``, where singleton values must appear in the overridden selection. The new values are inserted in an order that is consistent with the overridden selection and this list:: selection = [('a', 'A'), ('b', 'B')] selection_add = [('c', 'C'), ('b',)] > result = [('a', 'A'), ('c', 'C'), ('b', 'B')]" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Selection:8 +msgid "provides an extension of the selection in the case of an overridden field. It is a list of pairs ``(value, label)`` or singletons ``(value,)``, where singleton values must appear in the overridden selection. The new values are inserted in an order that is consistent with the overridden selection and this list::" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Selection:19 +msgid "provides a fallback mechanism for any overridden field with a selection_add. It is a dict that maps every option from the selection_add to a fallback action. This fallback action will be applied to all records whose selection_add option maps to it. The actions can be any of the following: - 'set null' -- the default, all records with this option will have their selection value set to False. - 'cascade' -- all records with this option will be deleted along with the option itself. - 'set default' -- all records with this option will be set to the default of the field definition - 'set VALUE' -- all records with this option will be set to the given value - -- a callable whose first and only argument will be the set of records containing the specified Selection option, for custom processing" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Selection:19 +msgid "provides a fallback mechanism for any overridden field with a selection_add. It is a dict that maps every option from the selection_add to a fallback action." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Selection:23 +msgid "This fallback action will be applied to all records whose selection_add option maps to it." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Selection:37 +msgid "The actions can be any of the following:" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Selection:27 +msgid "'set null' -- the default, all records with this option will have their selection value set to False." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Selection:29 +msgid "'cascade' -- all records with this option will be deleted along with the option itself." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Selection:31 +msgid "'set default' -- all records with this option will be set to the default of the field definition" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Selection:33 +msgid "'set VALUE' -- all records with this option will be set to the given value" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Selection:35 +msgid " -- a callable whose first and only argument will be the set of records containing the specified Selection option, for custom processing" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Selection:39 +msgid "The attribute ``selection`` is mandatory except in the case of ``related`` or extended fields." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Text:1 +msgid "Very similar to :class:`Char` but used for longer contents, does not have a size and usually displayed as a multiline text box." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:157 +msgid "Date(time) Fields" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:159 +msgid ":class:`Dates ` and :class:`Datetimes ` are very important fields in any kind of business application. Their misuse can create invisible yet painful bugs, this section aims to provide Odoo developers with the knowledge required to avoid misusing these fields." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:165 +msgid "When assigning a value to a Date/Datetime field, the following options are valid:" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:167 +msgid "A `date` or `datetime` object." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:168 +msgid "A string in the proper server format:" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:170 +msgid "``YYYY-MM-DD`` for :class:`~odoo.fields.Date` fields," +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:171 +msgid "``YYYY-MM-DD HH:MM:SS`` for :class:`~odoo.fields.Datetime` fields." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:173 +msgid "`False` or `None`." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:175 +msgid "The Date and Datetime fields class have helper methods to attempt conversion into a compatible type:" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:178 +msgid ":func:`~odoo.fields.Date.to_date` will convert to a :class:`datetime.date`" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:179 +msgid ":func:`~odoo.fields.Datetime.to_datetime` will convert to a :class:`datetime.datetime`." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:183 +msgid "To parse date/datetimes coming from external sources::" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:187 +msgid "Date / Datetime comparison best practices:" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:189 +msgid "Date fields can **only** be compared to date objects." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:190 +msgid "Datetime fields can **only** be compared to datetime objects." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:192 +msgid "Strings representing dates and datetimes can be compared between each other, however the result may not be the expected result, as a datetime string will always be greater than a date string, therefore this practice is **heavily** discouraged." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:198 +msgid "Common operations with dates and datetimes such as addition, subtraction or fetching the start/end of a period are exposed through both :class:`~odoo.fields.Date` and :class:`~odoo.fields.Datetime`. These helpers are also available by importing `odoo.tools.date_utils`." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:203 +msgid "Timezones" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:205 +msgid "Datetime fields are stored as `timestamp without timezone` columns in the database and are stored in the UTC timezone. This is by design, as it makes the Odoo database independent from the timezone of the hosting server system. Timezone conversion is managed entirely by the client side." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Date:1 +msgid "Encapsulates a python :class:`date ` object." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.add:1 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.add:1 +msgid "Return the sum of ``value`` and a :class:`relativedelta`." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.add:3 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.end_of:3 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.start_of:3 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.subtract:3 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.add:3 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.end_of:3 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.start_of:3 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.subtract:3 +msgid "initial date or datetime." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.add:4 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.subtract:4 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.add:4 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.subtract:4 +msgid "positional args to pass directly to :class:`relativedelta`." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.add:5 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.subtract:5 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.add:5 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.subtract:5 +msgid "keyword args to pass directly to :class:`relativedelta`." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.add:6 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.subtract:6 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.add:6 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.subtract:6 +msgid "the resulting date/datetime." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Date.context_today:1 +msgid "Return the current date as seen in the client's timezone in a format fit for date fields." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Date.context_today:4 +msgid "This method may be used to compute default values." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Date.context_today:6 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Datetime.context_timestamp:8 +msgid "recordset from which the timezone will be obtained." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Date.context_today:7 +msgid "optional datetime value to use instead of the current date and time (must be a datetime, regular dates can't be converted between timezones)." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.end_of:1 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.end_of:1 +msgid "Get end of a time period from a date or a datetime." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.end_of:4 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.end_of:4 +msgid "Type of period in string, can be year, quarter, month, week, day or hour." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.end_of:5 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.end_of:5 +msgid "A date/datetime object corresponding to the start of the specified period." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.start_of:1 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.start_of:1 +msgid "Get start of a time period from a date or a datetime." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.start_of:4 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.start_of:4 +msgid "type of period in string, can be year, quarter, month, week, day or hour." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.start_of:5 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.start_of:5 +msgid "a date/datetime object corresponding to the start of the specified period." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.subtract:1 +#: ../../../odoo/odoo/fields.py:docstring of odoo.tools.date_utils.subtract:1 +msgid "Return the difference between ``value`` and a :class:`relativedelta`." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Date.to_date:1 +msgid "Attempt to convert ``value`` to a :class:`date` object." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Date.to_date:5 +msgid "If a datetime object is given as value, it will be converted to a date object and all datetime-specific information will be lost (HMS, TZ, ...)." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Date.to_date:9 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Date.to_string:3 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Datetime.to_datetime:3 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Datetime.to_string:3 +msgid "value to convert." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Date.to_date:11 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Datetime.to_datetime:5 +msgid "an object representing ``value``." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Date.to_string:1 +msgid "Convert a :class:`date` or :class:`datetime` object to a string." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Date.to_string:4 +msgid "a string representing ``value`` in the server's date format, if ``value`` is of type :class:`datetime`, the hours, minute, seconds, tzinfo will be truncated." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Date.today:1 +msgid "Return the current day in the format expected by the ORM." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Date.today:3 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Datetime.now:3 +msgid "This function may be used to compute default values." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Datetime:1 +msgid "Encapsulates a python :class:`datetime ` object." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Datetime.context_timestamp:1 +msgid "Return the given timestamp converted to the client's timezone." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Datetime.context_timestamp:3 +msgid "This method is *not* meant for use as a default initializer, because datetime fields are automatically converted upon display on client side. For default values, :meth:`now` should be used instead." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Datetime.context_timestamp:9 +msgid "naive datetime value (expressed in UTC) to be converted to the client timezone." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Datetime.context_timestamp:11 +msgid "timestamp converted to timezone-aware datetime in context timezone." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Datetime.now:1 +msgid "Return the current day and time in the format expected by the ORM." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Datetime.to_datetime:1 +msgid "Convert an ORM ``value`` into a :class:`datetime` value." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Datetime.to_string:1 +msgid "Convert a :class:`datetime` or :class:`date` object to a string." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Datetime.to_string:5 +msgid "a string representing ``value`` in the server's datetime format, if ``value`` is of type :class:`date`, the time portion will be midnight (00:00:00)." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Datetime.today:1 +msgid "Return the current day, at midnight (00:00:00)." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:218 +msgid "Relational Fields" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Many2one:1 +msgid "The value of such a field is a recordset of size 0 (no record) or 1 (a single record)." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Many2one:4 +msgid "name of the target model ``Mandatory`` except for related or extended fields." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Many2one:7 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.One2many:10 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Many2many:29 +msgid "an optional domain to set on candidate values on the client side (domain or string)" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Many2one:10 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.One2many:13 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Many2many:32 +msgid "an optional context to use on the client side when handling that field" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Many2one:13 +msgid "what to do when the referred record is deleted; possible values are: ``'set null'``, ``'restrict'``, ``'cascade'``" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Many2one:16 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.One2many:16 +msgid "whether JOINs are generated upon search through that field (default: ``False``)" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Many2one:19 +msgid "set it to ``True`` to make fields of the target model accessible from the current model (corresponds to ``_inherits``)" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Many2one:22 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Many2many:35 +msgid "Mark the field to be verified in :meth:`~odoo.models.Model._check_company`. Add a default company domain depending on the field attributes." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.One2many:1 +msgid "One2many field; the value of such a field is the recordset of all the records in ``comodel_name`` such that the field ``inverse_name`` is equal to the current record." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.One2many:5 +msgid "name of the target model" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.One2many:7 +msgid "name of the inverse ``Many2one`` field in ``comodel_name``" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.One2many:19 +msgid "The attributes ``comodel_name`` and ``inverse_name`` are mandatory except in the case of related fields or field extensions." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Many2many:1 +msgid "Many2many field; the value of such a field is the recordset." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Many2many:3 +msgid "name of the target model (string) mandatory except in the case of related or extended fields" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Many2many:6 +msgid "optional name of the table that stores the relation in the database" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Many2many:9 +msgid "optional name of the column referring to \"these\" records in the table ``relation``" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Many2many:12 +msgid "optional name of the column referring to \"those\" records in the table ``relation``" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Many2many:15 +msgid "The attributes ``relation``, ``column1`` and ``column2`` are optional. If not given, names are automatically generated from model names, provided ``model_name`` and ``comodel_name`` are different!" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Many2many:19 +msgid "Note that having several fields with implicit relation parameters on a given model with the same comodel is not accepted by the ORM, since those field would use the same table. The ORM prevents two many2many fields to use the same relation parameters, except if" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Many2many:24 +msgid "both fields use the same model, comodel, and relation parameters are explicit; or" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Many2many:27 +msgid "at least one field belongs to a model with ``_auto = False``." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Command:1 +msgid ":class:`~odoo.fields.One2many` and :class:`~odoo.fields.Many2many` fields expect a special command to manipulate the relation they implement." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Command:4 +msgid "Internally, each command is a 3-elements tuple where the first element is a mandatory integer that identifies the command, the second element is either the related record id to apply the command on (commands update, delete, unlink and link) either 0 (commands create, clear and set), the third element is either the ``values`` to write on the record (commands create and update) either the new ``ids`` list of related records (command set), either 0 (commands delete, unlink, link, and clear)." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Command:12 +msgid "Via Python, we encourage developers craft new commands via the various functions of this namespace. We also encourage developers to use the command identifier constant names when comparing the 1st element of existing commands." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Command:17 +msgid "Via RPC, it is impossible nor to use the functions nor the command constant names. It is required to instead write the literal 3-elements tuple where the first element is the integer identifier of the command." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Command.create:1 +msgid "Create new records in the comodel using ``values``, link the created records to ``self``." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Command.create:4 +msgid "In case of a :class:`~odoo.fields.Many2many` relation, one unique new record is created in the comodel such that all records in `self` are linked to the new record." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Command.create:8 +msgid "In case of a :class:`~odoo.fields.One2many` relation, one new record is created in the comodel for every record in ``self`` such that every record in ``self`` is linked to exactly one of the new records." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Command.create:12 +msgid "Return the command triple :samp:`(CREATE, 0, {values})`" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Command.update:1 +msgid "Write ``values`` on the related record." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Command.update:3 +msgid "Return the command triple :samp:`(UPDATE, {id}, {values})`" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Command.delete:1 +msgid "Remove the related record from the database and remove its relation with ``self``." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Command.delete:4 +msgid "In case of a :class:`~odoo.fields.Many2many` relation, removing the record from the database may be prevented if it is still linked to other records." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Command.delete:8 +msgid "Return the command triple :samp:`(DELETE, {id}, 0)`" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Command.unlink:1 +msgid "Remove the relation between ``self`` and the related record." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Command.unlink:3 +msgid "In case of a :class:`~odoo.fields.One2many` relation, the given record is deleted from the database if the inverse field is set as ``ondelete='cascade'``. Otherwise, the value of the inverse field is set to False and the record is kept." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Command.unlink:8 +msgid "Return the command triple :samp:`(UNLINK, {id}, 0)`" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Command.link:1 +msgid "Add a relation between ``self`` and the related record." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Command.link:3 +msgid "Return the command triple :samp:`(LINK, {id}, 0)`" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Command.clear:1 +msgid "Remove all records from the relation with ``self``. It behaves like executing the `unlink` command on every record." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Command.clear:4 +msgid "Return the command triple :samp:`(CLEAR, 0, 0)`" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Command.set:1 +msgid "Replace the current relations of ``self`` by the given ones. It behaves like executing the ``unlink`` command on every removed relation then executing the ``link`` command on every new relation." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Command.set:5 +msgid "Return the command triple :samp:`(SET, 0, {ids})`" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:232 +msgid "Pseudo-relational fields" +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Reference:1 +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Many2oneReference:1 +msgid "Pseudo-relational field (no FK in database)." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Reference:3 +msgid "The field value is stored as a :class:`string ` following the pattern ``\"res_model,res_id\"`` in database." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Many2oneReference:3 +msgid "The field value is stored as an :class:`integer ` id in database." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Many2oneReference:5 +msgid "Contrary to :class:`Reference` fields, the model has to be specified in a :class:`Char` field, whose name has to be specified in the `model_field` attribute for the current :class:`Many2oneReference` field." +msgstr "" + +#: ../../../odoo/odoo/fields.py:docstring of odoo.fields.Many2oneReference:9 +msgid "name of the :class:`Char` where the model name is stored." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:243 +msgid "Fields can be computed (instead of read straight from the database) using the ``compute`` parameter. **It must assign the computed value to the field**. If it uses the values of other *fields*, it should specify those fields using :func:`~odoo.api.depends`. ::" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:256 +msgid "dependencies can be dotted paths when using sub-fields::" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:263 +msgid "computed fields are not stored by default, they are computed and returned when requested. Setting ``store=True`` will store them in the database and automatically enable searching." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:266 +msgid "searching on a computed field can also be enabled by setting the ``search`` parameter. The value is a method name returning a :ref:`reference/orm/domains`. ::" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:277 +msgid "The search method is invoked when processing domains before doing an actual search on the model. It must return a domain equivalent to the condition: ``field operator value``." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:283 +msgid "Computed fields are readonly by default. To allow *setting* values on a computed field, use the ``inverse`` parameter. It is the name of a function reversing the computation and setting the relevant fields::" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:299 +msgid "multiple fields can be computed at the same time by the same method, just use the same method on all fields and set all of them::" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:315 +msgid "While it is possible to use the same compute method for multiple fields, it is not recommended to do the same for the inverse method." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:319 +msgid "During the computation of the inverse, **all** fields that use said inverse are protected, meaning that they can't be computed, even if their value is not in the cache." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:323 +msgid "If any of those fields is accessed and its value is not in cache, the ORM will simply return a default value of `False` for these fields. This means that the value of the inverse fields (other than the one triggering the inverse method) may not give their correct value and this will probably break the expected behavior of the inverse method." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:332 +msgid "Related fields" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:334 +msgid "A special case of computed fields are *related* (proxy) fields, which provide the value of a sub-field on the current record. They are defined by setting the ``related`` parameter and like regular computed fields they can be stored::" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:341 +msgid "The value of a related field is given by following a sequence of relational fields and reading a field on the reached model. The complete sequence of fields to traverse is specified by the ``related`` attribute." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:345 +msgid "Some field attributes are automatically copied from the source field if they are not redefined: ``string``, ``help``, ``required`` (only if all fields in the sequence are required), ``groups``, ``digits``, ``size``, ``translate``, ``sanitize``, ``selection``, ``comodel_name``, ``domain``, ``context``. All semantic-free attributes are copied from the source field." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:352 +msgid "By default, related fields are:" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:354 +msgid "not stored" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:355 +msgid "not copied" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:356 +msgid "readonly" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:357 +msgid "computed in superuser mode" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:359 +msgid "Add the attribute ``store=True`` to make it stored, just like computed fields. Related fields are automatically recomputed when their dependencies are modified." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:365 +msgid "You can specify precise field dependencies if you don't want the related field to be recomputed on any dependency change::" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:376 +msgid "You cannot chain :class:`~odoo.fields.Many2many` or :class:`~odoo.fields.One2many` fields in ``related`` fields dependencies." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:378 +msgid "``related`` can be used to refer to a :class:`~odoo.fields.One2many` or :class:`~odoo.fields.Many2many` field on another model on the condition that it's done through a ``Many2one`` relation on the current model. ``One2many`` and ``Many2many`` are not supported and the results will not be aggregated correctly::" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:401 +msgid "Automatic fields" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:405 +msgid "Identifier :class:`field `" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:407 +msgid "If length of current recordset is 1, return id of unique record in it." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:409 +msgid "Raise an Error otherwise." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:414 +msgid "Access Log fields" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:416 +msgid "These fields are automatically set and updated if :attr:`~odoo.models.BaseModel._log_access` is enabled. It can be disabled to avoid creating or updating those fields on tables for which they are not useful." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:421 +msgid "By default, :attr:`~odoo.models.BaseModel._log_access` is set to the same value as :attr:`~odoo.models.BaseModel._auto`" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:426 +msgid "Stores when the record was created, :class:`~odoo.fields.Datetime`" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:430 +msgid "Stores *who* created the record, :class:`~odoo.fields.Many2one` to a ``res.users``." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:435 +msgid "Stores when the record was last updated, :class:`~odoo.fields.Datetime`" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:439 +msgid "Stores who last updated the record, :class:`~odoo.fields.Many2one` to a ``res.users``." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:442 +msgid ":attr:`~odoo.models.BaseModel._log_access` *must* be enabled on :class:`~odoo.models.TransientModel`." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:448 +msgid "Reserved Field names" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:450 +msgid "A few field names are reserved for pre-defined behaviors beyond that of automated fields. They should be defined on a model when the related behavior is desired:" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:456 +msgid "default value for :attr:`~odoo.models.BaseModel._rec_name`, used to display records in context where a representative \"naming\" is necessary." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:460 +#: ../../content/developer/reference/backend/orm.rst:504 +msgid ":class:`~odoo.fields.Char`" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:464 +msgid "toggles the global visibility of the record, if ``active`` is set to ``False`` the record is invisible in most searches and listing." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:467 +msgid ":class:`~odoo.fields.Boolean`" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:469 +msgid "Special methods:" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.toggle_active:1 +msgid "Inverses the value of :attr:`active` on the records in ``self``." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.action_archive:1 +msgid "Sets :attr:`active` to ``False`` on a recordset, by calling :meth:`toggle_active` on its currently active records." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.action_unarchive:1 +msgid "Sets :attr:`active` to ``True`` on a recordset, by calling :meth:`toggle_active` on its currently inactive records." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:484 +msgid "lifecycle stages of the object, used by the ``states`` attribute on :class:`fields `." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:487 +msgid ":class:`~odoo.fields.Selection`" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:491 +msgid "default_value of :attr:`~._parent_name`, used to organize records in a tree structure and enables the ``child_of`` and ``parent_of`` operators in domains." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:495 +msgid ":class:`~odoo.fields.Many2one`" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:499 +msgid "When :attr:`~._parent_store` is set to True, used to store a value reflecting the tree structure of :attr:`~._parent_name`, and to optimize the operators ``child_of`` and ``parent_of`` in search domains. It must be declared with ``index=True`` for proper operation." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:508 +msgid "Main field name used for Odoo multi-company behavior." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:510 +msgid "Used by `:meth:~odoo.models._check_company` to check multi company consistency. Defines whether a record is shared between companies (no value) or only accessible by the users of a given company." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:514 +msgid ":class:`~odoo.fields.Many2one` :type: :class:`~odoo.addons.base.models.res_company`" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:518 +msgid "Recordsets" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:520 +msgid "Interactions with models and records are performed through recordsets, an ordered collection of records of the same model." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:523 +msgid "Contrary to what the name implies, it is currently possible for recordsets to contain duplicates. This may change in the future." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:526 +msgid "Methods defined on a model are executed on a recordset, and their ``self`` is a recordset::" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:536 +msgid "Iterating on a recordset will yield new sets of *a single record* (\"singletons\"), much like iterating on a Python string yields strings of a single characters::" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:546 +msgid "Field access" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:548 +msgid "Recordsets provide an \"Active Record\" interface: model fields can be read and written directly from the record as attributes." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:553 +msgid "When accessing non-relational fields on a recordset of potentially multiple records, use :meth:`~odoo.models.BaseModel.mapped`::" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:558 +msgid "Field values can also be accessed like dict items, which is more elegant and safer than ``getattr()`` for dynamic field names. Setting a field's value triggers an update to the database::" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:573 +msgid "Trying to read a field on multiple records will raise an error for non relational fields." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:576 +msgid "Accessing a relational field (:class:`~odoo.fields.Many2one`, :class:`~odoo.fields.One2many`, :class:`~odoo.fields.Many2many`) *always* returns a recordset, empty if the field is not set." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:581 +msgid "Record cache and prefetching" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:583 +msgid "Odoo maintains a cache for the fields of the records, so that not every field access issues a database request, which would be terrible for performance. The following example queries the database only for the first statement::" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:590 +msgid "To avoid reading one field on one record at a time, Odoo *prefetches* records and fields following some heuristics to get good performance. Once a field must be read on a given record, the ORM actually reads that field on a larger recordset, and stores the returned values in cache for later use. The prefetched recordset is usually the recordset from which the record comes by iteration. Moreover, all simple stored fields (boolean, integer, float, char, text, date, datetime, selection, many2one) are fetched altogether; they correspond to the columns of the model's table, and are fetched efficiently in the same query." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:599 +msgid "Consider the following example, where ``partners`` is a recordset of 1000 records. Without prefetching, the loop would make 2000 queries to the database. With prefetching, only one query is made::" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:608 +msgid "The prefetching also works on *secondary records*: when relational fields are read, their values (which are records) are subscribed for future prefetching. Accessing one of those secondary records prefetches all secondary records from the same model. This makes the following example generate only two queries, one for partners and one for countries::" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:623 +msgid "Method decorators" +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api:1 +msgid "The Odoo API module defines Odoo Environments and method decorators." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api:3 +msgid "Document this module" +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.autovacuum:1 +msgid "Decorate a method so that it is called by the daily vacuum cron job (model ``ir.autovacuum``). This is typically used for garbage-collection-like tasks that do not deserve a specific cron job." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.constrains:1 +msgid "Decorate a constraint checker." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.constrains:3 +msgid "Each argument must be a field name used in the check::" +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.constrains:11 +msgid "Invoked on the records on which one of the named fields has been modified." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.constrains:13 +msgid "Should raise :exc:`~odoo.exceptions.ValidationError` if the validation failed." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.constrains:18 +msgid "``@constrains`` only supports simple field names, dotted names (fields of relational fields e.g. ``partner_id.customer``) are not supported and will be ignored." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.constrains:22 +msgid "``@constrains`` will be triggered only if the declared fields in the decorated method are included in the ``create`` or ``write`` call. It implies that fields not present in a view will not trigger a call during a record creation. A override of ``create`` is necessary to make sure a constraint will always be triggered (e.g. to test the absence of value)." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.constrains:29 +msgid "One may also pass a single function as argument. In that case, the field names are given by calling the function with a model instance." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.depends:1 +msgid "Return a decorator that specifies the field dependencies of a \"compute\" method (for new-style function fields). Each argument must be a string that consists in a dot-separated sequence of field names::" +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.depends:15 +msgid "One may also pass a single function as argument. In that case, the dependencies are given by calling the function with the field's model." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.depends_context:1 +msgid "Return a decorator that specifies the context dependencies of a non-stored \"compute\" method. Each argument is a key in the context's dictionary::" +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.depends_context:16 +msgid "All dependencies must be hashable. The following keys have special support:" +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.depends_context:19 +msgid "`company` (value in context or current company id)," +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.depends_context:20 +msgid "`uid` (current user id and superuser flag)," +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.depends_context:21 +msgid "`active_test` (value in env.context or value in field.context)." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.model:1 +msgid "Decorate a record-style method where ``self`` is a recordset, but its contents is not relevant, only the model is. Such a method::" +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.model_create_multi:1 +msgid "Decorate a method that takes a list of dictionaries and creates multiple records. The method may be called with either a single dict or a list of dicts::" +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.onchange:1 +msgid "Return a decorator to decorate an onchange method for given fields." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.onchange:3 +msgid "In the form views where the field appears, the method will be called when one of the given fields is modified. The method is invoked on a pseudo-record that contains the values present in the form. Field assignments on that record are automatically sent back to the client." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.onchange:8 +msgid "Each argument must be a field name::" +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.onchange:20 +msgid "If the type is set to notification, the warning will be displayed in a notification. Otherwise it will be displayed in a dialog as default." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.onchange:25 +msgid "``@onchange`` only supports simple field names, dotted names (fields of relational fields e.g. ``partner_id.tz``) are not supported and will be ignored" +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.onchange:31 +msgid "Since ``@onchange`` returns a recordset of pseudo-records, calling any one of the CRUD methods (:meth:`create`, :meth:`read`, :meth:`write`, :meth:`unlink`) on the aforementioned recordset is undefined behaviour, as they potentially do not exist in the database yet." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.onchange:37 +msgid "Instead, simply set the record's field like shown in the example above or call the :meth:`update` method." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.onchange:42 +msgid "It is not possible for a ``one2many`` or ``many2many`` field to modify itself via onchange. This is a webclient limitation - see `#2693 `_." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.ondelete:1 +msgid "Mark a method to be executed during :meth:`~odoo.models.BaseModel.unlink`." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.ondelete:3 +msgid "The goal of this decorator is to allow client-side errors when unlinking records if, from a business point of view, it does not make sense to delete such records. For instance, a user should not be able to delete a validated sales order." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.ondelete:8 +msgid "While this could be implemented by simply overriding the method ``unlink`` on the model, it has the drawback of not being compatible with module uninstallation. When uninstalling the module, the override could raise user errors, but we shouldn't care because the module is being uninstalled, and thus **all** records related to the module should be removed anyway." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.ondelete:14 +msgid "This means that by overriding ``unlink``, there is a big chance that some tables/records may remain as leftover data from the uninstalled module. This leaves the database in an inconsistent state. Moreover, there is a risk of conflicts if the module is ever reinstalled on that database." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.ondelete:19 +msgid "Methods decorated with ``@ondelete`` should raise an error following some conditions, and by convention, the method should be named either ``_unlink_if_`` or ``_unlink_except_``." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.ondelete:36 +msgid "Whether the decorated method should be called if the module that implements said method is being uninstalled. Should almost always be ``False``, so that module uninstallation does not trigger those errors." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.ondelete:42 +msgid "The parameter ``at_uninstall`` should only be set to ``True`` if the check you are implementing also applies when uninstalling the module." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.ondelete:45 +msgid "For instance, it doesn't matter if when uninstalling ``sale``, validated sales orders are being deleted because all data pertaining to ``sale`` should be deleted anyway, in that case ``at_uninstall`` should be set to ``False``." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.ondelete:50 +msgid "However, it makes sense to prevent the removal of the default language if no other languages are installed, since deleting the default language will break a lot of basic behavior. In this case, ``at_uninstall`` should be set to ``True``." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.returns:1 +msgid "Return a decorator for methods that return instances of ``model``." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.returns:3 +msgid "a model name, or ``'self'`` for the current model" +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.returns:5 +msgid "a function ``downgrade(self, value, *args, **kwargs)`` to convert the record-style ``value`` to a traditional-style output" +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.returns:8 +msgid "a function ``upgrade(self, value, *args, **kwargs)`` to convert the traditional-style ``value`` to a record-style output" +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.returns:11 +msgid "The arguments ``self``, ``*args`` and ``**kwargs`` are the ones passed to the method in the record-style." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.returns:14 +msgid "The decorator adapts the method output to the api style: ``id``, ``ids`` or ``False`` for the traditional style, and recordset for the record style::" +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.returns:28 +msgid "Note that the decorated method must satisfy that convention." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.returns:30 +msgid "Those decorators are automatically *inherited*: a method that overrides a decorated existing method will be decorated with the same ``@returns(model)``." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:637 +msgid "With sphinx 2.0 : autodecorator" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:639 +msgid "Add in Views reference * It is possible to suppress the trigger from a specific field by adding ``on_change=\"0\"`` in a view::" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:645 +msgid "will not trigger any interface update when the field is edited by the user, even if there are function fields or explicit onchange depending on that field." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:652 +#: ../../content/developer/reference/frontend/framework_overview.rst:96 +msgid "Environment" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:654 +msgid "The :class:`~odoo.api.Environment` stores various contextual data used by the ORM: the database cursor (for database queries), the current user (for access rights checking) and the current context (storing arbitrary metadata). The environment also stores caches." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:659 +msgid "All recordsets have an environment, which is immutable, can be accessed using :attr:`~odoo.models.Model.env` and gives access to:" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:662 +msgid "the current user (:attr:`~odoo.api.Environment.user`)" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:663 +msgid "the cursor (:attr:`~odoo.api.Environment.cr`)" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:664 +msgid "the superuser flag (:attr:`~odoo.api.Environment.su`)" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:665 +msgid "or the context (:attr:`~odoo.api.Environment.context`)" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:676 +msgid "When creating a recordset from an other recordset, the environment is inherited. The environment can be used to get an empty recordset in an other model, and query that model::" +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.Environment.ref:1 +msgid "Return the record corresponding to the given ``xml_id``." +msgstr "" + +#: ../../docstring of odoo.api.Environment.lang:1 +msgid "Return the current language code." +msgstr "" + +#: ../../docstring of odoo.api.Environment.user:1 +msgid "Return the current user (as an instance)." +msgstr "" + +#: ../../docstring of odoo.api.Environment.user:3 +msgid "current user - sudoed" +msgstr "" + +#: ../../docstring of odoo.api.Environment.user:4 +msgid ":class:`~odoo.addons.base.models.res_users`" +msgstr "" + +#: ../../docstring of odoo.api.Environment.company:1 +msgid "Return the current company (as an instance)." +msgstr "" + +#: ../../docstring of odoo.api.Environment.company:3 +msgid "If not specified in the context (`allowed_company_ids`), fallback on current user main company." +msgstr "" + +#: ../../docstring of odoo.api.Environment.company:6 +#: ../../docstring of odoo.api.Environment.companies:6 +msgid "invalid or unauthorized `allowed_company_ids` context key content." +msgstr "" + +#: ../../docstring of odoo.api.Environment.company:7 +msgid "current company (default=`self.user.company_id`), with the current environment" +msgstr "" + +#: ../../docstring of odoo.api.Environment.company:12 +#: ../../docstring of odoo.api.Environment.companies:12 +msgid "No sanity checks applied in sudo mode ! When in sudo mode, a user can access any company, even if not in his allowed companies." +msgstr "" + +#: ../../docstring of odoo.api.Environment.company:16 +#: ../../docstring of odoo.api.Environment.companies:16 +msgid "This allows to trigger inter-company modifications, even if the current user doesn't have access to the targeted company." +msgstr "" + +#: ../../docstring of odoo.api.Environment.companies:1 +msgid "Return a recordset of the enabled companies by the user." +msgstr "" + +#: ../../docstring of odoo.api.Environment.companies:3 +msgid "If not specified in the context(`allowed_company_ids`), fallback on current user companies." +msgstr "" + +#: ../../docstring of odoo.api.Environment.companies:7 +msgid "current companies (default=`self.user.company_ids`), with the current environment" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:700 +msgid "Altering the environment" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.with_context:1 +msgid "Returns a new version of this recordset attached to an extended context." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.with_context:4 +msgid "The extended context is either the provided ``context`` in which ``overrides`` are merged or the *current* context in which ``overrides`` are merged e.g.::" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.with_user:1 +msgid "Return a new version of this recordset attached to the given user, in non-superuser mode, unless `user` is the superuser (by convention, the superuser is always in superuser mode.)" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.with_company:1 +msgid "Return a new version of this recordset with a modified context, such that::" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.with_company:6 +msgid "main company of the new environment." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.with_company:11 +msgid "When using an unauthorized company for current user, accessing the company(ies) on the environment may trigger an AccessError if not done in a sudoed environment." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.with_env:1 +msgid "Return a new version of this recordset attached to the provided environment." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.with_env:7 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.sudo:18 +msgid "The returned recordset has the same prefetch object as ``self``." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.sudo:1 +msgid "Returns a new version of this recordset with superuser mode enabled or disabled, depending on `flag`. The superuser mode does not change the current user, and simply bypasses access rights checks." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.sudo:7 +msgid "Using ``sudo`` could cause data access to cross the boundaries of record rules, possibly mixing records that are meant to be isolated (e.g. records from different companies in multi-company environments)." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.sudo:12 +msgid "It may lead to un-intuitive results in methods which select one record among many - for example getting the default company, or selecting a Bill of Materials." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:717 +msgid "SQL Execution" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:719 +msgid "The :attr:`~odoo.api.Environment.cr` attribute on environments is the cursor for the current database transaction and allows executing SQL directly, either for queries which are difficult to express using the ORM (e.g. complex joins) or for performance reasons::" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:727 +msgid "Executing raw SQL bypasses the ORM and, by consequent, Odoo security rules. Please make sure your queries are sanitized when using user input and prefer using ORM utilities if you don't really need to use SQL queries." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:731 +msgid "One important thing to know about models is that they don't necessarily perform database updates right away. Indeed, for performance reasons, the framework delays the recomputation of fields after modifying records. And some database updates are delayed, too. Therefore, before querying the database, one has to make sure that it contains the relevant data for the query. This operation is called *flushing* and performs the expected database updates." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:748 +msgid "Before every SQL query, one has to flush the data needed for that query. There are three levels for flushing, each with its own API. One can flush either everything, all the records of a model, or some specific records. Because delaying updates improves performance in general, we recommend to be *specific* when flushing." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.Environment.flush_all:1 +msgid "Flush all pending computations and updates to the database." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.flush_model:1 +msgid "Process the pending computations and database updates on ``self``'s model. When the parameter is given, the method guarantees that at least the given fields are flushed to the database. More fields can be flushed, though." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.flush_model:6 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.flush_recordset:6 +msgid "optional iterable of field names to flush" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.flush_recordset:1 +msgid "Process the pending computations and database updates on the records ``self``. When the parameter is given, the method guarantees that at least the given fields on records ``self`` are flushed to the database. More fields and records can be flushed, though." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:760 +msgid "Because models use the same cursor and the :class:`~odoo.api.Environment` holds various caches, these caches must be invalidated when *altering* the database in raw SQL, or further uses of models may become incoherent. It is necessary to clear caches when using ``CREATE``, ``UPDATE`` or ``DELETE`` in SQL, but not ``SELECT`` (which simply reads the database)." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:778 +msgid "Just like flushing, one can invalidate either the whole cache, the cache of all the records of a model, or the cache of specific records. One can even invalidate specific fields on some records or all records of a model. As the cache improves performance in general, we recommend to be *specific* when invalidating." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.Environment.invalidate_all:1 +msgid "Invalidate the cache of all records." +msgstr "" + +#: ../../../odoo/odoo/api.py:docstring of odoo.api.Environment.invalidate_all:3 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.invalidate_model:6 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.invalidate_recordset:6 +msgid "whether pending updates should be flushed before invalidation. It is ``True`` by default, which ensures cache consistency. Do not use this parameter unless you know what you are doing." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.invalidate_model:1 +msgid "Invalidate the cache of all records of ``self``'s model, when the cached values no longer correspond to the database values. If the parameter is given, only the given fields are invalidated from cache." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.invalidate_model:5 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.invalidate_recordset:5 +msgid "optional iterable of field names to invalidate" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.invalidate_recordset:1 +msgid "Invalidate the cache of the records in ``self``, when the cached values no longer correspond to the database values. If the parameter is given, only the given fields on ``self`` are invalidated from cache." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:790 +msgid "The methods above keep the caches and the database consistent with each other. However, if computed field dependencies have been modified in the database, one has to inform the models for the computed fields to be recomputed. The only thing the framework needs to know is *what* fields have changed on *which* records." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:812 +msgid "One has to figure out which records have been modified. There are many ways to do this, possibly involving extra SQL queries. In the example above, we take advantage of the ``RETURNING`` clause of PostgreSQL to retrieve the information without an extra query. After making the cache consistent by invalidation, invoke the method ``modified`` on the modified records with the fields that have been updated." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.modified:1 +msgid "Notify that fields will be or have been modified on ``self``. This invalidates the cache where necessary, and prepares the recomputation of dependent stored fields." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.modified:5 +msgid "iterable of field names modified on records ``self``" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.modified:6 +msgid "whether called in the context of record creation" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.modified:7 +msgid "whether called before modifying records ``self``" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:825 +msgid "Common ORM methods" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:830 +msgid "Create/update" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:832 +msgid "api.model_create_multi information" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.create:1 +msgid "Creates new records for the model." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.create:3 +msgid "The new records are initialized using the values from the list of dicts ``vals_list``, and if necessary those from :meth:`~.default_get`." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.create:6 +msgid "values for the model's fields, as a list of dictionaries:: [{'field_name': field_value, ...}, ...] For backward compatibility, ``vals_list`` may be a dictionary. It is treated as a singleton list ``[vals]``, and a single record is returned. see :meth:`~.write` for details" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.create:7 +msgid "values for the model's fields, as a list of dictionaries::" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.create:11 +msgid "For backward compatibility, ``vals_list`` may be a dictionary. It is treated as a singleton list ``[vals]``, and a single record is returned." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.create:15 +msgid "see :meth:`~.write` for details" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.create:17 +msgid "the created records" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.create:18 +msgid "if the current user is not allowed to create records of the specified model" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.create:19 +msgid "if user tries to enter invalid value for a selection field" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.create:20 +msgid "if a field name specified in the create values does not exist." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.create:21 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.write:6 +msgid "if a loop would be created in a hierarchy of objects a result of the operation (such as setting an object as its own parent)" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.copy:1 +msgid "Duplicate record ``self`` updating it with default values" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.copy:3 +msgid "dictionary of field values to override in the original values of the copied record, e.g: ``{'field_name': overridden_value, ...}``" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.copy:5 +msgid "new record" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.default_get:1 +msgid "Return default values for the fields in ``fields_list``. Default values are determined by the context, user defaults, and the model itself." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.default_get:5 +msgid "names of field whose default is requested" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.default_get:6 +msgid "a dictionary mapping field names to their corresponding default values, if they have a default value." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.default_get:12 +msgid "Unrequested defaults won't be considered, there is no need to return a value for fields whose names are not in `fields_list`." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.name_create:1 +msgid "Create a new record by calling :meth:`~.create` with only one value provided: the display name of the new record." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.name_create:4 +msgid "The new record will be initialized with any default values applicable to this model, or provided through the context. The usual behavior of :meth:`~.create` applies." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.name_create:8 +msgid "display name of the record to create" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.name_create:10 +msgid "the :meth:`~.name_get` pair value of the created record" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.write:1 +msgid "Updates all records in ``self`` with the provided values." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.write:3 +msgid "fields to update and the value to set on them" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.write:4 +msgid "if user is not allowed to modify the specified records/fields" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.write:5 +msgid "if invalid values are specified for selection fields" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.write:8 +msgid "For numeric fields (:class:`~odoo.fields.Integer`, :class:`~odoo.fields.Float`) the value should be of the corresponding type" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.write:11 +msgid "For :class:`~odoo.fields.Boolean`, the value should be a :class:`python:bool`" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.write:13 +msgid "For :class:`~odoo.fields.Selection`, the value should match the selection values (generally :class:`python:str`, sometimes :class:`python:int`)" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.write:16 +msgid "For :class:`~odoo.fields.Many2one`, the value should be the database identifier of the record to set" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.write:18 +msgid "The expected value of a :class:`~odoo.fields.One2many` or :class:`~odoo.fields.Many2many` relational field is a list of :class:`~odoo.fields.Command` that manipulate the relation the implement. There are a total of 7 commands: :meth:`~odoo.fields.Command.create`, :meth:`~odoo.fields.Command.update`, :meth:`~odoo.fields.Command.delete`, :meth:`~odoo.fields.Command.unlink`, :meth:`~odoo.fields.Command.link`, :meth:`~odoo.fields.Command.clear`, and :meth:`~odoo.fields.Command.set`." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.write:29 +msgid "For :class:`~odoo.fields.Date` and `~odoo.fields.Datetime`, the value should be either a date(time), or a string." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.write:34 +msgid "If a string is provided for Date(time) fields, it must be UTC-only and formatted according to :const:`odoo.tools.misc.DEFAULT_SERVER_DATE_FORMAT` and :const:`odoo.tools.misc.DEFAULT_SERVER_DATETIME_FORMAT`" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.write:39 +msgid "Other non-relational fields use a string for value" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:845 +msgid "Search/Read" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.browse:1 +msgid "Returns a recordset for the ids provided as parameter in the current environment." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.browse:9 +msgid "id(s)" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.browse:11 +msgid "recordset" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.search:1 +msgid "Searches for records based on the ``domain`` :ref:`search domain `." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.search:4 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.search_count:4 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read_group:3 +msgid ":ref:`A search domain `. Use an empty list to match all records." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.search:6 +msgid "number of results to ignore (default: none)" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.search:7 +msgid "maximum number of records to return (default: all)" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.search:8 +msgid "sort string" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.search:9 +msgid "if True, only counts and returns the number of matching records (default: False)" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.search:10 +msgid "at most ``limit`` records matching the search criteria" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.search:11 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read:10 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read_group:35 +msgid "if user is not allowed to access requested information" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.search_count:1 +msgid "Returns the number of records in the current model matching :ref:`the provided domain `." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.search_count:6 +msgid "maximum number of record to count (upperbound) (default: all)" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.name_search:1 +msgid "Search for records that have a display name matching the given ``name`` pattern when compared with the given ``operator``, while also matching the optional search domain (``args``)." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.name_search:5 +msgid "This is used for example to provide suggestions based on a partial value for a relational field. Should usually behave as the reverse of :meth:`~.name_get`, but that is ont guaranteed." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.name_search:9 +msgid "This method is equivalent to calling :meth:`~.search` with a search domain based on ``display_name`` and then :meth:`~.name_get` on the result of the search." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.name_search:13 +msgid "the name pattern to match" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.name_search:14 +msgid "optional search domain (see :meth:`~.search` for syntax), specifying further restrictions" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.name_search:16 +msgid "domain operator for matching ``name``, such as ``'like'`` or ``'='``." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.name_search:18 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read_group:18 +msgid "optional max number of records to return" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.name_search:20 +msgid "list of pairs ``(id, text_repr)`` for all matching records." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read:1 +msgid "Reads the requested fields for the records in ``self``, low-level/RPC method." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read:4 +msgid "field names to return (default is all fields)" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read:5 +msgid "loading mode, currently the only option is to set to ``None`` to avoid loading the ``name_get`` of m2o fields" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read:7 +msgid "a list of dictionaries mapping field names to their values, with one dictionary per record" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read:11 +msgid "if a requested field does not exist" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read_group:1 +msgid "Get the list of records in list view grouped by the given ``groupby`` fields." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read_group:5 +msgid "list of fields present in the list view specified on the object. Each element is either 'field' (field name, using the default aggregation), or 'field:agg' (aggregate field with aggregation function 'agg'), or 'name:agg(field)' (aggregate field with 'agg' and return it as 'name'). The possible aggregation functions are the ones provided by `PostgreSQL `_ and 'count_distinct', with the expected meaning." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read_group:12 +msgid "list of groupby descriptions by which the records will be grouped. A groupby description is either a field (then it will be grouped by that field) or a string 'field:granularity'. Right now, the only supported granularities are 'day', 'week', 'month', 'quarter' or 'year', and they only make sense for date/datetime fields." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read_group:17 +msgid "optional number of records to skip" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read_group:19 +msgid "optional ``order by`` specification, for overriding the natural sort ordering of the groups, see also :py:meth:`~osv.osv.osv.search` (supported only for many2one fields currently)" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read_group:23 +msgid "if true, the results are only grouped by the first groupby and the remaining groupbys are put in the __context key. If false, all the groupbys are done in one call." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read_group:26 +msgid "list of dictionaries(one dictionary for each record) containing: * the values of fields grouped by the fields in ``groupby`` argument * __domain: list of tuples specifying the search criteria * __context: dictionary with argument like ``groupby`` * __range: (date/datetime only) dictionary with field_name:granularity as keys mapping to a dictionary with keys: \"from\" (inclusive) and \"to\" (exclusive) mapping to a string representation of the temporal bounds of the group" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read_group:26 +msgid "list of dictionaries(one dictionary for each record) containing:" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read_group:28 +msgid "the values of fields grouped by the fields in ``groupby`` argument" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read_group:29 +msgid "__domain: list of tuples specifying the search criteria" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read_group:30 +msgid "__context: dictionary with argument like ``groupby``" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read_group:32 +msgid "__range: (date/datetime only) dictionary with field_name:granularity as keys" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.read_group:32 +msgid "mapping to a dictionary with keys: \"from\" (inclusive) and \"to\" (exclusive) mapping to a string representation of the temporal bounds of the group" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:860 +msgid "Fields/Views" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.fields_get:1 +msgid "Return the definition of each field." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.fields_get:3 +msgid "The returned value is a dictionary (indexed by field name) of dictionaries. The _inherits'd fields are included. The string, help, and selection (if present) attributes are translated." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.fields_get:7 +msgid "fields to document, all if empty or not provided" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.fields_get:8 +msgid "attributes to return for each field, all if empty or not provided" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.fields_get:9 +msgid "dictionary mapping field names to a dictionary mapping attributes to values." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.get_view:1 +msgid "Get the detailed composition of the requested view like model, view architecture" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.get_view:3 +msgid "id of the view or None" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.get_view:4 +msgid "type of the view to return if view_id is None ('form', 'tree', ...)" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.get_view:5 +msgid "boolean options to return additional features: - bool mobile: true if the web client is currently using the responsive mobile view (to use kanban views instead of list views for x2many fields)" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.get_view:8 +msgid "composition of the requested view (including inherited views and extensions)" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.get_view:10 +msgid "* if the inherited view has unknown position to work with other than 'before', 'after', 'inside', 'replace' * if some tag other than 'position' is found in parent view" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.get_view:12 +msgid "if the inherited view has unknown position to work with other than 'before', 'after', 'inside', 'replace'" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.get_view:13 +msgid "if some tag other than 'position' is found in parent view" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.get_view:15 +msgid "if there is view type other than form, tree, calendar, search etc... defined on the structure" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.fields_view_get:3 +msgid "Use :meth:`~odoo.models.Model.get_view()` instead." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:871 +msgid "Search domains" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:873 +msgid "A domain is a list of criteria, each criterion being a triple (either a ``list`` or a ``tuple``) of ``(field_name, operator, value)`` where:" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:879 +msgid "``field_name`` (``str``)" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:877 +msgid "a field name of the current model, or a relationship traversal through a :class:`~odoo.fields.Many2one` using dot-notation e.g. ``'street'`` or ``'partner_id.country'``" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:933 +msgid "``operator`` (``str``)" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:882 +msgid "an operator used to compare the ``field_name`` with the ``value``. Valid operators are:" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:885 +msgid "``=``" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:886 +msgid "equals to" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:887 +msgid "``!=``" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:888 +msgid "not equals to" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:889 +msgid "``>``" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:890 +msgid "greater than" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:891 +msgid "``>=``" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:892 +msgid "greater than or equal to" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:893 +msgid "``<``" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:894 +msgid "less than" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:895 +msgid "``<=``" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:896 +msgid "less than or equal to" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:898 +msgid "``=?``" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:898 +msgid "unset or equals to (returns true if ``value`` is either ``None`` or ``False``, otherwise behaves like ``=``)" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:902 +msgid "``=like``" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:901 +msgid "matches ``field_name`` against the ``value`` pattern. An underscore ``_`` in the pattern stands for (matches) any single character; a percent sign ``%`` matches any string of zero or more characters." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:905 +msgid "``like``" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:905 +msgid "matches ``field_name`` against the ``%value%`` pattern. Similar to ``=like`` but wraps ``value`` with '%' before matching" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:907 +msgid "``not like``" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:908 +msgid "doesn't match against the ``%value%`` pattern" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:909 +msgid "``ilike``" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:910 +msgid "case insensitive ``like``" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:911 +msgid "``not ilike``" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:912 +msgid "case insensitive ``not like``" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:913 +msgid "``=ilike``" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:914 +msgid "case insensitive ``=like``" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:916 +msgid "``in``" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:916 +msgid "is equal to any of the items from ``value``, ``value`` should be a list of items" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:918 +msgid "``not in``" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:919 +msgid "is unequal to all of the items from ``value``" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:925 +msgid "``child_of``" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:921 +msgid "is a child (descendant) of a ``value`` record (value can be either one item or a list of items)." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:924 +#: ../../content/developer/reference/backend/orm.rst:931 +msgid "Takes the semantics of the model into account (i.e following the relationship field named by :attr:`~odoo.models.Model._parent_name`)." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:933 +msgid "``parent_of``" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:928 +msgid "is a parent (ascendant) of a ``value`` record (value can be either one item or a list of items)." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:936 +msgid "variable type, must be comparable (through ``operator``) to the named field." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:939 +msgid "Domain criteria can be combined using logical operators in *prefix* form:" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:942 +msgid "``'&'``" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:942 +msgid "logical *AND*, default operation to combine criteria following one another. Arity 2 (uses the next 2 criteria or combinations)." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:944 +msgid "``'|'``" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:945 +msgid "logical *OR*, arity 2." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:951 +msgid "``'!'``" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:947 +msgid "logical *NOT*, arity 1." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:949 +msgid "Mostly to negate combinations of criteria Individual criterion generally have a negative form (e.g. ``=`` -> ``!=``, ``<`` -> ``>=``) which is simpler than negating the positive." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:955 +msgid "To search for partners named *ABC*, from belgium or germany, whose language is not english::" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:963 +msgid "This domain is interpreted as:" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.unlink:1 +msgid "Deletes the records in ``self``." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.unlink:3 +msgid "if the user is not allowed to delete all the given records" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.unlink:4 +msgid "if the record is default property for other records" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:979 +msgid "Record(set) information" +msgstr "" + +#: ../../docstring of odoo.models.Model.ids:1 +msgid "Return the list of actual record ids corresponding to ``self``." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:985 +msgid "Returns the environment of the given recordset." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:987 msgid ":class:`~odoo.api.Environment`" msgstr "" -#: ../../content/developer/reference/orm.rst:879 +#: ../../content/developer/reference/backend/orm.rst:989 msgid "Environment documentation" msgstr "" -#: ../../content/developer/reference/orm.rst:892 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.exists:1 +msgid "Returns the subset of records in ``self`` that exist. It can be used as a test on records::" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.exists:7 +msgid "By convention, new records are returned as existing." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.ensure_one:1 +msgid "Verify that the current recordset holds a single record." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.ensure_one:3 +msgid "``len(self) != 1``" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.name_get:1 +msgid "Returns a textual representation for the records in ``self``, with one item output per input record, in the same order." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.name_get:6 +msgid "Although :meth:`~.name_get` can use context data for richer contextual formatting, as it is the default implementation for :attr:`~.display_name` it is important that it resets to the \"default\" behaviour if the context keys are empty / missing." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.name_get:11 +msgid "list of pairs ``(id, text_repr)`` for each record" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.get_metadata:1 +msgid "Return some metadata about the given records." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.get_metadata:3 +msgid "list of ownership dictionaries for each requested record" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.get_metadata:4 +msgid "list of dictionaries with the following keys: * id: object id * create_uid: user who created the record * create_date: date when the record was created * write_uid: last user who changed the record * write_date: date of the last change to the record * xmlid: XML ID to use to refer to this record (if there is one), in format ``module.name`` * xmlids: list of dict with xmlid in format ``module.name``, and noupdate as boolean * noupdate: A boolean telling if the record will be updated or not" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.get_metadata:4 +msgid "list of dictionaries with the following keys:" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.get_metadata:6 +msgid "id: object id" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.get_metadata:7 +msgid "create_uid: user who created the record" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.get_metadata:8 +msgid "create_date: date when the record was created" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.get_metadata:9 +msgid "write_uid: last user who changed the record" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.get_metadata:10 +msgid "write_date: date of the last change to the record" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.get_metadata:11 +msgid "xmlid: XML ID to use to refer to this record (if there is one), in format ``module.name``" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.get_metadata:12 +msgid "xmlids: list of dict with xmlid in format ``module.name``, and noupdate as boolean" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.get_metadata:13 +msgid "noupdate: A boolean telling if the record will be updated or not" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:1002 +#: ../../content/developer/reference/frontend/assets.rst:105 msgid "Operations" msgstr "" -#: ../../content/developer/reference/orm.rst:894 +#: ../../content/developer/reference/backend/orm.rst:1004 msgid "Recordsets are immutable, but sets of the same model can be combined using various set operations, returning new recordsets." msgstr "" -#: ../../content/developer/reference/orm.rst:899 +#: ../../content/developer/reference/backend/orm.rst:1009 msgid "``record in set`` returns whether ``record`` (which must be a 1-element recordset) is present in ``set``. ``record not in set`` is the inverse operation" msgstr "" -#: ../../content/developer/reference/orm.rst:902 +#: ../../content/developer/reference/backend/orm.rst:1012 msgid "``set1 <= set2`` and ``set1 < set2`` return whether ``set1`` is a subset of ``set2`` (resp. strict)" msgstr "" -#: ../../content/developer/reference/orm.rst:904 +#: ../../content/developer/reference/backend/orm.rst:1014 msgid "``set1 >= set2`` and ``set1 > set2`` return whether ``set1`` is a superset of ``set2`` (resp. strict)" msgstr "" -#: ../../content/developer/reference/orm.rst:906 +#: ../../content/developer/reference/backend/orm.rst:1016 msgid "``set1 | set2`` returns the union of the two recordsets, a new recordset containing all records present in either source" msgstr "" -#: ../../content/developer/reference/orm.rst:908 +#: ../../content/developer/reference/backend/orm.rst:1018 msgid "``set1 & set2`` returns the intersection of two recordsets, a new recordset containing only records present in both sources" msgstr "" -#: ../../content/developer/reference/orm.rst:910 +#: ../../content/developer/reference/backend/orm.rst:1020 msgid "``set1 - set2`` returns a new recordset containing only records of ``set1`` which are *not* in ``set2``" msgstr "" -#: ../../content/developer/reference/orm.rst:913 +#: ../../content/developer/reference/backend/orm.rst:1023 msgid "Recordsets are iterable so the usual Python tools are available for transformation (:func:`python:map`, :func:`python:sorted`, :func:`~python:itertools.ifilter`, ...) however these return either a :class:`python:list` or an :term:`python:iterator`, removing the ability to call methods on their result, or to use set operations." msgstr "" -#: ../../content/developer/reference/orm.rst:919 +#: ../../content/developer/reference/backend/orm.rst:1029 msgid "Recordsets therefore provide the following operations returning recordsets themselves (when possible):" msgstr "" -#: ../../content/developer/reference/orm.rst:923 -msgid "Filter" +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.filtered:1 +msgid "Return the records in ``self`` satisfying ``func``." msgstr "" -#: ../../content/developer/reference/orm.rst:930 -#: ../../content/developer/reference/views.rst:1639 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.filtered:3 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.mapped:5 +msgid "a function or a dot-separated sequence of field names" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.filtered:5 +msgid "recordset of records satisfying func, may be empty." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.filtered_domain:1 +msgid "Return the records in ``self`` satisfying the domain and keeping the same order." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.filtered_domain:3 +msgid ":ref:`A search domain `." +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:1040 +#: ../../content/developer/reference/backend/views.rst:1979 msgid "Map" msgstr "" -#: ../../content/developer/reference/orm.rst:936 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.mapped:1 +msgid "Apply ``func`` on all records in ``self``, and return the result as a list or a recordset (if ``func`` return recordsets). In the latter case, the order of the returned recordset is arbitrary." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.mapped:7 +msgid "self if func is falsy, result of func applied to all ``self`` records." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.mapped:15 +msgid "The provided function can be a string to get field values:" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:1046 msgid "Since V13, multi-relational field access is supported and works like a mapped call:" msgstr "" -#: ../../content/developer/reference/orm.rst:945 +#: ../../content/developer/reference/backend/orm.rst:1055 msgid "Sort" msgstr "" -#: ../../content/developer/reference/orm.rst:952 +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.sorted:1 +msgid "Return the recordset ``self`` ordered by ``key``." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.sorted:3 +msgid "either a function of one argument that returns a comparison key for each record, or a field name, or ``None``, in which case records are ordered according the default model's order" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel.sorted:7 +msgid "if ``True``, return the result in reverse order" +msgstr "" + +#: ../../content/developer/reference/backend/orm.rst:1062 msgid "Inheritance and extension" msgstr "" -#: ../../content/developer/reference/orm.rst:954 +#: ../../content/developer/reference/backend/orm.rst:1064 msgid "Odoo provides three different mechanisms to extend models in a modular way:" msgstr "" -#: ../../content/developer/reference/orm.rst:956 +#: ../../content/developer/reference/backend/orm.rst:1066 msgid "creating a new model from an existing one, adding new information to the copy but leaving the original module as-is" msgstr "" -#: ../../content/developer/reference/orm.rst:958 +#: ../../content/developer/reference/backend/orm.rst:1068 msgid "extending models defined in other modules in-place, replacing the previous version" msgstr "" -#: ../../content/developer/reference/orm.rst:960 +#: ../../content/developer/reference/backend/orm.rst:1070 msgid "delegating some of the model's fields to records it contains" msgstr "" -#: ../../content/developer/reference/orm.rst:966 +#: ../../content/developer/reference/backend/orm.rst:1076 msgid "Classical inheritance" msgstr "" -#: ../../content/developer/reference/orm.rst:968 +#: ../../content/developer/reference/backend/orm.rst:1078 msgid "When using the :attr:`~odoo.models.Model._inherit` and :attr:`~odoo.models.Model._name` attributes together, Odoo creates a new model using the existing one (provided via :attr:`~odoo.models.Model._inherit`) as a base. The new model gets all the fields, methods and meta-information (defaults & al) from its base." msgstr "" -#: ../../content/developer/reference/orm.rst:996 +#: ../../content/developer/reference/backend/orm.rst:1106 msgid "and using them::" msgstr "" -#: ../../content/developer/reference/orm.rst:1004 +#: ../../content/developer/reference/backend/orm.rst:1114 msgid "will yield:" msgstr "" -#: ../../content/developer/reference/orm.rst:1006 +#: ../../content/developer/reference/backend/orm.rst:1116 msgid "\"This is model 0 record A\" \"This is model 1 record B\"" msgstr "" -#: ../../content/developer/reference/orm.rst:1009 +#: ../../content/developer/reference/backend/orm.rst:1119 msgid "the second model has inherited from the first model's ``check`` method and its ``name`` field, but overridden the ``call`` method, as when using standard :ref:`Python inheritance `." msgstr "" -#: ../../content/developer/reference/orm.rst:1014 +#: ../../content/developer/reference/backend/orm.rst:1124 msgid "Extension" msgstr "" -#: ../../content/developer/reference/orm.rst:1016 +#: ../../content/developer/reference/backend/orm.rst:1126 msgid "When using :attr:`~odoo.models.Model._inherit` but leaving out :attr:`~odoo.models.Model._name`, the new model replaces the existing one, essentially extending it in-place. This is useful to add new fields or methods to existing models (created in other modules), or to customize or reconfigure them (e.g. to change their default sort order)::" msgstr "" -#: ../../content/developer/reference/orm.rst:1038 +#: ../../content/developer/reference/backend/orm.rst:1148 msgid "will yield::" msgstr "" -#: ../../content/developer/reference/orm.rst:1045 +#: ../../content/developer/reference/backend/orm.rst:1155 msgid "It will also yield the various :ref:`automatic fields ` unless they've been disabled" msgstr "" -#: ../../content/developer/reference/orm.rst:1049 +#: ../../content/developer/reference/backend/orm.rst:1159 msgid "Delegation" msgstr "" -#: ../../content/developer/reference/orm.rst:1051 +#: ../../content/developer/reference/backend/orm.rst:1161 msgid "The third inheritance mechanism provides more flexibility (it can be altered at runtime) but less power: using the :attr:`~odoo.models.Model._inherits` a model *delegates* the lookup of any field not found on the current model to \"children\" models. The delegation is performed via :class:`~odoo.fields.Reference` fields automatically set up on the parent model." msgstr "" -#: ../../content/developer/reference/orm.rst:1058 +#: ../../content/developer/reference/backend/orm.rst:1168 msgid "The main difference is in the meaning. When using Delegation, the model **has one** instead of **is one**, turning the relationship in a composition instead of inheritance::" msgstr "" -#: ../../content/developer/reference/orm.rst:1100 -#: ../../content/developer/reference/qweb.rst:26 -#: ../../content/developer/reference/qweb.rst:36 -#: ../../content/developer/reference/qweb.rst:324 +#: ../../content/developer/reference/backend/orm.rst:1210 +#: ../../content/developer/reference/frontend/qweb.rst:26 +#: ../../content/developer/reference/frontend/qweb.rst:36 +#: ../../content/developer/reference/frontend/qweb.rst:331 msgid "will result in::" msgstr "" -#: ../../content/developer/reference/orm.rst:1105 +#: ../../content/developer/reference/backend/orm.rst:1215 msgid "and it's possible to write directly on the delegated field::" msgstr "" -#: ../../content/developer/reference/orm.rst:1109 +#: ../../content/developer/reference/backend/orm.rst:1219 msgid "when using delegation inheritance, methods are *not* inherited, only fields" msgstr "" -#: ../../content/developer/reference/orm.rst:1114 +#: ../../content/developer/reference/backend/orm.rst:1224 msgid "`_inherits` is more or less implemented, avoid it if you can;" msgstr "" -#: ../../content/developer/reference/orm.rst:1115 +#: ../../content/developer/reference/backend/orm.rst:1225 msgid "chained `_inherits` is essentially not implemented, we cannot guarantee anything on the final behavior." msgstr "" -#: ../../content/developer/reference/orm.rst:1119 +#: ../../content/developer/reference/backend/orm.rst:1229 msgid "Fields Incremental Definition" msgstr "" -#: ../../content/developer/reference/orm.rst:1121 +#: ../../content/developer/reference/backend/orm.rst:1231 msgid "A field is defined as class attribute on a model class. If the model is extended, one can also extend the field definition by redefining a field with the same name and same type on the subclass. In that case, the attributes of the field are taken from the parent class and overridden by the ones given in subclasses." msgstr "" -#: ../../content/developer/reference/orm.rst:1127 +#: ../../content/developer/reference/backend/orm.rst:1237 msgid "For instance, the second class below only adds a tooltip on the field ``state``::" msgstr "" -#: ../../content/developer/reference/orm.rst:1141 +#: ../../content/developer/reference/backend/orm.rst:1251 msgid "Error management" msgstr "" -#: ../../content/developer/reference/qweb.rst:8 -#: ../../content/developer/reference/views.rst:1774 -msgid "QWeb" +#: ../../../odoo/odoo/exceptions.py:docstring of odoo.exceptions:1 +msgid "The Odoo Exceptions module defines a few core exception types." msgstr "" -#: ../../content/developer/reference/qweb.rst:10 -msgid "QWeb is the primary templating_ engine used by Odoo\\ [#othertemplates]_. It is an XML templating engine\\ [#genshif]_ and used mostly to generate HTML_ fragments and pages." +#: ../../../odoo/odoo/exceptions.py:docstring of odoo.exceptions:3 +msgid "Those types are understood by the RPC layer. Any other exception type bubbling until the RPC layer will be treated as a 'Server error'." msgstr "" -#: ../../content/developer/reference/qweb.rst:14 -msgid "Template directives are specified as XML attributes prefixed with ``t-``, for instance ``t-if`` for :ref:`reference/qweb/conditionals`, with elements and other attributes being rendered directly." +#: ../../../odoo/odoo/exceptions.py:docstring of odoo.exceptions:8 +msgid "If you consider introducing new exceptions, check out the :mod:`odoo.addons.test_exceptions` module." msgstr "" -#: ../../content/developer/reference/qweb.rst:18 -msgid "To avoid element rendering, a placeholder element ```` is also available, which executes its directive but doesn't generate any output in and of itself::" +#: ../../../odoo/odoo/exceptions.py:docstring of odoo.exceptions.AccessDenied:1 +msgid "Login/password error." msgstr "" -#: ../../content/developer/reference/qweb.rst:30 -msgid "if ``condition`` is true, but::" +#: ../../../odoo/odoo/exceptions.py:docstring of odoo.exceptions.AccessDenied:5 +msgid "No traceback." msgstr "" -#: ../../content/developer/reference/qweb.rst:45 -msgid "Data output" +#: ../../../odoo/odoo/exceptions.py:docstring of odoo.exceptions.AccessDenied:9 +msgid "When you try to log with a wrong password." msgstr "" -#: ../../content/developer/reference/qweb.rst:47 -msgid "QWeb has a primary output directive which automatically HTML-escape its content limiting XSS_ risks when displaying user-provided content: ``esc``." +#: ../../../odoo/odoo/exceptions.py:docstring of odoo.exceptions.AccessError:1 +msgid "Access rights error." msgstr "" -#: ../../content/developer/reference/qweb.rst:50 -msgid "``esc`` takes an expression, evaluates it and prints the content::" +#: ../../../odoo/odoo/exceptions.py:docstring of odoo.exceptions.AccessError:5 +msgid "When you try to read a record that you are not allowed to." msgstr "" -#: ../../content/developer/reference/qweb.rst:54 -msgid "rendered with the value ``value`` set to ``42`` yields::" +#: ../../../odoo/odoo/exceptions.py:docstring of odoo.exceptions.CacheMiss:1 +msgid "Missing value(s) in cache." msgstr "" -#: ../../content/developer/reference/qweb.rst:58 -msgid "There is one other output directive ``raw`` which behaves the same as respectively ``esc`` but *does not HTML-escape its output*. It can be useful to display separately constructed markup (e.g. from functions) or already sanitized user-provided markup." +#: ../../../odoo/odoo/exceptions.py:docstring of odoo.exceptions.CacheMiss:5 +msgid "When you try to read a value in a flushed cache." msgstr "" -#: ../../content/developer/reference/qweb.rst:68 -msgid "QWeb has a conditional directive ``if``, which evaluates an expression given as attribute value::" +#: ../../../odoo/odoo/exceptions.py:docstring of odoo.exceptions.MissingError:1 +msgid "Missing record(s)." msgstr "" -#: ../../content/developer/reference/qweb.rst:77 -msgid "The element is rendered if the condition is true::" +#: ../../../odoo/odoo/exceptions.py:docstring of odoo.exceptions.MissingError:5 +msgid "When you try to write on a deleted record." msgstr "" -#: ../../content/developer/reference/qweb.rst:83 -msgid "but if the condition is false it is removed from the result::" +#: ../../../odoo/odoo/exceptions.py:docstring of odoo.exceptions.RedirectWarning:1 +msgid "Warning with a possibility to redirect the user instead of simply displaying the warning message." msgstr "" -#: ../../content/developer/reference/qweb.rst:88 -msgid "The conditional rendering applies to the bearer of the directive, which does not have to be ````::" +#: ../../../odoo/odoo/exceptions.py:docstring of odoo.exceptions.RedirectWarning:4 +msgid "exception message and frontend modal content" msgstr "" -#: ../../content/developer/reference/qweb.rst:95 -msgid "will give the same results as the previous example." +#: ../../../odoo/odoo/exceptions.py:docstring of odoo.exceptions.RedirectWarning:5 +msgid "id of the action where to perform the redirection" msgstr "" -#: ../../content/developer/reference/qweb.rst:97 -msgid "Extra conditional branching directives ``t-elif`` and ``t-else`` are also available::" +#: ../../../odoo/odoo/exceptions.py:docstring of odoo.exceptions.RedirectWarning:6 +msgid "text to put on the button that will trigger the redirection." msgstr "" -#: ../../content/developer/reference/qweb.rst:110 -msgid "Loops" +#: ../../../odoo/odoo/exceptions.py:docstring of odoo.exceptions.RedirectWarning:8 +msgid "parameter passed to action_id. Can be used to limit a view to active_ids for example." msgstr "" -#: ../../content/developer/reference/qweb.rst:112 -msgid "QWeb has an iteration directive ``foreach`` which take an expression returning the collection to iterate on, and a second parameter ``t-as`` providing the name to use for the \"current item\" of the iteration::" +#: ../../../odoo/odoo/exceptions.py:docstring of odoo.exceptions.UserError:1 +msgid "Generic error managed by the client." msgstr "" -#: ../../content/developer/reference/qweb.rst:120 -#: ../../content/developer/reference/qweb.rst:209 -#: ../../content/developer/reference/qweb.rst:223 -#: ../../content/developer/reference/qweb.rst:234 -#: ../../content/developer/reference/qweb.rst:244 -msgid "will be rendered as::" +#: ../../../odoo/odoo/exceptions.py:docstring of odoo.exceptions.UserError:3 +msgid "Typically when the user tries to do something that has no sense given the current state of a record. Semantically comparable to the generic 400 HTTP status codes." msgstr "" -#: ../../content/developer/reference/qweb.rst:126 -msgid "Like conditions, ``foreach`` applies to the element bearing the directive's attribute, and" +#: ../../../odoo/odoo/exceptions.py:docstring of odoo.exceptions.ValidationError:1 +msgid "Violation of python constraints." msgstr "" -#: ../../content/developer/reference/qweb.rst:135 -msgid "is equivalent to the previous example." +#: ../../../odoo/odoo/exceptions.py:docstring of odoo.exceptions.ValidationError:5 +msgid "When you try to create a new user with a login which already exist in the db." msgstr "" -#: ../../content/developer/reference/qweb.rst:137 -msgid "``foreach`` can iterate on an array (the current item will be the current value) or a mapping (the current item will be the current key). Iterating on an integer (equivalent to iterating on an array between 0 inclusive and the provided integer exclusive) is still supported but deprecated." +#: ../../content/developer/reference/backend/orm/changelog.rst:5 +msgid "Changelog" msgstr "" -#: ../../content/developer/reference/qweb.rst:142 -msgid "In addition to the name passed via ``t-as``, ``foreach`` provides a few other variables for various data points:" +#: ../../content/developer/reference/backend/orm/changelog.rst:8 +msgid "Odoo Online version 15.4" msgstr "" -#: ../../content/developer/reference/qweb.rst:145 -msgid "``$as`` will be replaced by the name passed to ``t-as``" +#: ../../content/developer/reference/backend/orm/changelog.rst:10 +msgid "New API for flushing to the database and invalidating the cache with `#87527 `_. New methods have been added to `odoo.models.Model` and `odoo.api.Environment`, and are less confusing about what is actually done in each case. See the section :ref:`SQL Execution `." msgstr "" -#: ../../content/developer/reference/qweb.rst:150 -msgid ":samp:`{$as}_all` (deprecated)" +#: ../../content/developer/reference/backend/orm/changelog.rst:17 +msgid "Odoo Online version 15.2" msgstr "" -#: ../../content/developer/reference/qweb.rst:148 -msgid "the object being iterated over" +#: ../../content/developer/reference/backend/orm/changelog.rst:19 +msgid "Specific index types on fields: With `#83274 `_ and `#83015 `_, developers can now define what type of indexes can be used on fields by PostgreSQL. See the :ref:`index property ` of `odoo.fields.Field`." msgstr "" -#: ../../content/developer/reference/qweb.rst:150 -msgid "This variable is only available on JavaScript QWeb, not Python." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:153 -msgid ":samp:`{$as}_value`" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:153 -msgid "the current iteration value, identical to ``$as`` for lists and integers, but for mappings it provides the value (where ``$as`` provides the key)" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:155 -msgid ":samp:`{$as}_index`" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:156 -msgid "the current iteration index (the first item of the iteration has index 0)" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:157 -msgid ":samp:`{$as}_size`" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:158 -msgid "the size of the collection if it is available" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:160 -msgid ":samp:`{$as}_first`" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:160 -msgid "whether the current item is the first of the iteration (equivalent to :samp:`{$as}_index == 0`)" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:164 -msgid ":samp:`{$as}_last`" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:163 -msgid "whether the current item is the last of the iteration (equivalent to :samp:`{$as}_index + 1 == {$as}_size`), requires the iteratee's size be available" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:166 -msgid ":samp:`{$as}_parity` (deprecated)" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:167 -msgid "either ``\"even\"`` or ``\"odd\"``, the parity of the current iteration round" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:169 -msgid ":samp:`{$as}_even` (deprecated)" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:169 -msgid "a boolean flag indicating that the current iteration round is on an even index" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:173 -msgid ":samp:`{$as}_odd` (deprecated)" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:172 -msgid "a boolean flag indicating that the current iteration round is on an odd index" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:175 -msgid "These extra variables provided and all new variables created into the ``foreach`` are only available in the scope of the``foreach``. If the variable exists outside the context of the ``foreach``, the value is copied at the end of the foreach into the global context." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:197 -msgid "attributes" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:199 -msgid "QWeb can compute attributes on-the-fly and set the result of the computation on the output node. This is done via the ``t-att`` (attribute) directive which exists in 3 different forms:" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:210 -msgid ":samp:`t-att-{$name}`" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:204 -msgid "an attribute called ``$name`` is created, the attribute value is evaluated and the result is set as the attribute's value::" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:226 -msgid ":samp:`t-attf-{$name}`" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:213 -msgid "same as previous, but the parameter is a :term:`format string` instead of just an expression, often useful to mix literal and non-literal string (e.g. classes)::" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:235 -msgid ":samp:`t-att=mapping`" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:229 -msgid "if the parameter is a mapping, each (key, value) pair generates a new attribute and its value::" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:246 -msgid ":samp:`t-att=pair`" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:238 -msgid "if the parameter is a pair (tuple or array of 2 element), the first item of the pair is the name of the attribute and the second item is the value::" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:249 -msgid "setting variables" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:251 -msgid "QWeb allows creating variables from within the template, to memoize a computation (to use it multiple times), give a piece of data a clearer name, ..." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:255 -msgid "This is done via the ``set`` directive, which takes the name of the variable to create. The value to set can be provided in two ways:" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:258 -msgid "a ``t-value`` attribute containing an expression, and the result of its evaluation will be set::" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:264 -msgid "will print ``3``" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:265 -msgid "if there is no ``t-value`` attribute, the node's body is rendered and set as the variable's value::" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:273 -msgid "will generate ``<li>ok</li>`` (the content is escaped as we used the ``esc`` directive)" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:276 -msgid "using the result of this operation is a significant use-case for the ``raw`` directive." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:280 -msgid "calling sub-templates" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:282 -msgid "QWeb templates can be used for top-level rendering, but they can also be used from within another template (to avoid duplication or give names to parts of templates) using the ``t-call`` directive::" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:288 -msgid "This calls the named template with the execution context of the parent, if ``other_template`` is defined as::" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:293 -msgid "the call above will be rendered as ``

`` (no content), but::" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:298 -msgid "will be rendered as ``

1

``." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:300 -msgid "However this has the problem of being visible from outside the ``t-call``. Alternatively, content set in the body of the ``call`` directive will be evaluated *before* calling the sub-template, and can alter a local context::" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:309 -msgid "The body of the ``call`` directive can be arbitrarily complex (not just ``set`` directives), and its rendered form will be available within the called template as a magical ``0`` variable::" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:318 -msgid "being called thus::" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:335 -#: ../../content/developer/reference/qweb.rst:436 -msgid "Exclusive directives" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:338 -msgid "Asset bundles" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:340 -msgid "have fme write these up because I've no idea how they work" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:343 -msgid "\"smart records\" fields formatting" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:345 -msgid "The ``t-field`` directive can only be used when performing field access (``a.b``) on a \"smart\" record (result of the ``browse`` method). It is able to automatically format based on field type, and is integrated in the website's rich text editing." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:350 -msgid "``t-options`` can be used to customize fields, the most common option is ``widget``, other options are field- or widget-dependent." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:354 -msgid "Debugging" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:362 -#: ../../content/developer/reference/qweb.rst:563 -msgid "``t-debug``" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:357 -msgid "invokes a debugger using PDB's ``set_trace`` API. The parameter should be the name of a module, on which a ``set_trace`` method is called::" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:362 -msgid "is equivalent to ``importlib.import_module(\"pdb\").set_trace()``" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:365 -#: ../../content/developer/reference/qweb.rst:576 -msgid "Helpers" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:368 -msgid "Request-based" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:370 -msgid "Most Python-side uses of QWeb are in controllers (and during HTTP requests), in which case templates stored in the database (as :ref:`views `) can be trivially rendered by calling :meth:`odoo.http.HttpRequest.render`:" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:381 -msgid "This automatically creates a :class:`~odoo.http.Response` object which can be returned from the controller (or further customized to suit)." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:385 -msgid "View-based" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:387 -msgid "At a deeper level than the previous helper is the ``render`` method on ``ir.ui.view``:" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:392 -msgid "Renders a QWeb view/template by database id or :term:`external id`. Templates are automatically loaded from ``ir.ui.view`` records." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:395 -msgid "Sets up a number of default values in the rendering context:" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:397 -#: ../../content/developer/webservices/upgrade.rst:113 -#: ../../content/developer/webservices/upgrade.rst:320 -msgid "``request``" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:398 -msgid "the current :class:`~odoo.http.WebRequest` object, if any" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:399 -msgid "``debug``" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:400 -msgid "whether the current request (if any) is in ``debug`` mode" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:401 -msgid ":func:`quote_plus `" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:402 -msgid "url-encoding utility function" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:403 -msgid ":mod:`json`" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:404 -#: ../../content/developer/reference/qweb.rst:406 -#: ../../content/developer/reference/qweb.rst:408 -msgid "the corresponding standard library module" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:405 -msgid ":mod:`time`" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:407 -msgid ":mod:`datetime`" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:409 -msgid "`relativedelta `_" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:410 -msgid "see module" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:412 -msgid "``keep_query``" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:412 -msgid "the ``keep_query`` helper function" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:414 -msgid "context values to pass to QWeb for rendering" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:415 -msgid "name of the Odoo model to use for rendering, can be used to expand or customize QWeb locally (by creating a \"new\" qweb based on ``ir.qweb`` with alterations)" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:421 -msgid "the members below are no longer relevant, section to rewrite" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:433 -#: ../../content/developer/reference/security.rst:356 -#: ../../content/developer/reference/security.rst:358 -msgid "Javascript" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:439 -msgid "Defining templates" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:441 -msgid "The ``t-name`` directive can only be placed at the top-level of a template file (direct children to the document root)::" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:450 -msgid "It takes no other parameter, but can be used with a ```` element or any other. With a ```` element, the ```` should have a single child." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:453 -msgid "The template name is an arbitrary string, although when multiple templates are related (e.g. called sub-templates) it is customary to use dot-separated names to indicate hierarchical relationships." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:458 -msgid "Template inheritance" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:460 -msgid "Template inheritance is used to either:" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:461 -msgid "Alter existing templates in-place, e.g. to add information to templates" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:463 -msgid "created by other modules." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:463 -msgid "Create a new template from a given parent template" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:469 -msgid "Template inheritance is performed via the use of two directives:" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:466 -msgid "``t-inherit`` which is the name of the template to inherit from," -msgstr "" - -#: ../../content/developer/reference/qweb.rst:467 -msgid "``t-inherit-mode`` which is the behaviour of the inheritance: it can either be set to ``primary`` to create a new child template from the parented one or to ``extension`` to alter the parent template in place." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:471 -msgid "An optional ``t-name`` directive can also be specified. It will be the name of the newly created template if used in primary mode, else it will be added as a comment on the transformed template to help retrace inheritances." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:475 -msgid "For the inheritance itself, the changes are done using xpaths directives. See the XPATH_ documentation for the complete set of available instructions." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:478 -msgid "Primary inheritance (child template)::" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:486 -msgid "Extension inheritance (in-place transformation)::" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:495 -msgid "Old inheritance mechanism (deprecated)" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:497 -msgid "Template inheritance is performed via the ``t-extend`` directive which takes the name of the template to alter as parameter." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:500 -msgid "The directive ``t-extend`` will act as a primary inheritance when combined with ``t-name`` and as an extension one when used alone." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:503 -msgid "In both cases the alteration is then performed with any number of ``t-jquery`` sub-directives::" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:512 -msgid "The ``t-jquery`` directives takes a `CSS selector`_. This selector is used on the extended template to select *context nodes* to which the specified ``t-operation`` is applied:" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:517 -msgid "``append``" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:517 -msgid "the node's body is appended at the end of the context node (after the context node's last child)" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:520 -msgid "``prepend``" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:520 -msgid "the node's body is prepended to the context node (inserted before the context node's first child)" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:523 -msgid "the node's body is inserted right before the context node" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:525 -msgid "the node's body is inserted right after the context node" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:526 -msgid "``inner``" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:527 -msgid "the node's body replaces the context node's children" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:529 -msgid "the node's body is used to replace the context node itself" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:531 -msgid "the nodes's body should be any number of ``attribute`` elements, each with a ``name`` attribute and some textual content, the named attribute of the context node will be set to the specified value (either replaced if it already existed or added if not)" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:541 -msgid "No operation" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:536 -msgid "if no ``t-operation`` is specified, the template body is interpreted as javascript code and executed with the context node as ``this``" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:539 -msgid "while much more powerful than other operations, this mode is also much harder to debug and maintain, it is recommended to avoid it" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:544 -msgid "debugging" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:546 -msgid "The javascript QWeb implementation provides a few debugging hooks:" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:554 -msgid "``t-log``" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:549 -msgid "takes an expression parameter, evaluates the expression during rendering and logs its result with ``console.log``::" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:555 -msgid "will print ``42`` to the console" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:557 -msgid "triggers a debugger breakpoint during template rendering::" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:563 -msgid "will stop execution if debugging is active (exact condition depend on the browser and its development tools)" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:573 -msgid "``t-js``" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:566 -msgid "the node's body is javascript code executed during template rendering. Takes a ``context`` parameter, which is the name under which the rendering context will be available in the ``t-js``'s body::" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:580 -msgid "(core is the ``web.core`` module) An instance of :js:class:`QWeb2.Engine` with all module-defined template files loaded, and references to standard helper objects ``_`` (underscore), ``_t`` (translation function) and JSON_." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:584 -msgid ":js:func:`core.qweb.render ` can be used to easily render basic module templates" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:594 -msgid "The QWeb \"renderer\", handles most of QWeb's logic (loading, parsing, compiling and rendering templates)." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:597 -msgid "Odoo Web instantiates one for the user in the core module, and exports it to ``core.qweb``. It also loads all the template files of the various modules into that QWeb instance." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:601 -msgid "A :js:class:`QWeb2.Engine` also serves as a \"template namespace\"." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:605 -msgid "Renders a previously loaded template to a String, using ``context`` (if provided) to find the variables accessed during template rendering (e.g. strings to display)." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:609 -msgid "the name of the template to render" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:610 -msgid "the basic namespace to use for template rendering" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:612 -msgid "String" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:614 -msgid "The engine exposes an other method which may be useful in some cases (e.g. if you need a separate template namespace with, in Odoo Web, Kanban views get their own :js:class:`QWeb2.Engine` instance so their templates don't collide with more general \"module\" templates):" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:622 -msgid "Loads a template file (a collection of templates) in the QWeb instance. The templates can be specified as:" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:627 -msgid "An XML string" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:626 -msgid "QWeb will attempt to parse it to an XML document then load it." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:631 -msgid "A URL" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:630 -msgid "QWeb will attempt to download the URL content, then load the resulting XML string." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:636 -msgid "A ``Document`` or ``Node``" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:634 -msgid "QWeb will traverse the first level of the document (the child nodes of the provided root) and load any named template or template override." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:640 -msgid "A :js:class:`QWeb2.Engine` also exposes various attributes for behavior customization:" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:645 -msgid "Prefix used to recognize directives during parsing. A string. By default, ``t``." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:650 -msgid "Boolean flag putting the engine in \"debug mode\". Normally, QWeb intercepts any error raised during template execution. In debug mode, it leaves all exceptions go through without intercepting them." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:657 -msgid "The jQuery instance used during template inheritance processing. Defaults to ``window.jQuery``." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:662 -msgid "A ``Function``. If present, called before compiling each DOM node to template code. In Odoo Web, this is used to automatically translate text content and some attributes in templates. Defaults to ``null``." -msgstr "" - -#: ../../content/developer/reference/qweb.rst:667 -msgid "it is similar in that to Genshi_, although it does not use (and has no support for) `XML namespaces`_" -msgstr "" - -#: ../../content/developer/reference/qweb.rst:670 -msgid "although it uses a few others, either for historical reasons or because they remain better fits for the use case. Odoo 9.0 still depends on Jinja_ and Mako_." -msgstr "" - -#: ../../content/developer/reference/reports.rst:10 +#: ../../content/developer/reference/backend/reports.rst:10 msgid "QWeb Reports" msgstr "" -#: ../../content/developer/reference/reports.rst:12 +#: ../../content/developer/reference/backend/reports.rst:12 msgid "Reports are written in HTML/QWeb, like website views in Odoo. You can use the usual :ref:`QWeb control flow tools `. The PDF rendering itself is performed by wkhtmltopdf_." msgstr "" -#: ../../content/developer/reference/reports.rst:16 +#: ../../content/developer/reference/backend/reports.rst:16 msgid "Reports are declared using a :ref:`report action `, and a :ref:`reference/reports/templates` for the action to use." msgstr "" -#: ../../content/developer/reference/reports.rst:19 +#: ../../content/developer/reference/backend/reports.rst:19 msgid "If useful or necessary, it is possible to specify a :ref:`reference/reports/paper_formats` for the report report." msgstr "" -#: ../../content/developer/reference/reports.rst:25 +#: ../../content/developer/reference/backend/reports.rst:25 msgid "Report template" msgstr "" -#: ../../content/developer/reference/reports.rst:27 +#: ../../content/developer/reference/backend/reports.rst:27 msgid "Report templates will always provide the following variables:" msgstr "" -#: ../../content/developer/reference/reports.rst:29 +#: ../../content/developer/reference/backend/reports.rst:29 +#: ../../content/developer/reference/backend/security.rst:122 msgid "``time``" msgstr "" -#: ../../content/developer/reference/reports.rst:30 +#: ../../content/developer/reference/backend/reports.rst:30 msgid "a reference to :mod:`python:time` from the Python standard library" msgstr "" -#: ../../content/developer/reference/reports.rst:32 +#: ../../content/developer/reference/backend/reports.rst:32 msgid "``res.user`` record for the user printing the report" msgstr "" -#: ../../content/developer/reference/reports.rst:33 +#: ../../content/developer/reference/backend/reports.rst:33 msgid "``res_company``" msgstr "" -#: ../../content/developer/reference/reports.rst:34 +#: ../../content/developer/reference/backend/reports.rst:34 msgid "record for the current ``user``'s company" msgstr "" -#: ../../content/developer/reference/reports.rst:35 +#: ../../content/developer/reference/backend/reports.rst:35 msgid "``website``" msgstr "" -#: ../../content/developer/reference/reports.rst:36 +#: ../../content/developer/reference/backend/reports.rst:36 msgid "the current website object, if any (this item can be present but ``None``)" msgstr "" -#: ../../content/developer/reference/reports.rst:37 +#: ../../content/developer/reference/backend/reports.rst:37 msgid "``web_base_url``" msgstr "" -#: ../../content/developer/reference/reports.rst:38 +#: ../../content/developer/reference/backend/reports.rst:38 msgid "the base url for the webserver" msgstr "" -#: ../../content/developer/reference/reports.rst:41 +#: ../../content/developer/reference/backend/reports.rst:41 msgid "``context_timestamp``" msgstr "" -#: ../../content/developer/reference/reports.rst:40 +#: ../../content/developer/reference/backend/reports.rst:40 msgid "a function taking :class:`python:datetime.datetime` in UTC\\ [#unzoned]_ and converting it to the timezone of the user printing the report" msgstr "" -#: ../../content/developer/reference/reports.rst:44 +#: ../../content/developer/reference/backend/reports.rst:44 msgid "Minimal viable template" msgstr "" -#: ../../content/developer/reference/reports.rst:46 +#: ../../content/developer/reference/backend/reports.rst:46 msgid "A minimal template would look like::" msgstr "" -#: ../../content/developer/reference/reports.rst:61 +#: ../../content/developer/reference/backend/reports.rst:61 msgid "Calling ``external_layout`` will add the default header and footer on your report. The PDF body will be the content inside the ``
``. The template's ``id`` must be the name specified in the report declaration; for example ``account.report_invoice`` for the above report. Since this is a QWeb template, you can access all the fields of the ``docs`` objects received by the template." msgstr "" -#: ../../content/developer/reference/reports.rst:68 +#: ../../content/developer/reference/backend/reports.rst:68 msgid "By default, the rendering context will also expose the following items:" msgstr "" -#: ../../content/developer/reference/reports.rst:71 +#: ../../content/developer/reference/backend/reports.rst:71 msgid "records for the current report" msgstr "" -#: ../../content/developer/reference/reports.rst:72 +#: ../../content/developer/reference/backend/reports.rst:72 msgid "``doc_ids``" msgstr "" -#: ../../content/developer/reference/reports.rst:73 +#: ../../content/developer/reference/backend/reports.rst:73 msgid "list of ids for the ``docs`` records" msgstr "" -#: ../../content/developer/reference/reports.rst:75 +#: ../../content/developer/reference/backend/reports.rst:75 msgid "``doc_model``" msgstr "" -#: ../../content/developer/reference/reports.rst:75 +#: ../../content/developer/reference/backend/reports.rst:75 msgid "model for the ``docs`` records" msgstr "" -#: ../../content/developer/reference/reports.rst:77 +#: ../../content/developer/reference/backend/reports.rst:77 msgid "If you wish to access other records/models in the template, you will need :ref:`a custom report `, however in that case you will have to provide the items above if you need them." msgstr "" -#: ../../content/developer/reference/reports.rst:82 +#: ../../content/developer/reference/backend/reports.rst:82 msgid "Translatable Templates" msgstr "" -#: ../../content/developer/reference/reports.rst:84 +#: ../../content/developer/reference/backend/reports.rst:84 msgid "If you wish to translate reports (to the language of a partner, for example), you need to define two templates:" msgstr "" -#: ../../content/developer/reference/reports.rst:87 +#: ../../content/developer/reference/backend/reports.rst:87 msgid "The main report template" msgstr "" -#: ../../content/developer/reference/reports.rst:88 +#: ../../content/developer/reference/backend/reports.rst:88 msgid "The translatable document" msgstr "" -#: ../../content/developer/reference/reports.rst:90 +#: ../../content/developer/reference/backend/reports.rst:90 msgid "You can then call the translatable document from your main template with the attribute ``t-lang`` set to a language code (for example ``fr`` or ``en_US``) or to a record field. You will also need to re-browse the related records with the proper context if you use fields that are translatable (like country names, sales conditions, etc.)" msgstr "" -#: ../../content/developer/reference/reports.rst:97 +#: ../../content/developer/reference/backend/reports.rst:97 msgid "If your report template does not use translatable record fields, re-browsing the record in another language is *not* necessary and will impact performances." msgstr "" -#: ../../content/developer/reference/reports.rst:100 +#: ../../content/developer/reference/backend/reports.rst:100 msgid "For example, let's look at the Sale Order report from the Sale module::" msgstr "" -#: ../../content/developer/reference/reports.rst:130 +#: ../../content/developer/reference/backend/reports.rst:130 msgid "The main template calls the translatable template with ``doc.partner_id.lang`` as a ``t-lang`` parameter, so it will be rendered in the language of the partner. This way, each Sale Order will be printed in the language of the corresponding customer. If you wish to translate only the body of the document, but keep the header and footer in a default language, you could call the report's external layout this way::" msgstr "" -#: ../../content/developer/reference/reports.rst:140 +#: ../../content/developer/reference/backend/reports.rst:140 msgid "Please take note that this works only when calling external templates, you will not be able to translate part of a document by setting a ``t-lang`` attribute on an xml node other than ``t-call``. If you wish to translate part of a template, you can create an external template with this partial template and call it from the main one with the ``t-lang`` attribute." msgstr "" -#: ../../content/developer/reference/reports.rst:148 -msgid "Barcodes" -msgstr "" - -#: ../../content/developer/reference/reports.rst:150 +#: ../../content/developer/reference/backend/reports.rst:150 msgid "Barcodes are images returned by a controller and can easily be embedded in reports thanks to the QWeb syntax (e.g. see :ref:`reference/qweb/attributes`):" msgstr "" -#: ../../content/developer/reference/reports.rst:157 +#: ../../content/developer/reference/backend/reports.rst:157 msgid "More parameters can be passed as a query string" msgstr "" -#: ../../content/developer/reference/reports.rst:166 +#: ../../content/developer/reference/backend/reports.rst:166 msgid "Useful Remarks" msgstr "" -#: ../../content/developer/reference/reports.rst:167 +#: ../../content/developer/reference/backend/reports.rst:167 msgid "Twitter Bootstrap and FontAwesome classes can be used in your report template" msgstr "" -#: ../../content/developer/reference/reports.rst:169 +#: ../../content/developer/reference/backend/reports.rst:169 msgid "Local CSS can be put directly in the template" msgstr "" -#: ../../content/developer/reference/reports.rst:170 +#: ../../content/developer/reference/backend/reports.rst:170 msgid "Global CSS can be inserted in the main report layout by inheriting its template and inserting your CSS::" msgstr "" -#: ../../content/developer/reference/reports.rst:183 +#: ../../content/developer/reference/backend/reports.rst:183 msgid "If it appears that your PDF report is missing the styles, please check :ref:`these instructions `." msgstr "" -#: ../../content/developer/reference/reports.rst:189 +#: ../../content/developer/reference/backend/reports.rst:189 msgid "Paper Format" msgstr "" -#: ../../content/developer/reference/reports.rst:191 +#: ../../content/developer/reference/backend/reports.rst:191 msgid "Paper formats are records of ``report.paperformat`` and can contain the following attributes:" msgstr "" -#: ../../content/developer/reference/reports.rst:195 +#: ../../content/developer/reference/backend/reports.rst:195 msgid "only useful as a mnemonic/description of the report when looking for one in a list of some sort" msgstr "" -#: ../../content/developer/reference/reports.rst:197 -#: ../../content/developer/webservices/iap.rst:441 -msgid "``description``" -msgstr "" - -#: ../../content/developer/reference/reports.rst:198 +#: ../../content/developer/reference/backend/reports.rst:198 msgid "a small description of your format" msgstr "" -#: ../../content/developer/reference/reports.rst:201 +#: ../../content/developer/reference/backend/reports.rst:201 +#: ../../content/developer/reference/backend/views.rst:1496 msgid "``format``" msgstr "" -#: ../../content/developer/reference/reports.rst:200 +#: ../../content/developer/reference/backend/reports.rst:200 msgid "either a predefined format (A0 to A9, B0 to B10, Legal, Letter, Tabloid,...) or ``custom``; A4 by default. You cannot use a non-custom format if you define the page dimensions." msgstr "" -#: ../../content/developer/reference/reports.rst:203 +#: ../../content/developer/reference/backend/reports.rst:203 msgid "``dpi``" msgstr "" -#: ../../content/developer/reference/reports.rst:204 +#: ../../content/developer/reference/backend/reports.rst:204 msgid "output DPI; 90 by default" msgstr "" -#: ../../content/developer/reference/reports.rst:205 +#: ../../content/developer/reference/backend/reports.rst:205 msgid "``margin_top``, ``margin_bottom``, ``margin_left``, ``margin_right``" msgstr "" -#: ../../content/developer/reference/reports.rst:206 +#: ../../content/developer/reference/backend/reports.rst:206 msgid "margin sizes in mm" msgstr "" -#: ../../content/developer/reference/reports.rst:207 +#: ../../content/developer/reference/backend/reports.rst:207 msgid "``page_height``, ``page_width``" msgstr "" -#: ../../content/developer/reference/reports.rst:208 +#: ../../content/developer/reference/backend/reports.rst:208 msgid "page dimensions in mm" msgstr "" -#: ../../content/developer/reference/reports.rst:209 +#: ../../content/developer/reference/backend/reports.rst:209 msgid "``orientation``" msgstr "" -#: ../../content/developer/reference/reports.rst:210 +#: ../../content/developer/reference/backend/reports.rst:210 msgid "Landscape or Portrait" msgstr "" -#: ../../content/developer/reference/reports.rst:211 +#: ../../content/developer/reference/backend/reports.rst:211 msgid "``header_line``" msgstr "" -#: ../../content/developer/reference/reports.rst:212 +#: ../../content/developer/reference/backend/reports.rst:212 msgid "boolean to display a header line" msgstr "" -#: ../../content/developer/reference/reports.rst:214 +#: ../../content/developer/reference/backend/reports.rst:214 msgid "``header_spacing``" msgstr "" -#: ../../content/developer/reference/reports.rst:214 +#: ../../content/developer/reference/backend/reports.rst:214 msgid "header spacing in mm" msgstr "" -#: ../../content/developer/reference/reports.rst:216 -#: ../../content/developer/reference/reports.rst:283 -#: ../../content/developer/reference/reports.rst:293 +#: ../../content/developer/reference/backend/reports.rst:216 +#: ../../content/developer/reference/backend/reports.rst:283 +#: ../../content/developer/reference/backend/reports.rst:293 +#: ../../content/developer/reference/frontend/qweb.rst:577 +#: ../../content/developer/reference/frontend/qweb.rst:599 +#: ../../content/developer/reference/frontend/qweb.rst:636 +#: ../../content/developer/reference/frontend/qweb.rst:667 +#: ../../content/developer/reference/frontend/qweb.rst:707 msgid "Example::" msgstr "" -#: ../../content/developer/reference/reports.rst:237 +#: ../../content/developer/reference/backend/reports.rst:237 msgid "Custom Reports" msgstr "" -#: ../../content/developer/reference/reports.rst:239 +#: ../../content/developer/reference/backend/reports.rst:239 msgid "By default, the reporting system builds rendering values based on the target model specified through the ``model`` field." msgstr "" -#: ../../content/developer/reference/reports.rst:242 +#: ../../content/developer/reference/backend/reports.rst:242 msgid "However, it will first look for a model named :samp:`report.{module.report_name}` and call that model's ``_get_report_values(doc_ids, data)`` in order to prepare the rendering data for the template." msgstr "" -#: ../../content/developer/reference/reports.rst:247 +#: ../../content/developer/reference/backend/reports.rst:247 msgid "This can be used to include arbitrary items to use or display while rendering the template, such as data from additional models:" msgstr "" -#: ../../content/developer/reference/reports.rst:269 +#: ../../content/developer/reference/backend/reports.rst:269 msgid "When using a custom report, the \"default\" document-related items (``doc_ids``, ``doc_model`` and ``docs``) will *not* be included. If you want them, you will need to include them yourself." msgstr "" -#: ../../content/developer/reference/reports.rst:273 +#: ../../content/developer/reference/backend/reports.rst:273 msgid "In the example above, the rendering context will contain the \"global\" values as well as the ``lines`` we put in there but nothing else." msgstr "" -#: ../../content/developer/reference/reports.rst:279 +#: ../../content/developer/reference/backend/reports.rst:279 msgid "Custom fonts" msgstr "" -#: ../../content/developer/reference/reports.rst:280 +#: ../../content/developer/reference/backend/reports.rst:280 msgid "If you want to use custom fonts you will need to add your custom font and the related less/CSS to the ``web.reports_assets_common`` assets bundle. Adding your custom font(s) to ``web.assets_common`` or ``web.assets_backend`` will not make your font available in QWeb reports." msgstr "" -#: ../../content/developer/reference/reports.rst:291 +#: ../../content/developer/reference/backend/reports.rst:291 msgid "You will need to define your ``@font-face`` within this less file, even if you've used in another assets bundle (other than ``web.reports_assets_common``)." msgstr "" -#: ../../content/developer/reference/reports.rst:306 +#: ../../content/developer/reference/backend/reports.rst:306 msgid "After you've added the less into your assets bundle you can use the classes - in this example ``h1-title-big`` - in your custom QWeb report." msgstr "" -#: ../../content/developer/reference/reports.rst:309 -msgid "Reports are web pages" -msgstr "" - -#: ../../content/developer/reference/reports.rst:311 +#: ../../content/developer/reference/backend/reports.rst:311 msgid "Reports are dynamically generated by the report module and can be accessed directly via URL:" msgstr "" -#: ../../content/developer/reference/reports.rst:314 +#: ../../content/developer/reference/backend/reports.rst:314 msgid "For example, you can access a Sale Order report in html mode by going to \\http:///report/html/sale.report_saleorder/38" msgstr "" -#: ../../content/developer/reference/reports.rst:317 +#: ../../content/developer/reference/backend/reports.rst:317 msgid "Or you can access the pdf version at \\http:///report/pdf/sale.report_saleorder/38" msgstr "" -#: ../../content/developer/reference/reports.rst:320 +#: ../../content/developer/reference/backend/reports.rst:320 msgid "it does not matter what timezone the :class:`python:datetime` object is actually in (including no timezone), its timezone will unconditionally be *set* to UTC before being adjusted to the user's" msgstr "" -#: ../../content/developer/reference/security.rst:6 +#: ../../content/developer/reference/backend/security.rst:6 msgid "Security in Odoo" msgstr "" -#: ../../content/developer/reference/security.rst:8 +#: ../../content/developer/reference/backend/security.rst:8 msgid "Aside from manually managing access using custom code, Odoo provides two main data-driven mechanisms to manage or restrict access to data." msgstr "" -#: ../../content/developer/reference/security.rst:11 -msgid "Both mechanisms are linked to specific users through *groups*: a user belongs to any number of groups, and security mechanisms are associated to groups, thus applying security mechamisms to users." +#: ../../content/developer/reference/backend/security.rst:11 +msgid "Both mechanisms are linked to specific users through *groups*: a user belongs to any number of groups, and security mechanisms are associated to groups, thus applying security mechanisms to users." msgstr "" -#: ../../content/developer/reference/security.rst:18 -msgid "Access Control" +#: ../../content/developer/reference/backend/security.rst:19 +msgid "serves as user-readable identification for the group (spells out the role / purpose of the group)" msgstr "" -#: ../../content/developer/reference/security.rst:20 -msgid "Managed by the ``ir.model.access`` records, defines access to a whole model." +#: ../../content/developer/reference/backend/security.rst:24 +msgid "The *module category*, serves to associate groups with an Odoo App (~a set of related business models) and convert them into an exclusive selection in the user form." msgstr "" -#: ../../content/developer/reference/security.rst:22 -msgid "Each access control has a model to which it grants permissions, the permissions it grants and optionally a group." +#: ../../content/developer/reference/backend/security.rst:28 +msgid "clarify & document special cases & relationship between groups & categories better" msgstr "" -#: ../../content/developer/reference/security.rst:25 -msgid "Access controls are additive, for a given model a user has access all permissions granted to any of its groups: if the user belongs to one group which allows writing and another which allows deleting, they can both write and delete." +#: ../../content/developer/reference/backend/security.rst:33 +msgid "Other groups to set on the user alongside this one. This is a convenience pseudo-inheritance relationship: it's possible to explicitly remove implied groups from a user without removing the implier." msgstr "" -#: ../../content/developer/reference/security.rst:30 -msgid "If no group is specified, the access control applies to all users, otherwise it only applies to the members of the given group." +#: ../../content/developer/reference/backend/security.rst:40 +msgid "Additional notes on the group e.g." msgstr "" -#: ../../content/developer/reference/security.rst:33 -msgid "Available permissions are creation (``perm_create``), searching and reading (``perm_read``), updating existing records (``perm_write``) and deleting existing records (``perm_unlink``)" +#: ../../content/developer/reference/backend/security.rst:47 +msgid "*Grants* access to an entire model for a given set of operations. If no access rights matches an operation on a model for a user (through their group), the user doesn't have access." msgstr "" -#: ../../content/developer/reference/security.rst:40 -msgid "Record Rules" +#: ../../content/developer/reference/backend/security.rst:51 +msgid "Access rights are additive, a user's accesses are the union of the accesses they get through all their groups e.g. given a user who is part of group A granting read and create access and a group B granting update access, the user will have all three of create, read, and update." msgstr "" -#: ../../content/developer/reference/security.rst:42 -msgid "Record rules are conditions that records must satisfy for an operation (create, read, update or delete) to be allowed. It is applied record-by-record after access control has been applied." +#: ../../content/developer/reference/backend/security.rst:60 +msgid "The purpose or role of the group." msgstr "" -#: ../../content/developer/reference/security.rst:46 -msgid "A record rule has:" +#: ../../content/developer/reference/backend/security.rst:64 +msgid "The model whose access the ACL controls." msgstr "" -#: ../../content/developer/reference/security.rst:48 -msgid "a model on which it applies" +#: ../../content/developer/reference/backend/security.rst:68 +msgid "The :class:`res.groups` to which the accesses are granted, an empty :attr:`group_id` means the ACL is granted to *every user* (non-employees e.g. portal or public users)." msgstr "" -#: ../../content/developer/reference/security.rst:49 -msgid "a set of permissions to which it applies (e.g. if ``perm_read`` is set, the rule will only be checked when reading a record)" +#: ../../content/developer/reference/backend/security.rst:72 +msgid "The :samp:`perm_{method}` attributes grant the corresponding CRUD access when set, they are all unset by default." msgstr "" -#: ../../content/developer/reference/security.rst:51 -msgid "a set of user groups to which the rule applies, if no group is specified the rule is *global*" +#: ../../content/developer/reference/backend/security.rst:85 +msgid "Record rules are *conditions* which must be satisfied in order for an operation to be allowed. Record rules are evaluated record-by-record, following access rights." msgstr "" -#: ../../content/developer/reference/security.rst:53 -msgid "a :ref:`domain ` used to check whether a given record matches the rule (and is accessible) or does not (and is not accessible). The domain is evaluated with two variables in context: ``user`` is the current user's record and ``time`` is the `time module`_" +#: ../../content/developer/reference/backend/security.rst:89 +msgid "Record rules are default-allow: if access rights grant access and no rule applies to the operation and model for the user, the access is granted." msgstr "" -#: ../../content/developer/reference/security.rst:58 -msgid "Global rules and group rules (rules restricted to specific groups versus groups applying to all users) are used quite differently:" +#: ../../content/developer/reference/backend/security.rst:96 +msgid "The description of the rule." msgstr "" -#: ../../content/developer/reference/security.rst:61 -msgid "Global rules are subtractive, they *must all* be matched for a record to be accessible" +#: ../../content/developer/reference/backend/security.rst:100 +msgid "The model to which the rule applies." msgstr "" -#: ../../content/developer/reference/security.rst:63 -msgid "Group rules are additive, if *any* of them matches (and all global rules match) then the record is accessible" +#: ../../content/developer/reference/backend/security.rst:104 +msgid "The :class:`res.groups` to which access is granted (or not). Multiple groups can be specified. If no group is specified, the rule is *global* which is treated differently than \"group\" rules (see below)." msgstr "" -#: ../../content/developer/reference/security.rst:66 -msgid "This means the first *group rule* restricts access, but any further *group rule* expands it, while *global rules* can only ever restrict access (or have no effect)." +#: ../../content/developer/reference/backend/security.rst:110 +msgid "Computed on the basis of :attr:`groups`, provides easy access to the global status (or not) of the rule." msgstr "" -#: ../../content/developer/reference/security.rst:70 -msgid "record rules do not apply to the Superuser account" +#: ../../content/developer/reference/backend/security.rst:115 +msgid "A predicate specified as a :ref:`domain `, the rule allows the selected operations if the domain matches the record, and forbids it otherwise." msgstr "" -#: ../../content/developer/reference/security.rst:76 +#: ../../content/developer/reference/backend/security.rst:119 +msgid "The domain is a *python expression* which can use the following variables:" +msgstr "" + +#: ../../content/developer/reference/backend/security.rst:123 +msgid "Python's :mod:`python:time` module." +msgstr "" + +#: ../../content/developer/reference/backend/security.rst:125 +msgid "The current user, as a singleton recordset." +msgstr "" + +#: ../../content/developer/reference/backend/security.rst:127 +msgid "``company_id``" +msgstr "" + +#: ../../content/developer/reference/backend/security.rst:127 +msgid "The current user's currently selected company as a single company id (not a recordset)." +msgstr "" + +#: ../../content/developer/reference/backend/security.rst:131 +msgid "``company_ids``" +msgstr "" + +#: ../../content/developer/reference/backend/security.rst:130 +msgid "All the companies to which the current user has access as a list of company ids (not a recordset), see :ref:`howto/company/security` for more details." +msgstr "" + +#: ../../content/developer/reference/backend/security.rst:134 +msgid "The :samp:`perm_{method}` have completely different semantics than for :class:`ir.model.access`: for rules, they specify which operation the rules applies *for*. If an operation is not selected, then the rule is not checked for it, as if the rule did not exist." +msgstr "" + +#: ../../content/developer/reference/backend/security.rst:139 +msgid "All operations are selected by default." +msgstr "" + +#: ../../content/developer/reference/backend/security.rst:149 +msgid "Global rules versus group rules" +msgstr "" + +#: ../../content/developer/reference/backend/security.rst:151 +msgid "There is a large difference between global and group rules in how they compose and combine:" +msgstr "" + +#: ../../content/developer/reference/backend/security.rst:154 +msgid "Global rules *intersect*, if two global rules apply then *both* must be satisfied for the access to be granted, this means adding global rules always restricts access further." +msgstr "" + +#: ../../content/developer/reference/backend/security.rst:157 +msgid "Group rules *unify*, if two group rules apply then *either* can be satisfied for the access to be granted. This means adding group rules can expand access, but not beyond the bounds defined by global rules." +msgstr "" + +#: ../../content/developer/reference/backend/security.rst:160 +msgid "The global and group rulesets *intersect*, which means the first group rule being added to a given global ruleset will restrict access." +msgstr "" + +#: ../../content/developer/reference/backend/security.rst:165 +msgid "Creating multiple global rules is risky as it's possible to create non-overlapping rulesets, which will remove all access." +msgstr "" + +#: ../../content/developer/reference/backend/security.rst:171 msgid "Field Access" msgstr "" -#: ../../content/developer/reference/security.rst:78 +#: ../../content/developer/reference/backend/security.rst:173 msgid "An ORM :class:`~odoo.fields.Field` can have a ``groups`` attribute providing a list of groups (as a comma-separated string of :term:`external identifiers`)." msgstr "" -#: ../../content/developer/reference/security.rst:82 +#: ../../content/developer/reference/backend/security.rst:177 msgid "If the current user is not in one of the listed groups, he will not have access to the field:" msgstr "" -#: ../../content/developer/reference/security.rst:85 +#: ../../content/developer/reference/backend/security.rst:180 msgid "restricted fields are automatically removed from requested views" msgstr "" -#: ../../content/developer/reference/security.rst:86 +#: ../../content/developer/reference/backend/security.rst:181 msgid "restricted fields are removed from :meth:`~odoo.models.Model.fields_get` responses" msgstr "" -#: ../../content/developer/reference/security.rst:88 +#: ../../content/developer/reference/backend/security.rst:183 msgid "attempts to (explicitly) read from or write to restricted fields results in an access error" msgstr "" -#: ../../content/developer/reference/security.rst:93 +#: ../../content/developer/reference/backend/security.rst:188 msgid "field access groups apply to the Superuser in fields_get but not in read/write..." msgstr "" -#: ../../content/developer/reference/security.rst:102 +#: ../../content/developer/reference/backend/security.rst:197 msgid "Security Pitfalls" msgstr "" -#: ../../content/developer/reference/security.rst:104 +#: ../../content/developer/reference/backend/security.rst:199 msgid "As a developer, it is important to understand the security mechanisms and avoid common mistakes leading to insecure code." msgstr "" -#: ../../content/developer/reference/security.rst:108 +#: ../../content/developer/reference/backend/security.rst:203 msgid "Unsafe Public Methods" msgstr "" -#: ../../content/developer/reference/security.rst:110 -msgid "Any public method can be executed via a :ref:`RPC call ` with the chosen parameters. The methods starting with a ``_`` are not callable from an action button or external API." +#: ../../content/developer/reference/backend/security.rst:205 +msgid "Any public method can be executed via a :ref:`RPC call ` with the chosen parameters. The methods starting with a ``_`` are not callable from an action button or external API." msgstr "" -#: ../../content/developer/reference/security.rst:114 +#: ../../content/developer/reference/backend/security.rst:209 msgid "On public methods, the record on which a method is executed and the parameters can not be trusted, ACL being only verified during CRUD operations." msgstr "" -#: ../../content/developer/reference/security.rst:128 +#: ../../content/developer/reference/backend/security.rst:223 msgid "Making a method private is obviously not enough and care must be taken to use it properly." msgstr "" -#: ../../content/developer/reference/security.rst:132 +#: ../../content/developer/reference/backend/security.rst:227 msgid "Bypassing the ORM" msgstr "" -#: ../../content/developer/reference/security.rst:133 +#: ../../content/developer/reference/backend/security.rst:228 msgid "You should never use the database cursor directly when the ORM can do the same thing! By doing so you are bypassing all the ORM features, possibly the automated behaviours like translations, invalidation of fields, ``active``, access rights and so on." msgstr "" -#: ../../content/developer/reference/security.rst:138 +#: ../../content/developer/reference/backend/security.rst:233 msgid "And chances are that you are also making the code harder to read and probably less secure." msgstr "" -#: ../../content/developer/reference/security.rst:157 +#: ../../content/developer/reference/backend/security.rst:252 msgid "SQL injections" msgstr "" -#: ../../content/developer/reference/security.rst:158 +#: ../../content/developer/reference/backend/security.rst:253 msgid "Care must be taken not to introduce SQL injections vulnerabilities when using manual SQL queries. The vulnerability is present when user input is either incorrectly filtered or badly quoted, allowing an attacker to introduce undesirable clauses to a SQL query (such as circumventing filters or executing ``UPDATE`` or ``DELETE`` commands)." msgstr "" -#: ../../content/developer/reference/security.rst:164 +#: ../../content/developer/reference/backend/security.rst:259 msgid "The best way to be safe is to never, NEVER use Python string concatenation (+) or string parameters interpolation (%) to pass variables to a SQL query string." msgstr "" -#: ../../content/developer/reference/security.rst:167 +#: ../../content/developer/reference/backend/security.rst:262 msgid "The second reason, which is almost as important, is that it is the job of the database abstraction layer (psycopg2) to decide how to format query parameters, not your job! For example psycopg2 knows that when you pass a list of values it needs to format them as a comma-separated list, enclosed in parentheses !" msgstr "" -#: ../../content/developer/reference/security.rst:187 +#: ../../content/developer/reference/backend/security.rst:282 msgid "This is very important, so please be careful also when refactoring, and most importantly do not copy these patterns!" msgstr "" -#: ../../content/developer/reference/security.rst:190 +#: ../../content/developer/reference/backend/security.rst:285 msgid "Here is a memorable example to help you remember what the issue is about (but do not copy the code there). Before continuing, please be sure to read the online documentation of pyscopg2 to learn of to use it properly:" msgstr "" -#: ../../content/developer/reference/security.rst:194 +#: ../../content/developer/reference/backend/security.rst:289 msgid "`The problem with query parameters `_" msgstr "" -#: ../../content/developer/reference/security.rst:195 +#: ../../content/developer/reference/backend/security.rst:290 msgid "`How to pass parameters with psycopg2 `_" msgstr "" -#: ../../content/developer/reference/security.rst:196 +#: ../../content/developer/reference/backend/security.rst:291 msgid "`Advanced parameter types `_" msgstr "" -#: ../../content/developer/reference/security.rst:197 +#: ../../content/developer/reference/backend/security.rst:292 msgid "`Psycopg documentation `_" msgstr "" -#: ../../content/developer/reference/security.rst:200 +#: ../../content/developer/reference/backend/security.rst:295 msgid "Unescaped field content" msgstr "" -#: ../../content/developer/reference/security.rst:202 +#: ../../content/developer/reference/backend/security.rst:297 msgid "When rendering content using JavaScript and XML, one may be tempted to use a ``t-raw`` to display rich-text content. This should be avoided as a frequent `XSS `_ vector." msgstr "" -#: ../../content/developer/reference/security.rst:206 +#: ../../content/developer/reference/backend/security.rst:301 msgid "It is very hard to control the integrity of the data from the computation until the final integration in the browser DOM. A ``t-raw`` that is correctly escaped at the time of introduction may no longer be safe at the next bugfix or refactoring." msgstr "" -#: ../../content/developer/reference/security.rst:223 +#: ../../content/developer/reference/backend/security.rst:318 msgid "The above code may feel safe as the message content is controlled but is a bad practice that may lead to unexpected security vulnerabilities once this code evolves in the future." msgstr "" -#: ../../content/developer/reference/security.rst:235 +#: ../../content/developer/reference/backend/security.rst:330 msgid "While formatting the template differently would prevent such vulnerabilities." msgstr "" -#: ../../content/developer/reference/security.rst:260 +#: ../../content/developer/reference/backend/security.rst:355 msgid "Escaping vs Sanitizing" msgstr "" -#: ../../content/developer/reference/security.rst:264 +#: ../../content/developer/reference/backend/security.rst:359 msgid "Escaping is always 100% mandatory when you mix data and code, no matter how safe the data" msgstr "" -#: ../../content/developer/reference/security.rst:267 +#: ../../content/developer/reference/backend/security.rst:362 msgid "**Escaping** converts *TEXT* to *CODE*. It is absolutely mandatory to do it every time you mix *DATA/TEXT* with *CODE* (e.g. generating HTML or python code to be evaluated inside a `safe_eval`), because *CODE* always requires *TEXT* to be encoded. It is critical for security, but it's also a question of correctness. Even when there is no security risk (because the text is 100% guarantee to be safe or trusted), it is still required (e.g. to avoid breaking the layout in generated HTML)." msgstr "" -#: ../../content/developer/reference/security.rst:275 +#: ../../content/developer/reference/backend/security.rst:370 msgid "Escaping will never break any feature, as long as the developer identifies which variable contains *TEXT* and which contains *CODE*." msgstr "" -#: ../../content/developer/reference/security.rst:291 +#: ../../content/developer/reference/backend/security.rst:386 msgid "**Sanitizing** converts *CODE* to *SAFER CODE* (but not necessary *safe* code). It does not work on *TEXT*. Sanitizing is only necessary when *CODE* is untrusted, because it comes in full or in part from some user-provided data. If the user-provided data is in the form of *TEXT* (e.g. the content from a form filled by a user), and if that data was correctly escaped before putting it in *CODE*, then sanitizing is useless (but can still be done). If however, the user-provided data was **not escaped**, then sanitizing will **not** work as expected." msgstr "" -#: ../../content/developer/reference/security.rst:310 +#: ../../content/developer/reference/backend/security.rst:405 msgid "Sanitizing can break features, depending on whether the *CODE* is expected to contain patterns that are not safe. That's why `fields.Html` and `tools.html_sanitize()` have options to fine-tune the level of sanitization for styles, etc. Those options have to be carefully considered depending on where the data comes from, and the desired features. The sanitization safety is balanced against sanitization breakages: the safer the sanitisation the more likely it is to break things." msgstr "" -#: ../../content/developer/reference/security.rst:327 +#: ../../content/developer/reference/backend/security.rst:422 msgid "Evaluating content" msgstr "" -#: ../../content/developer/reference/security.rst:328 +#: ../../content/developer/reference/backend/security.rst:423 msgid "Some may want to ``eval`` to parse user provided content. Using ``eval`` should be avoided at all cost. A safer, sandboxed, method :class:`~odoo.tools.safe_eval` can be used instead but still gives tremendous capabilities to the user running it and must be reserved for trusted privileged users only as it breaks the barrier between code and data." msgstr "" -#: ../../content/developer/reference/security.rst:350 +#: ../../content/developer/reference/backend/security.rst:445 msgid "Parsing content does not need ``eval``" msgstr "" -#: ../../content/developer/reference/security.rst:353 +#: ../../content/developer/reference/backend/security.rst:448 msgid "Language" msgstr "" -#: ../../content/developer/reference/security.rst:353 +#: ../../content/developer/reference/backend/security.rst:448 msgid "Data type" msgstr "" -#: ../../content/developer/reference/security.rst:353 +#: ../../content/developer/reference/backend/security.rst:448 msgid "Suitable parser" msgstr "" -#: ../../content/developer/reference/security.rst:355 -#: ../../content/developer/reference/security.rst:356 +#: ../../content/developer/reference/backend/security.rst:450 +#: ../../content/developer/reference/backend/security.rst:451 msgid "int, float, etc." msgstr "" -#: ../../content/developer/reference/security.rst:355 +#: ../../content/developer/reference/backend/security.rst:450 msgid "int(), float()" msgstr "" -#: ../../content/developer/reference/security.rst:356 +#: ../../content/developer/reference/backend/security.rst:451 +#: ../../content/developer/reference/backend/security.rst:453 +#: ../../content/developer/reference/backend/testing.rst:583 +#: ../../content/developer/reference/frontend/qweb.rst:411 +#: ../../content/developer/reference/frontend/qweb.rst:805 +msgid "Javascript" +msgstr "" + +#: ../../content/developer/reference/backend/security.rst:451 msgid "parseInt(), parseFloat()" msgstr "" -#: ../../content/developer/reference/security.rst:357 +#: ../../content/developer/reference/backend/security.rst:452 msgid "dict" msgstr "" -#: ../../content/developer/reference/security.rst:357 +#: ../../content/developer/reference/backend/security.rst:452 msgid "json.loads(), ast.literal_eval()" msgstr "" -#: ../../content/developer/reference/security.rst:358 +#: ../../content/developer/reference/backend/security.rst:453 msgid "object, list, etc." msgstr "" -#: ../../content/developer/reference/security.rst:358 +#: ../../content/developer/reference/backend/security.rst:453 msgid "JSON.parse()" msgstr "" -#: ../../content/developer/reference/security.rst:362 +#: ../../content/developer/reference/backend/security.rst:457 msgid "Accessing object attributes" msgstr "" -#: ../../content/developer/reference/security.rst:364 +#: ../../content/developer/reference/backend/security.rst:459 msgid "If the values of a record needs to be retrieved or modified dynamically, one may want to use the ``getattr`` and ``setattr`` methods." msgstr "" -#: ../../content/developer/reference/security.rst:374 +#: ../../content/developer/reference/backend/security.rst:469 msgid "This code is however not safe as it allows to access any property of the record, including private attributes or methods." msgstr "" -#: ../../content/developer/reference/security.rst:377 +#: ../../content/developer/reference/backend/security.rst:472 msgid "The ``__getitem__`` of a recordset has been defined and accessing a dynamic field value can be easily achieved safely:" msgstr "" -#: ../../content/developer/reference/security.rst:387 +#: ../../content/developer/reference/backend/security.rst:482 msgid "The above method is obviously still too optimistic and additional verifications on the record id and field value must be done." msgstr "" -#: ../../content/developer/reference/testing.rst:7 +#: ../../content/developer/reference/backend/testing.rst:6 msgid "Testing Odoo" msgstr "" -#: ../../content/developer/reference/testing.rst:9 +#: ../../content/developer/reference/backend/testing.rst:8 msgid "There are many ways to test an application. In Odoo, we have three kinds of tests" msgstr "" -#: ../../content/developer/reference/testing.rst:12 +#: ../../content/developer/reference/backend/testing.rst:11 msgid "Python unit tests (see `Testing Python code`_): useful for testing model business logic" msgstr "" -#: ../../content/developer/reference/testing.rst:13 +#: ../../content/developer/reference/backend/testing.rst:12 msgid "JS unit tests (see `Testing JS code`_): useful to test the javascript code in isolation" msgstr "" -#: ../../content/developer/reference/testing.rst:14 +#: ../../content/developer/reference/backend/testing.rst:13 msgid "Tours (see `Integration Testing`_): tours simulate a real situation. They ensures that the python and the javascript parts properly talk to each other." msgstr "" -#: ../../content/developer/reference/testing.rst:18 +#: ../../content/developer/reference/backend/testing.rst:19 msgid "Testing Python code" msgstr "" -#: ../../content/developer/reference/testing.rst:20 -msgid "Odoo provides support for testing modules using unittest." +#: ../../content/developer/reference/backend/testing.rst:21 +msgid "Odoo provides support for testing modules using `Python's unittest library `_." msgstr "" -#: ../../content/developer/reference/testing.rst:22 +#: ../../content/developer/reference/backend/testing.rst:24 msgid "To write tests, simply define a ``tests`` sub-package in your module, it will be automatically inspected for test modules. Test modules should have a name starting with ``test_`` and should be imported from ``tests/__init__.py``, e.g." msgstr "" -#: ../../content/developer/reference/testing.rst:36 +#: ../../content/developer/reference/backend/testing.rst:38 msgid "and ``__init__.py`` contains::" msgstr "" -#: ../../content/developer/reference/testing.rst:42 +#: ../../content/developer/reference/backend/testing.rst:44 msgid "test modules which are not imported from ``tests/__init__.py`` will not be run" msgstr "" -#: ../../content/developer/reference/testing.rst:45 +#: ../../content/developer/reference/backend/testing.rst:47 msgid "The test runner will simply run any test case, as described in the official `unittest documentation`_, but Odoo provides a number of utilities and helpers related to testing Odoo content (modules, mainly):" msgstr "" -#: ../../content/developer/reference/testing.rst:62 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.TransactionCase:1 +msgid "Test class in which all test methods are run in a single transaction, but each test method is run in a sub-transaction managed by a savepoint. The transaction's cursor is always closed without committing." +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.TransactionCase:5 +msgid "The data setup common to all methods should be done in the class method `setUpClass`, so that it is done once for all test methods. This is useful for test cases containing fast tests but with significant database setup common to all cases (complex in-db test data)." +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.TransactionCase:10 +msgid "After being run, each test method cleans up the record cache and the registry cache. However, there is no cleanup of the registry models and fields. If a test modifies the registry (custom models and/or fields), it should prepare the necessary cleanup (`self.registry.reset_changes()`)." +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.browse_ref:1 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.browse_ref:1 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.browse_ref:1 +msgid "Returns a record object for the provided :term:`external identifier`" +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.browse_ref:4 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.ref:4 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.browse_ref:4 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.ref:4 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.browse_ref:4 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.ref:4 +msgid "fully-qualified :term:`external identifier`, in the form :samp:`{module}.{identifier}`" +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.browse_ref:0 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.ref:0 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.browse_ref:0 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.ref:0 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.browse_ref:0 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.ref:0 +msgid "raise" +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.browse_ref:6 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.ref:6 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.browse_ref:6 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.ref:6 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.browse_ref:6 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.ref:6 +msgid "ValueError if not found" +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.browse_ref:7 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.browse_ref:7 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.browse_ref:7 +msgid ":class:`~odoo.models.BaseModel`" +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.ref:1 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.ref:1 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.ref:1 +msgid "Returns database ID for the provided :term:`external identifier`, shortcut for ``_xmlid_lookup``" +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.ref:7 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.ref:7 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.BaseCase.ref:7 +msgid "registered id" +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.SingleTransactionCase:1 +msgid "TestCase in which all test methods are run in the same transaction, the transaction is started with the first test method and rolled back at the end of the last." +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.HttpCase:1 +msgid "Transactional HTTP TestCase with url_open and Chrome headless helpers." +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.HttpCase.browser_js:1 +msgid "Test js code running in the browser - optionnally log as 'login' - load page given by url_path - wait for ready object to be available - eval(code) inside the page - open another chrome window to watch code execution if watch is True" +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.HttpCase.browser_js:8 +msgid "To signal success test do: console.log('test successful') To signal test failure raise an exception or call console.error with a message. Test will stop when a failure occurs if error_checker is not defined or returns True for this message" +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.tagged:1 +msgid "A decorator to tag BaseCase objects." +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.tagged:3 +msgid "Tags are stored in a set that can be accessed from a 'test_tags' attribute." +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.tagged:5 +msgid "A tag prefixed by '-' will remove the tag e.g. to remove the 'standard' tag." +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.tagged:7 +msgid "By default, all Test classes from odoo.tests.common have a test_tags attribute that defaults to 'standard' and 'at_install'." +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.tagged:10 +msgid "When using class inheritance, the tags ARE inherited." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:64 msgid "By default, tests are run once right after the corresponding module has been installed. Test cases can also be configured to run after all modules have been installed, and not run right after the module installation::" msgstr "" -#: ../../content/developer/reference/testing.rst:75 +#: ../../content/developer/reference/backend/testing.rst:77 msgid "The most common situation is to use :class:`~odoo.tests.common.TransactionCase` and test a property of a model in each method::" msgstr "" -#: ../../content/developer/reference/testing.rst:91 +#: ../../content/developer/reference/backend/testing.rst:93 msgid "Test methods must start with ``test_``" msgstr "" -#: ../../content/developer/reference/testing.rst:103 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.Form:1 +msgid "Server-side form view implementation (partial)" +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.Form:3 +msgid "Implements much of the \"form view\" manipulation flow, such that server-side tests can more properly reflect the behaviour which would be observed when manipulating the interface:" +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.Form:7 +msgid "call default_get and the relevant onchanges on \"creation\"" +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.Form:8 +msgid "call the relevant onchanges on setting fields" +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.Form:9 +msgid "properly handle defaults & onchanges around x2many fields" +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.Form:11 +msgid "Saving the form returns the created record if in creation mode." +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.Form:13 +msgid "Regular fields can just be assigned directly to the form, for :class:`~odoo.fields.Many2one` fields assign a singleton recordset::" +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.Form:21 +msgid "When editing a record, using the form as a context manager to automatically save it at the end of the scope::" +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.Form:28 +msgid "For :class:`~odoo.fields.Many2many` fields, the field itself is a :class:`~odoo.tests.common.M2MProxy` and can be altered by adding or removing records::" +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.Form:36 +msgid "Finally :class:`~odoo.fields.One2many` are reified as :class:`~odoo.tests.common.O2MProxy`." +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.Form:39 +msgid "Because the :class:`~odoo.fields.One2many` only exists through its parent, it is manipulated more directly by creating \"sub-forms\" with the :meth:`~odoo.tests.common.O2MProxy.new` and :meth:`~odoo.tests.common.O2MProxy.edit` methods. These would normally be used as context managers since they get saved in the parent record::" +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.Form:60 +msgid "empty or singleton recordset. An empty recordset will put the view in \"creation\" mode and trigger calls to default_get and on-load onchanges, a singleton will put it in \"edit\" mode and only load the view's data." +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.Form:65 +msgid "the id, xmlid or actual view object to use for onchanges and view constraints. If none is provided, simply loads the default view for the model." +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.Form.save:1 +msgid "Saves the form, returns the created record if applicable" +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.Form.save:3 +msgid "does not save ``readonly`` fields" +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.Form.save:4 +msgid "does not save unmodified fields (during edition) — any assignment or onchange return marks the field as modified, even if set to its current value" +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.Form.save:8 +msgid "if the form has any unfilled required field" +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.M2MProxy:1 +msgid "Behaves as a :class:`~collection.Sequence` of recordsets, can be indexed or sliced to get actual underlying recordsets." +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.M2MProxy.add:1 +msgid "Adds ``record`` to the field, the record must already exist." +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.M2MProxy.add:3 +msgid "The addition will only be finalized when the parent record is saved." +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.M2MProxy.clear:1 +msgid "Removes all existing records in the m2m" +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.M2MProxy.remove:1 +msgid "Removes a record at a certain index or with a provided id from the field." +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.O2MProxy.edit:1 +msgid "Returns a :class:`Form` to edit the pre-existing :class:`~odoo.fields.One2many` record." +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.O2MProxy.edit:4 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.O2MProxy.new:4 +msgid "The form is created from the list view if editable, or the field's form view otherwise." +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.O2MProxy.edit:7 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.O2MProxy.new:7 +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.O2MProxy.remove:3 +msgid "if the field is not editable" +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.O2MProxy.new:1 +msgid "Returns a :class:`Form` for a new :class:`~odoo.fields.One2many` record, properly initialised." +msgstr "" + +#: ../../../odoo/odoo/tests/common.py:docstring of odoo.tests.common.O2MProxy.remove:1 +msgid "Removes the record at ``index`` from the parent form." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:105 msgid "Running tests" msgstr "" -#: ../../content/developer/reference/testing.rst:105 +#: ../../content/developer/reference/backend/testing.rst:107 msgid "Tests are automatically run when installing or updating modules if :option:`--test-enable ` was enabled when starting the Odoo server." msgstr "" -#: ../../content/developer/reference/testing.rst:114 +#: ../../content/developer/reference/backend/testing.rst:116 msgid "Test selection" msgstr "" -#: ../../content/developer/reference/testing.rst:116 +#: ../../content/developer/reference/backend/testing.rst:118 msgid "In Odoo, Python tests can be tagged to facilitate the test selection when running tests." msgstr "" -#: ../../content/developer/reference/testing.rst:119 -msgid "Subclasses of :class:`odoo.tests.common.BaseCase` (usually through :class:`~odoo.tests.common.TransactionCase`, :class:`~odoo.tests.common.SavepointCase` or :class:`~odoo.tests.common.HttpCase`) are automatically tagged with ``standard``, ``at_install`` and their source module's name by default." +#: ../../content/developer/reference/backend/testing.rst:121 +msgid "Subclasses of :class:`odoo.tests.common.BaseCase` (usually through :class:`~odoo.tests.common.TransactionCase`, :class:`~odoo.tests.common.SavepointCase` or :class:`~odoo.tests.common.HttpCase`) are automatically tagged with ``standard`` and ``at_install`` by default." msgstr "" -#: ../../content/developer/reference/testing.rst:126 +#: ../../content/developer/reference/backend/testing.rst:128 msgid "Invocation" msgstr "" -#: ../../content/developer/reference/testing.rst:128 -msgid ":option:`--test-tags ` can be used to select/filter tests to run on the command-line." +#: ../../content/developer/reference/backend/testing.rst:130 +msgid ":option:`--test-tags ` can be used to select/filter tests to run on the command-line. It implies :option:`--test-enable `, so it's not necessary to specify :option:`--test-enable ` when using :option:`--test-tags `." msgstr "" -#: ../../content/developer/reference/testing.rst:131 +#: ../../content/developer/reference/backend/testing.rst:135 msgid "This option defaults to ``+standard`` meaning tests tagged ``standard`` (explicitly or implicitly) will be run by default when starting Odoo with :option:`--test-enable `." msgstr "" -#: ../../content/developer/reference/testing.rst:135 +#: ../../content/developer/reference/backend/testing.rst:139 msgid "When writing tests, the :func:`~odoo.tests.common.tagged` decorator can be used on **test classes** to add or remove tags." msgstr "" -#: ../../content/developer/reference/testing.rst:138 +#: ../../content/developer/reference/backend/testing.rst:142 msgid "The decorator's arguments are tag names, as strings." msgstr "" -#: ../../content/developer/reference/testing.rst:140 +#: ../../content/developer/reference/backend/testing.rst:144 msgid ":func:`~odoo.tests.common.tagged` is a class decorator, it has no effect on functions or methods" msgstr "" -#: ../../content/developer/reference/testing.rst:143 +#: ../../content/developer/reference/backend/testing.rst:147 msgid "Tags can be prefixed with the minus (``-``) sign, to *remove* them instead of add or select them e.g. if you don't want your test to be executed by default you can remove the ``standard`` tag:" msgstr "" -#: ../../content/developer/reference/testing.rst:155 -msgid "This test will not be selected by default, to run it the relevant tag will have to be selected explicitely:" +#: ../../content/developer/reference/backend/testing.rst:159 +msgid "This test will not be selected by default, to run it the relevant tag will have to be selected explicitly:" msgstr "" -#: ../../content/developer/reference/testing.rst:162 +#: ../../content/developer/reference/backend/testing.rst:166 msgid "Note that only the tests tagged ``nice`` are going to be executed. To run *both* ``nice`` and ``standard`` tests, provide multiple values to :option:`--test-tags `: on the command-line, values are *additive* (you're selecting all tests with *any* of the specified tags)" msgstr "" -#: ../../content/developer/reference/testing.rst:171 -msgid "The config switch parameter also accepts the ``+`` and ``-`` prefixes. The ``+`` prefix is implied and therefore, totaly optional. The ``-`` (minus) prefix is made to deselect tests tagged with the prefixed tags, even if they are selected by other specified tags e.g. if there are ``standard`` tests which are also tagged as ``slow`` you can run all standard tests *except* the slow ones:" +#: ../../content/developer/reference/backend/testing.rst:175 +msgid "The config switch parameter also accepts the ``+`` and ``-`` prefixes. The ``+`` prefix is implied and therefore, totally optional. The ``-`` (minus) prefix is made to deselect tests tagged with the prefixed tags, even if they are selected by other specified tags e.g. if there are ``standard`` tests which are also tagged as ``slow`` you can run all standard tests *except* the slow ones:" msgstr "" -#: ../../content/developer/reference/testing.rst:182 -msgid "When you write a test that does not inherit from the :class:`~odoo.tests.common.BaseCase`, this test will not have the default tags, you have to add them explicitely to have the test included in the default test suite. This is a common issue when using a simple ``unittest.TestCase`` as they're not going to get run:" +#: ../../content/developer/reference/backend/testing.rst:186 +msgid "When you write a test that does not inherit from the :class:`~odoo.tests.common.BaseCase`, this test will not have the default tags, you have to add them explicitly to have the test included in the default test suite. This is a common issue when using a simple ``unittest.TestCase`` as they're not going to get run:" msgstr "" -#: ../../content/developer/reference/testing.rst:198 +#: ../../content/developer/reference/backend/testing.rst:201 +msgid "Besides tags you can also specify specific modules, classes or functions to test. The full syntax of the format accepted by :option:`--test-tags ` is:" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:209 +msgid "So if you want to test the `stock_account` module, you can use:" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:215 +msgid "If you want to test a specific function with a unique name, it can be specified directly:" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:222 +msgid "This is equivalent to" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:228 +msgid "if the name of the test is unambiguous. Multiple modules, classes and functions can be specified at once separated by a `,` like with regular tags." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:234 msgid "Special tags" msgstr "" -#: ../../content/developer/reference/testing.rst:200 -msgid "``standard``: All Odoo tests that inherit from :class:`~odoo.tests.common.BaseCase` are implicitely tagged standard. :option:`--test-tags ` also defaults to ``standard``." +#: ../../content/developer/reference/backend/testing.rst:236 +msgid "``standard``: All Odoo tests that inherit from :class:`~odoo.tests.common.BaseCase` are implicitly tagged standard. :option:`--test-tags ` also defaults to ``standard``." msgstr "" -#: ../../content/developer/reference/testing.rst:204 +#: ../../content/developer/reference/backend/testing.rst:240 msgid "That means untagged test will be executed by default when tests are enabled." msgstr "" -#: ../../content/developer/reference/testing.rst:205 +#: ../../content/developer/reference/backend/testing.rst:241 msgid "``at_install``: Means that the test will be executed right after the module installation and before other modules are installed. This is a default implicit tag." msgstr "" -#: ../../content/developer/reference/testing.rst:208 +#: ../../content/developer/reference/backend/testing.rst:244 msgid "``post_install``: Means that the test will be executed after all the modules are installed. This is what you want for HttpCase tests most of the time." msgstr "" -#: ../../content/developer/reference/testing.rst:211 +#: ../../content/developer/reference/backend/testing.rst:247 msgid "Note that this is *not exclusive* with ``at_install``, however since you will generally not want both ``post_install`` is usually paired with ``-at_install`` when tagging a test class." msgstr "" -#: ../../content/developer/reference/testing.rst:214 -msgid "*module_name*: Odoo tests classes extending :class:`~odoo.tests.common.BaseCase` are implicitely tagged with the technical name of their module. This allows easily selecting or excluding specific modules when testing e.g. if you want to only run tests from ``stock_account``:" -msgstr "" - -#: ../../content/developer/reference/testing.rst:225 +#: ../../content/developer/reference/backend/testing.rst:252 +#: ../../content/developer/reference/frontend/services.rst:479 msgid "Examples" msgstr "" -#: ../../content/developer/reference/testing.rst:229 -msgid "Tests will be executed only in the installed or updated modules. So modules have to be selected with the :option:`-u ` or :option:`-i ` switches. For simplicity, those switches are not specified in the examples below." +#: ../../content/developer/reference/backend/testing.rst:256 +msgid "Tests will be executed only in installed modules. If you're starting from a clean database, you'll need to install the modules with the :option:`-i ` switch at least once. After that it's no longer needed, unless you need to upgrade the module, in which case :option:`-u ` can be used. For simplicity, those switches are not specified in the examples below." msgstr "" -#: ../../content/developer/reference/testing.rst:234 +#: ../../content/developer/reference/backend/testing.rst:263 msgid "Run only the tests from the sale module:" msgstr "" -#: ../../content/developer/reference/testing.rst:240 +#: ../../content/developer/reference/backend/testing.rst:269 msgid "Run the tests from the sale module but not the ones tagged as slow:" msgstr "" -#: ../../content/developer/reference/testing.rst:246 +#: ../../content/developer/reference/backend/testing.rst:275 msgid "Run only the tests from stock or tagged as slow:" msgstr "" -#: ../../content/developer/reference/testing.rst:252 +#: ../../content/developer/reference/backend/testing.rst:281 msgid "``-standard`` is implicit (not required), and present for clarity" msgstr "" -#: ../../content/developer/reference/testing.rst:255 +#: ../../content/developer/reference/backend/testing.rst:284 msgid "Testing JS code" msgstr "" -#: ../../content/developer/reference/testing.rst:257 +#: ../../content/developer/reference/backend/testing.rst:286 msgid "Testing a complex system is an important safeguard to prevent regressions and to guarantee that some basic functionality still works. Since Odoo has a non trivial codebase in Javascript, it is necessary to test it. In this section, we will discuss the practice of testing JS code in isolation: these tests stay in the browser, and are not supposed to reach the server." msgstr "" -#: ../../content/developer/reference/testing.rst:264 +#: ../../content/developer/reference/backend/testing.rst:293 msgid "Qunit test suite" msgstr "" -#: ../../content/developer/reference/testing.rst:266 +#: ../../content/developer/reference/backend/testing.rst:295 msgid "The Odoo framework uses the QUnit_ library testing framework as a test runner. QUnit defines the concepts of *tests* and *modules* (a set of related tests), and gives us a web based interface to execute the tests." msgstr "" -#: ../../content/developer/reference/testing.rst:270 +#: ../../content/developer/reference/backend/testing.rst:299 msgid "For example, here is what a pyUtils test could look like:" msgstr "" -#: ../../content/developer/reference/testing.rst:285 +#: ../../content/developer/reference/backend/testing.rst:314 msgid "The main way to run the test suite is to have a running Odoo server, then navigate a web browser to ``/web/tests``. The test suite will then be executed by the web browser Javascript engine." msgstr "" -#: ../../content/developer/reference/testing.rst:292 +#: ../../content/developer/reference/backend/testing.rst:321 msgid "The web UI has many useful features: it can run only some submodules, or filter tests that match a string. It can show every assertions, failed or passed, rerun specific tests, ..." msgstr "" -#: ../../content/developer/reference/testing.rst:298 +#: ../../content/developer/reference/backend/testing.rst:327 msgid "While the test suite is running, make sure that:" msgstr "" -#: ../../content/developer/reference/testing.rst:300 +#: ../../content/developer/reference/backend/testing.rst:329 msgid "your browser window is focused," msgstr "" -#: ../../content/developer/reference/testing.rst:301 +#: ../../content/developer/reference/backend/testing.rst:330 msgid "it is not zoomed in/out. It needs to have exactly 100% zoom level." msgstr "" -#: ../../content/developer/reference/testing.rst:303 +#: ../../content/developer/reference/backend/testing.rst:332 msgid "If this is not the case, some tests will fail, without a proper explanation." msgstr "" -#: ../../content/developer/reference/testing.rst:306 +#: ../../content/developer/reference/backend/testing.rst:335 msgid "Testing Infrastructure" msgstr "" -#: ../../content/developer/reference/testing.rst:308 +#: ../../content/developer/reference/backend/testing.rst:337 msgid "Here is a high level overview of the most important parts of the testing infrastructure:" msgstr "" -#: ../../content/developer/reference/testing.rst:311 +#: ../../content/developer/reference/backend/testing.rst:340 msgid "there is an asset bundle named `web.qunit_suite`_. This bundle contains the main code (assets common + assets backend), some libraries, the QUnit test runner and the test bundles listed below." msgstr "" -#: ../../content/developer/reference/testing.rst:315 +#: ../../content/developer/reference/backend/testing.rst:344 msgid "a bundle named `web.tests_assets`_ includes most of the assets and utils required by the test suite: custom QUnit asserts, test helpers, lazy loaded assets, etc." msgstr "" -#: ../../content/developer/reference/testing.rst:318 +#: ../../content/developer/reference/backend/testing.rst:347 msgid "another asset bundle, `web.qunit_suite_tests`_, contains all the test scripts. This is typically where the test files are added to the suite." msgstr "" -#: ../../content/developer/reference/testing.rst:321 +#: ../../content/developer/reference/backend/testing.rst:350 msgid "there is a `controller`_ in web, mapped to the route */web/tests*. This controller simply renders the *web.qunit_suite* template." msgstr "" -#: ../../content/developer/reference/testing.rst:324 +#: ../../content/developer/reference/backend/testing.rst:353 msgid "to execute the tests, one can simply point its browser to the route */web/tests*. In that case, the browser will download all assets, and QUnit will take over." msgstr "" -#: ../../content/developer/reference/testing.rst:327 +#: ../../content/developer/reference/backend/testing.rst:356 msgid "there is some code in `qunit_config.js`_ which logs in the console some information when a test passes or fails." msgstr "" -#: ../../content/developer/reference/testing.rst:330 +#: ../../content/developer/reference/backend/testing.rst:359 msgid "we want the runbot to also run these tests, so there is a test (in `test_js.py`_) which simply spawns a browser and points it to the *web/tests* url. Note that the browser_js method spawns a Chrome headless instance." msgstr "" -#: ../../content/developer/reference/testing.rst:336 +#: ../../content/developer/reference/backend/testing.rst:365 msgid "Modularity and testing" msgstr "" -#: ../../content/developer/reference/testing.rst:338 +#: ../../content/developer/reference/backend/testing.rst:367 msgid "With the way Odoo is designed, any addon can modify the behaviour of other parts of the system. For example, the *voip* addon can modify the *FieldPhone* widget to use extra features. This is not really good from the perspective of the testing system, since this means that a test in the addon web will fail whenever the voip addon is installed (note that the runbot runs the tests with all addons installed)." msgstr "" -#: ../../content/developer/reference/testing.rst:345 -msgid "At the same time, our testing sytem is good, because it can detect whenever another module breaks some core functionality. There is no complete solution to this issue. For now, we solve this on a case by case basis." +#: ../../content/developer/reference/backend/testing.rst:374 +msgid "At the same time, our testing system is good, because it can detect whenever another module breaks some core functionality. There is no complete solution to this issue. For now, we solve this on a case by case basis." msgstr "" -#: ../../content/developer/reference/testing.rst:349 +#: ../../content/developer/reference/backend/testing.rst:378 msgid "Usually, it is not a good idea to modify some other behaviour. For our voip example, it is certainly cleaner to add a new *FieldVOIPPhone* widget and modify the few views that needs it. This way, the *FieldPhone* widget is not impacted, and both can be tested." msgstr "" -#: ../../content/developer/reference/testing.rst:355 +#: ../../content/developer/reference/backend/testing.rst:384 msgid "Adding a new test case" msgstr "" -#: ../../content/developer/reference/testing.rst:357 +#: ../../content/developer/reference/backend/testing.rst:386 msgid "Let us assume that we are maintaining an addon *my_addon*, and that we want to add a test for some javascript code (for example, some utility function myFunction, located in *my_addon.utils*). The process to add a new test case is the following:" msgstr "" -#: ../../content/developer/reference/testing.rst:362 +#: ../../content/developer/reference/backend/testing.rst:391 msgid "create a new file *my_addon/static/tests/utils_tests.js*. This file contains the basic code to add a QUnit module *my_addon > utils*." msgstr "" -#: ../../content/developer/reference/testing.rst:380 +#: ../../content/developer/reference/backend/testing.rst:409 msgid "In *my_addon/assets.xml*, add the file to the main test assets:" msgstr "" -#: ../../content/developer/reference/testing.rst:393 +#: ../../content/developer/reference/backend/testing.rst:422 msgid "Restart the server and update *my_addon*, or do it from the interface (to make sure the new test file is loaded)" msgstr "" -#: ../../content/developer/reference/testing.rst:396 +#: ../../content/developer/reference/backend/testing.rst:425 msgid "Add a test case after the definition of the *utils* sub test suite:" msgstr "" -#: ../../content/developer/reference/testing.rst:407 +#: ../../content/developer/reference/backend/testing.rst:436 msgid "Visit */web/tests/* to make sure the test is executed" msgstr "" -#: ../../content/developer/reference/testing.rst:410 +#: ../../content/developer/reference/backend/testing.rst:439 msgid "Helper functions and specialized assertions" msgstr "" -#: ../../content/developer/reference/testing.rst:412 +#: ../../content/developer/reference/backend/testing.rst:441 msgid "Without help, it is quite difficult to test some parts of Odoo. In particular, views are tricky, because they communicate with the server and may perform many rpcs, which needs to be mocked. This is why we developed some specialized helper functions, located in `test_utils.js`_." msgstr "" -#: ../../content/developer/reference/testing.rst:417 +#: ../../content/developer/reference/backend/testing.rst:446 msgid "Mock test functions: these functions help setting up a test environment. The most important use case is mocking the answers given by the Odoo server. These functions use a `mock server`_. This is a javascript class that simulates answers to the most common model methods: read, search_read, nameget, ..." msgstr "" -#: ../../content/developer/reference/testing.rst:422 +#: ../../content/developer/reference/backend/testing.rst:451 msgid "DOM helpers: useful to simulate events/actions on some specific target. For example, testUtils.dom.click performs a click on a target. Note that it is safer than doing it manually, because it also checks that the target exists, and is visible." msgstr "" -#: ../../content/developer/reference/testing.rst:427 +#: ../../content/developer/reference/backend/testing.rst:456 msgid "create helpers: they are probably the most important functions exported by `test_utils.js`_. These helpers are useful to create a widget, with a mock environment, and a lot of small detail to simulate as much as possible the real conditions. The most important is certainly `createView`_." msgstr "" -#: ../../content/developer/reference/testing.rst:432 +#: ../../content/developer/reference/backend/testing.rst:461 msgid "`qunit assertions`_: QUnit can be extended with specialized assertions. For Odoo, we frequently test some DOM properties. This is why we made some assertions to help with that. For example, the *containsOnce* assertion takes a widget/jQuery/HtmlElement and a selector, then checks if the target contains exactly one match for the css selector." msgstr "" -#: ../../content/developer/reference/testing.rst:438 +#: ../../content/developer/reference/backend/testing.rst:467 msgid "For example, with these helpers, here is what a simple form test could look like:" msgstr "" -#: ../../content/developer/reference/testing.rst:462 +#: ../../content/developer/reference/backend/testing.rst:491 msgid "Notice the use of the testUtils.createView helper and of the containsOnce assertion. Also, the form controller was properly destroyed at the end of the test." msgstr "" -#: ../../content/developer/reference/testing.rst:467 +#: ../../content/developer/reference/backend/testing.rst:496 msgid "Best Practices" msgstr "" -#: ../../content/developer/reference/testing.rst:469 +#: ../../content/developer/reference/backend/testing.rst:498 msgid "In no particular order:" msgstr "" -#: ../../content/developer/reference/testing.rst:471 +#: ../../content/developer/reference/backend/testing.rst:500 msgid "all test files should be added in *some_addon/static/tests/*" msgstr "" -#: ../../content/developer/reference/testing.rst:472 +#: ../../content/developer/reference/backend/testing.rst:501 msgid "for bug fixes, make sure that the test fails without the bug fix, and passes with it. This ensures that it actually works." msgstr "" -#: ../../content/developer/reference/testing.rst:474 +#: ../../content/developer/reference/backend/testing.rst:503 msgid "try to have the minimal amount of code necessary for the test to work." msgstr "" -#: ../../content/developer/reference/testing.rst:475 +#: ../../content/developer/reference/backend/testing.rst:504 msgid "usually, two small tests are better than one large test. A smaller test is easier to understand and to fix." msgstr "" -#: ../../content/developer/reference/testing.rst:477 +#: ../../content/developer/reference/backend/testing.rst:506 msgid "always cleanup after a test. For example, if your test instantiates a widget, it should destroy it at the end." msgstr "" -#: ../../content/developer/reference/testing.rst:479 +#: ../../content/developer/reference/backend/testing.rst:508 msgid "no need to have full and complete code coverage. But adding a few tests helps a lot: it makes sure that your code is not completely broken, and whenever a bug is fixed, it is really much easier to add a test to an existing test suite." msgstr "" -#: ../../content/developer/reference/testing.rst:482 +#: ../../content/developer/reference/backend/testing.rst:511 msgid "if you want to check some negative assertion (for example, that a HtmlElement does not have a specific css class), then try to add the positive assertion in the same test (for example, by doing an action that changes the state). This will help avoid the test to become dead in the future (for example, if the css class is changed)." msgstr "" -#: ../../content/developer/reference/testing.rst:489 +#: ../../content/developer/reference/backend/testing.rst:518 msgid "Tips" msgstr "" -#: ../../content/developer/reference/testing.rst:491 +#: ../../content/developer/reference/backend/testing.rst:520 msgid "running only one test: you can (temporarily!) change the *QUnit.test(...)* definition into *QUnit.only(...)*. This is useful to make sure that QUnit only runs this specific test." msgstr "" -#: ../../content/developer/reference/testing.rst:494 +#: ../../content/developer/reference/backend/testing.rst:523 msgid "debug flag: most create utility functions have a debug mode (activated by the debug: true parameter). In that case, the target widget will be put in the DOM instead of the hidden qunit specific fixture, and more information will be logged. For example, all mocked network communications will be available in the console." msgstr "" -#: ../../content/developer/reference/testing.rst:499 +#: ../../content/developer/reference/backend/testing.rst:528 msgid "when working on a failing test, it is common to add the debug flag, then comment the end of the test (in particular, the destroy call). With this, it is possible to see the state of the widget directly, and even better, to manipulate the widget by clicking/interacting with it." msgstr "" -#: ../../content/developer/reference/testing.rst:506 -#: ../../content/developer/webservices/extract_api.rst:538 -msgid "Integration Testing" +#: ../../content/developer/reference/backend/testing.rst:537 +msgid "Testing Python code and JS code separately is very useful, but it does not prove that the web client and the server work together. In order to do that, we can write another kind of test: tours. A tour is a mini scenario of some interesting business flow. It explains a sequence of steps that should be followed. The test runner will then create a PhantomJs browser, point it to the proper url and simulate the click and inputs, according to the scenario." msgstr "" -#: ../../content/developer/reference/testing.rst:508 -msgid "Testing Python code and JS code separately is very useful, but it does not prove that the web client and the server work together. In order to do that, we can write another kind of test: tours. A tour is a mini scenario of some interesting business flow. It explains a sequence of steps that should be followed. The test runner will then create a Chrome headless browser, point it to the proper url and simulate the click and inputs, according to the scenario." +#: ../../content/developer/reference/backend/testing.rst:544 +msgid "Writing a test tour" msgstr "" -#: ../../content/developer/reference/testing.rst:516 +#: ../../content/developer/reference/backend/testing.rst:549 +msgid "To write a test tour for `your_module`, start with creating the required files:" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:564 +msgid "You can then:" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:566 +msgid "update :file:`__manifest__.py` to add :file:`your_tour.js` in the assets." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:576 +msgid "update :file:`__init__.py` in the folder :file:`tests` to import :file:`test_calling_the_tour`." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:579 +msgid ":ref:`Assets Bundle `" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:580 +msgid ":ref:`testing/python`" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:585 +msgid "Setup your tour by registering it." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:598 +msgid "Add any step you want." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:600 +msgid "Every step contains at least a trigger. You can either use the `predefined steps `_ or write your own personalized step." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:604 +msgid "Here are some example of steps:" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:639 +msgid "Here are some possible arguments for your personalized steps:" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:641 +msgid "**trigger**: Selector/element to ``run`` an action on. The tour will wait until the element exists and is visible before ``run``-ing the action *on it*." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:644 +msgid "**extra_trigger**: Optional secondary condition for the step to ``run``. Will be waited for like the **trigger** element but the action will not run on the extra trigger." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:648 +msgid "Useful to have a precondition, or two different and unrelated conditions." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:650 +msgid "**run**: Action to perform on the *trigger* element." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:652 +msgid "By default, tries to set the **trigger**'s content to ``Text`` if it's an ``input``, otherwise ``click`` it." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:655 +msgid "The action can also be:" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:657 +msgid "A function, synchronous, executed with the trigger's ``Tip`` as context (``this``) and the action helpers as parameter." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:659 +msgid "The name of one of the action helpers, which will be run on the trigger element:" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:665 +msgid "``click``" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:665 +msgid "Clicks the element, performing all the relevant intermediate events." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:669 +msgid ":samp:`text {content}`" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:668 +msgid "Clicks (focuses) the element then sets ``content`` as the element's value (if an input), option (if a select), or content." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:671 +msgid "``dblclick``, ``tripleclick``" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:672 +msgid "Same as ``click`` with multiple repetitions." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:676 +msgid "``clicknoleave``" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:674 +msgid "By default, ``click`` (and variants) will trigger \"exit\" events on the trigger element (mouseout, mouseleave). This helper suppresses those (note: further clicks on other elements will not trigger those events implicitly)." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:679 +msgid "``text_blur``" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:679 +msgid "Similar to ``text`` but follows the edition with ``focusout`` and ``blur`` events." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:682 +msgid ":samp:`drag_and_drop {target}`" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:682 +msgid "Simulates the dragging of the **trigger** element over to the ``target``." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:684 +msgid "**edition**: Optional," +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:686 +msgid "If you don't specify an edition, the step will be active in both community and enterprise." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:687 +msgid "Sometimes, a step will be different in enterprise or in community. You can then write two steps, one for the enterprise edition and one for the community one." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:689 +msgid "Generally, you want to specify an edition for steps that use the main menu as the main menus are different in community and enterprise." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:691 +msgid "**position**: Optional, ``\"top\"``, ``\"right\"``, ``\"bottom\"``, or ``\"left\"``. Where to position the tooltip relative to the **target** when running interactive tours." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:694 +msgid "**content**: Optional but recommended, the content of the tooltip in interactive tours, also logged to the console so very useful to trace and debug automated tours." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:697 +msgid "**auto**: Whether the tour manager should wait for the user to perform the action if the tour is interactive, defaults to ``false``." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:700 +msgid "**in_modal**: If set the **trigger** element will be searched only in the top modal window, defaults to ``false``." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:702 +msgid "**timeout**: How long to wait until the step can ``run``, in milliseconds, 10000 (10 seconds)." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:707 +msgid "The last step(s) of a tour should always return the client to a \"stable\" state (e.g. no ongoing editions) and ensure all side-effects (network requests) have finished running to avoid race conditions or errors during teardown." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:713 +msgid "`jQuery documentation about find `_" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:718 +msgid "To start a tour from a python test, make the class inherit from :class:`~odoo.tests.common.HTTPCase`, and call `start_tour`:" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:729 +msgid "Debugging tips" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:732 +msgid "Observing tours in a browser" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:734 +msgid "There are two ways with different tradeoffs:" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:737 +msgid "``watch=True``" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:738 +msgid "When running a tour locally via the test suite, the ``watch=True`` parameter can be added to the ``browser_js`` or ``start_tour`` call::" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:744 +msgid "This will automatically open a Chrome window with the tour being run inside it." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:749 +#: ../../content/developer/reference/backend/testing.rst:773 +#: ../../content/developer/reference/backend/testing.rst:829 +#: ../../content/developer/reference/backend/testing.rst:847 +msgid "**Advantages**" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:748 +msgid "always works if the tour has Python setup / surrounding code, or multiple steps" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:749 +msgid "runs entirely automatically (just select the test which launches the tour)" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:750 +msgid "transactional (*should* always be runnable multiple times)" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:753 +#: ../../content/developer/reference/backend/testing.rst:777 +#: ../../content/developer/reference/backend/testing.rst:832 +#: ../../content/developer/reference/backend/testing.rst:850 +msgid "**Drawbacks**" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:752 +msgid "only works locally" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:753 +msgid "only works if the test / tour can run correctly locally" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:756 +msgid "Run via browser" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:757 +msgid "Tours can also be launched via the browser UI, either by calling" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:763 +msgid "in the javascript console, or by enabling :ref:`tests mode ` by setting ``?debug=tests`` in the URL, then selecting **Start Tour** in the debug menu and picking a tour:" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:772 +msgid "easier to run" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:773 +msgid "can be used on production or test sites, not just local instances" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:774 +msgid "allows running in \"Onboarding\" mode (manual steps)" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:776 +msgid "harder to use with test tours involving Python setup" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:777 +msgid "may not work multiple times depending on tour side-effects" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:781 +msgid "It's possible to use this method to observe or interact with tours which require Python setup:" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:784 +msgid "add a *python* breakpoint before the relevant tour is started (``start_tour`` or ``browser_js`` call)" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:786 +msgid "when the breakpoint is hit, open the instance in your browser" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:787 +msgid "run the tour" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:789 +msgid "At this point the Python setup will be visible to the browser, and the tour will be able to run." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:792 +msgid "You may want to comment the ``start_tour`` or ``browser_js`` call if you also want the test to continue afterwards, depending on the tour's side-effects." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:797 msgid "Screenshots and screencasts during browser_js tests" msgstr "" -#: ../../content/developer/reference/testing.rst:518 -msgid "When running tests that use HttpCase.browser_js from the command line, the Chrome browser is used in headless mode. By default, if a test fails, a PNG screenshot is taken at the moment of the failure and written in" +#: ../../content/developer/reference/backend/testing.rst:799 +msgid "When running tests that use ``HttpCase.browser_js`` from the command line, the Chrome browser is used in headless mode. By default, if a test fails, a PNG screenshot is taken at the moment of the failure and written in" msgstr "" -#: ../../content/developer/reference/testing.rst:526 +#: ../../content/developer/reference/backend/testing.rst:807 msgid "Two new command line arguments were added since Odoo 13.0 to control this behavior: :option:`--screenshots ` and :option:`--screencasts `" msgstr "" -#: ../../content/developer/reference/testing.rst:531 +#: ../../content/developer/reference/backend/testing.rst:811 +msgid "Introspecting / debugging steps" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:813 +msgid "When trying to fix / debug a tour, the screenshots (on failure) are not necessarily sufficient. In that case it can be useful to see what's happening at some or each step." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:817 +msgid "While this is pretty easy when in an \"onboarding\" (as they're mostly driven explicitly by the user) it's more complicated when running \"test\" tours, or when running tours through the test suite. In that case there are two main tricks:" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:822 +msgid "Have a step with a ``run() { debugger; }`` action." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:824 +msgid "This can be added to an existing step, or can be a new dedicated step. Once the step's **trigger** is matched, the execution will stop all javascript execution." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:829 +msgid "very simple" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:830 +msgid "the tour restarts as soon as you resume execution" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:832 +msgid "page interaction is limited as all javascript is blocked" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:833 +msgid "debugging the inside of the tour manager is not very useful" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:834 +msgid "Add a step with a trigger which never succeeds and a very long ``timeout``." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:837 +msgid "The browser will wait for the **trigger** until the ``timeout`` before it fails the tour, this allows inspecting and interacting with the page until the developer is ready to resume, by manually enabling the **trigger** (a nonsense class is useful there, as it can be triggered by adding the class to any visible element of the page)." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:845 +msgid "allows interacting with the page" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:846 +msgid "easy to apply to a step which times out (just add a long ``timeout`` then look around)" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:848 +msgid "no useless (for this situation) debugger UI" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:850 +msgid "more manual, especially when resuming" +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:853 msgid "Performance Testing" msgstr "" -#: ../../content/developer/reference/testing.rst:534 +#: ../../content/developer/reference/backend/testing.rst:856 msgid "Query counts" msgstr "" -#: ../../content/developer/reference/testing.rst:536 +#: ../../content/developer/reference/backend/testing.rst:858 msgid "One of the ways to test performance is to measure database queries. Manually, this can be tested with the `--log-sql` CLI parameter. If you want to establish the maximum number of queries for an operation, you can use the :meth:`~odoo.tests.common.BaseCase.assertQueryCount` method, integrated in Odoo test classes." msgstr "" -#: ../../content/developer/reference/testing.rst:548 +#: ../../content/developer/reference/backend/testing.rst:870 msgid "Database population" msgstr "" -#: ../../content/developer/reference/testing.rst:550 +#: ../../content/developer/reference/backend/testing.rst:872 msgid "Odoo CLI offers a :ref:`database population` feature." msgstr "" -#: ../../content/developer/reference/testing.rst:556 +#: ../../content/developer/reference/backend/testing.rst:878 msgid "Instead of the tedious manual, or programmatic, specification of test data, one can use this feature to fill a database on demand with the desired number of test data. This can be used to detect diverse bugs or performance issues in tested flows." msgstr "" -#: ../../content/developer/reference/testing.rst:562 +#: ../../content/developer/reference/backend/testing.rst:884 msgid "To specify this feature for a given model, the following methods and attributes can be defined." msgstr "" -#: ../../content/developer/reference/testing.rst:573 +#: ../../docstring of odoo.models.Model._populate_sizes:1 +msgid "Return a dict mapping symbolic sizes (``'small'``, ``'medium'``, ``'large'``) to integers, giving the minimal number of records that :meth:`_populate` should create." +msgstr "" + +#: ../../docstring of odoo.models.Model._populate_sizes:4 +msgid "The default population sizes are:" +msgstr "" + +#: ../../docstring of odoo.models.Model._populate_sizes:6 +msgid "``small`` : 10" +msgstr "" + +#: ../../docstring of odoo.models.Model._populate_sizes:7 +msgid "``medium`` : 100" +msgstr "" + +#: ../../docstring of odoo.models.Model._populate_sizes:8 +msgid "``large`` : 1000" +msgstr "" + +#: ../../docstring of odoo.models.Model._populate_dependencies:1 +msgid "Return the list of models which have to be populated before the current one." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel._populate:1 +msgid "Create records to populate this model." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel._populate:3 +msgid "symbolic size for the number of records: ``'small'``, ``'medium'`` or ``'large'``" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel._populate_factories:1 +msgid "Generates a factory for the different fields of the model." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel._populate_factories:3 +msgid "``factory`` is a generator of values (dict of field values)." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel._populate_factories:5 +msgid "Factory skeleton::" +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel._populate_factories:12 +msgid "See :mod:`odoo.tools.populate` for population tools and applications." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel._populate_factories:14 +msgid "list of pairs(field_name, factory) where `factory` is a generator function." +msgstr "" + +#: ../../../odoo/odoo/models.py:docstring of odoo.models.BaseModel._populate_factories:19 +msgid "It is the responsibility of the generator to handle the field_name correctly. The generator could generate values for multiple fields together. In this case, the field_name should be more a \"field_group\" (should be begin by a \"_\"), covering the different fields updated by the generator (e.g. \"_address\" for a generator updating multiple address fields)." +msgstr "" + +#: ../../content/developer/reference/backend/testing.rst:895 msgid "You have to define at least :meth:`~odoo.models.Model._populate` or :meth:`~odoo.models.Model._populate_factories` on the model to enable database population." msgstr "" -#: ../../content/developer/reference/testing.rst:577 +#: ../../content/developer/reference/backend/testing.rst:899 msgid "Example model" msgstr "" -#: ../../content/developer/reference/testing.rst:621 +#: ../../content/developer/reference/backend/testing.rst:943 msgid "Population tools" msgstr "" -#: ../../content/developer/reference/testing.rst:623 +#: ../../content/developer/reference/backend/testing.rst:945 msgid "Multiple population tools are available to easily create the needed data generators." msgstr "" -#: ../../content/developer/reference/translations.rst:7 -msgid "Translating Modules" +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.cartesian:1 +msgid "Return a factory for an iterator of values dicts that combines all ``vals`` for the field with the other field values in input." msgstr "" -#: ../../content/developer/reference/translations.rst:9 -msgid "This section explains how to provide translation abilities to your module." +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.cartesian:4 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.iterate:5 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.randomize:4 +msgid "list in which a value will be chosen, depending on `weights`" msgstr "" -#: ../../content/developer/reference/translations.rst:11 -msgid "If you want to contribute to the translation of Odoo itself, please refer to the `Odoo Wiki page `_." +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.cartesian:5 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.iterate:6 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.randomize:5 +msgid "list of probabilistic weights" msgstr "" -#: ../../content/developer/reference/translations.rst:15 -msgid "Exporting translatable term" +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.cartesian:6 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.compute:6 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.iterate:7 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.randomize:6 +msgid "optional initialization of the random number generator" msgstr "" -#: ../../content/developer/reference/translations.rst:17 -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." +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.cartesian:7 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.iterate:8 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.randomize:7 +msgid "(val, counter, values) --> formatted_value" msgstr "" -#: ../../content/developer/reference/translations.rst:21 -msgid "needs technical features" +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.cartesian:8 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.iterate:9 +msgid "if defined, factory used when vals has been consumed." msgstr "" -#: ../../content/developer/reference/translations.rst:23 -msgid "Translations export is performed via the administration interface by logging into the backend interface and opening :menuselection:`Settings --> Translations --> Import / Export --> Export Translations`" +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.cartesian:9 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.compute:7 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.constant:4 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.iterate:10 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.randint:7 +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.randomize:9 +msgid "function of the form (iterator, field_name, model_name) -> values" msgstr "" -#: ../../content/developer/reference/translations.rst:27 -msgid "leave the language to the default (new language/empty template)" +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.compute:1 +msgid "Return a factory for an iterator of values dicts that computes the field value as ``function(values, counter, random)``, where ``values`` is the other field values, ``counter`` is an integer, and ``random`` is a pseudo-random number generator." msgstr "" -#: ../../content/developer/reference/translations.rst:28 -msgid "select the `PO File`_ format" +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.compute:5 +msgid "(values, counter, random) --> field_values" msgstr "" -#: ../../content/developer/reference/translations.rst:29 -msgid "select your module" +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.constant:1 +msgid "Return a factory for an iterator of values dicts that sets the field to the given value in each input dict." msgstr "" -#: ../../content/developer/reference/translations.rst:30 -msgid "click :guilabel:`Export` and download the file" +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.iterate:1 +msgid "Return a factory for an iterator of values dicts that picks a value among ``vals`` for each input. Once all ``vals`` have been used once, resume as ``then`` or as a ``randomize`` generator." msgstr "" -#: ../../content/developer/reference/translations.rst:36 -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`)" +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.randint:1 +msgid "Return a factory for an iterator of values dicts that sets the field to a random integer between a and b included in each input dict." msgstr "" -#: ../../content/developer/reference/translations.rst:46 -msgid "translations for all loaded languages are also installed or updated when installing or updating a module" +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.randint:4 +msgid "minimal random value" msgstr "" -#: ../../content/developer/reference/translations.rst:50 -msgid "Implicit exports" +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.randint:5 +msgid "maximal random value" msgstr "" -#: ../../content/developer/reference/translations.rst:52 -msgid "Odoo automatically exports translatable strings from \"data\"-type content:" +#: ../../../odoo/odoo/tools/populate.py:docstring of odoo.tools.populate.randomize:1 +msgid "Return a factory for an iterator of values dicts with pseudo-randomly chosen values (among ``vals``) for a field." msgstr "" -#: ../../content/developer/reference/translations.rst:54 -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/reference/translations.rst:57 -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/reference/translations.rst:61 -msgid "for :class:`~odoo.fields.Field`, unless their model is marked with ``_translate = False``:" -msgstr "" - -#: ../../content/developer/reference/translations.rst:64 -msgid "their ``string`` and ``help`` attributes are exported" -msgstr "" - -#: ../../content/developer/reference/translations.rst:65 -msgid "if ``selection`` is present and a list (or tuple), it's exported" -msgstr "" - -#: ../../content/developer/reference/translations.rst:66 -msgid "if their ``translate`` attribute is set to ``True``, all of their existing values (across all records) are exported" -msgstr "" - -#: ../../content/developer/reference/translations.rst:68 -msgid "help/error messages of :attr:`~odoo.models.Model._constraints` and :attr:`~odoo.models.Model._sql_constraints` are exported" -msgstr "" - -#: ../../content/developer/reference/translations.rst:72 -msgid "Explicit exports" -msgstr "" - -#: ../../content/developer/reference/translations.rst:74 -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/reference/translations.rst:79 -msgid "In Python, the wrapping function is :func:`odoo._`::" -msgstr "" - -#: ../../content/developer/reference/translations.rst:83 -msgid "In JavaScript, the wrapping function is generally :js:func:`odoo.web._t`:" -msgstr "" - -#: ../../content/developer/reference/translations.rst:91 -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/reference/translations.rst:95 -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/reference/translations.rst:101 -msgid "Variables" -msgstr "" - -#: ../../content/developer/reference/translations.rst:102 -msgid "**Don't** the extract may work but it will not translate the text correctly::" -msgstr "" - -#: ../../content/developer/reference/translations.rst:106 -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/reference/translations.rst:113 -msgid "Blocks" -msgstr "" - -#: ../../content/developer/reference/translations.rst:114 -msgid "**Don't** split your translation in several blocks or multiples lines::" -msgstr "" - -#: ../../content/developer/reference/translations.rst:124 -msgid "**Do** keep in one block, giving the full context to translators::" -msgstr "" - -#: ../../content/developer/reference/translations.rst:135 -msgid "Plural" -msgstr "" - -#: ../../content/developer/reference/translations.rst:136 -msgid "**Don't** pluralize terms the English-way::" -msgstr "" - -#: ../../content/developer/reference/translations.rst:142 -msgid "**Do** keep in mind every language has different plural forms::" -msgstr "" - -#: ../../content/developer/reference/translations.rst:150 -msgid "Read vs Run Time" -msgstr "" - -#: ../../content/developer/reference/translations.rst:152 -msgid "**Don't** invoke translation lookup at server launch::" -msgstr "" - -#: ../../content/developer/reference/translations.rst:165 -msgid "**Don't** invoke translation lookup when the javascript file is read::" -msgstr "" - -#: ../../content/developer/reference/translations.rst:176 -msgid "**Do** use lazy translation lookup method::" -msgstr "" - -#: ../../content/developer/reference/translations.rst:190 -msgid "or **do** evaluate dynamically the translatable content::" -msgstr "" - -#: ../../content/developer/reference/translations.rst:199 -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/reference/views.rst:8 +#: ../../content/developer/reference/backend/views.rst:8 msgid "Views are what define how records should be displayed to end-users. They are specified in XML which means that they can be edited independently from the models that they represent. They are flexible and allow a high level of customization of the screens that they control. There exist various types of views. Each of them represents a mode of visualization: *form*, *list*, *kanban*, etc." msgstr "" -#: ../../content/developer/reference/views.rst:13 +#: ../../content/developer/reference/backend/views.rst:13 msgid "Build doc of ir_ui_view.py ?" msgstr "" -#: ../../content/developer/reference/views.rst:18 -#: ../../content/developer/reference/views.rst:906 +#: ../../content/developer/reference/backend/views.rst:18 +#: ../../content/developer/reference/backend/views.rst:966 msgid "Generic structure" msgstr "" -#: ../../content/developer/reference/views.rst:20 +#: ../../content/developer/reference/backend/views.rst:20 msgid "Basic views generally share the common structure defined below. Placeholders are denoted in all caps." msgstr "" -#: ../../content/developer/reference/views.rst:38 +#: ../../content/developer/reference/backend/views.rst:38 msgid "View objects expose a number of fields. They are optional unless specified otherwise." msgstr "" -#: ../../content/developer/reference/views.rst:40 +#: ../../content/developer/reference/backend/views.rst:40 msgid "``name`` (mandatory) :class:`~odoo.fields.Char`" msgstr "" -#: ../../content/developer/reference/views.rst:42 +#: ../../content/developer/reference/backend/views.rst:42 msgid "Only useful as a mnemonic/description of the view when looking for one in a list of some sort." msgstr "" -#: ../../content/developer/reference/views.rst:44 +#: ../../content/developer/reference/backend/views.rst:44 msgid "``model`` :class:`~odoo.fields.Char`" msgstr "" -#: ../../content/developer/reference/views.rst:46 +#: ../../content/developer/reference/backend/views.rst:46 msgid "The model linked to the view, if applicable." msgstr "" -#: ../../content/developer/reference/views.rst:48 +#: ../../content/developer/reference/backend/views.rst:48 msgid "``priority`` :class:`~odoo.fields.Integer`" msgstr "" -#: ../../content/developer/reference/views.rst:50 +#: ../../content/developer/reference/backend/views.rst:50 msgid "When a view is requested by ``(model, type)``, the view matching the model and the type, with the lowest priority will be returned (it is the default view)." msgstr "" -#: ../../content/developer/reference/views.rst:53 +#: ../../content/developer/reference/backend/views.rst:53 msgid "It also defines the order of views application during :ref:`view inheritance `." msgstr "" -#: ../../content/developer/reference/views.rst:56 +#: ../../content/developer/reference/backend/views.rst:56 msgid "``groups_id`` :class:`~odoo.fields.Many2many` -> :class:`odoo.addons.base.models.res_users.Groups`" msgstr "" -#: ../../content/developer/reference/views.rst:58 +#: ../../content/developer/reference/backend/views.rst:58 msgid "The groups allowed to use/access the current view." msgstr "" -#: ../../content/developer/reference/views.rst:60 +#: ../../content/developer/reference/backend/views.rst:60 msgid "If the view extends an existing view, the extension will only be applied for a given user if the user has access to the provided ``groups_id``." msgstr "" -#: ../../content/developer/reference/views.rst:63 +#: ../../content/developer/reference/backend/views.rst:63 msgid "``arch`` :class:`~odoo.fields.Text`" msgstr "" -#: ../../content/developer/reference/views.rst:65 +#: ../../content/developer/reference/backend/views.rst:65 msgid "The description of the view layout." msgstr "" -#: ../../content/developer/reference/views.rst:68 -msgid "Attributes" -msgstr "" - -#: ../../content/developer/reference/views.rst:72 +#: ../../content/developer/reference/backend/views.rst:72 msgid "view attributes & view element attributes attrs & states attributes are missing generic information" msgstr "" -#: ../../content/developer/reference/views.rst:75 +#: ../../content/developer/reference/backend/views.rst:75 msgid "The different view types have a wide variety of attributes allowing customizations of the generic behaviors. Some main attributes will be explained here. They do not all have an impact on all view types." msgstr "" -#: ../../content/developer/reference/views.rst:79 +#: ../../content/developer/reference/backend/views.rst:79 msgid "The current context and user access rights may also impact the view abilities." msgstr "" -#: ../../content/developer/reference/views.rst:81 +#: ../../content/developer/reference/backend/views.rst:81 msgid "info on create/... in the context ?" msgstr "" -#: ../../content/developer/reference/views.rst:83 -#: ../../content/developer/reference/views.rst:1606 +#: ../../content/developer/reference/backend/views.rst:83 +#: ../../content/developer/reference/backend/views.rst:1946 msgid "``create``" msgstr "" -#: ../../content/developer/reference/views.rst:85 +#: ../../content/developer/reference/backend/views.rst:85 msgid "Disable/enable record creation on the view." msgstr "" -#: ../../content/developer/reference/views.rst:87 +#: ../../content/developer/reference/backend/views.rst:87 msgid "``edit`` (``form`` & ``list`` & ``gantt``)" msgstr "" -#: ../../content/developer/reference/views.rst:89 +#: ../../content/developer/reference/backend/views.rst:89 msgid "Disable/enable record editing on the view." msgstr "" -#: ../../content/developer/reference/views.rst:91 +#: ../../content/developer/reference/backend/views.rst:91 msgid "``delete`` (``form`` & ``list``)" msgstr "" -#: ../../content/developer/reference/views.rst:93 +#: ../../content/developer/reference/backend/views.rst:93 msgid "Disable/enable record deletion on the view through the **Action** dropdown." msgstr "" -#: ../../content/developer/reference/views.rst:95 -msgid "``duplicate`` (``form`` & ``list``)" +#: ../../content/developer/reference/backend/views.rst:95 +msgid "``duplicate`` (``form``)" msgstr "" -#: ../../content/developer/reference/views.rst:97 +#: ../../content/developer/reference/backend/views.rst:97 msgid "Disable/enable record duplication on the view through the **Action** dropdown." msgstr "" -#: ../../content/developer/reference/views.rst:99 +#: ../../content/developer/reference/backend/views.rst:99 msgid "``decoration-{$name}`` (``list`` & ``gantt``)" msgstr "" -#: ../../content/developer/reference/views.rst:101 +#: ../../content/developer/reference/backend/views.rst:101 msgid "Define a conditional display of a record in the style of a row's text based on the corresponding record's attributes." msgstr "" -#: ../../content/developer/reference/views.rst:123 +#: ../../content/developer/reference/backend/views.rst:123 msgid "Supported values differ for the two view types. The Gantt view only supports ``success``, ``info``, ``warning``, ``danger`` and ``secondary`` displays. The list view supports ``bf``, ``it``, ``success``, ``info``, ``warning``, ``danger``, ``muted`` and ``primary`` displays." msgstr "" -#: ../../content/developer/reference/views.rst:127 +#: ../../content/developer/reference/backend/views.rst:127 msgid "``sample`` (``kanban`` & ``list`` & ``gantt`` & ``graph`` & ``pivot`` & ``cohort`` & ``dashboard``)" msgstr "" -#: ../../content/developer/reference/views.rst:129 +#: ../../content/developer/reference/backend/views.rst:129 msgid "Populate the view with a set of sample records if none are found for the current model. This attribute is false by default." msgstr "" -#: ../../content/developer/reference/views.rst:132 +#: ../../content/developer/reference/backend/views.rst:132 msgid "These fake records will have heuristics for certain field names/models. For example, a field 'display_name' on the model 'res.users' will be populated with sample people names while an 'email' field will be in the form 'firstname.lastname@sample.demo'." msgstr "" -#: ../../content/developer/reference/views.rst:136 +#: ../../content/developer/reference/backend/views.rst:136 msgid "The user will not be able to interact with these data and they will be discarded as soon as an action is performed (record created, column added, etc.)" msgstr "" -#: ../../content/developer/reference/views.rst:139 +#: ../../content/developer/reference/backend/views.rst:139 msgid "``banner_route`` a route address to be fetched and prepended to the view." msgstr "" -#: ../../content/developer/reference/views.rst:142 +#: ../../content/developer/reference/backend/views.rst:142 msgid "If this attribute is set, the :ref:`controller route url` will be fetched and displayed above the view. The json response from the controller should contain an \"html\" key." msgstr "" -#: ../../content/developer/reference/views.rst:147 +#: ../../content/developer/reference/backend/views.rst:147 msgid "If the html contains a stylesheet tag, it will be removed and appended to ." msgstr "" -#: ../../content/developer/reference/views.rst:150 +#: ../../content/developer/reference/backend/views.rst:150 msgid "To interact with the backend you can use tags. Please take a look at the documentation of the _onActionClicked method of AbstractController (*addons/web/static/src/js/views/abstract_controller.js*) for more details." msgstr "" -#: ../../content/developer/reference/views.rst:155 +#: ../../content/developer/reference/backend/views.rst:155 msgid "Only views extending AbstractView and AbstractController can use this attribute, like :ref:`reference/views/form`, :ref:`reference/views/kanban`, :ref:`reference/views/list`, ..." msgstr "" -#: ../../content/developer/reference/views.rst:159 -#: ../../content/developer/reference/views.rst:1901 -#: ../../content/developer/reference/views.rst:1938 -#: ../../content/developer/reference/views.rst:1964 +#: ../../content/developer/reference/backend/views.rst:159 +#: ../../content/developer/reference/backend/views.rst:2262 +#: ../../content/developer/reference/backend/views.rst:2328 +#: ../../content/developer/reference/frontend/framework_overview.rst:329 +#: ../../content/developer/reference/frontend/registries.rst:292 msgid "Example:" msgstr "" -#: ../../content/developer/reference/views.rst:179 +#: ../../content/developer/reference/backend/views.rst:179 msgid "Views main content section, with field, group & separator ?" msgstr "" -#: ../../content/developer/reference/views.rst:187 +#: ../../content/developer/reference/backend/views.rst:187 msgid "Inheritance fields" msgstr "" -#: ../../content/developer/reference/views.rst:189 +#: ../../content/developer/reference/backend/views.rst:189 msgid "The two following :class:`~odoo.addons.base.ir_ui_view.View` fields are used to specify inherited views." msgstr "" -#: ../../content/developer/reference/views.rst:192 +#: ../../content/developer/reference/backend/views.rst:192 msgid "``inherit_id`` :class:`~odoo.fields.Many2one`" msgstr "" -#: ../../content/developer/reference/views.rst:194 +#: ../../content/developer/reference/backend/views.rst:194 msgid "the current view's parent view, unset by default. Specify the parent using the `ref` attribute:" msgstr "" -#: ../../content/developer/reference/views.rst:201 +#: ../../content/developer/reference/backend/views.rst:201 msgid "``mode`` :class:`~odoo.fields.Selection`: `extension / primary`" msgstr "" -#: ../../content/developer/reference/views.rst:203 +#: ../../content/developer/reference/backend/views.rst:203 msgid "inheritance mode, ``extension`` by default if ``inherit_id`` is set, ``primary`` otherwise." msgstr "" -#: ../../content/developer/reference/views.rst:206 +#: ../../content/developer/reference/backend/views.rst:206 msgid "An example of where you would want to override ``mode`` while using ``inherit_id`` is delegation inheritance. In that case your derived model will be separate from its parent and views matching with one won't match with the other. Suppose you inherit from a view associated with the parent model and want to customize the derived view to show data from the derived model. The ``mode`` of the derived view needs to be set to ``primary``, because it's the base (and maybe only) view for that derived model. Otherwise the :ref:`view matching ` rules won't apply." msgstr "" -#: ../../content/developer/reference/views.rst:219 +#: ../../content/developer/reference/backend/views.rst:219 msgid "View matching" msgstr "" -#: ../../content/developer/reference/views.rst:221 +#: ../../content/developer/reference/backend/views.rst:221 msgid "if a view is requested by ``(model, type)``, the view with the right model and type, ``mode=primary`` and the lowest priority is matched." msgstr "" -#: ../../content/developer/reference/views.rst:223 +#: ../../content/developer/reference/backend/views.rst:223 msgid "when a view is requested by ``id``, if its mode is not ``primary`` its *closest* parent with mode ``primary`` is matched." msgstr "" -#: ../../content/developer/reference/views.rst:227 +#: ../../content/developer/reference/backend/views.rst:227 msgid "View resolution" msgstr "" -#: ../../content/developer/reference/views.rst:229 +#: ../../content/developer/reference/backend/views.rst:229 msgid "Resolution generates the final ``arch`` for a requested/matched ``primary`` view:" msgstr "" -#: ../../content/developer/reference/views.rst:232 +#: ../../content/developer/reference/backend/views.rst:232 msgid "if the view has a parent, the parent is fully resolved then the current view's inheritance specs are applied" msgstr "" -#: ../../content/developer/reference/views.rst:234 +#: ../../content/developer/reference/backend/views.rst:234 msgid "if the view has no parent, its ``arch`` is used as-is" msgstr "" -#: ../../content/developer/reference/views.rst:235 +#: ../../content/developer/reference/backend/views.rst:235 msgid "the current view's children with mode ``extension`` are looked up and their inheritance specs are applied depth-first (a child view is applied, then its children, then its siblings)" msgstr "" -#: ../../content/developer/reference/views.rst:239 +#: ../../content/developer/reference/backend/views.rst:239 msgid "The result of applying children views yields the final ``arch``" msgstr "" -#: ../../content/developer/reference/views.rst:241 +#: ../../content/developer/reference/backend/views.rst:241 msgid "NOTE on fields_view_get and link to ORM ?" msgstr "" -#: ../../content/developer/reference/views.rst:244 +#: ../../content/developer/reference/backend/views.rst:244 msgid "Inheritance specs" msgstr "" -#: ../../content/developer/reference/views.rst:246 +#: ../../content/developer/reference/backend/views.rst:246 msgid "Inheritance specs are comprised of an element locator, to match the inherited element in the parent view, and children element that will be used to modify the inherited element." msgstr "" -#: ../../content/developer/reference/views.rst:250 +#: ../../content/developer/reference/backend/views.rst:250 msgid "There are three types of element locators for matching a target element:" msgstr "" -#: ../../content/developer/reference/views.rst:252 +#: ../../content/developer/reference/backend/views.rst:252 msgid "An ``xpath`` element with an ``expr`` attribute. ``expr`` is an XPath_ expression\\ [#hasclass]_ applied to the current ``arch``, the first node it finds is the match" msgstr "" -#: ../../content/developer/reference/views.rst:255 +#: ../../content/developer/reference/backend/views.rst:255 msgid "a ``field`` element with a ``name`` attribute, matches the first ``field`` with the same ``name``. All other attributes are ignored during matching" msgstr "" -#: ../../content/developer/reference/views.rst:257 +#: ../../content/developer/reference/backend/views.rst:257 msgid "any other element: the first element with the same name and identical attributes (ignoring ``position`` and ``version`` attributes) is matched" msgstr "" -#: ../../content/developer/reference/views.rst:274 +#: ../../content/developer/reference/backend/views.rst:274 msgid "The inheritance spec may have an optional ``position`` attribute specifying how the matched node should be altered:" msgstr "" -#: ../../content/developer/reference/views.rst:277 +#: ../../content/developer/reference/backend/views.rst:279 msgid "``inside`` (default)" msgstr "" -#: ../../content/developer/reference/views.rst:278 +#: ../../content/developer/reference/backend/views.rst:280 msgid "the content of the inheritance spec is appended to the matched node" msgstr "" -#: ../../content/developer/reference/views.rst:280 +#: ../../content/developer/reference/backend/views.rst:282 msgid "the content of the inheritance spec replaces the matched node. Any text node containing only ``$0`` within the contents of the spec will be replaced by a complete copy of the matched node, effectively wrapping the matched node." msgstr "" -#: ../../content/developer/reference/views.rst:285 +#: ../../content/developer/reference/backend/views.rst:287 msgid "the content of the inheritance spec is added to the matched node's parent, after the matched node" msgstr "" -#: ../../content/developer/reference/views.rst:288 +#: ../../content/developer/reference/backend/views.rst:290 msgid "the content of the inheritance spec is added to the matched node's parent, before the matched node" msgstr "" -#: ../../content/developer/reference/views.rst:291 +#: ../../content/developer/reference/backend/views.rst:293 msgid "the content of the inheritance spec should be ``attribute`` elements with a ``name`` attribute and an optional body:" msgstr "" -#: ../../content/developer/reference/views.rst:294 +#: ../../content/developer/reference/backend/views.rst:296 msgid "if the ``attribute`` element has a body, a new attributed named after its ``name`` is created on the matched node with the ``attribute`` element's text as value" msgstr "" -#: ../../content/developer/reference/views.rst:297 +#: ../../content/developer/reference/backend/views.rst:299 msgid "if the ``attribute`` element has no body, the attribute named after its ``name`` is removed from the matched node. If no such attribute exists, an error is raised" msgstr "" -#: ../../content/developer/reference/views.rst:324 +#: ../../content/developer/reference/backend/views.rst:302 +msgid "if the ``attribute`` element has an ``add`` attribute, a ``remove`` attribute, or both, the value of the matched node's attribute named after ``name`` is recomputed to include the value(s) of ``add`` (separated by ``separator``) and delete the value(s) of ``remove`` (separated by ``separator``). If ``separator`` is not provided, ``,`` is used instead." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:331 msgid "``move``" msgstr "" -#: ../../content/developer/reference/views.rst:311 +#: ../../content/developer/reference/backend/views.rst:318 msgid "can be used as a direct child of a inheritance spec with a ``inside``, ``replace``, ``after`` or ``before`` ``position`` attribute to move a node." msgstr "" -#: ../../content/developer/reference/views.rst:326 +#: ../../content/developer/reference/backend/views.rst:333 msgid "A view's specs are applied sequentially." msgstr "" -#: ../../content/developer/reference/views.rst:328 +#: ../../content/developer/reference/backend/views.rst:335 msgid "an extension function is added for simpler matching in QWeb views: ``hasclass(*classes)`` matches if the context node has all the specified classes" msgstr "" -#: ../../content/developer/reference/views.rst:335 +#: ../../content/developer/reference/backend/views.rst:342 msgid "View types" msgstr "" -#: ../../content/developer/reference/views.rst:340 +#: ../../content/developer/reference/backend/views.rst:347 msgid "Activity" msgstr "" -#: ../../content/developer/reference/views.rst:342 +#: ../../content/developer/reference/backend/views.rst:349 msgid "The Activity view is used to display the activities linked to the records. The data are displayed in a chart with the records forming the rows and the activity types the columns. The first cell of each row displays a (customizable, see ``templates``, quite similarly to :ref:`reference/views/kanban`) card representing the corresponding record. When clicking on others cells, a detailed description of all activities of the same type for the record is displayed." msgstr "" -#: ../../content/developer/reference/views.rst:351 +#: ../../content/developer/reference/backend/views.rst:358 msgid "The Activity view is only available when the ``mail`` module is installed, and for the models that inherit from the ``mail.activity.mixin``." msgstr "" -#: ../../content/developer/reference/views.rst:354 +#: ../../content/developer/reference/backend/views.rst:361 msgid "The root element of the Activity view is ````, it accepts the following attributes:" msgstr "" -#: ../../content/developer/reference/views.rst:358 -#: ../../content/developer/reference/views.rst:487 +#: ../../content/developer/reference/backend/views.rst:367 +#: ../../content/developer/reference/backend/views.rst:519 msgid "``string`` (mandatory)" msgstr "" -#: ../../content/developer/reference/views.rst:358 -#: ../../content/developer/reference/views.rst:487 +#: ../../content/developer/reference/backend/views.rst:367 +#: ../../content/developer/reference/backend/views.rst:519 msgid "A title, which should describe the view" msgstr "" -#: ../../content/developer/reference/views.rst:360 -#: ../../content/developer/reference/views.rst:1223 +#: ../../content/developer/reference/backend/views.rst:369 +#: ../../content/developer/reference/backend/views.rst:1571 msgid "Possible children of the view element are:" msgstr "" -#: ../../content/developer/reference/views.rst:363 +#: ../../content/developer/reference/backend/views.rst:374 msgid "declares fields to use in activity *logic*. If the field is simply displayed in the activity view, it does not need to be pre-declared." msgstr "" -#: ../../content/developer/reference/views.rst:366 -#: ../../content/developer/reference/views.rst:1229 -#: ../../content/developer/reference/views.rst:1237 +#: ../../content/developer/reference/backend/views.rst:377 +#: ../../content/developer/reference/backend/views.rst:1579 +#: ../../content/developer/reference/backend/views.rst:1595 msgid "Possible attributes are:" msgstr "" -#: ../../content/developer/reference/views.rst:369 -#: ../../content/developer/reference/views.rst:520 -#: ../../content/developer/reference/views.rst:1137 -#: ../../content/developer/reference/views.rst:1232 -#: ../../content/developer/reference/views.rst:1723 +#: ../../content/developer/reference/backend/views.rst:382 +#: ../../content/developer/reference/backend/views.rst:1584 msgid "``name`` (required)" msgstr "" -#: ../../content/developer/reference/views.rst:369 -#: ../../content/developer/reference/views.rst:1232 +#: ../../content/developer/reference/backend/views.rst:382 +#: ../../content/developer/reference/backend/views.rst:1584 msgid "the name of the field to fetch" msgstr "" -#: ../../content/developer/reference/views.rst:387 -#: ../../content/developer/reference/views.rst:1081 -#: ../../content/developer/reference/views.rst:1319 +#: ../../content/developer/reference/backend/views.rst:402 +#: ../../content/developer/reference/backend/views.rst:1156 +#: ../../content/developer/reference/backend/views.rst:1685 msgid "``templates``" msgstr "" -#: ../../content/developer/reference/views.rst:372 +#: ../../content/developer/reference/backend/views.rst:385 msgid "defines the :ref:`reference/qweb` templates. Cards definition may be split into multiple templates for clarity, but activity views *must* define at least one root template ``activity-box``, which will be rendered once for each record." msgstr "" -#: ../../content/developer/reference/views.rst:377 +#: ../../content/developer/reference/backend/views.rst:390 msgid "The activity view uses mostly-standard :ref:`javascript qweb ` and provides the following context variables (see :ref:`reference/views/kanban` for more details):" msgstr "" -#: ../../content/developer/reference/views.rst:383 -#: ../../content/developer/reference/views.rst:723 -#: ../../content/developer/reference/views.rst:820 -#: ../../content/developer/reference/views.rst:1077 -#: ../../content/developer/reference/views.rst:1263 -#: ../../content/developer/reference/views.rst:1509 +#: ../../content/developer/reference/backend/views.rst:398 +#: ../../content/developer/reference/backend/views.rst:769 +#: ../../content/developer/reference/backend/views.rst:876 +#: ../../content/developer/reference/backend/views.rst:1152 +#: ../../content/developer/reference/backend/views.rst:1625 +#: ../../content/developer/reference/backend/views.rst:1841 msgid "``widget``" msgstr "" -#: ../../content/developer/reference/views.rst:382 +#: ../../content/developer/reference/backend/views.rst:397 msgid "the current :js:class:`ActivityRecord`, can be used to fetch some meta-information. These methods are also available directly in the template context and don't need to be accessed via ``widget``" msgstr "" -#: ../../content/developer/reference/views.rst:386 +#: ../../content/developer/reference/backend/views.rst:401 msgid "an object with all the requested fields as its attributes. Each field has two attributes ``value`` and ``raw_value``" msgstr "" -#: ../../content/developer/reference/views.rst:392 -#: ../../content/developer/reference/views.rst:1324 +#: ../../content/developer/reference/backend/views.rst:407 msgid "Calendar" msgstr "" -#: ../../content/developer/reference/views.rst:394 -msgid "Calendar views display records as events in a daily, weekly, monthly or yearly calendar. Their root element is ````. Available attributes on the calendar view are:" +#: ../../content/developer/reference/backend/views.rst:409 +msgid "Calendar views display records as events in a daily, weekly, monthly or yearly calendar." msgstr "" -#: ../../content/developer/reference/views.rst:398 -#: ../../content/developer/reference/views.rst:957 -#: ../../content/developer/reference/views.rst:1330 +#: ../../content/developer/reference/backend/views.rst:412 +msgid "By default the calendar view will be centered around the current date (today). You can pass a specific initial date to the context of the action in order to set the initial focus of the calendar on the period (see `mode`) around this date (the context key to use being `initial_date`)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:417 +msgid "Their root element is ````. Available attributes on the calendar view are:" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:422 +#: ../../content/developer/reference/backend/views.rst:1019 msgid "``date_start`` (required)" msgstr "" -#: ../../content/developer/reference/views.rst:399 -#: ../../content/developer/reference/views.rst:1331 +#: ../../content/developer/reference/backend/views.rst:423 msgid "name of the record's field holding the start date for the event" msgstr "" -#: ../../content/developer/reference/views.rst:402 -#: ../../content/developer/reference/views.rst:1334 +#: ../../content/developer/reference/backend/views.rst:426 msgid "``date_stop``" msgstr "" -#: ../../content/developer/reference/views.rst:401 -#: ../../content/developer/reference/views.rst:1333 +#: ../../content/developer/reference/backend/views.rst:425 msgid "name of the record's field holding the end date for the event, if ``date_stop`` is provided records become movable (via drag and drop) directly in the calendar" msgstr "" -#: ../../content/developer/reference/views.rst:405 -#: ../../content/developer/reference/views.rst:1337 +#: ../../content/developer/reference/backend/views.rst:429 msgid "``date_delay``" msgstr "" -#: ../../content/developer/reference/views.rst:405 -#: ../../content/developer/reference/views.rst:1337 +#: ../../content/developer/reference/backend/views.rst:429 msgid "alternative to ``date_stop``, provides the duration of the event instead of its end date (unit: day)" msgstr "" -#: ../../content/developer/reference/views.rst:408 -#: ../../content/developer/reference/views.rst:1340 +#: ../../content/developer/reference/backend/views.rst:432 msgid "name of a record field to use for *color segmentation*. Records in the same color segment are allocated the same highlight color in the calendar, colors are allocated semi-randomly. Displayed the display_name/avatar of the visible record in the sidebar" msgstr "" -#: ../../content/developer/reference/views.rst:414 -#: ../../content/developer/reference/views.rst:1086 -#: ../../content/developer/reference/views.rst:1346 +#: ../../content/developer/reference/backend/views.rst:438 +#: ../../content/developer/reference/backend/views.rst:1161 msgid "``form_view_id``" msgstr "" -#: ../../content/developer/reference/views.rst:413 -#: ../../content/developer/reference/views.rst:1345 +#: ../../content/developer/reference/backend/views.rst:437 msgid "view to open when the user create or edit an event. Note that if this attribute is not set, the calendar view will fall back to the id of the form view in the current action, if any." msgstr "" -#: ../../content/developer/reference/views.rst:418 -#: ../../content/developer/reference/views.rst:1350 +#: ../../content/developer/reference/backend/views.rst:442 msgid "``event_open_popup``" msgstr "" -#: ../../content/developer/reference/views.rst:417 -#: ../../content/developer/reference/views.rst:1349 +#: ../../content/developer/reference/backend/views.rst:441 msgid "If the option 'event_open_popup' is set to true, then the calendar view will open events (or records) in a FormViewDialog. Otherwise, it will open events in a new form view (with a do_action)" msgstr "" -#: ../../content/developer/reference/views.rst:422 -#: ../../content/developer/reference/views.rst:1354 +#: ../../content/developer/reference/backend/views.rst:447 msgid "``quick_add``" msgstr "" -#: ../../content/developer/reference/views.rst:421 -#: ../../content/developer/reference/views.rst:1353 -msgid "enables quick-event creation on click: only asks the user for a ``name`` and tries to create a new event with just that and the clicked event time. Falls back to a full form dialog if the quick creation fails" +#: ../../content/developer/reference/backend/views.rst:445 +msgid "enables quick-event creation on click: only asks the user for a ``name`` (the field to which this values is saved can be controlled through ``rec_name``) and tries to create a new event with just that and the clicked event time. Falls back to a full form dialog if the quick creation fails" msgstr "" -#: ../../content/developer/reference/views.rst:425 -#: ../../content/developer/reference/views.rst:1357 +#: ../../content/developer/reference/backend/views.rst:450 +msgid "``create_name_field``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:450 +msgid "name of the record's field holding the textual representation of the record, this is used when creating records through the 'quick create' mechanism" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:453 msgid "``all_day``" msgstr "" -#: ../../content/developer/reference/views.rst:425 -#: ../../content/developer/reference/views.rst:1357 +#: ../../content/developer/reference/backend/views.rst:453 msgid "name of a boolean field on the record indicating whether the corresponding event is flagged as day-long (and duration is irrelevant)" msgstr "" -#: ../../content/developer/reference/views.rst:428 -#: ../../content/developer/reference/views.rst:869 -#: ../../content/developer/reference/views.rst:1360 +#: ../../content/developer/reference/backend/views.rst:456 +#: ../../content/developer/reference/backend/views.rst:927 msgid "``mode``" msgstr "" -#: ../../content/developer/reference/views.rst:428 +#: ../../content/developer/reference/backend/views.rst:456 msgid "Default display mode when loading the calendar. Possible attributes are: ``day``, ``week``, ``month``, ``year``" msgstr "" -#: ../../content/developer/reference/views.rst:432 -#: ../../content/developer/reference/views.rst:1065 +#: ../../content/developer/reference/backend/views.rst:459 +#: ../../content/developer/reference/backend/views.rst:1138 msgid "``scales``" msgstr "" -#: ../../content/developer/reference/views.rst:431 +#: ../../content/developer/reference/backend/views.rst:459 msgid "Comma-separated list of scales to provide. By default, all scales are available. See mode for possible scale values." msgstr "" -#: ../../content/developer/reference/views.rst:452 -#: ../../content/developer/reference/views.rst:1367 -msgid "````" -msgstr "" - -#: ../../content/developer/reference/views.rst:435 -#: ../../content/developer/reference/views.rst:1366 -msgid "declares fields to aggregate or to use in kanban *logic*. If the field is simply displayed in the calendar cards." -msgstr "" - -#: ../../content/developer/reference/views.rst:438 -msgid "Fields can have additional attributes:" -msgstr "" - -#: ../../content/developer/reference/views.rst:440 -msgid "``invisible`` use \"True\" to hide the value in the cards" -msgstr "" - -#: ../../content/developer/reference/views.rst:442 -msgid "``avatar_field`` only for x2many field, to display the avatar instead of the display_name in the cards" -msgstr "" - -#: ../../content/developer/reference/views.rst:445 -msgid "``write_model`` and ``write_field``" -msgstr "" - -#: ../../content/developer/reference/views.rst:447 -msgid "you can add a filter and save the result in the defined model, the filter is added in the sidebar" -msgstr "" - -#: ../../content/developer/reference/views.rst:449 -msgid "``filter`` and ``color``" -msgstr "" - -#: ../../content/developer/reference/views.rst:451 -msgid "use \"True\" to add this field in filter in the sidebar. You can specify a ``color`` field used to colorize the checkbox." -msgstr "" - -#: ../../content/developer/reference/views.rst:457 -msgid "Cohort" -msgstr "" - -#: ../../content/developer/reference/views.rst:463 -msgid "The cohort view is used to display and understand the way some data changes over a period of time. For example, imagine that for a given business, clients can subscribe to some service. The cohort view can then display the total number of subscriptions each month, and study the rate at which client leave the service (churn). When clicking on a cell, the cohort view will redirect you to a new action in which you will only see the records contained in the cell's time interval; this action contains a list view and a form view." -msgstr "" - -#: ../../content/developer/reference/views.rst:471 -msgid "By default the cohort view will use the same list and form views as those defined on the action. You can pass a list view and a form view to the context of the action in order to set/override the views that will be used (the context keys to use being `form_view_id` and `list_view_id`)" -msgstr "" - -#: ../../content/developer/reference/views.rst:476 -msgid "For example, here is a very simple cohort view:" -msgstr "" - -#: ../../content/developer/reference/views.rst:482 -msgid "The root element of the Cohort view is , it accepts the following attributes:" -msgstr "" - -#: ../../content/developer/reference/views.rst:491 -msgid "``date_start`` (mandatory)" -msgstr "" - -#: ../../content/developer/reference/views.rst:490 -msgid "A valid date or datetime field. This field is understood by the view as the beginning date of a record" -msgstr "" - -#: ../../content/developer/reference/views.rst:495 -msgid "``date_stop`` (mandatory)" -msgstr "" - -#: ../../content/developer/reference/views.rst:494 -msgid "A valid date or datetime field. This field is understood by the view as the end date of a record. This is the field that will determine the churn." -msgstr "" - -#: ../../content/developer/reference/views.rst:500 -msgid "``mode`` (optional)" -msgstr "" - -#: ../../content/developer/reference/views.rst:498 -msgid "A string to describe the mode. It should be either 'churn' or 'retention' (default). Churn mode will start at 0% and accumulate over time whereas retention will start at 100% and decrease over time." -msgstr "" - -#: ../../content/developer/reference/views.rst:506 -msgid "``timeline`` (optional)" -msgstr "" - -#: ../../content/developer/reference/views.rst:503 -msgid "A string to describe the timeline. It should be either 'backward' or 'forward' (default). Forward timeline will display data from date_start to date_stop, whereas backward timeline will display data from date_stop to date_start (when the date_start is in future / greater than date_stop)." -msgstr "" - -#: ../../content/developer/reference/views.rst:510 -msgid "``interval`` (optional)" -msgstr "" - -#: ../../content/developer/reference/views.rst:509 -msgid "A string to describe a time interval. It should be 'day', 'week', 'month'' (default) or 'year'." -msgstr "" - -#: ../../content/developer/reference/views.rst:514 -#: ../../content/developer/reference/views.rst:663 -msgid "``measure`` (optional)" -msgstr "" - -#: ../../content/developer/reference/views.rst:513 -msgid "A field that can be aggregated. This field will be used to compute the values for each cell. If not set, the cohort view will count the number of occurrences." -msgstr "" - -#: ../../content/developer/reference/views.rst:518 -msgid "```` (optional)" -msgstr "" - -#: ../../content/developer/reference/views.rst:517 -msgid "allows to specify a particular field in order to manage it from the available measures, it's main use is for hiding a field from the selectable measures:" -msgstr "" - -#: ../../content/developer/reference/views.rst:521 -msgid "the name of the field to use in the view." -msgstr "" - -#: ../../content/developer/reference/views.rst:523 -#: ../../content/developer/reference/views.rst:588 -#: ../../content/developer/reference/views.rst:620 -#: ../../content/developer/reference/views.rst:693 -msgid "``string`` (optional)" -msgstr "" - -#: ../../content/developer/reference/views.rst:523 -msgid "the name that would be used to display the field in the cohort view, overrides the default python String attribute of the field." -msgstr "" - -#: ../../content/developer/reference/views.rst:528 -#: ../../content/developer/reference/views.rst:1144 -msgid "``invisible`` (optional)" -msgstr "" - -#: ../../content/developer/reference/views.rst:526 -#: ../../content/developer/reference/views.rst:1745 -msgid "if true, the field will not appear either in the active measures nor in the selectable measures (useful for fields that do not make sense aggregated, such as fields in different units, e.g. € and $)." -msgstr "" - -#: ../../content/developer/reference/views.rst:533 -msgid "Dashboard" -msgstr "" - -#: ../../content/developer/reference/views.rst:539 -msgid "Like pivot and graph view, The dashboard view is used to display aggregate data. However, the dashboard can embed sub views, which makes it possible to have a more complete and interesting look on a given dataset." -msgstr "" - -#: ../../content/developer/reference/views.rst:543 -msgid "The dashboard view can display sub views, aggregates for some fields (over a domain), or even *formulas* (expressions which involves one or more aggregates). For example, here is a very simple dashboard:" -msgstr "" - -#: ../../content/developer/reference/views.rst:560 -msgid "The root element of the Dashboard view is , it does not accept any attributes." -msgstr "" - -#: ../../content/developer/reference/views.rst:563 -msgid "There are 5 possible type of tags in a dashboard view:" -msgstr "" - -#: ../../content/developer/reference/views.rst:566 -msgid "declares a sub view." -msgstr "" - -#: ../../content/developer/reference/views.rst:568 -#: ../../content/developer/reference/views.rst:585 -#: ../../content/developer/reference/views.rst:605 -#: ../../content/developer/reference/views.rst:681 -#: ../../content/developer/reference/views.rst:715 -msgid "Admissible attributes are:" -msgstr "" - -#: ../../content/developer/reference/views.rst:571 -msgid "``type`` (mandatory)" -msgstr "" - -#: ../../content/developer/reference/views.rst:571 -msgid "The type of the sub view. For example, *graph* or *pivot*." -msgstr "" - -#: ../../content/developer/reference/views.rst:575 -msgid "``ref`` (optional)" -msgstr "" - -#: ../../content/developer/reference/views.rst:574 -msgid "An xml id for a view. If not given, the default view for the model will be used." -msgstr "" - -#: ../../content/developer/reference/views.rst:579 -#: ../../content/developer/reference/views.rst:690 -#: ../../content/developer/webservices/extract_api.rst:308 -msgid "``name`` (optional)" -msgstr "" - -#: ../../content/developer/reference/views.rst:578 -msgid "A string which identifies this element. It is mostly useful to be used as a target for an xpath." -msgstr "" - -#: ../../content/developer/reference/views.rst:596 -#: ../../content/developer/reference/views.rst:766 -#: ../../content/developer/reference/views.rst:2015 -msgid "``group``" -msgstr "" - -#: ../../content/developer/reference/views.rst:582 -msgid "defines a column layout. This is actually very similar to the group element in a form view." -msgstr "" - -#: ../../content/developer/reference/views.rst:588 -msgid "A description which will be displayed as a group title." -msgstr "" - -#: ../../content/developer/reference/views.rst:591 -msgid "``colspan`` (optional)" -msgstr "" - -#: ../../content/developer/reference/views.rst:591 -msgid "The number of subcolumns in this group tag. By default, 6." -msgstr "" - -#: ../../content/developer/reference/views.rst:596 -#: ../../content/developer/reference/views.rst:647 -#: ../../content/developer/reference/views.rst:697 -#: ../../content/developer/reference/views.rst:723 -msgid "``col`` (optional)" -msgstr "" - -#: ../../content/developer/reference/views.rst:594 -msgid "The number of columns spanned by this group tag (only makes sense inside another group). By default, 6." -msgstr "" - -#: ../../content/developer/reference/views.rst:673 -msgid "``aggregate``" -msgstr "" - -#: ../../content/developer/reference/views.rst:599 -msgid "declares an aggregate. This is the value of an aggregate for a given field over the current domain." -msgstr "" - -#: ../../content/developer/reference/views.rst:602 -msgid "Note that aggregates are supposed to be used inside a group tag (otherwise the style will not be properly applied)." -msgstr "" - -#: ../../content/developer/reference/views.rst:613 -msgid "``field`` (mandatory)" -msgstr "" - -#: ../../content/developer/reference/views.rst:608 -msgid "The field name to use for computing the aggregate. Possible field types are:" -msgstr "" - -#: ../../content/developer/reference/views.rst:611 -msgid "``integer`` (default group operator is sum)" -msgstr "" - -#: ../../content/developer/reference/views.rst:612 -msgid "``float`` (default group operator is sum)" -msgstr "" - -#: ../../content/developer/reference/views.rst:613 -msgid "``many2one`` (default group operator is count distinct)" -msgstr "" - -#: ../../content/developer/reference/views.rst:616 -msgid "A string to identify this aggregate (useful for formulas)" -msgstr "" - -#: ../../content/developer/reference/views.rst:619 -msgid "A short description that will be displayed above the value. If not given, it will fall back to the field string." -msgstr "" - -#: ../../content/developer/reference/views.rst:623 -msgid "An additional restriction on the set of records that we want to aggregate. This domain will be combined with the current domain." -msgstr "" - -#: ../../content/developer/reference/views.rst:629 -msgid "``domain_label`` (optional)" -msgstr "" - -#: ../../content/developer/reference/views.rst:627 -msgid "When the user clicks on an aggregate with a domain, it will be added to the search view as a facet. The string displayed for this facet can be customized with this attribute." -msgstr "" - -#: ../../content/developer/reference/views.rst:643 -msgid "``group_operator`` (optional)" -msgstr "" - -#: ../../content/developer/reference/views.rst:632 -msgid "A valid postgreSQL aggregate function identifier to use when aggregating values (see https://www.postgresql.org/docs/9.5/static/functions-aggregate.html). If not provided, By default, the group_operator from the field definition is used. Note that no aggregation of field values is achieved if the group_operator value is \"\"." -msgstr "" - -#: ../../content/developer/reference/views.rst:637 -msgid "The special aggregate function ``count_distinct`` (defined in odoo) can also be used here" -msgstr "" - -#: ../../content/developer/reference/views.rst:646 -#: ../../content/developer/reference/views.rst:696 -#: ../../content/developer/reference/views.rst:722 -msgid "The number of columns spanned by this tag (only makes sense inside a group). By default, 1." -msgstr "" - -#: ../../content/developer/reference/views.rst:651 -#: ../../content/developer/reference/views.rst:701 -msgid "``widget`` (optional)" -msgstr "" - -#: ../../content/developer/reference/views.rst:650 -msgid "A widget to format the value (like the widget attribute for fields). For example, monetary." -msgstr "" - -#: ../../content/developer/reference/views.rst:654 -#: ../../content/developer/reference/views.rst:704 -msgid "``help`` (optional)" -msgstr "" - -#: ../../content/developer/reference/views.rst:654 -#: ../../content/developer/reference/views.rst:704 -msgid "A help message to dipslay in a tooltip (equivalent of help for a field in python)" -msgstr "" - -#: ../../content/developer/reference/views.rst:657 -msgid "This attribute is the name of a field describing the measure that has to be used in the graph and pivot views when clicking on the aggregate. The special value __count__ can be used to use the count measure." -msgstr "" - -#: ../../content/developer/reference/views.rst:668 -msgid "``clickable`` (optional)" -msgstr "" - -#: ../../content/developer/reference/views.rst:666 -msgid "A boolean indicating if this aggregate should be clickable or not (default to true). Clicking on a clickable aggregate will change the measures used by the subviews and add the value of the domain attribute (if any) to the search view." -msgstr "" - -#: ../../content/developer/reference/views.rst:673 -#: ../../content/developer/reference/views.rst:709 -msgid "``value_label`` (optional)" -msgstr "" - -#: ../../content/developer/reference/views.rst:671 -msgid "A string put on the right of the aggregate value. For example, it can be useful to indicate the unit of measure of the aggregate value." -msgstr "" - -#: ../../content/developer/reference/views.rst:709 -msgid "``formula``" -msgstr "" - -#: ../../content/developer/reference/views.rst:676 -msgid "declares a derived value. Formulas are values computed from aggregates." -msgstr "" - -#: ../../content/developer/reference/views.rst:678 -msgid "Note that like aggregates, formulas are supposed to be used inside a group tag (otherwise the style will not be properly applied)." -msgstr "" - -#: ../../content/developer/reference/views.rst:687 -msgid "``value`` (mandatory)" -msgstr "" - -#: ../../content/developer/reference/views.rst:684 -msgid "A string expression that will be evaluated, with the builtin python evaluator (in the web client). Every aggregate can be used in the context, in the ``record`` variable. For example, ``record.price_total / record.order_id``." -msgstr "" - -#: ../../content/developer/reference/views.rst:690 -msgid "A string to identify this formula" -msgstr "" - -#: ../../content/developer/reference/views.rst:693 -msgid "A short description that will be displayed above the formula." -msgstr "" - -#: ../../content/developer/reference/views.rst:700 -msgid "A widget to format the value (like the widget attribute for fields). For example, monetary. By default, it is 'float'." -msgstr "" - -#: ../../content/developer/reference/views.rst:707 -msgid "A string put on the right of the formula value. For example, it can be useful to indicate the unit of measure of the formula value." -msgstr "" - -#: ../../content/developer/reference/views.rst:712 -msgid "Declares a specialized widget to be used to display the information. This is a mechanism similar to the widgets in the form view." -msgstr "" - -#: ../../content/developer/reference/views.rst:718 -msgid "A string to identify which widget should be instantiated. The view will look into the ``widget_registry`` to get the proper class." -msgstr "" - -#: ../../content/developer/reference/views.rst:728 -msgid "Form" -msgstr "" - -#: ../../content/developer/reference/views.rst:730 -msgid "Form views are used to display the data from a single record. Their root element is ````. They are composed of regular HTML_ with additional structural and semantic components." -msgstr "" - -#: ../../content/developer/reference/views.rst:735 -#: ../../content/developer/reference/views.rst:1663 -msgid "Structural components" -msgstr "" - -#: ../../content/developer/reference/views.rst:737 -msgid "Structural components provide structure or \"visual\" features with little logic. They are used as elements or sets of elements in form views." -msgstr "" - -#: ../../content/developer/reference/views.rst:751 -msgid "``notebook``" -msgstr "" - -#: ../../content/developer/reference/views.rst:741 -msgid "defines a tabbed section. Each tab is defined through a ``page`` child element. Pages can have the following attributes:" -msgstr "" - -#: ../../content/developer/reference/views.rst:744 -msgid "``string`` (required) the title of the tab" -msgstr "" - -#: ../../content/developer/reference/views.rst:746 -msgid "``accesskey`` an HTML accesskey_" -msgstr "" - -#: ../../content/developer/reference/views.rst:748 -msgid "``attrs`` standard dynamic attributes based on record values" -msgstr "" - -#: ../../content/developer/reference/views.rst:751 -msgid "Note that ``notebook`` should not be placed within ``group``" -msgstr "" - -#: ../../content/developer/reference/views.rst:754 -msgid "used to define column layouts in forms. By default, groups define 2 columns and most direct children of groups take a single column. ``field`` direct children of groups display a label by default, and the label and the field itself have a colspan of 1 each." -msgstr "" - -#: ../../content/developer/reference/views.rst:759 -msgid "The number of columns in a ``group`` can be customized using the ``col`` attribute, the number of columns taken by an element can be customized using ``colspan``." -msgstr "" - -#: ../../content/developer/reference/views.rst:763 -msgid "Children are laid out horizontally (tries to fill the next column before changing row)." -msgstr "" - -#: ../../content/developer/reference/views.rst:766 -msgid "Groups can have a ``string`` attribute, which is displayed as the group's title" -msgstr "" - -#: ../../content/developer/reference/views.rst:770 -msgid "``newline``" -msgstr "" - -#: ../../content/developer/reference/views.rst:769 -msgid "only useful within ``group`` elements, ends the current row early and immediately switches to a new row (without filling any remaining column beforehand)" -msgstr "" - -#: ../../content/developer/reference/views.rst:773 -#: ../../content/developer/reference/views.rst:2011 -msgid "``separator``" -msgstr "" - -#: ../../content/developer/reference/views.rst:773 -msgid "small horizontal spacing, with a ``string`` attribute behaves as a section title" -msgstr "" - -#: ../../content/developer/reference/views.rst:776 -msgid "``sheet``" -msgstr "" - -#: ../../content/developer/reference/views.rst:776 -msgid "can be used as a direct child to ``form`` for a narrower and more responsive form layout" -msgstr "" - -#: ../../content/developer/reference/views.rst:780 -msgid "``header``" -msgstr "" - -#: ../../content/developer/reference/views.rst:779 -msgid "combined with ``sheet``, provides a full-width location above the sheet itself, generally used to display workflow buttons and status widgets" -msgstr "" - -#: ../../content/developer/reference/views.rst:783 -msgid "Semantic components" -msgstr "" - -#: ../../content/developer/reference/views.rst:785 -msgid "Semantic components tie into and allow interaction with the Odoo system. Available semantic components are:" -msgstr "" - -#: ../../content/developer/reference/views.rst:798 -#: ../../content/developer/reference/views.rst:1483 -msgid "``button``" -msgstr "" - -#: ../../content/developer/reference/views.rst:789 -msgid "call into the Odoo system, similar to :ref:`list view buttons `. In addition, the following attribute can be specified:" -msgstr "" - -#: ../../content/developer/reference/views.rst:794 -msgid "``special``" -msgstr "" - -#: ../../content/developer/reference/views.rst:794 -msgid "for form views opened in dialogs: ``save`` to save the record and close the dialog, ``cancel`` to close the dialog without saving." -msgstr "" - -#: ../../content/developer/reference/views.rst:798 -msgid "``confirm``" -msgstr "" - -#: ../../content/developer/reference/views.rst:797 -msgid "confirmation message to display (and for the user to accept) before performing the button's Odoo call (also works in Kanban views)." -msgstr "" - -#: ../../content/developer/reference/views.rst:801 -msgid "renders (and allow editing of, possibly) a single field of the current record. Using several times a field in a form view is supported and the fields can receive different values for modifiers 'invisible' and 'readonly'. However, the behavior is not guaranteed when several fields exist with different values for modifier 'required'. Possible attributes of the field node are:" -msgstr "" - -#: ../../content/developer/reference/views.rst:808 -msgid "the name of the field to render" -msgstr "" - -#: ../../content/developer/reference/views.rst:810 -msgid "the node id. Useful when there are several occurrences of the same field in the view (see ``label`` component below). Default is the field name." -msgstr "" - -#: ../../content/developer/reference/views.rst:813 -msgid "fields have a default rendering based on their type (e.g. :class:`~odoo.fields.Char`, :class:`~odoo.fields.Many2one`). The ``widget`` attributes allows using a different rendering method and context." -msgstr "" - -#: ../../content/developer/reference/views.rst:818 -msgid "list of widgets" -msgstr "" - -#: ../../content/developer/reference/views.rst:820 -msgid "& options & specific attributes (e.g. widget=statusbar statusbar_visible clickable)" -msgstr "" - -#: ../../content/developer/reference/views.rst:823 -msgid "``options``" -msgstr "" - -#: ../../content/developer/reference/views.rst:823 -msgid "JSON object specifying configuration option for the field's widget (including default widgets)" -msgstr "" - -#: ../../content/developer/reference/views.rst:835 -#: ../../content/developer/reference/views.rst:899 -#: ../../content/developer/reference/views.rst:1197 -msgid "``class``" -msgstr "" - -#: ../../content/developer/reference/views.rst:826 -msgid "HTML class to set on the generated element, common field classes are:" -msgstr "" - -#: ../../content/developer/reference/views.rst:828 -msgid "``oe_inline``" -msgstr "" - -#: ../../content/developer/reference/views.rst:829 -msgid "prevent the usual line break following fields" -msgstr "" - -#: ../../content/developer/reference/views.rst:830 -msgid "``oe_left``, ``oe_right``" -msgstr "" - -#: ../../content/developer/reference/views.rst:831 -msgid "floats_ the field to the corresponding direction" -msgstr "" - -#: ../../content/developer/reference/views.rst:832 -msgid "``oe_read_only``, ``oe_edit_only``" -msgstr "" - -#: ../../content/developer/reference/views.rst:833 -msgid "only displays the field in the corresponding form mode" -msgstr "" - -#: ../../content/developer/reference/views.rst:835 -msgid "``oe_avatar``" -msgstr "" - -#: ../../content/developer/reference/views.rst:835 -msgid "for image fields, displays images as \"avatar\" (square, 90x90 maximum size, some image decorations)" -msgstr "" - -#: ../../content/developer/reference/views.rst:838 -msgid "only displays the field for specific users" -msgstr "" - -#: ../../content/developer/reference/views.rst:845 -msgid "``on_change``" -msgstr "" - -#: ../../content/developer/reference/views.rst:840 -msgid "calls the specified method when this field's value is edited, can generate update other fields or display warnings for the user" -msgstr "" - -#: ../../content/developer/reference/views.rst:845 -msgid "Use :func:`odoo.api.onchange` on the model" -msgstr "" - -#: ../../content/developer/reference/views.rst:847 -#: ../../content/developer/reference/views.rst:903 -#: ../../content/developer/reference/views.rst:1466 -#: ../../content/developer/reference/views.rst:1518 -msgid "``attrs``" -msgstr "" - -#: ../../content/developer/reference/views.rst:848 -msgid "dynamic meta-parameters based on record values" -msgstr "" - -#: ../../content/developer/reference/views.rst:850 -msgid "for relational fields only, filters to apply when displaying existing records for selection" -msgstr "" - -#: ../../content/developer/reference/views.rst:853 -msgid "for relational fields only, context to pass when fetching possible values" -msgstr "" - -#: ../../content/developer/reference/views.rst:855 -msgid "``readonly``" -msgstr "" - -#: ../../content/developer/reference/views.rst:855 -msgid "display the field in both readonly and edit mode, but never make it editable" -msgstr "" - -#: ../../content/developer/reference/views.rst:858 -msgid "``required``" -msgstr "" - -#: ../../content/developer/reference/views.rst:858 -msgid "generates an error and prevents saving the record if the field doesn't have a value" -msgstr "" - -#: ../../content/developer/reference/views.rst:861 -#: ../../content/developer/reference/views.rst:1536 -msgid "``nolabel``" -msgstr "" - -#: ../../content/developer/reference/views.rst:861 -msgid "don't automatically display the field's label, only makes sense if the field is a direct child of a ``group`` element" -msgstr "" - -#: ../../content/developer/reference/views.rst:865 -msgid "``placeholder``" -msgstr "" - -#: ../../content/developer/reference/views.rst:864 -msgid "help message to display in *empty* fields. Can replace field labels in complex forms. *Should not* be an example of data as users are liable to confuse placeholder text with filled fields" -msgstr "" - -#: ../../content/developer/reference/views.rst:868 -msgid "for :class:`~odoo.fields.One2many`, display mode (view type) to use for the field's linked records. One of ``tree``, ``form``, ``kanban`` or ``graph``. The default is ``tree`` (a list display)" -msgstr "" - -#: ../../content/developer/reference/views.rst:871 -#: ../../content/developer/reference/views.rst:1980 -msgid "``help``" -msgstr "" - -#: ../../content/developer/reference/views.rst:872 -msgid "tooltip displayed for users when hovering the field or its label" -msgstr "" - -#: ../../content/developer/reference/views.rst:874 -#: ../../content/developer/webservices/upgrade.rst:541 -msgid "``filename``" -msgstr "" - -#: ../../content/developer/reference/views.rst:874 -msgid "for binary fields, name of the related field providing the name of the file" -msgstr "" - -#: ../../content/developer/reference/views.rst:877 -msgid "``password``" -msgstr "" - -#: ../../content/developer/reference/views.rst:877 -msgid "indicates that a :class:`~odoo.fields.Char` field stores a password and that its data shouldn't be displayed" -msgstr "" - -#: ../../content/developer/reference/views.rst:881 -msgid "``kanban_view_ref``" -msgstr "" - -#: ../../content/developer/reference/views.rst:880 -msgid "for opening specific kanban view when selecting records from m2o/m2m in mobile environment" -msgstr "" - -#: ../../content/developer/reference/views.rst:903 -msgid "``label``" -msgstr "" - -#: ../../content/developer/reference/views.rst:884 -msgid "when a ``field`` component isn't placed directly inside a ``group``, or when its ``nolabel`` attribute is set, the field's label isn't automatically displayed alongside its value. The ``label`` component is the manual alternative of displaying the label of a field. Possible attributes are:" -msgstr "" - -#: ../../content/developer/reference/views.rst:894 -msgid "``for`` (mandatory)" -msgstr "" - -#: ../../content/developer/reference/views.rst:890 -msgid "the reference to the field associated with the label. Can be either the name of a field, or its id (``id`` attribute set on the ``field``). When there are several occurrences of the same field in the view, and there are several ``label`` components associated with these ``field`` nodes, those labels must have unique ``for`` attributes (in this case referencing the ``id`` attribute of the corresponding ``field`` nodes)." -msgstr "" - -#: ../../content/developer/reference/views.rst:897 -msgid "the label to display. Display the field's label (coming from the field definition in the model) by default." -msgstr "" - -#: ../../content/developer/reference/views.rst:900 -#: ../../content/developer/reference/views.rst:902 -msgid "same as for ``field`` component." -msgstr "" - -#: ../../content/developer/reference/views.rst:938 -msgid "classes for forms" -msgstr "" - -#: ../../content/developer/reference/views.rst:940 -msgid "widgets?" -msgstr "" - -#: ../../content/developer/reference/views.rst:951 -msgid "Gantt views appropriately display Gantt charts (for scheduling)." -msgstr "" - -#: ../../content/developer/reference/views.rst:953 -msgid "The root element of gantt views is ````, it has no children but can take the following attributes:" -msgstr "" - -#: ../../content/developer/reference/views.rst:957 -msgid "name of the field providing the start datetime of the event for each record." -msgstr "" - -#: ../../content/developer/reference/views.rst:960 -msgid "``date_stop`` (required)" -msgstr "" - -#: ../../content/developer/reference/views.rst:960 -msgid "name of the field providing the end duration of the event for each record." -msgstr "" - -#: ../../content/developer/reference/views.rst:963 -msgid "name of the field used to color the pills according to its value" -msgstr "" - -#: ../../content/developer/reference/views.rst:978 -msgid "``{$name}`` can be one of the following `bootstrap contextual color`_ (``danger``, ``info``, ``secondary``, ``success`` or ``warning``)." -msgstr "" - -#: ../../content/developer/reference/views.rst:980 -#: ../../content/developer/reference/views.rst:1192 -msgid "``default_group_by``" -msgstr "" - -#: ../../content/developer/reference/views.rst:981 -msgid "name of a field to group tasks by" -msgstr "" - -#: ../../content/developer/reference/views.rst:982 -msgid "``consolidation``" -msgstr "" - -#: ../../content/developer/reference/views.rst:983 -msgid "field name to display consolidation value in record cell" -msgstr "" - -#: ../../content/developer/reference/views.rst:986 -msgid "``consolidation_max``" -msgstr "" - -#: ../../content/developer/reference/views.rst:985 -msgid "dictionnary with the \"group by\" field as key and the maximum consolidation value that can be reached before displaying the cell in red (e.g. ``{\"user_id\": 100}``)" -msgstr "" - -#: ../../content/developer/reference/views.rst:990 -msgid "``consolidation_exclude``" -msgstr "" - -#: ../../content/developer/reference/views.rst:989 -msgid "name of the field that describes if the task has to be excluded from the consolidation if set to true it displays a striped zone in the consolidation line" -msgstr "" - -#: ../../content/developer/reference/views.rst:1007 -msgid "``create``, ``cell_create``, ``edit``, ``delete``, ``plan``" -msgstr "" - -#: ../../content/developer/reference/views.rst:993 -msgid "allows *dis*\\ abling the corresponding action in the view by setting the corresponding attribute to ``false`` (default: ``true``)." -msgstr "" - -#: ../../content/developer/reference/views.rst:996 -msgid "``create``: If enabled, an ``Add`` button will be available in the control panel to create records." -msgstr "" - -#: ../../content/developer/reference/views.rst:998 -msgid "``cell_create``: If enabled and ``create`` enabled, a \"**+**\" button will be displayed while hovering on a time slot cell to create a new record on that slot." -msgstr "" - -#: ../../content/developer/reference/views.rst:1000 -msgid "``edit``: If enabled, the opened records will be in edit mode (thus editable)." -msgstr "" - -#: ../../content/developer/reference/views.rst:1001 -msgid "``plan``: If enabled and ``edit`` enabled, a \"magnifying glass\" button will be displayed on time slots to plan unassigned records into that time slot." -msgstr "" - -#: ../../content/developer/reference/views.rst:1006 -msgid "When you do not want to create records on the gantt view and the beginning and end dates are required on the model, the planning feature should be disabled because no record will ever be found." -msgstr "" - -#: ../../content/developer/reference/views.rst:1012 -msgid "``offset``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1010 -msgid "Depending on the scale, the number of units to add to today to compute the default period. Examples: An offset of +1 in default_scale week will open the gantt view for next week, and an offset of -2 in default_scale month will open the gantt view of 2 months ago." -msgstr "" - -#: ../../content/developer/reference/views.rst:1015 -msgid "``progress``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1015 -msgid "name of a field providing the completion percentage for the record's event, between 0 and 100" -msgstr "" - -#: ../../content/developer/reference/views.rst:1018 -msgid "title of the gantt view" -msgstr "" - -#: ../../content/developer/reference/views.rst:1043 -msgid "``precision``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1020 -msgid "JSON object specifying snapping precisions for the pills in each scale." -msgstr "" - -#: ../../content/developer/reference/views.rst:1022 -msgid "Possible values for scale ``day`` are (default: ``hour``):" -msgstr "" - -#: ../../content/developer/reference/views.rst:1024 -msgid "``hour``: records times snap to full hours (ex: 7:12 becomes 8:00)" -msgstr "" - -#: ../../content/developer/reference/views.rst:1026 -msgid "``hour:half``: records times snap to half hours (ex: 7:12 becomes 7:30)" -msgstr "" - -#: ../../content/developer/reference/views.rst:1028 -msgid "``hour:quarter``: records times snap to half hours (ex: 7:12 becomes 7:15)" -msgstr "" - -#: ../../content/developer/reference/views.rst:1030 -msgid "Possible values for scale ``week`` are (default: ``day:half``):" -msgstr "" - -#: ../../content/developer/reference/views.rst:1032 -#: ../../content/developer/reference/views.rst:1038 -msgid "``day``: records times snap to full days (ex: 7:28 AM becomes 11:59:59 PM of the previous day, 10:32 PM becomes 12:00 PM of the current day)" -msgstr "" - -#: ../../content/developer/reference/views.rst:1034 -#: ../../content/developer/reference/views.rst:1040 -msgid "``day:half``: records times snap to half hours (ex: 7:28 AM becomes 12:00 PM)" -msgstr "" - -#: ../../content/developer/reference/views.rst:1036 -msgid "Possible values for scale ``month`` are (default: ``day:half``):" -msgstr "" - -#: ../../content/developer/reference/views.rst:1042 -msgid "Scale ``year`` always snap to full day." -msgstr "" - -#: ../../content/developer/reference/views.rst:1044 -msgid "Example of precision attribute: ``{\"day\": \"hour:quarter\", \"week\": \"day:half\", \"month\": \"day\"}``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1046 -msgid "``total_row``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1046 -msgid "boolean to control whether the row containing the total count of records should be displayed. (default: ``false``)" -msgstr "" - -#: ../../content/developer/reference/views.rst:1049 -msgid "``collapse_first_level``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1049 -msgid "boolean to control whether it is possible to collapse each row if grouped by one field. (default: ``false``, the collapse starts when grouping by two fields)" -msgstr "" - -#: ../../content/developer/reference/views.rst:1053 -msgid "``display_unavailability``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1052 -msgid "boolean to mark the dates returned by the ``gantt_unavailability`` function of the model as available inside the gantt view. Records can still be scheduled in them, but their unavailability is visually displayed. (default: ``false``)" -msgstr "" - -#: ../../content/developer/reference/views.rst:1061 -msgid "``default_scale``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1056 -msgid "default scale when rendering the view. Possible values are (default: ``month``):" -msgstr "" - -#: ../../content/developer/reference/views.rst:1058 -msgid "``day``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1059 -msgid "``week``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1060 -msgid "``month``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1061 -msgid "``year``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1064 -msgid "comma-separated list of allowed scales for this view. By default, all scales are allowed. For possible scale values to use in this list, see ``default_scale``." -msgstr "" - -#: ../../content/developer/reference/views.rst:1068 -msgid "defines the :ref:`reference/qweb` template ``gantt-popover`` which is used when the user hovers over one of the records in the gantt view." -msgstr "" - -#: ../../content/developer/reference/views.rst:1071 -msgid "The gantt view uses mostly-standard :ref:`javascript qweb ` and provides the following context variables:" -msgstr "" - -#: ../../content/developer/reference/views.rst:1075 -msgid "the current :js:class:`GanttRow`, can be used to fetch some meta-information. The ``getColor`` method to convert in a color integer is also available directly in the template context without using ``widget``." -msgstr "" - -#: ../../content/developer/reference/views.rst:1079 -msgid "``on_create`` If specified when clicking the add button on the view, instead of opening a generic dialog, launch a client action. this should hold the xmlid of the action (eg: ``on_create=\"%(my_module.my_wizard)d\"``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1084 -msgid "view to open when the user create or edit a record. Note that if this attribute is not set, the gantt view will fall back to the id of the form view in the current action, if any." -msgstr "" - -#: ../../content/developer/reference/views.rst:1090 -msgid "``dynamic_range``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1089 -msgid "if set to true, the gantt view will start at the first record, instead of starting at the beginning of the year/month/day." -msgstr "" - -#: ../../content/developer/reference/views.rst:1109 -msgid "``thumbnails``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1093 -msgid "This allows to display a thumbnail next to groups name if the group is a relationnal field. This expects a python dict which keys are the name of the field on the active model. Values are the names of the field holding the thumbnail on the related model." -msgstr "" - -#: ../../content/developer/reference/views.rst:1097 -msgid "Example: tasks have a field user_id that reference res.users. The res.users model has a field image that holds the avatar, then:" -msgstr "" - -#: ../../content/developer/reference/views.rst:1109 -msgid "will display the users avatars next to their names when grouped by user_id." -msgstr "" - -#: ../../content/developer/reference/views.rst:1114 -msgid "Graph" -msgstr "" - -#: ../../content/developer/reference/views.rst:1116 -msgid "The graph view is used to visualize aggregations over a number of records or record groups. Its root element is ```` which can take the following attributes:" -msgstr "" - -#: ../../content/developer/reference/views.rst:1121 -msgid "one of ``bar`` (default), ``pie`` and ``line``, the type of graph to use" -msgstr "" - -#: ../../content/developer/reference/views.rst:1123 -msgid "``stacked``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1123 -msgid "only used for ``bar`` charts. If present and set to ``True``, stacks bars within a group" -msgstr "" - -#: ../../content/developer/reference/views.rst:1125 -#: ../../content/developer/reference/views.rst:1704 -msgid "``disable_linking``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1126 -msgid "set to ``True`` to prevent from redirecting clicks on graph to list view" -msgstr "" - -#: ../../content/developer/reference/views.rst:1130 -msgid "``order``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1128 -msgid "if set, x-axis values will be sorted by default according their measure with respect to the given order (``asc`` or ``desc``). Only used for ``bar`` and ``pie`` charts." -msgstr "" - -#: ../../content/developer/reference/views.rst:1132 -msgid "The only allowed element within a graph view is ``field`` which can have the following attributes:" -msgstr "" - -#: ../../content/developer/reference/views.rst:1136 -#: ../../content/developer/reference/views.rst:1722 -msgid "the name of a field to use in the view. If used for grouping (rather than aggregating)" -msgstr "" - -#: ../../content/developer/reference/views.rst:1140 -msgid "``title`` (optional)" -msgstr "" - -#: ../../content/developer/reference/views.rst:1140 -msgid "string displayed on the top of the graph." -msgstr "" - -#: ../../content/developer/reference/views.rst:1143 -msgid "if true, the field will not appear either in the active measures nor in the selectable measures." -msgstr "" - -#: ../../content/developer/reference/views.rst:1147 -#: ../../content/developer/reference/views.rst:1730 -msgid "indicates whether the field should be used as a grouping criteria or as an aggregated value within a group. Possible values are:" -msgstr "" - -#: ../../content/developer/reference/views.rst:1151 -msgid "groups by the specified field. All graph types support at least one level of grouping, some may support more." -msgstr "" - -#: ../../content/developer/reference/views.rst:1153 -#: ../../content/developer/reference/views.rst:1735 -msgid "``col``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1154 -msgid "authorized in graph views but only used by pivot tables" -msgstr "" - -#: ../../content/developer/reference/views.rst:1156 -#: ../../content/developer/reference/views.rst:1738 -msgid "field to aggregate within a group" -msgstr "" - -#: ../../content/developer/reference/views.rst:1161 -#: ../../content/developer/reference/views.rst:1742 -msgid "``interval``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1159 -#: ../../content/developer/reference/views.rst:1740 -msgid "on date and datetime fields, groups by the specified interval (``day``, ``week``, ``month``, ``quarter`` or ``year``) instead of grouping on the specific datetime (fixed second resolution) or date (fixed day resolution)." -msgstr "" - -#: ../../content/developer/reference/views.rst:1163 -#: ../../content/developer/reference/views.rst:1749 -msgid "The measures are automatically generated from the model fields; only the aggregatable fields are used. Those measures are also alphabetically sorted on the string of the field." -msgstr "" - -#: ../../content/developer/reference/views.rst:1169 -msgid "graph view aggregations are performed on database content, non-stored function fields can not be used in graph views" -msgstr "" - -#: ../../content/developer/reference/views.rst:1177 -msgid "The kanban view is a `kanban board`_ visualisation: it displays records as \"cards\", halfway between a :ref:`list view ` and a non-editable :ref:`form view `. Records may be grouped in columns for use in workflow visualisation or manipulation (e.g. tasks or work-progress management), or ungrouped (used simply to visualize records)." -msgstr "" - -#: ../../content/developer/reference/views.rst:1183 -msgid "The kanban view will load and display a maximum of ten columns. Any column after that will be closed (but can still be opened by the user)." -msgstr "" - -#: ../../content/developer/reference/views.rst:1187 -msgid "The root element of the Kanban view is ````, it can use the following attributes:" -msgstr "" - -#: ../../content/developer/reference/views.rst:1191 -msgid "whether the kanban view should be grouped if no grouping is specified via the action or the current search. Should be the name of the field to group by when no grouping is otherwise specified" -msgstr "" - -#: ../../content/developer/reference/views.rst:1195 -#: ../../content/developer/reference/views.rst:1404 -#: ../../content/developer/reference/views.rst:1669 -#: ../../content/developer/reference/views.rst:1716 -msgid "``default_order``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1195 -msgid "cards sorting order used if the user has not already sorted the records (via the list view)" -msgstr "" - -#: ../../content/developer/reference/views.rst:1198 -msgid "adds HTML classes to the root HTML element of the Kanban view" -msgstr "" - -#: ../../content/developer/reference/views.rst:1199 -msgid "``examples``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1200 -msgid "if set to a key in the `KanbanExamplesRegistry`_, examples on column setups will be available in the grouped kanban view. `Here `_ is an example of how to define those setups." -msgstr "" - -#: ../../content/developer/reference/views.rst:1201 -msgid "``group_create``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1202 -msgid "whether the \"Add a new column\" bar is visible or not. Default: true." -msgstr "" - -#: ../../content/developer/reference/views.rst:1203 -msgid "``group_delete``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1204 -msgid "whether groups can be deleted via the context menu. Default: true." -msgstr "" - -#: ../../content/developer/reference/views.rst:1205 -msgid "``group_edit``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1206 -msgid "whether groups can be edited via the context menu. Default: true." -msgstr "" - -#: ../../content/developer/reference/views.rst:1208 -msgid "``archivable``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1208 -msgid "whether records belonging to a column can be archived / restored if an ``active`` field is defined on the model. Default: true." -msgstr "" - -#: ../../content/developer/reference/views.rst:1212 -msgid "``quick_create``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1211 -msgid "whether it should be possible to create records without switching to the form view. By default, ``quick_create`` is enabled when the Kanban view is grouped by many2one, selection, char or boolean fields, and disabled when not." -msgstr "" - -#: ../../content/developer/reference/views.rst:1214 -msgid "``quick_create_view``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1215 -msgid "``form`` view reference, specifying the view used for records quick creation." -msgstr "" - -#: ../../content/developer/reference/views.rst:1219 -msgid "``records_draggable``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1217 -msgid "whether it should be possible to drag records when kanban is grouped. Default: true." -msgstr "" - -#: ../../content/developer/reference/views.rst:1219 -msgid "Set to ``true`` to always enable it, and to ``false`` to always disable it." -msgstr "" - -#: ../../content/developer/reference/views.rst:1221 -msgid "VFE missing information on on_create attribute of kanban views." -msgstr "" - -#: ../../content/developer/reference/views.rst:1226 -msgid "declares fields to use in kanban *logic*. If the field is simply displayed in the kanban view, it does not need to be pre-declared." -msgstr "" - -#: ../../content/developer/reference/views.rst:1250 -#: ../../content/developer/reference/views.rst:1505 -msgid "``progressbar``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1235 -msgid "declares a progressbar element to put on top of kanban columns." -msgstr "" - -#: ../../content/developer/reference/views.rst:1241 -msgid "``field`` (required)" -msgstr "" - -#: ../../content/developer/reference/views.rst:1240 -msgid "the name of the field whose values are used to subgroup column's records in the progressbar" -msgstr "" - -#: ../../content/developer/reference/views.rst:1245 -msgid "``colors`` (required)" -msgstr "" - -#: ../../content/developer/reference/views.rst:1244 -msgid "JSON mapping the above field values to either \"danger\", \"warning\", \"success\" or \"muted\" colors" -msgstr "" - -#: ../../content/developer/reference/views.rst:1250 -msgid "``sum_field`` (optional)" -msgstr "" - -#: ../../content/developer/reference/views.rst:1248 -msgid "the name of the field whose column's records' values will be summed and displayed next to the progressbar (if omitted, displays the total number of records)" -msgstr "" - -#: ../../content/developer/reference/views.rst:1253 -msgid "defines a list of :ref:`reference/qweb` templates. Cards definition may be split into multiple templates for clarity, but kanban views *must* define at least one root template ``kanban-box``, which will be rendered once for each record." -msgstr "" - -#: ../../content/developer/reference/views.rst:1258 -msgid "The kanban view uses mostly-standard :ref:`javascript qweb ` and provides the following context variables:" -msgstr "" - -#: ../../content/developer/reference/views.rst:1262 -msgid "the current :js:class:`KanbanRecord`, can be used to fetch some meta-information. These methods are also available directly in the template context and don't need to be accessed via ``widget``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1266 -msgid "an object with all the requested fields as its attributes. Each field has two attributes ``value`` and ``raw_value``, the former is formatted according to current user parameters, the latter is the direct value from a :meth:`~odoo.models.Model.read` (except for date and datetime fields that are `formatted according to user's locale `_)" -msgstr "" - -#: ../../content/developer/reference/views.rst:1273 -msgid "the current context, coming from the action, and the one2many or many2many field in the case of a Kanban view embedded in a Form view" -msgstr "" - -#: ../../content/developer/reference/views.rst:1275 -msgid "``user_context``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1277 -msgid "``read_only_mode``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1319 -msgid "``selection_mode``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1280 -msgid "set to true when kanban view is opened in mobile environment from m2o/m2m field for selecting records." -msgstr "" - -#: ../../content/developer/reference/views.rst:1283 -msgid "clicking on m2o/m2m field in mobile environment opens kanban view" -msgstr "" - -#: ../../content/developer/reference/views.rst:0 -msgid "buttons and fields" -msgstr "" - -#: ../../content/developer/reference/views.rst:1288 -msgid "While most of the Kanban templates are standard :ref:`reference/qweb`, the Kanban view processes ``field``, ``button`` and ``a`` elements specially:" -msgstr "" - -#: ../../content/developer/reference/views.rst:1291 -msgid "by default fields are replaced by their formatted value, unless the ``widget`` attribute is specified, in which case their rendering and behavior depends on the corresponding widget. Possible values are (among others):" -msgstr "" - -#: ../../content/developer/reference/views.rst:1298 -#: ../../content/developer/reference/views.rst:1509 -msgid "``handle``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1297 -msgid "for ``sequence`` (or ``integer``) fields by which records are sorted, allows to drag&drop records to reorder them." -msgstr "" - -#: ../../content/developer/reference/views.rst:1300 -msgid "list widgets?" -msgstr "" - -#: ../../content/developer/reference/views.rst:1302 -msgid "buttons and links with a ``type`` attribute become perform Odoo-related operations rather than their standard HTML function. Possible types are:" -msgstr "" - -#: ../../content/developer/reference/views.rst:1307 -msgid "``action``, ``object``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1306 -msgid "standard behavior for :ref:`Odoo buttons `, most attributes relevant to standard Odoo buttons can be used." -msgstr "" - -#: ../../content/developer/reference/views.rst:1309 -msgid "``open``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1310 -msgid "opens the card's record in the form view in read-only mode" -msgstr "" - -#: ../../content/developer/reference/views.rst:1311 -msgid "``edit``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1312 -msgid "opens the card's record in the form view in editable mode" -msgstr "" - -#: ../../content/developer/reference/views.rst:1314 -msgid "deletes the card's record and removes the card" -msgstr "" - -#: ../../content/developer/reference/views.rst:1318 -msgid "kanban-specific CSS" -msgstr "" - -#: ../../content/developer/reference/views.rst:1319 -msgid "kanban structures/widgets (vignette, details, ...)" -msgstr "" - -#: ../../content/developer/reference/views.rst:1321 -msgid "If you need to extend the Kanban view, see :js:class::`the JS API `." -msgstr "" - -#: ../../content/developer/reference/views.rst:1326 -msgid "Calendar views display records as events in a daily, weekly or monthly calendar. Their root element is ````. Available attributes on the calendar view are:" -msgstr "" - -#: ../../content/developer/reference/views.rst:1360 -msgid "Default display mode when loading the calendar. Possible attributes are: ``day``, ``week``, ``month``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1363 +#: ../../content/developer/reference/backend/views.rst:462 msgid "``create``, ``delete``" msgstr "" -#: ../../content/developer/reference/views.rst:1363 -#: ../../content/developer/reference/views.rst:1414 -msgid "allows *dis*\\ abling the corresponding action in the view by setting the corresponding attribute to ``false``" +#: ../../content/developer/reference/backend/views.rst:462 +msgid "allows disabling the corresponding action in the view by setting the corresponding attribute to ``false``" msgstr "" -#: ../../content/developer/reference/views.rst:1372 -msgid "List" +#: ../../content/developer/reference/backend/views.rst:483 +msgid "````" msgstr "" -#: ../../content/developer/reference/views.rst:1374 -msgid "The root element of list views is ````\\ [#treehistory]_. The list view's root can have the following attributes:" +#: ../../content/developer/reference/backend/views.rst:465 +msgid "declares fields to aggregate or to use in kanban *logic*. If the field is simply displayed in the calendar cards." msgstr "" -#: ../../content/developer/reference/views.rst:1378 -msgid "by default, selecting a list view's row opens the corresponding :ref:`form view `. The ``editable`` attributes makes the list view itself editable in-place." +#: ../../content/developer/reference/backend/views.rst:468 +msgid "Fields can have additional attributes:" msgstr "" -#: ../../content/developer/reference/views.rst:1382 -msgid "Valid values are ``top`` and ``bottom``, making *new* records appear respectively at the top or bottom of the list." -msgstr "" - -#: ../../content/developer/reference/views.rst:1385 -msgid "The architecture for the inline :ref:`form view ` is derived from the list view. Most attributes valid on a :ref:`form view `'s fields and buttons are thus accepted by list views although they may not have any meaning if the list view is non-editable" -msgstr "" - -#: ../../content/developer/reference/views.rst:1391 -msgid "if the ``edit`` attribute is set to ``false``, the ``editable`` option will be ignored." -msgstr "" - -#: ../../content/developer/reference/views.rst:1395 -msgid "``multi_edit``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1394 -msgid "editable or not editable list can activate the multi-editing feature by defining the `multi_edit=1`" -msgstr "" - -#: ../../content/developer/reference/views.rst:1398 -msgid "overrides the ordering of the view, replacing the model's order (:attr:`~odoo.models.BaseModel._order` model attribute). The value is a comma-separated list of fields, postfixed by ``desc`` to sort in reverse order:" -msgstr "" - -#: ../../content/developer/reference/views.rst:1410 -#: ../../content/developer/reference/views.rst:1531 -msgid "``{$name}`` can be ``bf`` (``font-weight: bold``), ``it`` (``font-style: italic``), or any `bootstrap contextual color`_ (``danger``, ``info``, ``muted``, ``primary``, ``success`` or ``warning``)." -msgstr "" - -#: ../../content/developer/reference/views.rst:1414 -msgid "``create``, ``edit``, ``delete``, ``duplicate``, ``import``, ``export_xlsx``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1416 -#: ../../content/developer/reference/views.rst:1685 -msgid "``limit``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1417 -msgid "the default size of a page. It must be a positive integer" -msgstr "" - -#: ../../content/developer/reference/views.rst:1419 -msgid "``groups_limit``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1419 -msgid "when the list view is grouped, the default number of groups of a page. It must be a position integer" -msgstr "" - -#: ../../content/developer/reference/views.rst:1423 -msgid "``expand``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1422 -msgid "when the list view is grouped, automatically open the first level of groups if set to true (default: false)" -msgstr "" - -#: ../../content/developer/reference/views.rst:1425 -msgid "Possible children elements of the list view are:" -msgstr "" - -#: ../../content/developer/reference/views.rst:1430 -msgid "displays a button in a list cell" -msgstr "" - -#: ../../content/developer/reference/views.rst:1432 -msgid "``icon``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1433 -msgid "icon to use to display the button" -msgstr "" - -#: ../../content/developer/reference/views.rst:1435 -msgid "if there is no ``icon``, the button's text" -msgstr "" - -#: ../../content/developer/reference/views.rst:1436 -msgid "if there is an ``icon``, ``alt`` text for the icon" -msgstr "" - -#: ../../content/developer/reference/views.rst:1438 -msgid "type of button, indicates how it clicking it affects Odoo:" -msgstr "" - -#: ../../content/developer/reference/views.rst:1447 -msgid "``object``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1441 -msgid "call a method on the list's model. The button's ``name`` is the method, which is called with the current row's record id and the current context." -msgstr "" - -#: ../../content/developer/reference/views.rst:1450 -msgid "load an execute an ``ir.actions``, the button's ``name`` is the database id of the action. The context is expanded with the list's model (as ``active_model``), the current row's record (``active_id``) and all the records currently loaded in the list (``active_ids``, may be just a subset of the database records matching the current search)" -msgstr "" - -#: ../../content/developer/reference/views.rst:1457 -#: ../../content/developer/reference/views.rst:1459 -msgid "see ``type``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1461 -msgid "dynamic attributes based on record values." -msgstr "" - -#: ../../content/developer/reference/views.rst:1463 -msgid "A mapping of attributes to domains, domains are evaluated in the context of the current row's record, if ``True`` the corresponding attribute is set on the cell." -msgstr "" - -#: ../../content/developer/reference/views.rst:1467 -msgid "Possible attribute is ``invisible`` (hides the button)." -msgstr "" - -#: ../../content/developer/reference/views.rst:1478 -msgid "``states``" -msgstr "" - -#: ../../content/developer/reference/views.rst:1469 -msgid "shorthand for ``invisible`` ``attrs``: a list of states, comma separated, requires that the model has a ``state`` field and that it is used in the view." -msgstr "" - -#: ../../content/developer/reference/views.rst:1473 -msgid "Makes the button ``invisible`` if the record is *not* in one of the listed states" -msgstr "" - -#: ../../content/developer/reference/views.rst:1478 -msgid "Using ``states`` in combination with ``attrs`` may lead to unexpected results as domains are combined with a logical AND." -msgstr "" - -#: ../../content/developer/reference/views.rst:1481 -msgid "merged into the view's context when performing the button's Odoo call" -msgstr "" - -#: ../../content/developer/reference/views.rst:1483 -msgid "declared but unused: help" -msgstr "" - -#: ../../content/developer/reference/views.rst:1486 -msgid "defines a column where the corresponding field should be displayed for each record. Can use the following attributes:" -msgstr "" - -#: ../../content/developer/reference/views.rst:1490 -msgid "the name of the field to display in the current model. A given name can only be used once per view" -msgstr "" - -#: ../../content/developer/reference/views.rst:1493 -msgid "the title of the field's column (by default, uses the ``string`` of the model's field)" -msgstr "" - -#: ../../content/developer/reference/views.rst:1497 -#: ../../content/developer/reference/views.rst:1747 +#: ../../content/developer/reference/backend/views.rst:472 +#: ../../content/developer/reference/backend/views.rst:1827 msgid "``invisible``" msgstr "" -#: ../../content/developer/reference/views.rst:1496 -msgid "fetches and stores the field, but doesn't display the column in the table. Necessary for fields which shouldn't be displayed but are used by e.g. ``@colors``" +#: ../../content/developer/reference/backend/views.rst:473 +msgid "use \"True\" to hide the value in the cards" msgstr "" -#: ../../content/developer/reference/views.rst:1500 -msgid "lists the groups which should be able to see the field" +#: ../../content/developer/reference/backend/views.rst:475 +msgid "``avatar_field``" msgstr "" -#: ../../content/developer/reference/views.rst:1502 -msgid "alternate representations for a field's display. Possible list view values are (among others):" +#: ../../content/developer/reference/backend/views.rst:475 +msgid "only for x2many field, to display the avatar instead of the display_name in the cards" msgstr "" -#: ../../content/developer/reference/views.rst:1506 -msgid "displays ``float`` fields as a progress bar." +#: ../../content/developer/reference/backend/views.rst:479 +msgid "``write_model`` and ``write_field`` and ``filter_field``" msgstr "" -#: ../../content/developer/reference/views.rst:1508 -msgid "for ``sequence`` (or ``integer``) fields by which records are sorted, instead of displaying the field's value just displays a drag&drop icon to reorder records." +#: ../../content/developer/reference/backend/views.rst:478 +msgid "you can add a filter and save the result in the defined model, the filter is added in the sidebar. The ``filter_field`` is optional and allows you to specify the field that will hold the status of the filter." msgstr "" -#: ../../content/developer/reference/views.rst:1514 -msgid "``sum``, ``avg``" +#: ../../content/developer/reference/backend/views.rst:483 +msgid "``filters`` and ``color``" msgstr "" -#: ../../content/developer/reference/views.rst:1512 -msgid "displays the corresponding aggregate at the bottom of the column. The aggregation is only computed on *currently displayed* records. The aggregation operation must match the corresponding field's ``group_operator``" +#: ../../content/developer/reference/backend/views.rst:482 +msgid "use \"True\" to add this field in filter in the sidebar. You can specify a ``color`` field used to colorize the checkbox." msgstr "" -#: ../../content/developer/reference/views.rst:1517 -msgid "dynamic attributes based on record values. Only effects the current field, so e.g. ``invisible`` will hide the field but leave the same field of other records visible, it will not hide the column itself" +#: ../../content/developer/reference/backend/views.rst:488 +msgid "Cohort" msgstr "" -#: ../../content/developer/reference/views.rst:1525 -msgid "``width`` (for ``editable``)" +#: ../../content/developer/reference/backend/views.rst:494 +msgid "The cohort view is used to display and understand the way some data changes over a period of time. For example, imagine that for a given business, clients can subscribe to some service. The cohort view can then display the total number of subscriptions each month, and study the rate at which client leave the service (churn). When clicking on a cell, the cohort view will redirect you to a new action in which you will only see the records contained in the cell's time interval; this action contains a list view and a form view." msgstr "" -#: ../../content/developer/reference/views.rst:1521 -msgid "when there is no data in the list, the width of a column can be forced by setting this attribute. The value can be an absolute width (e.g. '100px'), or a relative weight (e.g. '3', meaning that this column will be 3 times larger than the others). Note that when there are records in the list, we let the browser automatically adapt the column's widths according to their content, and this attribute is thus ignored." +#: ../../content/developer/reference/backend/views.rst:502 +msgid "By default the cohort view will use the same list and form views as those defined on the action. You can pass a list view and a form view to the context of the action in order to set/override the views that will be used (the context keys to use being `form_view_id` and `list_view_id`)" msgstr "" -#: ../../content/developer/reference/views.rst:1528 -msgid "allow changing the style of a cell's text based on the corresponding record's attributes." +#: ../../content/developer/reference/backend/views.rst:507 +msgid "For example, here is a very simple cohort view:" msgstr "" -#: ../../content/developer/reference/views.rst:1535 -msgid "if set to \"1\", the column header will remain empty. Also, the column won't be sortable." +#: ../../content/developer/reference/backend/views.rst:513 +msgid "The root element of the Cohort view is , it accepts the following attributes:" msgstr "" -#: ../../content/developer/reference/views.rst:1540 -msgid "if the list view is ``editable``, any field attribute from the :ref:`form view ` is also valid and will be used when setting up the inline form view." +#: ../../content/developer/reference/backend/views.rst:523 +msgid "``date_start`` (mandatory)" msgstr "" -#: ../../content/developer/reference/views.rst:1546 -msgid "In case of list sub-views (One2many/Many2many display in a form view), The attribute ``column_invisible`` can be useful to hide a column depending on the parent object." +#: ../../content/developer/reference/backend/views.rst:522 +msgid "A valid date or datetime field. This field is understood by the view as the beginning date of a record" msgstr "" -#: ../../content/developer/reference/views.rst:1554 -msgid "When a list view is grouped, numeric fields are aggregated and displayed for each group. Also, if there are too many records in a group, a pager will appear on the right of the group row. For this reason, it is not a good practice to have a numeric field in the last column, when the list view is in a situation where it can be grouped (it is however fine for x2manys field in a form view: they cannot be grouped)." +#: ../../content/developer/reference/backend/views.rst:527 +msgid "``date_stop`` (mandatory)" msgstr "" -#: ../../content/developer/reference/views.rst:1581 -msgid "``groupby``" +#: ../../content/developer/reference/backend/views.rst:526 +msgid "A valid date or datetime field. This field is understood by the view as the end date of a record. This is the field that will determine the churn." msgstr "" -#: ../../content/developer/reference/views.rst:1563 -msgid "defines custom headers (with buttons) for the current view when grouping records on many2one fields. It is also possible to add `field`, inside the `groupby` which can be used for modifiers. These fields thus belong on the many2one comodel. These extra fields will be fetched in batch." +#: ../../content/developer/reference/backend/views.rst:532 +msgid "``mode`` (optional)" msgstr "" -#: ../../content/developer/reference/views.rst:1569 -msgid "the name of a many2one field (on the current model). Custom header will be displayed when grouping the view on this field name." +#: ../../content/developer/reference/backend/views.rst:530 +msgid "A string to describe the mode. It should be either 'churn' or 'retention' (default). Churn mode will start at 0% and accumulate over time whereas retention will start at 100% and decrease over time." msgstr "" -#: ../../content/developer/reference/views.rst:1581 -msgid "A special button (`type=\"edit\"`) can be defined to open the many2one form view." +#: ../../content/developer/reference/backend/views.rst:538 +msgid "``timeline`` (optional)" msgstr "" -#: ../../content/developer/reference/views.rst:1631 -msgid "``control``" +#: ../../content/developer/reference/backend/views.rst:535 +msgid "A string to describe the timeline. It should be either 'backward' or 'forward' (default). Forward timeline will display data from date_start to date_stop, whereas backward timeline will display data from date_stop to date_start (when the date_start is in future / greater than date_stop)." msgstr "" -#: ../../content/developer/reference/views.rst:1584 -msgid "defines custom controls for the current view." +#: ../../content/developer/reference/backend/views.rst:542 +#: ../../content/developer/reference/backend/views.rst:1242 +msgid "``interval`` (optional)" msgstr "" -#: ../../content/developer/reference/views.rst:1586 -msgid "This makes sense if the parent ``tree`` view is inside a One2many field." +#: ../../content/developer/reference/backend/views.rst:541 +msgid "A string to describe a time interval. It should be 'day', 'week', 'month'' (default) or 'year'." msgstr "" -#: ../../content/developer/reference/views.rst:1588 -msgid "Does not support any attribute, but can have children:" +#: ../../content/developer/reference/backend/views.rst:546 +#: ../../content/developer/reference/backend/views.rst:705 +msgid "``measure`` (optional)" msgstr "" -#: ../../content/developer/reference/views.rst:1591 -msgid "adds a button to create a new element on the current list." +#: ../../content/developer/reference/backend/views.rst:545 +msgid "A field that can be aggregated. This field will be used to compute the values for each cell. If not set, the cohort view will count the number of occurrences." msgstr "" -#: ../../content/developer/reference/views.rst:1593 -msgid "If any ``create`` is defined, it will overwrite the default \"add a line\" button." +#: ../../content/developer/reference/backend/views.rst:562 +msgid "```` (optional)" msgstr "" -#: ../../content/developer/reference/views.rst:1596 -msgid "The following attributes are supported:" +#: ../../content/developer/reference/backend/views.rst:549 +msgid "allows to specify a particular field in order to manage it from the available measures, it's main use is for hiding a field from the selectable measures:" msgstr "" -#: ../../content/developer/reference/views.rst:1599 -#: ../../content/developer/reference/views.rst:1888 +#: ../../content/developer/reference/backend/views.rst:555 +msgid "the name of the field to use in the view." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:557 +#: ../../content/developer/reference/backend/views.rst:628 +#: ../../content/developer/reference/backend/views.rst:662 +#: ../../content/developer/reference/backend/views.rst:737 +#: ../../content/developer/reference/backend/views.rst:1217 +#: ../../content/developer/reference/backend/views.rst:1247 +#: ../../content/developer/reference/backend/views.rst:2078 +msgid "``string`` (optional)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:557 +msgid "the name that would be used to display the field in the cohort view, overrides the default python String attribute of the field." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:562 +#: ../../content/developer/reference/backend/views.rst:1230 +#: ../../content/developer/reference/backend/views.rst:2100 +msgid "``invisible`` (optional)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:560 +#: ../../content/developer/reference/backend/views.rst:2098 +msgid "if true, the field will not appear either in the active measures nor in the selectable measures (useful for fields that do not make sense aggregated, such as fields in different units, e.g. € and $)." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:567 +msgid "Dashboard" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:573 +msgid "Like pivot and graph view, The dashboard view is used to display aggregate data. However, the dashboard can embed sub views, which makes it possible to have a more complete and interesting look on a given dataset." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:577 +msgid "The dashboard view can display sub views, aggregates for some fields (over a domain), or even *formulas* (expressions which involves one or more aggregates). For example, here is a very simple dashboard:" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:594 +msgid "The root element of the Dashboard view is , it does not accept any attributes." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:597 +msgid "There are 5 possible type of tags in a dashboard view:" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:602 +msgid "declares a sub view." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:604 +#: ../../content/developer/reference/backend/views.rst:623 +#: ../../content/developer/reference/backend/views.rst:645 +#: ../../content/developer/reference/backend/views.rst:723 +#: ../../content/developer/reference/backend/views.rst:759 +msgid "Admissible attributes are:" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:609 +msgid "``type`` (mandatory)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:609 +msgid "The type of the sub view. For example, *graph* or *pivot*." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:613 +msgid "``ref`` (optional)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:612 +msgid "An xml id for a view. If not given, the default view for the model will be used." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:616 +msgid "A string which identifies this element. It is mostly useful to be used as a target for an xpath." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:636 +#: ../../content/developer/reference/backend/views.rst:816 +#: ../../content/developer/reference/backend/views.rst:2379 +msgid "``group``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:620 +msgid "defines a column layout. This is actually very similar to the group element in a form view." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:628 +msgid "A description which will be displayed as a group title." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:631 +msgid "``colspan`` (optional)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:631 +msgid "The number of subcolumns in this group tag. By default, 6." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:636 +#: ../../content/developer/reference/backend/views.rst:689 +#: ../../content/developer/reference/backend/views.rst:741 +#: ../../content/developer/reference/backend/views.rst:769 +msgid "``col`` (optional)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:634 +msgid "The number of columns spanned by this group tag (only makes sense inside another group). By default, 6." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:715 +msgid "``aggregate``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:639 +msgid "declares an aggregate. This is the value of an aggregate for a given field over the current domain." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:642 +msgid "Note that aggregates are supposed to be used inside a group tag (otherwise the style will not be properly applied)." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:655 +msgid "``field`` (mandatory)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:650 +msgid "The field name to use for computing the aggregate. Possible field types are:" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:653 +msgid "``integer`` (default group operator is sum)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:654 +msgid "``float`` (default group operator is sum)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:655 +msgid "``many2one`` (default group operator is count distinct)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:658 +msgid "A string to identify this aggregate (useful for formulas)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:661 +msgid "A short description that will be displayed above the value. If not given, it will fall back to the field string." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:665 +msgid "An additional restriction on the set of records that we want to aggregate. This domain will be combined with the current domain." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:671 +msgid "``domain_label`` (optional)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:669 +msgid "When the user clicks on an aggregate with a domain, it will be added to the search view as a facet. The string displayed for this facet can be customized with this attribute." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:685 +msgid "``group_operator`` (optional)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:674 +msgid "A valid postgreSQL aggregate function identifier to use when aggregating values (see https://www.postgresql.org/docs/9.5/static/functions-aggregate.html). If not provided, By default, the group_operator from the field definition is used. Note that no aggregation of field values is achieved if the group_operator value is \"\"." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:679 +msgid "The special aggregate function ``count_distinct`` (defined in odoo) can also be used here" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:688 +#: ../../content/developer/reference/backend/views.rst:740 +#: ../../content/developer/reference/backend/views.rst:768 +msgid "The number of columns spanned by this tag (only makes sense inside a group). By default, 1." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:693 +#: ../../content/developer/reference/backend/views.rst:745 +msgid "``widget`` (optional)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:692 +msgid "A widget to format the value (like the widget attribute for fields). For example, monetary." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:696 +#: ../../content/developer/reference/backend/views.rst:748 +msgid "``help`` (optional)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:696 +#: ../../content/developer/reference/backend/views.rst:748 +msgid "A help message to dipslay in a tooltip (equivalent of help for a field in python)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:699 +msgid "This attribute is the name of a field describing the measure that has to be used in the graph and pivot views when clicking on the aggregate. The special value __count__ can be used to use the count measure." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:710 +msgid "``clickable`` (optional)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:708 +msgid "A boolean indicating if this aggregate should be clickable or not (default to true). Clicking on a clickable aggregate will change the measures used by the subviews and add the value of the domain attribute (if any) to the search view." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:715 +#: ../../content/developer/reference/backend/views.rst:753 +msgid "``value_label`` (optional)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:713 +msgid "A string put on the right of the aggregate value. For example, it can be useful to indicate the unit of measure of the aggregate value." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:753 +msgid "``formula``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:718 +msgid "declares a derived value. Formulas are values computed from aggregates." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:720 +msgid "Note that like aggregates, formulas are supposed to be used inside a group tag (otherwise the style will not be properly applied)." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:731 +msgid "``value`` (mandatory)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:728 +msgid "A string expression that will be evaluated, with the builtin python evaluator (in the web client). Every aggregate can be used in the context, in the ``record`` variable. For example, ``record.price_total / record.order_id``." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:734 +msgid "A string to identify this formula" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:737 +msgid "A short description that will be displayed above the formula." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:744 +msgid "A widget to format the value (like the widget attribute for fields). For example, monetary. By default, it is 'float'." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:751 +msgid "A string put on the right of the formula value. For example, it can be useful to indicate the unit of measure of the formula value." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:756 +msgid "Declares a specialized widget to be used to display the information. This is a mechanism similar to the widgets in the form view." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:764 +msgid "A string to identify which widget should be instantiated. The view will look into the ``widget_registry`` to get the proper class." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:776 +msgid "Form views are used to display the data from a single record. Their root element is ````. They are composed of regular HTML_ with additional structural and semantic components." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:781 +#: ../../content/developer/reference/backend/views.rst:2003 +msgid "Structural components" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:783 +msgid "Structural components provide structure or \"visual\" features with little logic. They are used as elements or sets of elements in form views." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:801 +msgid "``notebook``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:789 +msgid "defines a tabbed section. Each tab is defined through a ``page`` child element. Pages can have the following attributes:" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:794 +#: ../../content/developer/reference/backend/views.rst:1939 +#: ../../content/developer/reference/backend/views.rst:2249 msgid "``string`` (required)" msgstr "" -#: ../../content/developer/reference/views.rst:1599 +#: ../../content/developer/reference/backend/views.rst:795 +msgid "the title of the tab" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:796 +msgid "``accesskey``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:797 +msgid "an HTML accesskey_" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:799 +#: ../../content/developer/reference/backend/views.rst:905 +#: ../../content/developer/reference/backend/views.rst:963 +#: ../../content/developer/reference/backend/views.rst:1794 +#: ../../content/developer/reference/backend/views.rst:1850 +msgid "``attrs``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:799 +msgid "standard dynamic attributes based on record values" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:801 +msgid "Note that ``notebook`` should not be placed within ``group``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:804 +msgid "used to define column layouts in forms. By default, groups define 2 columns and most direct children of groups take a single column. ``field`` direct children of groups display a label by default, and the label and the field itself have a colspan of 1 each." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:809 +msgid "The number of columns in a ``group`` can be customized using the ``col`` attribute, the number of columns taken by an element can be customized using ``colspan``." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:813 +msgid "Children are laid out horizontally (tries to fill the next column before changing row)." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:816 +msgid "Groups can have a ``string`` attribute, which is displayed as the group's title" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:820 +msgid "``newline``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:819 +msgid "only useful within ``group`` elements, ends the current row early and immediately switches to a new row (without filling any remaining column beforehand)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:823 +#: ../../content/developer/reference/backend/views.rst:2375 +msgid "``separator``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:823 +msgid "small horizontal spacing, with a ``string`` attribute behaves as a section title" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:826 +msgid "``sheet``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:826 +msgid "can be used as a direct child to ``form`` for a narrower and more responsive form layout" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:830 +msgid "``header``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:829 +msgid "combined with ``sheet``, provides a full-width location above the sheet itself, generally used to display workflow buttons and status widgets" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:833 +msgid "Semantic components" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:835 +msgid "Semantic components tie into and allow interaction with the Odoo system. Available semantic components are:" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:852 +#: ../../content/developer/reference/backend/views.rst:1811 +msgid "``button``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:841 +msgid "call into the Odoo system, similar to :ref:`list view buttons `. In addition, the following attribute can be specified:" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:848 +msgid "``special``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:848 +msgid "for form views opened in dialogs: ``save`` to save the record and close the dialog, ``cancel`` to close the dialog without saving." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:852 +msgid "``confirm``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:851 +msgid "confirmation message to display (and for the user to accept) before performing the button's Odoo call (also works in Kanban views)." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:855 +msgid "renders (and allow editing of, possibly) a single field of the current record. Using several times a field in a form view is supported and the fields can receive different values for modifiers 'invisible' and 'readonly'. However, the behavior is not guaranteed when several fields exist with different values for modifier 'required'. Possible attributes of the field node are:" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:864 +msgid "the name of the field to render" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:866 +msgid "the node id. Useful when there are several occurrences of the same field in the view (see ``label`` component below). Default is the field name." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:869 +msgid "fields have a default rendering based on their type (e.g. :class:`~odoo.fields.Char`, :class:`~odoo.fields.Many2one`). The ``widget`` attributes allows using a different rendering method and context." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:874 +msgid "list of widgets" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:876 +msgid "& options & specific attributes (e.g. widget=statusbar statusbar_visible clickable)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:879 +msgid "``options``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:879 +msgid "JSON object specifying configuration option for the field's widget (including default widgets)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:893 +#: ../../content/developer/reference/backend/views.rst:959 +#: ../../content/developer/reference/backend/views.rst:1545 +msgid "``class``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:882 +msgid "HTML class to set on the generated element, common field classes are:" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:886 +msgid "``oe_inline``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:887 +msgid "prevent the usual line break following fields" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:888 +msgid "``oe_left``, ``oe_right``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:889 +msgid "floats_ the field to the corresponding direction" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:890 +msgid "``oe_read_only``, ``oe_edit_only``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:891 +msgid "only displays the field in the corresponding form mode" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:893 +msgid "``oe_avatar``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:893 +msgid "for image fields, displays images as \"avatar\" (square, 90x90 maximum size, some image decorations)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:896 +msgid "only displays the field for specific users" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:903 +msgid "``on_change``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:898 +msgid "calls the specified method when this field's value is edited, can generate update other fields or display warnings for the user" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:903 +msgid "Use :func:`odoo.api.onchange` on the model" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:906 +msgid "dynamic meta-parameters based on record values" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:908 +msgid "for relational fields only, filters to apply when displaying existing records for selection" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:911 +msgid "for relational fields only, context to pass when fetching possible values" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:913 +msgid "``readonly``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:913 +msgid "display the field in both readonly and edit mode, but never make it editable" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:916 +msgid "``required``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:916 +msgid "generates an error and prevents saving the record if the field doesn't have a value" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:919 +#: ../../content/developer/reference/backend/views.rst:1868 +msgid "``nolabel``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:919 +msgid "don't automatically display the field's label, only makes sense if the field is a direct child of a ``group`` element" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:923 +msgid "``placeholder``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:922 +msgid "help message to display in *empty* fields. Can replace field labels in complex forms. *Should not* be an example of data as users are liable to confuse placeholder text with filled fields" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:926 +msgid "for :class:`~odoo.fields.One2many`, display mode (view type) to use for the field's linked records. One of ``tree``, ``form``, ``kanban`` or ``graph``. The default is ``tree`` (a list display)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:929 +#: ../../content/developer/reference/backend/views.rst:2344 +msgid "``help``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:930 +msgid "tooltip displayed for users when hovering the field or its label" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:932 +msgid "``filename``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:932 +msgid "for binary fields, name of the related field providing the name of the file" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:935 +msgid "``password``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:935 +msgid "indicates that a :class:`~odoo.fields.Char` field stores a password and that its data shouldn't be displayed" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:939 +msgid "``kanban_view_ref``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:938 +msgid "for opening specific kanban view when selecting records from m2o/m2m in mobile environment" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:963 +msgid "``label``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:942 +msgid "when a ``field`` component isn't placed directly inside a ``group``, or when its ``nolabel`` attribute is set, the field's label isn't automatically displayed alongside its value. The ``label`` component is the manual alternative of displaying the label of a field. Possible attributes are:" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:954 +msgid "``for`` (mandatory)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:950 +msgid "the reference to the field associated with the label. Can be either the name of a field, or its id (``id`` attribute set on the ``field``). When there are several occurrences of the same field in the view, and there are several ``label`` components associated with these ``field`` nodes, those labels must have unique ``for`` attributes (in this case referencing the ``id`` attribute of the corresponding ``field`` nodes)." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:957 +msgid "the label to display. Display the field's label (coming from the field definition in the model) by default." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:960 +#: ../../content/developer/reference/backend/views.rst:962 +msgid "same as for ``field`` component." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:998 +msgid "classes for forms" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1000 +msgid "widgets?" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1011 +msgid "Gantt views appropriately display Gantt charts (for scheduling)." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1013 +msgid "The root element of gantt views is ````, it has no children but can take the following attributes:" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1019 +msgid "name of the field providing the start datetime of the event for each record." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1022 +msgid "``date_stop`` (required)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1022 +msgid "name of the field providing the end duration of the event for each record." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1027 +msgid "``dependency_field``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1025 +msgid "name of the ``many2many`` field that provides the dependency relation between two records. If B depends on A, ``dependency_field`` is the field that allows getting A from B. Both this field and ``dependency_inverted_field`` field are used to draw dependency arrows between pills and reschedule them." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1031 +msgid "``dependency_inverted_field`` (required if ``dependency_field`` is provided)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1030 +msgid "name of the ``many2many`` field that provides the invert dependency relation than ``dependency_field``. If B depends on A, ``dependency_inverted_field`` is the field that allows getting B from A." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1034 +msgid "name of the field used to color the pills according to its value" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1049 +msgid "``{$name}`` can be one of the following `bootstrap contextual color`_ (``danger``, ``info``, ``secondary``, ``success`` or ``warning``)." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1051 +#: ../../content/developer/reference/backend/views.rst:1540 +msgid "``default_group_by``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1052 +msgid "name of a field to group tasks by" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1053 +msgid "``disable_drag_drop``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1054 +msgid "if set to true, the gantt view will not have any drag&drop support" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1055 +msgid "``consolidation``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1056 +msgid "field name to display consolidation value in record cell" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1059 +msgid "``consolidation_max``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1058 +msgid "dictionary with the \"group by\" field as key and the maximum consolidation value that can be reached before displaying the cell in red (e.g. ``{\"user_id\": 100}``)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1063 +msgid "``consolidation_exclude``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1062 +msgid "name of the field that describes if the task has to be excluded from the consolidation if set to true it displays a striped zone in the consolidation line" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1080 +msgid "``create``, ``cell_create``, ``edit``, ``delete``, ``plan``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1066 +msgid "allows *dis*\\ abling the corresponding action in the view by setting the corresponding attribute to ``false`` (default: ``true``)." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1069 +msgid "``create``: If enabled, an ``Add`` button will be available in the control panel to create records." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1071 +msgid "``cell_create``: If enabled and ``create`` enabled, a \"**+**\" button will be displayed while hovering on a time slot cell to create a new record on that slot." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1073 +msgid "``edit``: If enabled, the opened records will be in edit mode (thus editable)." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1074 +msgid "``plan``: If enabled and ``edit`` enabled, a \"magnifying glass\" button will be displayed on time slots to plan unassigned records into that time slot." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1079 +msgid "When you do not want to create records on the gantt view and the beginning and end dates are required on the model, the planning feature should be disabled because no record will ever be found." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1085 +msgid "``offset``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1083 +msgid "Depending on the scale, the number of units to add to today to compute the default period. Examples: An offset of +1 in default_scale week will open the gantt view for next week, and an offset of -2 in default_scale month will open the gantt view of 2 months ago." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1088 +msgid "``progress``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1088 +msgid "name of a field providing the completion percentage for the record's event, between 0 and 100" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1091 +msgid "title of the gantt view" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1116 +msgid "``precision``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1093 +msgid "JSON object specifying snapping precisions for the pills in each scale." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1095 +msgid "Possible values for scale ``day`` are (default: ``hour``):" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1097 +msgid "``hour``: records times snap to full hours (ex: 7:12 becomes 8:00)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1099 +msgid "``hour:half``: records times snap to half hours (ex: 7:12 becomes 7:30)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1101 +msgid "``hour:quarter``: records times snap to half hours (ex: 7:12 becomes 7:15)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1103 +msgid "Possible values for scale ``week`` are (default: ``day:half``):" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1105 +#: ../../content/developer/reference/backend/views.rst:1111 +msgid "``day``: records times snap to full days (ex: 7:28 AM becomes 11:59:59 PM of the previous day, 10:32 PM becomes 12:00 PM of the current day)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1107 +#: ../../content/developer/reference/backend/views.rst:1113 +msgid "``day:half``: records times snap to half hours (ex: 7:28 AM becomes 12:00 PM)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1109 +msgid "Possible values for scale ``month`` are (default: ``day:half``):" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1115 +msgid "Scale ``year`` always snap to full day." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1117 +msgid "Example of precision attribute: ``{\"day\": \"hour:quarter\", \"week\": \"day:half\", \"month\": \"day\"}``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1119 +msgid "``total_row``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1119 +msgid "boolean to control whether the row containing the total count of records should be displayed. (default: ``false``)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1122 +msgid "``collapse_first_level``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1122 +msgid "boolean to control whether it is possible to collapse each row if grouped by one field. (default: ``false``, the collapse starts when grouping by two fields)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1126 +msgid "``display_unavailability``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1125 +msgid "boolean to mark the dates returned by the ``gantt_unavailability`` function of the model as available inside the gantt view. Records can still be scheduled in them, but their unavailability is visually displayed. (default: ``false``)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1134 +msgid "``default_scale``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1129 +msgid "default scale when rendering the view. Possible values are (default: ``month``):" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1131 +msgid "``day``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1132 +msgid "``week``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1133 +msgid "``month``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1134 +msgid "``year``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1137 +msgid "comma-separated list of allowed scales for this view. By default, all scales are allowed. For possible scale values to use in this list, see ``default_scale``." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1141 +msgid "defines the :ref:`reference/qweb` template ``gantt-popover`` which is used when the user hovers over one of the records in the gantt view." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1144 +msgid "The gantt view uses mostly-standard :ref:`javascript qweb ` and provides the following context variables:" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1150 +msgid "the current :js:class:`GanttRow`, can be used to fetch some meta-information. The ``getColor`` method to convert in a color integer is also available directly in the template context without using ``widget``." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1156 +msgid "``on_create``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1155 +msgid "If specified when clicking the add button on the view, instead of opening a generic dialog, launch a client action. this should hold the xmlid of the action (eg: ``on_create=\"%(my_module.my_wizard)d\"``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1159 +msgid "view to open when the user create or edit a record. Note that if this attribute is not set, the gantt view will fall back to the id of the form view in the current action, if any." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1165 +msgid "``dynamic_range``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1164 +msgid "if set to true, the gantt view will start at the first record, instead of starting at the beginning of the year/month/day." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1169 +msgid "``pill_label``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1168 +msgid "If set to true, the time appears in the pill label when the scale is set on week or month. (e.g. `7:00 AM - 11:00 AM (4h) - DST Task 1`)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1188 +msgid "``thumbnails``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1172 +msgid "This allows to display a thumbnail next to groups name if the group is a relationnal field. This expects a python dict which keys are the name of the field on the active model. Values are the names of the field holding the thumbnail on the related model." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1176 +msgid "Example: tasks have a field user_id that reference res.users. The res.users model has a field image that holds the avatar, then:" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1188 +msgid "will display the users avatars next to their names when grouped by user_id." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1193 +msgid "Graph" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1195 +msgid "The graph view is used to visualize aggregations over a number of records or record groups. Its root element is ```` which can take the following attributes:" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1202 +#: ../../content/developer/reference/backend/views.rst:1236 +#: ../../content/developer/reference/backend/views.rst:2095 +msgid "``type`` (optional)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1202 +msgid "one of ``bar`` (default), ``pie`` and ``line``, the type of graph to use" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1206 +msgid "``stacked`` (optional)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1205 +msgid "only used for ``bar`` charts. Set to ``0`` to prevent the bars within a group to be stacked initially." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1209 +#: ../../content/developer/reference/backend/views.rst:2053 +msgid "``disable_linking`` (optional)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1209 +msgid "set to ``1`` to prevent from redirecting clicks on graph to list view" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1214 +msgid "``order`` (optional)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1212 +msgid "if set, x-axis values will be sorted by default according their measure with respect to the given order (``asc`` or ``desc``). Only used for ``bar`` and ``pie`` charts." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1217 +msgid "string displayed in the breadcrumbs when redirecting to list view." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1219 +msgid "The only allowed element within a graph view is ``field`` which can have the following attributes:" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1225 +#: ../../content/developer/reference/backend/views.rst:2073 +msgid "the name of a field to use in the view. If used for grouping (rather than aggregating)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1229 +msgid "if true, the field will not appear either in the active measures nor in the selectable measures." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1233 +msgid "if set to ``measure``, the field will be used as an aggregated value within a group instead of a grouping criteria. It only works for the last field with that attribute but it is useful for other fields with string attribute (see below)." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1239 +msgid "on date and datetime fields, groups by the specified interval (``day``, ``week``, ``month``, ``quarter`` or ``year``) instead of grouping on the specific datetime (fixed second resolution) or date (fixed day resolution). Default is ``month``." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1245 +msgid "only used for field with ``type=\"measure\"``. The name that will be used to display the field in the graph view, overrides the default python String attribute of the field." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1249 +#: ../../content/developer/reference/backend/views.rst:2102 +msgid "The measures are automatically generated from the model fields; only the aggregatable fields are used. Those measures are also alphabetically sorted on the string of the field." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1255 +msgid "graph view aggregations are performed on database content, non-stored function fields can not be used in graph views" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1261 +msgid "Grid" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1268 +#: ../../content/developer/reference/frontend/javascript_modules.rst:193 +msgid "Limitations" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1270 +msgid "This view is a work in progress and may have to be expanded or altered." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1272 +msgid "only ``date`` column fields have been tested, ``selection`` and ``many2one`` are nominally implemented and supported but have not been tested, ``datetime`` is not implemented at all." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1275 +msgid "column cells are hardly configurable and must be numerical" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1276 +msgid "cell adjustment is disabled by default and must be configured to be enabled" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1277 +msgid "``create``, ``edit`` and ``delete`` ACL metadata doesn't get automatically set on the view root due to limitations in ``fields_view_get`` post-processing (there's a fixed explicit list of the view types getting those attributes)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1283 +msgid "Schema" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1285 +msgid "The grid view has its own schema and additional validation in this module. The view architecture is:" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1342 +msgid "```` (1)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1289 +msgid "architecture root element" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1291 +msgid "mandatory ``string`` attribute" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1292 +msgid "optional ``create``, ``edit`` and ``delete`` attributes" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1293 +msgid "optional ``adjustment`` and ``adjust_name`` attributes" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1295 +msgid "``adjustment`` can be either ``object`` or ``action`` to indicate whether a cell's adjustment should be performed through a method call or an action execution. ``adjust_name`` provides respectively the method name and the action id." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1300 +msgid "In both cases, the adjustment parameters are provided as a ``grid_adjust`` context member, in the ``object`` case, the parameters are also provided as positional function parameters (next to an empty list of ids):" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1305 +msgid "``row_domain``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1306 +msgid "the domain matching the entire row of the adjusted cell" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1307 +msgid "``column_field``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1308 +msgid "the name of the column for the adjusted cell" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1309 +msgid "``column_value``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1310 +msgid "the value of the column for the adjusted cell" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1311 +msgid "``cell_field``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1312 +msgid "the measure field of the adjusted cell" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1315 +msgid "``change``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1314 +msgid "the difference between the old value of the cell and the adjusted one, may be positive or negative" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1317 +msgid "optional ``hide_line_total`` and ``hide_column_total`` attributes" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1319 +msgid "``hide_line_total``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1320 +msgid "set to true to hide total line (default false)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1322 +msgid "``hide_column_total``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1322 +msgid "set to true to hide total column (default false)" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1324 +msgid "optional ``barchart_total`` attribute" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1328 +msgid "``barchart_total``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1327 +msgid "set to ``true`` in order to display a bar chart at the bottom of the grid, based on the totals of the columns (default false)." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1330 +msgid "optional ``create_inline`` and ``display_empty`` attributes" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1336 +msgid "``create_inline``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1333 +msgid "set to ``true`` in order to display an additional row at bottom of the grid with an ``Add a line`` button (default false). When this option is set to ``true``, the ``Add a line`` button from the control panel is hidden. When no data is available and when ``display_empty`` is not set (so when the help content is displayed), the the ``Add a line`` button from the control panel is shown in order to let the user create a first record." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1342 +msgid "``display_empty``" +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1339 +msgid "set to ``true`` in order to keep displaying the grid when there is no data (default false). This can be useful when you want the user to be able to keep track of the current period (as dates are displayed in the columns headers). As a reminder, when no data are present and when this attribute is no set, the help content is displayed instead of the grid." +msgstr "" + +#: ../../content/developer/reference/backend/views.rst:1358 +msgid "``