diff --git a/locale/sources/administration.pot b/locale/sources/administration.pot index 3959e4d1b..c8a7d6042 100644 --- a/locale/sources/administration.pot +++ b/locale/sources/administration.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo 14.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-01 15:09+0000\n" +"POT-Creation-Date: 2023-01-03 07:53+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -809,7 +809,7 @@ 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." +msgid "There are two different Editions_ of Odoo: the Community and Enterprise versions. Using the Enterprise version is possible on `Odoo Online`_ 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 @@ -833,11 +833,15 @@ msgid "Demo_ instances require no local installation, just a web browser." msgstr "" #: ../../content/administration/install/install.rst:59 -msgid "SaaS" +#: ../../content/administration/maintain/domain_names.rst:137 +#: ../../content/administration/maintain/domain_names.rst:207 +#: ../../content/administration/maintain/supported_versions.rst:27 +#: ../../content/administration/upgrade/odoo_online.rst:3 +msgid "Odoo Online" 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." +msgid "Trivial to start with, fully managed and migrated by Odoo S.A., `Odoo Online`_ 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 @@ -845,7 +849,7 @@ 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." +msgid "Like demo_ instances, `Odoo Online`_ instances require no local installation, a web browser is sufficient." msgstr "" #: ../../content/administration/install/install.rst:75 @@ -907,116 +911,116 @@ msgid "Debian/Ubuntu" msgstr "" #: ../../content/administration/install/install.rst:110 -msgid "Odoo 13.0 'deb' package currently supports `Debian Buster`_, `Ubuntu 18.04`_ or above." +msgid "Odoo 14 'deb' package currently supports `Debian Buster`_, `Ubuntu 18.04`_ or above." msgstr "" -#: ../../content/administration/install/install.rst:113 -#: ../../content/administration/install/install.rst:186 +#: ../../content/administration/install/install.rst:114 +#: ../../content/administration/install/install.rst:187 #: ../../content/administration/install/install.rst:313 #: ../../content/administration/install/install.rst:503 #: ../../content/administration/install/install.rst:698 msgid "Prepare" msgstr "" -#: ../../content/administration/install/install.rst:115 +#: ../../content/administration/install/install.rst:116 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:198 +#: ../../content/administration/install/install.rst:124 +#: ../../content/administration/install/install.rst:199 #: ../../content/administration/install/install.rst:380 #: ../../content/administration/install/install.rst:577 #: ../../content/administration/install/install.rst:770 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:129 -#: ../../content/administration/install/install.rst:204 +#: ../../content/administration/install/install.rst:130 +#: ../../content/administration/install/install.rst:205 msgid "Repository" msgstr "" -#: ../../content/administration/install/install.rst:131 +#: ../../content/administration/install/install.rst:132 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:140 +#: ../../content/administration/install/install.rst:141 msgid "You can then use the usual `apt-get upgrade` command to keep your installation up-to-date." msgstr "" -#: ../../content/administration/install/install.rst:142 +#: ../../content/administration/install/install.rst:143 msgid "At this moment, there is no nightly repository for the Enterprise Edition." msgstr "" -#: ../../content/administration/install/install.rst:145 +#: ../../content/administration/install/install.rst:146 msgid "Deb Package" msgstr "" -#: ../../content/administration/install/install.rst:147 +#: ../../content/administration/install/install.rst:148 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:150 +#: ../../content/administration/install/install.rst:151 msgid "Next, execute the following commands **as root**:" msgstr "" -#: ../../content/administration/install/install.rst:158 +#: ../../content/administration/install/install.rst:159 msgid "This will install Odoo as a service, create the necessary PostgreSQL_ user and automatically start the server." msgstr "" -#: ../../content/administration/install/install.rst:161 +#: ../../content/administration/install/install.rst:162 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:164 +#: ../../content/administration/install/install.rst:165 msgid "If you need the feature, you can install it manually with:" msgstr "" -#: ../../content/administration/install/install.rst:170 +#: ../../content/administration/install/install.rst:171 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:174 +#: ../../content/administration/install/install.rst:175 msgid "If you need this feature, you can install manually with:" msgstr "" -#: ../../content/administration/install/install.rst:181 +#: ../../content/administration/install/install.rst:182 msgid "Fedora" msgstr "" -#: ../../content/administration/install/install.rst:183 -msgid "Odoo 13.0 'rpm' package supports Fedora 30." +#: ../../content/administration/install/install.rst:184 +msgid "Odoo 14 'rpm' package supports Fedora 30." msgstr "" -#: ../../content/administration/install/install.rst:187 +#: ../../content/administration/install/install.rst:188 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:206 +#: ../../content/administration/install/install.rst:207 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:218 +#: ../../content/administration/install/install.rst:219 msgid "RPM package" msgstr "" -#: ../../content/administration/install/install.rst:220 +#: ../../content/administration/install/install.rst:221 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:223 +#: ../../content/administration/install/install.rst:224 msgid "Once downloaded, the package can be installed using the 'dnf' package manager:" msgstr "" -#: ../../content/administration/install/install.rst:235 +#: ../../content/administration/install/install.rst:236 msgid "Source Install" msgstr "" -#: ../../content/administration/install/install.rst:237 +#: ../../content/administration/install/install.rst:238 msgid "The source \"installation\" is really about not installing Odoo, and running it directly from source instead." msgstr "" -#: ../../content/administration/install/install.rst:240 -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)." +#: ../../content/administration/install/install.rst:241 +msgid "It can be more convenient for module developers as the Odoo source is more easily accessible than using packaged installation." msgstr "" #: ../../content/administration/install/install.rst:244 @@ -1399,6 +1403,208 @@ msgstr "" msgid "Maintain" msgstr "" +#: ../../content/administration/maintain/azure_oauth.rst:3 +msgid "Connect Microsoft Outlook 365 to Odoo using Azure OAuth" +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:5 +msgid "Odoo is compatible with Microsoft's Azure OAuth for Microsoft 365. In order to send and receive secure emails from a custom domain, all that is required is to configure a few settings on the Azure platform and on the back end of the Odoo database. This configuration works with either a personal email address or an address created by a custom domain." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:11 +msgid "For more information, visit `Microsoft's documentation `_ on setting up OAuth in Azure." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:15 +msgid "Setup in Microsoft Azure Portal" +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:18 +msgid "Create a new application" +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:20 +msgid "To get started, go to `Microsoft's Azure Portal `_. Log in with the :guilabel:`Microsoft Outlook Office 365` account if there is one, otherwise log in with the personal :guilabel:`Microsoft account`. A user with administrative access to the Azure Settings will need to connect and perform the following configuration. Next, navigate to the section labeled :guilabel:`Manage Azure Active Directory`." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:26 +msgid "Now, click on :guilabel:`Add (+)`, located in the top menu, and then select :guilabel:`App registration`. On the :guilabel:`Register an application` screen, rename the :guilabel:`Name` to `Odoo` or something recognizable. Under the :guilabel:`Supported account types` section select :guilabel:`Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)`." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:32 +msgid "Under the :guilabel:`Redirect URL` section, select :guilabel:`Web` as the platform, and then input `https:///microsoft_outlook/confirm` in the :guilabel:`URL` field. The Odoo base URL is the canonical domain at which your Odoo instance can be reached (e.g. mydatabase.odoo.com if you are hosted on Odoo.com) in the URL field. Then, click :guilabel:`Register` and the application is created." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:39 +msgid "API permissions" +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:41 +msgid "The :guilabel:`API permissions` should be set next. Odoo will need specific API permissions to be able to read (IMAP) and send (IMAP) emails in the Microsoft 365 setup. First, click the :guilabel:`API permissions` link, located in the left menu bar. Next, click on the :guilabel:`(+) Add a Permission` button and select :guilabel:`Microsoft Graph` under :guilabel:`Commonly Used Microsoft APIs`. After, select the :guilabel:`Delegated Permissions` option." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:48 +msgid "In the search bar, search for the following :guilabel:`Deregulated permissions` and click :guilabel:`Add permissions` for each one:" +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:51 +msgid ":guilabel:`SMTP.Send`" +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:52 +msgid ":guilabel:`IMAP.AccessAsUser.All`" +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:55 +msgid "The :guilabel:`User.Read` permission will be added by default." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:None +msgid "API permissions added for the app." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:62 +msgid "Assign users and groups" +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:64 +msgid "After adding the API permissions, navigate back to the :guilabel:`Overview` of the :guilabel:`Application` in the top of the left sidebar menu." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:67 +msgid "Now, add users to this application. Under the :guilabel:`Essentials` overview table, click on the link labeled :guilabel:`Managed Application in Local Directory`, or the last option on the bottom right-hand side of the table." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:None +msgid "Link to the created application and to add users/groups." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:75 +msgid "In the left sidebar menu, select :guilabel:`Users and Groups`. Next, click on :guilabel:`(+) Add User/Group`. Depending on the account, either a :guilabel:`Group` and a :guilabel:`User` can be added, or only :guilabel:`Users`. Personal accounts will only allow for :guilabel:`Users` to be added." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:80 +msgid "Under :guilabel:`Users` or :guilabel:`Groups`, click on :guilabel:`None Selected` and add the users or group of users that will be sending emails from the :guilabel:`Microsoft account` in Odoo. :guilabel:`Add` the users/groups, click :guilabel:`Select`, and then :guilabel:`Assign` them to the application." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:86 +msgid "Create credentials" +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:88 +msgid "Now that the Microsoft Azure app is set up, credentials need to be created for the Odoo setup. These include the :guilabel:`Client ID` and :guilabel:`Client Secret`. To start, the :guilabel:`Client ID` can be copied from the :guilabel:`Overview` page of the app. The :guilabel:`Client ID` or :guilabel:`Application ID` is located under the :guilabel:`Display Name` in the :guilabel:`Essentials` overview of the app." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:None +msgid "Application/Client ID located in the Overview of the app." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:98 +msgid "Next, the :guilabel:`Client Secret Value` needs to be retrieved. To get this value, click on :guilabel:`Certificates & Secrets` in the left sidebar menu. Then, a :guilabel:`Client Secret` needs to be produced. In order to do this, click on the :guilabel:`(+) New Client Secret` button." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:102 +msgid "A window on the right will populate with a button labeled :guilabel:`Add a client secret`. Under :guilabel:`Description`, type in `Odoo Fetchmail` or something recognizable, and then set the :guilabel:`expiration date`." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:107 +msgid "A new :guilabel:`Client Secret` will need to be produced and configured if the first one expires. In this event, there could be an interruption of service, so the expiration date should be noted and set to the furthest possible date." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:111 +msgid "Next, click on :guilabel:`Add` when these two values are entered. A :guilabel:`Client Secret Value` and :guilabel:`Secret ID` will be created. It is important to copy the :guilabel:`Value` or :guilabel:`Client Secret Value` into a notepad as it will become encrypted after leaving this page. The :guilabel:`Secret ID` is not needed." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:None +msgid "Client Secret Value or Value in the app's credentials." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:120 +msgid "After these steps, the following items should be ready to be set up in Odoo:" +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:122 +msgid "A client ID (:guilabel:`Client ID` or :guilabel:`Application ID`)" +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:123 +msgid "A client secret (:guilabel:`Value` or :guilabel:`Client Secret Value`)" +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:125 +msgid "This completes the setup on the :guilabel:`Microsoft Azure Portal` side." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:128 +#: ../../content/administration/maintain/google_oauth.rst:84 +msgid "Setup in Odoo" +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:131 +msgid "Enter Microsoft Outlook credentials" +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:133 +msgid "First, open the Odoo database and navigate to the :guilabel:`Apps` module. Then, remove the :guilabel:`Apps` filter from the search bar and type in `Outlook`. After that, install the module called :guilabel:`Microsoft Outlook`." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:137 +msgid "Next, navigate to :guilabel:`Settings --> General Settings`, and under the :guilabel:`Discuss` section, ensure that the checkbox for :guilabel:`External Email Servers` is checked. This populates a new option for :guilabel:`Outlook Credentials`." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:141 +msgid ":guilabel:`Save` the progress." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:143 +msgid "Then, copy and paste the :guilabel:`Client ID` (Application ID) and :guilabel:`Client Secret (Client Secret Value)` into the respective fields and :guilabel:`Save` the settings." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:147 +#: ../../content/administration/maintain/google_oauth.rst:98 +msgid "Configure outgoing email server" +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:149 +msgid "On the :guilabel:`General Settings` page, under the :guilabel:`External Email Servers` setting, click the :guilabel:`Outgoing Email Servers` link to configure the Microsoft account." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:152 +msgid "Then, create a new email server and check the box for :guilabel:`Outlook`. Next, fill in the :guilabel:`Description` (it can be anything) and the Microsoft Outlook email :guilabel:`Username`." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:155 +msgid "Then, cick on :guilabel:`Connect your Outlook account`." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:157 +msgid "A new window from Microsoft opens to complete the :guilabel:`authorization process`. Select the appropriate email address that is being configured in Odoo." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:None +msgid "Permission page to grant access between newly created app and Odoo." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:164 +msgid "Then, allow Odoo to access the Microsoft account by clicking on :guilabel:`Yes`. After this, the page will navigate back to the newly configured :guilabel:`Outgoing Mail Server` in Odoo. The configuration automatically loads the :guilabel:`token` in Odoo, and a tag stating :guilabel:`Outlook Token Valid` appears in green." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:169 +msgid "Finally, click :guilabel:`Test Connection`. A confirmation message should appear. The Odoo database can now send safe, secure emails through Microsoft Outlook using OAuth authentication." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:173 +msgid "To extend the server's use, set a :guilabel:`mail.force.smtp.from` system parameter so that email is sent from a default *from email address* for all emails sent from the database. The value of the system parameter should be the :guilabel:`username` being configured in Microsoft Outlook." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:179 +msgid "The :guilabel:`System Parameters` can be accessed by activating :doc:`../../applications/general/developer_mode` in the :menuselection:`Settings --> Technical --> Parameters --> System Parameters` menu." +msgstr "" + +#: ../../content/administration/maintain/azure_oauth.rst:184 +msgid ":doc:`../../applications/general/email_communication/email_domain`" +msgstr "" + #: ../../content/administration/maintain/domain_names.rst:3 msgid "Domain names" msgstr "" @@ -1475,314 +1681,336 @@ msgstr "" msgid "Odoo manages payment and technical support for you." msgstr "" -#: ../../content/administration/maintain/domain_names.rst:63 +#: ../../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 --> Go to website --> Promote --> 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:71 +#: ../../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:78 -msgid "Next, fill in the form with your information to become the domain name owner." +#: ../../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:84 +#: ../../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:87 +#: ../../content/administration/maintain/domain_names.rst:89 msgid "This is not available for Odoo.sh databases yet." msgstr "" -#: ../../content/administration/maintain/domain_names.rst:92 +#: ../../content/administration/maintain/domain_names.rst:94 msgid "Manage your domain name registered with Odoo" msgstr "" -#: ../../content/administration/maintain/domain_names.rst:94 +#: ../../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:104 +#: ../../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:110 +#: ../../content/administration/maintain/domain_names.rst:112 msgid "Configure your existing domain name" msgstr "" -#: ../../content/administration/maintain/domain_names.rst:112 +#: ../../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:114 +#: ../../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:117 +#: ../../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:118 +#: ../../content/administration/maintain/domain_names.rst:120 msgid ":ref:`Map your domain name with your Odoo database `." msgstr "" -#: ../../content/administration/maintain/domain_names.rst:119 +#: ../../content/administration/maintain/domain_names.rst:121 msgid ":ref:`Map your domain name with your Odoo website `." msgstr "" -#: ../../content/administration/maintain/domain_names.rst:120 +#: ../../content/administration/maintain/domain_names.rst:122 msgid "Optionally: :ref:`Change the web base address of your database `." msgstr "" -#: ../../content/administration/maintain/domain_names.rst:125 +#: ../../content/administration/maintain/domain_names.rst:127 msgid "Add a CNAME record" msgstr "" -#: ../../content/administration/maintain/domain_names.rst:127 +#: ../../content/administration/maintain/domain_names.rst:129 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:130 +#: ../../content/administration/maintain/domain_names.rst:132 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:135 -#: ../../content/administration/maintain/domain_names.rst:205 -#: ../../content/administration/maintain/supported_versions.rst:26 -msgid "Odoo Online" -msgstr "" - -#: ../../content/administration/maintain/domain_names.rst:137 +#: ../../content/administration/maintain/domain_names.rst:139 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:140 -#: ../../content/administration/maintain/domain_names.rst:219 -#: ../../content/administration/maintain/supported_versions.rst:26 +#: ../../content/administration/maintain/domain_names.rst:142 +#: ../../content/administration/maintain/domain_names.rst:221 +#: ../../content/administration/maintain/supported_versions.rst:27 #: ../../content/administration/odoo_sh.rst:5 #: ../../content/administration/upgrade/odoo_sh.rst:3 msgid "Odoo.sh" msgstr "" -#: ../../content/administration/maintain/domain_names.rst:142 +#: ../../content/administration/maintain/domain_names.rst:144 msgid "Your project's main address is defined in :menuselection:`Settings --> Project Name`." msgstr "" -#: ../../content/administration/maintain/domain_names.rst:144 +#: ../../content/administration/maintain/domain_names.rst:146 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:149 -#: ../../content/administration/maintain/domain_names.rst:191 +#: ../../content/administration/maintain/domain_names.rst:151 +#: ../../content/administration/maintain/domain_names.rst:193 msgid "Open your domain name's manager dashboard." msgstr "" -#: ../../content/administration/maintain/domain_names.rst:150 +#: ../../content/administration/maintain/domain_names.rst:152 msgid "Open the **DNS zone** management page for the domain name you want to configure." msgstr "" -#: ../../content/administration/maintain/domain_names.rst:151 +#: ../../content/administration/maintain/domain_names.rst:153 msgid "Create a **CNAME record** pointing to the address of your database." msgstr "" -#: ../../content/administration/maintain/domain_names.rst:153 +#: ../../content/administration/maintain/domain_names.rst:155 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:158 +#: ../../content/administration/maintain/domain_names.rst:160 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:163 +#: ../../content/administration/maintain/domain_names.rst:165 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:167 +#: ../../content/administration/maintain/domain_names.rst:169 msgid "You also create a redirection from ``example.com`` to ``wwww.example.com``." msgstr "" -#: ../../content/administration/maintain/domain_names.rst:169 +#: ../../content/administration/maintain/domain_names.rst:171 msgid "Your new DNS records are propagated to all DNS servers." msgstr "" -#: ../../content/administration/maintain/domain_names.rst:172 +#: ../../content/administration/maintain/domain_names.rst:174 msgid "Here are some specific guidelines to create a CNAME record:" msgstr "" -#: ../../content/administration/maintain/domain_names.rst:174 +#: ../../content/administration/maintain/domain_names.rst:176 msgid "`GoDaddy `_" msgstr "" -#: ../../content/administration/maintain/domain_names.rst:175 +#: ../../content/administration/maintain/domain_names.rst:177 msgid "`Namecheap `_" msgstr "" -#: ../../content/administration/maintain/domain_names.rst:176 +#: ../../content/administration/maintain/domain_names.rst:178 msgid "`OVH `_" msgstr "" -#: ../../content/administration/maintain/domain_names.rst:177 +#: ../../content/administration/maintain/domain_names.rst:179 msgid "`CloudFlare `_" msgstr "" -#: ../../content/administration/maintain/domain_names.rst:178 +#: ../../content/administration/maintain/domain_names.rst:180 msgid "`Google Domains `_" msgstr "" -#: ../../content/administration/maintain/domain_names.rst:183 +#: ../../content/administration/maintain/domain_names.rst:185 msgid "Naked domain" msgstr "" -#: ../../content/administration/maintain/domain_names.rst:185 +#: ../../content/administration/maintain/domain_names.rst:187 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:188 +#: ../../content/administration/maintain/domain_names.rst:190 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:192 +#: ../../content/administration/maintain/domain_names.rst:194 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:196 +#: ../../content/administration/maintain/domain_names.rst:198 msgid "Depending on your domain name registrar, this redirection may be already pre-configured." msgstr "" -#: ../../content/administration/maintain/domain_names.rst:201 +#: ../../content/administration/maintain/domain_names.rst:203 msgid "Map your domain name with your Odoo database" msgstr "" -#: ../../content/administration/maintain/domain_names.rst:207 +#: ../../content/administration/maintain/domain_names.rst:209 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:211 +#: ../../content/administration/maintain/domain_names.rst:213 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:221 +#: ../../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:223 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:229 +#: ../../content/administration/maintain/domain_names.rst:0 +msgid "Mapping a domain name with an Odoo.sh branch" +msgstr "" + +#: ../../content/administration/maintain/domain_names.rst:231 msgid ":ref:`Odoo.sh branches: settings tab `" msgstr "" -#: ../../content/administration/maintain/domain_names.rst:232 +#: ../../content/administration/maintain/domain_names.rst:234 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:235 +#: ../../content/administration/maintain/domain_names.rst:237 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:239 +#: ../../content/administration/maintain/domain_names.rst:241 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:246 +#: ../../content/administration/maintain/domain_names.rst:248 msgid "SSL encryption (HTTPS protocol)" msgstr "" -#: ../../content/administration/maintain/domain_names.rst:248 +#: ../../content/administration/maintain/domain_names.rst:250 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:252 +#: ../../content/administration/maintain/domain_names.rst:254 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:257 +#: ../../content/administration/maintain/domain_names.rst:259 msgid "The certificate generation may take up to 24h." msgstr "" -#: ../../content/administration/maintain/domain_names.rst:258 +#: ../../content/administration/maintain/domain_names.rst:260 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:260 +#: ../../content/administration/maintain/domain_names.rst:262 msgid "If you already use another service, you can keep using it or simply change for Odoo." msgstr "" -#: ../../content/administration/maintain/domain_names.rst:265 +#: ../../content/administration/maintain/domain_names.rst:267 msgid "Web base URL of a database" msgstr "" -#: ../../content/administration/maintain/domain_names.rst:267 +#: ../../content/administration/maintain/domain_names.rst:269 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:270 +#: ../../content/administration/maintain/domain_names.rst:272 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:274 +#: ../../content/administration/maintain/domain_names.rst:276 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:277 +#: ../../content/administration/maintain/domain_names.rst:279 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:280 +#: ../../content/administration/maintain/domain_names.rst:282 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:284 +#: ../../content/administration/maintain/domain_names.rst:286 msgid "The URL must include the protocol ``https://`` (or ``http://``) and must not end with a slash (``/``)." msgstr "" -#: ../../content/administration/maintain/domain_names.rst:287 +#: ../../content/administration/maintain/domain_names.rst:289 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:290 +#: ../../content/administration/maintain/domain_names.rst:292 msgid "key: ``web.base.url.freeze``" msgstr "" -#: ../../content/administration/maintain/domain_names.rst:291 +#: ../../content/administration/maintain/domain_names.rst:293 msgid "value: ``True``" msgstr "" -#: ../../content/administration/maintain/domain_names.rst:296 +#: ../../content/administration/maintain/domain_names.rst:298 msgid "Map your domain name with your website" msgstr "" -#: ../../content/administration/maintain/domain_names.rst:298 +#: ../../content/administration/maintain/domain_names.rst:300 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:300 +#: ../../content/administration/maintain/domain_names.rst:302 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:302 +#: ../../content/administration/maintain/domain_names.rst:304 msgid "If you have multiple websites, it maps your domain name with the appropriate website." msgstr "" -#: ../../content/administration/maintain/domain_names.rst:304 +#: ../../content/administration/maintain/domain_names.rst:306 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:307 +#: ../../content/administration/maintain/domain_names.rst:309 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:315 +#: ../../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:317 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:318 +#: ../../content/administration/maintain/domain_names.rst:320 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:323 +#: ../../content/administration/maintain/domain_names.rst:325 msgid ":doc:`/applications/general/email_communication/email_servers`" msgstr "" @@ -1914,6 +2142,10 @@ msgstr "" 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 "" @@ -1978,8 +2210,8 @@ msgstr "" 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:84 -msgid "Setup in Odoo" +#: ../../content/administration/maintain/google_oauth.rst:None +msgid "Client ID and Client Secret for Google OAuth." msgstr "" #: ../../content/administration/maintain/google_oauth.rst:87 @@ -1994,14 +2226,15 @@ msgstr "" 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 "" @@ -2034,6 +2267,10 @@ msgstr "" 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 "" @@ -2046,6 +2283,10 @@ msgstr "" 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 "" @@ -2058,6 +2299,10 @@ msgstr "" 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 "" @@ -2070,6 +2315,10 @@ msgstr "" 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 "" @@ -2252,6 +2501,229 @@ msgstr "" msgid "Grab a :ref:`backup of your Odoo.sh production database `." msgstr "" +#: ../../content/administration/maintain/odoo_online.rst:3 +msgid "Odoo Online database management" +msgstr "" + +#: ../../content/administration/maintain/odoo_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/odoo_online.rst:None +msgid "Clicking on the user icon opens a drop-down menu. \"My databases\" button is highlighted." +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:13 +msgid "Make sure you are connected as the administrator of the database you want to manage." +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:None +msgid "Clicking on the gear icon opens the drop-down menu." +msgstr "" + +#: ../../content/administration/maintain/odoo_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/odoo_online.rst:21 +msgid "Several actions are available:" +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:23 +msgid ":ref:`odoo_online/upgrade`" +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:24 +msgid ":ref:`odoo_online/duplicate`" +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:25 +msgid ":ref:`odoo_online/rename`" +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:26 +msgid ":ref:`odoo_online/download`" +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:27 +msgid ":ref:`odoo_online/domains`" +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:28 +msgid ":ref:`odoo_online/tags`" +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:29 +msgid ":ref:`odoo_online/delete`" +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:30 +msgid ":ref:`odoo_online/contact-support`" +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:31 +msgid ":ref:`odoo_online/users`" +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:36 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:285 +#: ../../content/administration/upgrade.rst:10 +msgid "Upgrade" +msgstr "" + +#: ../../content/administration/maintain/odoo_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/odoo_online.rst:0 +msgid "**If your Odoo database's version is lower than the latest major release:**" +msgstr "" + +#: ../../content/administration/maintain/odoo_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/odoo_online.rst:0 +msgid "**If your Odoo database's version is equal to or higher than the latest major release:**" +msgstr "" + +#: ../../content/administration/maintain/odoo_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/odoo_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/odoo_online.rst:56 +msgid ":doc:`../upgrade`" +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:57 +msgid ":doc:`supported_versions`" +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:62 +msgid "Duplicate" +msgstr "" + +#: ../../content/administration/maintain/odoo_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/odoo_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/odoo_online.rst:70 +msgid "Duplicate databases expire automatically after 15 days." +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:75 +msgid "Rename" +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:77 +msgid "Rename the database and its URL." +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:82 +msgid "Download" +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:84 +msgid "Download instantly a ZIP file with a backup of the database." +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:87 +msgid "Databases are backed up daily according to the `Odoo Cloud SLA `_." +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:93 +msgid "Domains" +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:95 +msgid "Configure custom domains to access the database via another URL." +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:98 +msgid ":doc:`domain_names`" +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:103 +msgid "Tags" +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:105 +msgid "Add tags to sort your databases out. You can search the tags in the search bar." +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:110 +#: ../../content/administration/odoo_sh/getting_started/branches.rst:539 +msgid "Delete" +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:112 +msgid "Delete a database instantly." +msgstr "" + +#: ../../content/administration/maintain/odoo_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/odoo_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/odoo_online.rst:None +msgid "A warning message is prompted before deleting a database." +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:126 +msgid "Only an administrator can delete a database." +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:127 +msgid "The database name is immediately available for a new database." +msgstr "" + +#: ../../content/administration/maintain/odoo_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/odoo_online.rst:130 +msgid "To delete your account, please get in touch with `Odoo Support `_." +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:135 +msgid "Contact Support" +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:137 +msgid "Access the Odoo `support page `_ with your database's details already pre-filled." +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:143 +msgid "Invite / Remove Users" +msgstr "" + +#: ../../content/administration/maintain/odoo_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/odoo_online.rst:None +msgid "Clicking on \"Add more users\" adds additional email fields." +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:152 +msgid "To remove users, select the users to remove and click on *Remove*." +msgstr "" + +#: ../../content/administration/maintain/odoo_online.rst:155 +msgid ":doc:`/applications/general/users/manage_users`" +msgstr "" + #: ../../content/administration/maintain/on_premise.rst:3 msgid "On-premise database management" msgstr "" @@ -2272,6 +2744,11 @@ msgstr "" 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 @@ -2351,6 +2828,11 @@ msgstr "" 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 "" @@ -2375,6 +2857,10 @@ msgstr "" 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 "" @@ -2411,213 +2897,6 @@ msgstr "" 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:13 -msgid "Make sure you are connected as the administrator of the database you want to manage." -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: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: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" @@ -2628,277 +2907,289 @@ msgid "Odoo provides support and bug fixing **for the 3 last major versions** of 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." +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:15 -msgid "Online versions are *not* released for Odoo.sh and On-Premise installations." +msgid "Admins of Odoo Online databases are invited to :doc:`upgrade <../upgrade>` them regularly." msgstr "" #: ../../content/administration/maintain/supported_versions.rst:16 +msgid "Online versions are *not* released for Odoo.sh and On-Premise installations." +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:17 msgid "Online versions are listed below as *SaaS*." msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:19 +#: ../../content/administration/maintain/supported_versions.rst:20 msgid "What's the support status of my Odoo?" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:21 +#: ../../content/administration/maintain/supported_versions.rst:22 msgid "This matrix shows the support status of every version." msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:23 +#: ../../content/administration/maintain/supported_versions.rst:24 msgid "**Major releases are in bold type.**" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:26 +#: ../../content/administration/maintain/supported_versions.rst:27 #: ../../content/administration/upgrade/on_premise.rst:3 msgid "On-Premise" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:26 +#: ../../content/administration/maintain/supported_versions.rst:27 msgid "Release date" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:26 +#: ../../content/administration/maintain/supported_versions.rst:27 msgid "End of support" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:28 -msgid "Odoo saas~15.2" +#: ../../content/administration/maintain/supported_versions.rst:29 +msgid "**Odoo 16.0**" 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 +#: ../../content/administration/maintain/supported_versions.rst:29 +#: ../../content/administration/maintain/supported_versions.rst:29 +#: ../../content/administration/maintain/supported_versions.rst:29 +#: ../../content/administration/maintain/supported_versions.rst:31 +#: ../../content/administration/maintain/supported_versions.rst:35 +#: ../../content/administration/maintain/supported_versions.rst:35 +#: ../../content/administration/maintain/supported_versions.rst:35 +#: ../../content/administration/maintain/supported_versions.rst:37 +#: ../../content/administration/maintain/supported_versions.rst:37 +#: ../../content/administration/maintain/supported_versions.rst:37 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 +#: ../../content/administration/maintain/supported_versions.rst:29 +#: ../../content/administration/maintain/supported_versions.rst:39 +msgid "October 2022" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:29 +msgid "October 2025 (planned)" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:31 +msgid "Odoo saas~15.2" +msgstr "" + +#: ../../content/administration/maintain/supported_versions.rst:31 +#: ../../content/administration/maintain/supported_versions.rst:31 +#: ../../content/administration/maintain/supported_versions.rst:33 +#: ../../content/administration/maintain/supported_versions.rst:33 +#: ../../content/administration/maintain/supported_versions.rst:41 +#: ../../content/administration/maintain/supported_versions.rst:41 +#: ../../content/administration/maintain/supported_versions.rst:45 +#: ../../content/administration/maintain/supported_versions.rst:45 +#: ../../content/administration/maintain/supported_versions.rst:49 +#: ../../content/administration/maintain/supported_versions.rst:49 +#: ../../content/administration/maintain/supported_versions.rst:51 +#: ../../content/administration/maintain/supported_versions.rst:51 +#: ../../content/administration/maintain/supported_versions.rst:55 +#: ../../content/administration/maintain/supported_versions.rst:55 +#: ../../content/administration/maintain/supported_versions.rst:57 +#: ../../content/administration/maintain/supported_versions.rst:59 +#: ../../content/administration/maintain/supported_versions.rst:59 +#: ../../content/administration/maintain/supported_versions.rst:61 msgid "N/A" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:28 +#: ../../content/administration/maintain/supported_versions.rst:31 msgid "March 2022" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:30 +#: ../../content/administration/maintain/supported_versions.rst:33 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 +#: ../../content/administration/maintain/supported_versions.rst:33 +#: ../../content/administration/maintain/supported_versions.rst:39 +#: ../../content/administration/maintain/supported_versions.rst:39 +#: ../../content/administration/maintain/supported_versions.rst:39 +#: ../../content/administration/maintain/supported_versions.rst:41 +#: ../../content/administration/maintain/supported_versions.rst:43 +#: ../../content/administration/maintain/supported_versions.rst:43 +#: ../../content/administration/maintain/supported_versions.rst:43 +#: ../../content/administration/maintain/supported_versions.rst:45 +#: ../../content/administration/maintain/supported_versions.rst:47 +#: ../../content/administration/maintain/supported_versions.rst:47 +#: ../../content/administration/maintain/supported_versions.rst:47 +#: ../../content/administration/maintain/supported_versions.rst:49 +#: ../../content/administration/maintain/supported_versions.rst:51 +#: ../../content/administration/maintain/supported_versions.rst:53 +#: ../../content/administration/maintain/supported_versions.rst:53 +#: ../../content/administration/maintain/supported_versions.rst:53 +#: ../../content/administration/maintain/supported_versions.rst:55 +#: ../../content/administration/maintain/supported_versions.rst:57 +#: ../../content/administration/maintain/supported_versions.rst:57 +#: ../../content/administration/maintain/supported_versions.rst:59 +#: ../../content/administration/maintain/supported_versions.rst:61 +#: ../../content/administration/maintain/supported_versions.rst:61 msgid "|red|" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:30 +#: ../../content/administration/maintain/supported_versions.rst:33 msgid "February 2022" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:32 +#: ../../content/administration/maintain/supported_versions.rst:35 msgid "**Odoo 15.0**" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:32 -#: ../../content/administration/maintain/supported_versions.rst:40 +#: ../../content/administration/maintain/supported_versions.rst:35 +#: ../../content/administration/maintain/supported_versions.rst:43 msgid "October 2021" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:32 +#: ../../content/administration/maintain/supported_versions.rst:35 msgid "October 2024 (planned)" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:34 +#: ../../content/administration/maintain/supported_versions.rst:37 msgid "**Odoo 14.0**" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:34 -#: ../../content/administration/maintain/supported_versions.rst:44 +#: ../../content/administration/maintain/supported_versions.rst:37 +#: ../../content/administration/maintain/supported_versions.rst:47 msgid "October 2020" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:34 +#: ../../content/administration/maintain/supported_versions.rst:37 msgid "October 2023 (planned)" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:36 +#: ../../content/administration/maintain/supported_versions.rst:39 msgid "**Odoo 13.0**" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:36 -#: ../../content/administration/maintain/supported_versions.rst:50 +#: ../../content/administration/maintain/supported_versions.rst:39 +#: ../../content/administration/maintain/supported_versions.rst:53 msgid "October 2019" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:36 -msgid "October 2022 (planned)" -msgstr "" - -#: ../../content/administration/maintain/supported_versions.rst:38 +#: ../../content/administration/maintain/supported_versions.rst:41 msgid "Odoo saas~12.3" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:38 +#: ../../content/administration/maintain/supported_versions.rst:41 msgid "August 2019" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:40 +#: ../../content/administration/maintain/supported_versions.rst:43 msgid "**Odoo 12.0**" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:40 -#: ../../content/administration/maintain/supported_versions.rst:54 +#: ../../content/administration/maintain/supported_versions.rst:43 +#: ../../content/administration/maintain/supported_versions.rst:57 msgid "October 2018" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:42 +#: ../../content/administration/maintain/supported_versions.rst:45 msgid "Odoo saas~11.3" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:42 +#: ../../content/administration/maintain/supported_versions.rst:45 msgid "April 2018" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:44 +#: ../../content/administration/maintain/supported_versions.rst:47 msgid "**Odoo 11.0**" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:44 -#: ../../content/administration/maintain/supported_versions.rst:58 +#: ../../content/administration/maintain/supported_versions.rst:47 +#: ../../content/administration/maintain/supported_versions.rst:61 msgid "October 2017" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:46 +#: ../../content/administration/maintain/supported_versions.rst:49 msgid "Odoo 10.saas~15" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:46 +#: ../../content/administration/maintain/supported_versions.rst:49 msgid "March 2017" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:48 +#: ../../content/administration/maintain/supported_versions.rst:51 msgid "Odoo 10.saas~14" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:48 +#: ../../content/administration/maintain/supported_versions.rst:51 msgid "January 2017" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:50 +#: ../../content/administration/maintain/supported_versions.rst:53 msgid "**Odoo 10.0**" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:50 +#: ../../content/administration/maintain/supported_versions.rst:53 msgid "October 2016" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:52 +#: ../../content/administration/maintain/supported_versions.rst:55 msgid "Odoo 9.saas~11" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:52 +#: ../../content/administration/maintain/supported_versions.rst:55 msgid "May 2016" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:54 +#: ../../content/administration/maintain/supported_versions.rst:57 msgid "**Odoo 9.0**" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:54 +#: ../../content/administration/maintain/supported_versions.rst:57 msgid "October 2015" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:56 +#: ../../content/administration/maintain/supported_versions.rst:59 msgid "Odoo 8.saas~6" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:56 +#: ../../content/administration/maintain/supported_versions.rst:59 msgid "February 2015" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:58 +#: ../../content/administration/maintain/supported_versions.rst:61 msgid "**Odoo 8.0**" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:58 +#: ../../content/administration/maintain/supported_versions.rst:61 msgid "September 2014" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:63 +#: ../../content/administration/maintain/supported_versions.rst:66 msgid "|green| Supported version" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:65 +#: ../../content/administration/maintain/supported_versions.rst:68 msgid "|red| End-of-support" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:67 +#: ../../content/administration/maintain/supported_versions.rst:70 msgid "N/A Never released for this platform" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:69 +#: ../../content/administration/maintain/supported_versions.rst:72 msgid "🏁 Future version, not released yet" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:80 +#: ../../content/administration/maintain/supported_versions.rst:83 msgid "I run an older version of Odoo/OpenERP/TinyERP" msgstr "" -#: ../../content/administration/maintain/supported_versions.rst:82 +#: ../../content/administration/maintain/supported_versions.rst:85 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 +#: ../../content/administration/maintain/supported_versions.rst:87 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 +#: ../../content/administration/maintain/supported_versions.rst:89 msgid "Even though we don't support older versions, you can always `upgrade from any version `_." msgstr "" @@ -3058,7 +3349,7 @@ msgstr "" #: ../../content/administration/odoo_sh/advanced/submodules.rst:9 #: ../../content/administration/odoo_sh/getting_started/branches.rst:7 #: ../../content/administration/odoo_sh/getting_started/builds.rst:9 -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:7 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:6 #: ../../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 @@ -3243,6 +3534,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 "" @@ -3366,8 +3661,8 @@ msgstr "" #: ../../content/administration/odoo_sh/advanced/submodules.rst:82 #: ../../content/administration/odoo_sh/advanced/submodules.rst:94 -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:358 -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:487 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:364 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:502 msgid "Replace" msgstr "" @@ -4339,7 +4634,7 @@ msgid "`Access your databases manager ` for instructions." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:4 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:3 msgid "Your first module" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:9 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:8 msgid "This chapter helps you to create your first Odoo module and deploy it in your Odoo.sh project." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:11 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:10 msgid "This tutorial requires :ref:`you created a project on Odoo.sh `, and you know your Github repository's URL." msgstr "" @@ -4478,6 +4773,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 "" @@ -4571,7 +4876,7 @@ msgid "Stage the changes to be committed" msgstr "" #: ../../content/administration/odoo_sh/getting_started/first_module.rst:164 -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:392 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:399 msgid "Commit your changes" msgstr "" @@ -4588,8 +4893,8 @@ msgid "The above command is explained in the section :ref:`Commit & Push your ch msgstr "" #: ../../content/administration/odoo_sh/getting_started/first_module.rst:186 -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:380 -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:406 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:387 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:413 msgid "Or, from your computer terminal:" msgstr "" @@ -4617,267 +4922,279 @@ msgstr "" msgid "If your Odoo.sh project is configured to install your module automatically, you will directly see it amongst the database apps. Otherwise, it will be available in the apps to install." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:222 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:223 msgid "You can then play around with your module, create new records and test your features and buttons." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:226 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:227 msgid "Test with the production data" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:228 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:229 msgid "You need to have a production database for this step. You can create it if you do not have it yet." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:230 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:231 msgid "Once you tested your module in a development build with the demo data and believe it is ready, you can test it with the production data using a staging branch." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:233 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:234 msgid "You can either:" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:235 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:236 msgid "Make your development branch a staging branch, by drag and dropping it onto the *staging* section title." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:240 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:242 msgid "Merge it in an existing staging branch, by drag and dropping it onto the given staging branch." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:245 -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:289 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:247 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:293 msgid "You can also use the :code:`git merge` command to merge your branches." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:247 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:249 msgid "This will create a new staging build, which will duplicate the production database and make it run using a server updated with your latest changes of your branch." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:253 -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:297 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:255 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:301 msgid "Once the database ready, you can access it using the *Connect* button." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:258 -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:300 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:260 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:304 msgid "Install your module" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:260 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:262 msgid "Your module will not be installed automatically, you have to install it from the apps menu. Indeed, the purpose of the staging build is to test the behavior of your changes as it would be on your production, and on your production you would not like your module to be installed automatically, but on demand." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:264 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:267 msgid "Your module may not appear directly in your apps to install either, you need to update your apps list first:" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:266 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:270 msgid "Activate the :ref:`developer mode `" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:267 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:271 msgid "in the apps menu, click the *Update Apps List* button," msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:268 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:272 msgid "in the dialog that appears, click the *Update* button." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:273 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:277 msgid "Your module will then appear in the list of available apps." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:279 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:283 msgid "Deploy in production" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:281 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:285 msgid "Once you tested your module in a staging branch with your production data, and believe it is ready for production, you can merge your branch in the production branch." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:284 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:288 msgid "Drag and drop your staging branch on the production branch." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:291 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:295 msgid "This will merge the latest changes of your staging branch in the production branch, and update your production server with these latest changes." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:302 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:306 msgid "Your module will not be installed automatically, you have to install it manually as explained in the :ref:`above section about installing your module in staging databases `." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:308 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:312 msgid "Add a change" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:310 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:314 msgid "This section explains how to add a change in your module by adding a new field in a model and deploy it." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:314 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:319 msgid "From the Odoo.sh editor," msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:313 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:318 msgid "browse to your module folder *~/src/user/my_module*," msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:314 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:319 msgid "then, open the file *models/models.py*." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:319 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:325 msgid "Or, from your computer," msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:317 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:322 msgid "use the file browser of your choice to browse to your module folder *~/src/odoo-addons/my_module*," msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:318 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:324 msgid "then, open the file *models/models.py* using the editor of your choice, such as *Atom*, *Sublime Text*, *PyCharm*, *vim*, ..." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:321 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:327 msgid "Then, after the description field" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:327 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:333 msgid "Add a datetime field" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:333 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:339 msgid "Then, open the file *views/views.xml*." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:335 -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:462 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:341 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:477 msgid "After" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:341 -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:439 -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:456 -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:468 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:347 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:454 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:471 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:483 msgid "Add" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:347 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:353 msgid "These changes alter the database structure by adding a column in a table, and modify a view stored in database." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:350 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:356 msgid "In order to be applied in existing databases, such as your production database, these changes requires the module to be updated." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:353 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:359 msgid "If you would like the update to be performed automatically by the Odoo.sh platform when you push your changes, increase your module version in its manifest." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:356 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:362 msgid "Open the module manifest *__manifest__.py*." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:364 -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:493 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:370 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:508 msgid "with" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:370 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:376 msgid "The platform will detect the change of version and trigger the update of the module upon the new revision deployment." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:372 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:379 msgid "Browse to your Git folder." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:374 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:381 msgid "Then, from an Odoo.sh terminal:" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:386 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:393 msgid "Then, stage your changes to be committed" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:398 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:405 msgid "Push your changes:" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:400 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:407 msgid "From an Odoo.sh terminal:" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:412 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:419 msgid "The platform will then create a new build for the branch *feature-1*." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:417 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:424 msgid "Once you tested your changes, you can merge your changes in the production branch, for instance by drag-and-dropping the branch on the production branch in the Odoo.sh interface. As you increased the module version in the manifest, the platform will update the module automatically and your new field will be directly available. Otherwise you can manually update the module within the apps list." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:423 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:430 msgid "Use an external Python library" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:425 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:432 msgid "If you would like to use an external Python library which is not installed by default, you can define a *requirements.txt* file listing the external libraries your modules depends on." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:428 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:436 +msgid "It is not possible to install or upgrade system packages on an Odoo.sh database (e.g., apt packages). However, under specific conditions, packages can be considered for installation. This also applies to **Python modules** requiring system packages for their compilation, and **third-party Odoo modules**." +msgstr "" + +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:440 +msgid "**PostgreSQL extensions** are not supported on Odoo.sh." +msgstr "" + +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:441 +msgid "For more information, consult our `FAQ `_." +msgstr "" + +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:443 msgid "The platform will use this file to automatically install the Python libraries your project needs." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:430 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:445 msgid "The feature is explained in this section by using the `Unidecode library `_ in your module." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:433 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:448 msgid "Create a file *requirements.txt* in the root folder of your repository" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:435 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:450 msgid "From the Odoo.sh editor, create and open the file ~/src/user/requirements.txt." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:437 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:452 msgid "Or, from your computer, create and open the file ~/src/odoo-addons/requirements.txt." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:445 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:460 msgid "Then use the library in your module, for instance to remove accents from characters in the name field of your model." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:448 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:463 msgid "Open the file *models/models.py*." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:450 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:465 msgid "Before" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:483 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:498 msgid "Adding a Python dependency requires a module version increase for the platform to install it." msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:485 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:500 msgid "Edit the module manifest *__manifest__.py*" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:499 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:514 msgid "Stage and commit your changes:" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:507 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:522 msgid "Then, push your changes:" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:509 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:524 msgid "In an Odoo.sh terminal:" msgstr "" -#: ../../content/administration/odoo_sh/getting_started/first_module.rst:515 +#: ../../content/administration/odoo_sh/getting_started/first_module.rst:530 msgid "In your computer terminal:" msgstr "" @@ -5309,7 +5626,7 @@ msgid "Changing :ref:`editions ` (i.e., Community t msgstr "" #: ../../content/administration/upgrade.rst:25 -msgid "Switching :ref:`hosting type ` (i.e., On-Premise to Online or Odoo.sh)" +msgid "Switching :ref:`hosting type ` (i.e., On-Premise to Odoo Online or Odoo.sh)" msgstr "" #: ../../content/administration/upgrade.rst:27 @@ -5374,7 +5691,7 @@ msgid "You restore it in your Production environment a few short hours later and msgstr "" #: ../../content/administration/upgrade.rst:57 -msgid ":doc:`Upgrade process for Odoo Online (SaaS) `" +msgid ":doc:`Upgrade process for Odoo Online `" msgstr "" #: ../../content/administration/upgrade.rst:58 @@ -5449,6 +5766,10 @@ msgstr "" 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 "" @@ -5474,6 +5795,10 @@ msgstr "" 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 "" @@ -5565,7 +5890,7 @@ 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." +msgid "Databases hosted on Odoo’s Cloud platforms (Odoo Online and Odoo.sh) or On-Premise (Self-Hosting) enjoy the following services at all times." msgstr "" #: ../../content/administration/upgrade.rst:231 @@ -5737,7 +6062,7 @@ 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)" +msgid "Switching the hosting types (On-premise vs. Odoo Online vs. Odoo.sh)" msgstr "" #: ../../content/administration/upgrade/faq.rst:114 @@ -5777,7 +6102,7 @@ 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." +msgid "An Odoo Online 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 @@ -5884,6 +6209,46 @@ msgstr "" 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_online.rst:6 +msgid "Requesting a test upgrade" +msgstr "" + +#: ../../content/administration/upgrade/odoo_online.rst:8 +msgid "Go to your `database manager `_" +msgstr "" + +#: ../../content/administration/upgrade/odoo_online.rst:9 +msgid "Click on your profile icon and select *My Databases*." +msgstr "" + +#: ../../content/administration/upgrade/odoo_online.rst:0 +msgid "Selecting My Databases under my profile" +msgstr "" + +#: ../../content/administration/upgrade/odoo_online.rst:14 +msgid "Click on the up arrow button next to your main database name to proceed to the test upgrade." +msgstr "" + +#: ../../content/administration/upgrade/odoo_online.rst:0 +msgid "Selecting the action settings icon" +msgstr "" + +#: ../../content/administration/upgrade/odoo_online.rst:19 +msgid "In the pop-up message that appears, select the target version and then :guilabel:`Test` as purpose." +msgstr "" + +#: ../../content/administration/upgrade/odoo_online.rst:23 +msgid "The :guilabel:`Production` purpose doesn't appear if you didn't test your upgraded database at least once." +msgstr "" + +#: ../../content/administration/upgrade/odoo_online.rst:26 +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/odoo_online.rst:30 +msgid "You can also see and access your test database from your *My Databases* page." +msgstr "" + #: ../../content/administration/upgrade/odoo_sh.rst:10 msgid "Odoo.sh is integrated with the upgrade platform to make the upgrade process easier." msgstr "" @@ -5892,6 +6257,10 @@ msgstr "" 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 "" @@ -5944,6 +6313,10 @@ msgstr "" 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 "" @@ -5989,6 +6362,10 @@ msgstr "" 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 "" @@ -5997,6 +6374,10 @@ msgstr "" 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 "" @@ -6096,35 +6477,3 @@ 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: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:19 -msgid "In the pop-up message that will appear, select 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/contributing.pot b/locale/sources/contributing.pot index eabc06ae6..db4d39d39 100644 --- a/locale/sources/contributing.pot +++ b/locale/sources/contributing.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo 14.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-01 15:09+0000\n" +"POT-Creation-Date: 2023-01-03 07:53+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,903 +16,1252 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../../content/contributing.rst:7 +#: ../../content/contributing.rst:6 msgid "Contributing" msgstr "" -#: ../../content/contributing.rst:9 -msgid "First, **thank you** for landing here and helping us improve Odoo!" +#: ../../content/contributing.rst:8 +msgid "First off, **thank you** for landing here and considering contributing to Odoo!" msgstr "" -#: ../../content/contributing.rst:11 -msgid "This documentation section is intended as a guide to making contributions for first-timers and veterans." +#: ../../content/contributing.rst:10 +msgid "This documentation serves as a guide for first-timer and veteran contributors. As an open-core project, Odoo accepts contributions from everyone, Odoo employees and members of the Odoo community alike. The Odoo community comprises users, developers, and other interested parties who contribute their time and expertise." 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 `_." +#: ../../content/contributing.rst:15 +msgid "Depending on your skill set and interest, there are many ways to contribute to Odoo. The table below lists the most important of them." msgstr "" -#: ../../content/contributing/development.rst:6 +#: ../../content/contributing.rst:23 +msgid "Contribution" +msgstr "" + +#: ../../content/contributing.rst:24 +msgid "Description" +msgstr "" + +#: ../../content/contributing.rst:25 +msgid "Resources" +msgstr "" + +#: ../../content/contributing.rst:26 +msgid "Target Audience" +msgstr "" + +#: ../../content/contributing.rst:27 +msgid "Join the community" +msgstr "" + +#: ../../content/contributing.rst:28 +msgid "Participate in discussions on the forums, help answer questions, and assist other members of the Odoo community." +msgstr "" + +#: ../../content/contributing.rst:30 +msgid "`Odoo forums `_" +msgstr "" + +#: ../../content/contributing.rst:31 +msgid "Anyone interested in Odoo" +msgstr "" + +#: ../../content/contributing.rst:32 +msgid "Submit bug reports" +msgstr "" + +#: ../../content/contributing.rst:33 +msgid "Help improve the stability of Odoo by reporting the bugs that you discover in :doc:`supported versions ` directly to Odoo support. Make sure to include as many details (version, environment, test scenario...) as possible. If you don't have the Odoo Enterprise license required for contacting the support, open a new issue on the GitHub repository of Odoo." +msgstr "" + +#: ../../content/contributing.rst:38 +msgid "`Odoo support `_" +msgstr "" + +#: ../../content/contributing.rst:39 +msgid "`Issue tracker on GitHub `_" +msgstr "" + +#: ../../content/contributing.rst:40 +msgid "Users of Odoo" +msgstr "" + +#: ../../content/contributing.rst:41 +msgid "Translate Odoo" +msgstr "" + +#: ../../content/contributing.rst:42 +msgid "Translate the user interface and documentation of Odoo into different languages." +msgstr "" + +#: ../../content/contributing.rst:43 +msgid "`Odoo project on Transifex `_" +msgstr "" + +#: ../../content/contributing.rst:44 +msgid "Anyone fluent in multiple languages" +msgstr "" + +#: ../../content/contributing.rst:45 +msgid "Contribute to the codebase" +msgstr "" + +#: ../../content/contributing.rst:46 +msgid "Submit pull requests to the Odoo GitHub repositories to fix bugs, add new features, or improve the performance and reliability of the product. You can also review and comment on pull requests from other contributors. By contributing to the codebase, you can make a direct and lasting impact on the quality and features of Odoo." +msgstr "" + +#: ../../content/contributing.rst:50 +msgid ":doc:`Guide: Contributing to the codebase `" +msgstr "" + +#: ../../content/contributing.rst:51 +msgid ":doc:`Developer tutorials `" +msgstr "" + +#: ../../content/contributing.rst:52 +#: ../../content/contributing.rst:65 +msgid "Developers with experience in Python and web development" +msgstr "" + +#: ../../content/contributing.rst:53 +msgid "Contribute to the documentation" +msgstr "" + +#: ../../content/contributing.rst:54 +msgid "Submit corrections and improvements to the Odoo documentation. The product evolves fast, and it can be challenging to consistently reflect these changes in the documentation. By updating the documentation, you can help many users find their way in Odoo." +msgstr "" + +#: ../../content/contributing.rst:57 +msgid ":doc:`Guide: Contributing to the documentation `" +msgstr "" + +#: ../../content/contributing.rst:58 +msgid "Anyone interested in improving the Odoo documentation" +msgstr "" + +#: ../../content/contributing.rst:59 +msgid "Create custom modules" +msgstr "" + +#: ../../content/contributing.rst:60 +msgid "Develop new modules to extend the functionality of Odoo. Custom modules can be made available for free or paid on the Odoo App Store or on any other Odoo modules library. By creating custom modules and making them available to others, you can help grow the Odoo ecosystem and provide additional value to users of the platform." +msgstr "" + +#: ../../content/contributing.rst:64 +msgid "`Odoo Apps Store `_" +msgstr "" + +#: ../../content/contributing.rst:68 +msgid "It is mainly Odoo employees who develop new features for the codebase and write new content for the documentation. Be sure to discuss any idea for a new feature or page with the Odoo team so they can give you the green light before you begin working on it. Some features may already be in development on their side, and only approved features can be merged." +msgstr "" + +#: ../../content/contributing/check_mergeability_status.rst:1 +#: ../../content/contributing/check_mergeability_status.rst:1 +#: ../../content/contributing/check_mergeability_status.rst:1 +#: ../../content/contributing/check_mergeability_status.rst:1 +#: ../../content/contributing/check_mergeability_status.rst:1 +#: ../../content/contributing/check_mergeability_status.rst:1 +msgid "At the bottom of the page, check the mergeability status and address any issues." +msgstr "" + +#: ../../content/contributing/configure_git_authorship.rst:1 +#: ../../content/contributing/configure_git_authorship.rst:1 +#: ../../content/contributing/configure_git_authorship.rst:1 +msgid "Configure Git to identify yourself as the author of your future contributions. Enter the same email address you used to register on GitHub." +msgstr "" + +#: ../../content/contributing/configure_github_account.rst:1 +#: ../../content/contributing/configure_github_account.rst:1 +#: ../../content/contributing/configure_github_account.rst:1 +msgid "`Generate a new SSH key and register it on your GitHub account `_." +msgstr "" + +#: ../../content/contributing/create_github_account.rst:1 +#: ../../content/contributing/create_github_account.rst:1 +#: ../../content/contributing/create_github_account.rst:1 +msgid "First, you need to `create a GitHub account `_. Odoo uses GitHub to manage the source code of its products, and this is where you will make your changes and submit them for review." +msgstr "" + +#: ../../content/contributing/development.rst:5 msgid "Development" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:6 -msgid "Coding Guidelines" +#: ../../content/contributing/development.rst:13 +msgid "If you are reading this, chances are that you are interested in learning how to contribute to the codebase of Odoo. Whether that's the case or you landed here by accident, we've got you covered!" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:8 +#: ../../content/contributing/development.rst:17 +#: ../../content/contributing/documentation.rst:19 +msgid ":doc:`Discover other ways to contribute to Odoo <../contributing>`" +msgstr "" + +#: ../../content/contributing/development.rst:19 +msgid "When you feel ready, jump to the :ref:`contributing/development/setup` section to begin your journey in contributing to the development of Odoo." +msgstr "" + +#: ../../content/contributing/development.rst:25 +#: ../../content/contributing/documentation.rst:63 +msgid "Environment setup" +msgstr "" + +#: ../../content/contributing/development.rst:27 +msgid "The instructions below help you prepare your environment for making local changes to the codebase and then push them to GitHub. Skip this section and go to :ref:`contributing/development/first-contribution` if you have already completed this step." +msgstr "" + +#: ../../content/contributing/development.rst:33 +msgid "Go to `github.com/odoo/odoo `_ and click on the :guilabel:`Fork` button in the top right corner to create a fork (:dfn:`your own copy`) of the repository on your account. Do the same with `github.com/odoo/enterprise `_ if you have access to it. This creates a copy of the codebase to which you can make changes without affecting the main codebase. Skip this step if you work at Odoo." +msgstr "" + +#: ../../content/contributing/install_git.rst:1 +#: ../../content/contributing/install_git.rst:1 +#: ../../content/contributing/install_git.rst:1 +msgid "`Install Git `_. It is a command-line (:dfn:`a text interface`) tool that allows tracking the history of changes made to a file and, more importantly, working on different versions of that file simultaneously. It means you do not need to worry about overwriting someone else’s pending work when making changes." +msgstr "" + +#: ../../content/contributing/install_git.rst:6 +#: ../../content/contributing/install_git.rst:6 +#: ../../content/contributing/install_git.rst:6 +msgid "Verify that the installation directory of Git is included in your system's `PATH` variable." +msgstr "" + +#: ../../content/contributing/install_git.rst:10 +#: ../../content/contributing/install_git.rst:10 +#: ../../content/contributing/documentation.rst:97 +#: ../../content/contributing/documentation.rst:124 +#: ../../content/contributing/documentation.rst:140 +#: ../../content/contributing/install_git.rst:10 +msgid "Linux and macOS" +msgstr "" + +#: ../../content/contributing/install_git.rst:12 +#: ../../content/contributing/install_git.rst:12 +#: ../../content/contributing/install_git.rst:12 +msgid "Follow the `guide to update the PATH variable on Linux and macOS `_ with the installation path of Git (by default :file:`/usr/bin/git`)." +msgstr "" + +#: ../../content/contributing/install_git.rst:16 +#: ../../content/contributing/install_git.rst:16 +#: ../../content/contributing/documentation.rst:104 +#: ../../content/contributing/documentation.rst:130 +#: ../../content/contributing/documentation.rst:146 +#: ../../content/contributing/install_git.rst:16 +msgid "Windows" +msgstr "" + +#: ../../content/contributing/install_git.rst:18 +#: ../../content/contributing/install_git.rst:18 +#: ../../content/contributing/install_git.rst:18 +msgid "Follow the `guide to update the PATH variable on Windows `_ with the installation path of Git (by default :file:`C:\\\\Program Files\\\\Git`)." +msgstr "" + +#: ../../content/contributing/development.rst:40 +msgid ":ref:`Install Odoo from the sources `. Make sure to fetch the sources through Git with SSH." +msgstr "" + +#: ../../content/contributing/development.rst:42 +msgid "Configure Git to push changes to your fork(s) rather than to the main codebase. If you work at Odoo, configure Git to push changes to the shared forks created on the account **odoo-dev**." +msgstr "" + +#: ../../content/contributing/development.rst:47 +msgid "Link Git with your fork(s)" +msgstr "" + +#: ../../content/contributing/development.rst:49 +msgid "In the command below, replace `` with the name of the GitHub account on which you created the fork(s)." +msgstr "" + +#: ../../content/contributing/development.rst:56 +msgid "If you have access to `odoo/enterprise`, configure the related remote too." +msgstr "" + +#: ../../content/contributing/development.rst:62 +msgid "Link Git with odoo-dev" +msgstr "" + +#: ../../content/contributing/development.rst:72 +msgid "That's it! You are ready to :ref:`make your first contribution `." +msgstr "" + +#: ../../content/contributing/development.rst:79 +#: ../../content/contributing/documentation.rst:158 +msgid "Make your first contribution" +msgstr "" + +#: ../../content/contributing/development.rst:82 +msgid "Odoo development can be challenging for beginners. We recommend you to be knowledgeable enough to code a small module before contributing. If that is not the case, take some time to go through the :doc:`developer tutorials ` to fill in the gaps." +msgstr "" + +#: ../../content/contributing/development.rst:85 +#: ../../content/contributing/documentation.rst:204 +msgid "Some steps of this guide require to be comfortable with Git. Here are some `tutorials `_ and an `interactive training `_ if you are stuck at some point." +msgstr "" + +#: ../../content/contributing/development.rst:89 +msgid "Now that your environment is set up, you can start contributing to the codebase. In a terminal, navigate to the directory where you installed Odoo from sources and follow the guide below." +msgstr "" + +#: ../../content/contributing/development.rst:92 +msgid "Choose the version of Odoo to which you want to make changes. Keep in mind that contributions targeting an :doc:`unsupported version of Odoo ` are not accepted. This guide assumes that the changes target Odoo 14, which corresponds to branch `14.0`." +msgstr "" + +#: ../../content/contributing/development.rst:96 +#: ../../content/contributing/documentation.rst:216 +msgid "Create a new branch starting from branch 14.0. Prefix the branch name with the base branch: `14.0-...`. If you work at Odoo, suffix the branch name with your Odoo handle: `14.0-...-xyz`." +msgstr "" + +#: ../../content/contributing/development.rst:110 +msgid "`Sign the Odoo CLA `_ if not already done. Skip this step if you work at Odoo." +msgstr "" + +#: ../../content/contributing/development.rst:112 +msgid "Make the desired changes to the codebase. When working on the codebase, follow these rules:" +msgstr "" + +#: ../../content/contributing/development.rst:114 +msgid "Keep your changes focused and specific. It is best to work on one particular feature or bug fix at a time rather than tackle multiple unrelated changes simultaneously." +msgstr "" + +#: ../../content/contributing/development.rst:116 +msgid "Respect the `stable policy `_ when working in another branch than `master`." +msgstr "" + +#: ../../content/contributing/development.rst:119 +msgid "Follow the :doc:`coding guidelines `." +msgstr "" + +#: ../../content/contributing/development.rst:120 +msgid "Test your changes thoroughly and :doc:`write tests ` to ensure that everything is working as expected and that there are no regressions or unintended consequences." +msgstr "" + +#: ../../content/contributing/development.rst:124 +#: ../../content/contributing/documentation.rst:249 +msgid "Commit your changes. Write a clear commit message as instructed in the :doc:`Git guidelines `." +msgstr "" + +#: ../../content/contributing/development.rst:132 +#: ../../content/contributing/documentation.rst:257 +msgid "Push your change to your fork, for which we added the remote alias `dev`." +msgstr "" + +#: ../../content/contributing/development.rst:140 +#: ../../content/contributing/documentation.rst:274 +msgid "Open a :abbr:`PR (Pull Request)` on GitHub to submit your changes for review." +msgstr "" + +#: ../../content/contributing/development.rst:142 +msgid "Go to the `compare page of the odoo/odoo codebase `_, or the `compare page of the odoo/enterprise codebase `_, depending on which codebase your changes target." +msgstr "" + +#: ../../content/contributing/development.rst:146 +#: ../../content/contributing/documentation.rst:278 +msgid "Select **14.0** for the base." +msgstr "" + +#: ../../content/contributing/development.rst:147 +#: ../../content/contributing/documentation.rst:279 +msgid "Click on :guilabel:`compare across forks`." +msgstr "" + +#: ../../content/contributing/development.rst:148 +msgid "Select **/odoo** or **/enterprise** for the head repository. Replace `` with the name of the GitHub account on which you created the fork or by **odoo-dev** if you work at Odoo." +msgstr "" + +#: ../../content/contributing/development.rst:151 +#: ../../content/contributing/documentation.rst:192 +#: ../../content/contributing/documentation.rst:283 +msgid "Review your changes and click on the :guilabel:`Create pull request` button." +msgstr "" + +#: ../../content/contributing/development.rst:152 +#: ../../content/contributing/documentation.rst:193 +#: ../../content/contributing/documentation.rst:284 +msgid "Tick the :guilabel:`Allow edits from maintainer` checkbox. Skip this step if you work at Odoo." +msgstr "" + +#: ../../content/contributing/development.rst:153 +#: ../../content/contributing/documentation.rst:286 +msgid "Complete the description and click on the :guilabel:`Create pull request` button again." +msgstr "" + +#: ../../content/contributing/handle_reviews.rst:1 +#: ../../content/contributing/handle_reviews.rst:1 +#: ../../content/contributing/handle_reviews.rst:1 +#: ../../content/contributing/handle_reviews.rst:1 +#: ../../content/contributing/handle_reviews.rst:1 +#: ../../content/contributing/handle_reviews.rst:1 +msgid "As soon as your :abbr:`PR (Pull Request)` is ready for merging, a member of the Odoo team will be automatically assigned for review. If the reviewer has questions or remarks, they will post them as comments and you will be notified by email. Those comments must be resolved for the contribution to go forward." +msgstr "" + +#: ../../content/contributing/development.rst:157 +msgid "Once your changes are approved, the review merges them and they become available for all Odoo users after the next code update!" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:5 +msgid "Coding guidelines" +msgstr "" + +#: ../../content/contributing/development/coding_guidelines.rst:7 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 +#: ../../content/contributing/development/coding_guidelines.rst:14 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 +#: ../../content/contributing/development/coding_guidelines.rst:22 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 +#: ../../content/contributing/development/coding_guidelines.rst:29 msgid "Module structure" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:33 +#: ../../content/contributing/development/coding_guidelines.rst:32 msgid "Directories" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:34 +#: ../../content/contributing/development/coding_guidelines.rst:33 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 +#: ../../content/contributing/development/coding_guidelines.rst:36 msgid "*data/* : demo and data xml" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:38 +#: ../../content/contributing/development/coding_guidelines.rst:37 msgid "*models/* : models definition" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:39 +#: ../../content/contributing/development/coding_guidelines.rst:38 msgid "*controllers/* : contains controllers (HTTP routes)" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:40 +#: ../../content/contributing/development/coding_guidelines.rst:39 msgid "*views/* : contains the views and templates" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:41 +#: ../../content/contributing/development/coding_guidelines.rst:40 msgid "*static/* : contains the web assets, separated into *css/, js/, img/, lib/, ...*" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:43 +#: ../../content/contributing/development/coding_guidelines.rst:42 msgid "Other optional directories compose the module." msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:45 +#: ../../content/contributing/development/coding_guidelines.rst:44 msgid "*wizard/* : regroups the transient models (``models.TransientModel``) and their views" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:46 +#: ../../content/contributing/development/coding_guidelines.rst:45 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 +#: ../../content/contributing/development/coding_guidelines.rst:46 msgid "*tests/* : contains the Python tests" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:51 +#: ../../content/contributing/development/coding_guidelines.rst:50 msgid "File naming" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:53 +#: ../../content/contributing/development/coding_guidelines.rst:52 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 +#: ../../content/contributing/development/coding_guidelines.rst:57 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 +#: ../../content/contributing/development/coding_guidelines.rst:71 msgid "Concerning *security*, three main files should be used:" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:74 +#: ../../content/contributing/development/coding_guidelines.rst:73 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 +#: ../../content/contributing/development/coding_guidelines.rst:74 msgid "User groups are defined in :file:`_groups.xml`." msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:76 +#: ../../content/contributing/development/coding_guidelines.rst:75 msgid "Record rules are defined in :file:`_security.xml`." msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:87 +#: ../../content/contributing/development/coding_guidelines.rst:86 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 +#: ../../content/contributing/development/coding_guidelines.rst:106 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 +#: ../../content/contributing/development/coding_guidelines.rst:119 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 +#: ../../content/contributing/development/coding_guidelines.rst:133 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 +#: ../../content/contributing/development/coding_guidelines.rst:142 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 +#: ../../content/contributing/development/coding_guidelines.rst:154 msgid "Concerning *statistics reports* done with python / SQL views and classic views naming is the following :" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:165 +#: ../../content/contributing/development/coding_guidelines.rst:164 msgid "Concerning *printable reports* which contain mainly data preparation and Qweb templates naming is the following :" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:175 +#: ../../content/contributing/development/coding_guidelines.rst:174 msgid "The complete tree of our Odoo module therefore looks like" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:234 +#: ../../content/contributing/development/coding_guidelines.rst:233 msgid "File names should only contain ``[a-z0-9_]`` (lowercase alphanumerics and ``_``)" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:237 +#: ../../content/contributing/development/coding_guidelines.rst:236 msgid "Use correct file permissions : folder 755 and file 644." msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:242 +#: ../../content/contributing/development/coding_guidelines.rst:241 msgid "XML files" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:245 +#: ../../content/contributing/development/coding_guidelines.rst:244 msgid "Format" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:246 +#: ../../content/contributing/development/coding_guidelines.rst:245 msgid "To declare a record in XML, the **record** notation (using **) is recommended:" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:248 +#: ../../content/contributing/development/coding_guidelines.rst:247 msgid "Place ``id`` attribute before ``model``" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:249 +#: ../../content/contributing/development/coding_guidelines.rst:248 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 +#: ../../content/contributing/development/coding_guidelines.rst:253 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 +#: ../../content/contributing/development/coding_guidelines.rst:255 msgid "Use naming convention defined at the next point" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:257 +#: ../../content/contributing/development/coding_guidelines.rst:256 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 +#: ../../content/contributing/development/coding_guidelines.rst:274 msgid "Odoo supports custom tags acting as syntactic sugar:" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:277 +#: ../../content/contributing/development/coding_guidelines.rst:276 msgid "menuitem: use it as a shortcut to declare a ``ir.ui.menu``" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:278 +#: ../../content/contributing/development/coding_guidelines.rst:277 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 `" +msgid "These tags are preferred over the *record* notation." 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 +#: ../../content/contributing/development/coding_guidelines.rst:283 msgid "XML IDs and naming" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:289 +#: ../../content/contributing/development/coding_guidelines.rst:286 msgid "Security, View and Action" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:291 +#: ../../content/contributing/development/coding_guidelines.rst:288 msgid "Use the following pattern :" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:293 +#: ../../content/contributing/development/coding_guidelines.rst:290 msgid "For a menu: :samp:`{}_menu`, or :samp:`{}_menu_{do_stuff}` for submenus." msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:294 +#: ../../content/contributing/development/coding_guidelines.rst:291 msgid "For a view: :samp:`{}_view_{}`, where *view_type* is ``kanban``, ``form``, ``tree``, ``search``, ..." msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:296 +#: ../../content/contributing/development/coding_guidelines.rst:293 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 +#: ../../content/contributing/development/coding_guidelines.rst:297 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 +#: ../../content/contributing/development/coding_guidelines.rst:299 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 +#: ../../content/contributing/development/coding_guidelines.rst:301 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 +#: ../../content/contributing/development/coding_guidelines.rst:306 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 +#: ../../content/contributing/development/coding_guidelines.rst:360 msgid "Inheriting XML" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:365 +#: ../../content/contributing/development/coding_guidelines.rst:362 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 +#: ../../content/contributing/development/coding_guidelines.rst:366 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 +#: ../../content/contributing/development/coding_guidelines.rst:377 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/development/coding_guidelines.rst:392 #: ../../content/contributing/documentation/rst_cheat_sheet.rst:879 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:881 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:897 msgid "Python" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:399 +#: ../../content/contributing/development/coding_guidelines.rst:396 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 +#: ../../content/contributing/development/coding_guidelines.rst:400 msgid "PEP8 options" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:405 +#: ../../content/contributing/development/coding_guidelines.rst:402 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 +#: ../../content/contributing/development/coding_guidelines.rst:405 msgid "E501: line too long" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:409 +#: ../../content/contributing/development/coding_guidelines.rst:406 msgid "E301: expected 1 blank line, found 0" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:410 +#: ../../content/contributing/development/coding_guidelines.rst:407 msgid "E302: expected 2 blank lines, found 1" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:413 +#: ../../content/contributing/development/coding_guidelines.rst:410 msgid "Imports" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:414 +#: ../../content/contributing/development/coding_guidelines.rst:411 msgid "The imports are ordered as" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:416 +#: ../../content/contributing/development/coding_guidelines.rst:413 msgid "External libraries (one per line sorted and split in python stdlib)" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:417 +#: ../../content/contributing/development/coding_guidelines.rst:414 msgid "Imports of ``odoo``" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:418 +#: ../../content/contributing/development/coding_guidelines.rst:415 msgid "Imports from Odoo modules (rarely, and only if necessary)" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:420 +#: ../../content/contributing/development/coding_guidelines.rst:417 msgid "Inside these 3 groups, the imported lines are alphabetically sorted." msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:438 +#: ../../content/contributing/development/coding_guidelines.rst:435 msgid "Idiomatics of Programming (Python)" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:440 +#: ../../content/contributing/development/coding_guidelines.rst:437 msgid "Always favor *readability* over *conciseness* or using the language features or idioms." msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:441 +#: ../../content/contributing/development/coding_guidelines.rst:438 msgid "Don't use ``.clone()``" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:452 +#: ../../content/contributing/development/coding_guidelines.rst:449 msgid "Python dictionary : creation and update" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:477 +#: ../../content/contributing/development/coding_guidelines.rst:474 msgid "Use meaningful variable/class/method names" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:478 +#: ../../content/contributing/development/coding_guidelines.rst:475 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 +#: ../../content/contributing/development/coding_guidelines.rst:487 msgid "Multiple return points are OK, when they're simpler" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:510 +#: ../../content/contributing/development/coding_guidelines.rst:507 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 +#: ../../content/contributing/development/coding_guidelines.rst:515 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 +#: ../../content/contributing/development/coding_guidelines.rst:518 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 +#: ../../content/contributing/development/coding_guidelines.rst:531 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 +#: ../../content/contributing/development/coding_guidelines.rst:542 msgid "So, you can write ``if some_collection:`` instead of ``if len(some_collection):``." msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:548 +#: ../../content/contributing/development/coding_guidelines.rst:545 msgid "Iterate on iterables" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:562 +#: ../../content/contributing/development/coding_guidelines.rst:559 msgid "Use dict.setdefault" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:578 +#: ../../content/contributing/development/coding_guidelines.rst:575 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 +#: ../../content/contributing/development/coding_guidelines.rst:577 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 +#: ../../content/contributing/development/coding_guidelines.rst:582 msgid "Programming in Odoo" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:587 +#: ../../content/contributing/development/coding_guidelines.rst:584 msgid "Avoid to create generators and decorators: only use the ones provided by the Odoo API." msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:589 +#: ../../content/contributing/development/coding_guidelines.rst:586 msgid "As in python, use ``filtered``, ``mapped``, ``sorted``, ... methods to ease code reading and performance." msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:594 +#: ../../content/contributing/development/coding_guidelines.rst:591 msgid "Make your method work in batch" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:595 +#: ../../content/contributing/development/coding_guidelines.rst:592 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 +#: ../../content/contributing/development/coding_guidelines.rst:601 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 +#: ../../content/contributing/development/coding_guidelines.rst:616 msgid "Propagate the context" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:620 +#: ../../content/contributing/development/coding_guidelines.rst:617 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 +#: ../../content/contributing/development/coding_guidelines.rst:626 msgid "Passing parameter in context can have dangerous side-effects." msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:631 +#: ../../content/contributing/development/coding_guidelines.rst:628 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, 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*, ..." +#: ../../content/contributing/development/coding_guidelines.rst:634 +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 +#: ../../content/contributing/development/coding_guidelines.rst:641 msgid "Think extendable" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:646 +#: ../../content/contributing/development/coding_guidelines.rst:643 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 +#: ../../content/contributing/development/coding_guidelines.rst:648 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 +#: ../../content/contributing/development/coding_guidelines.rst:674 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 +#: ../../content/contributing/development/coding_guidelines.rst:677 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 +#: ../../content/contributing/development/coding_guidelines.rst:680 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 +#: ../../content/contributing/development/coding_guidelines.rst:685 msgid "Never commit the transaction" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:689 +#: ../../content/contributing/development/coding_guidelines.rst:686 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 +#: ../../content/contributing/development/coding_guidelines.rst:707 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 +#: ../../content/contributing/development/coding_guidelines.rst:710 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 +#: ../../content/contributing/development/coding_guidelines.rst:714 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 +#: ../../content/contributing/development/coding_guidelines.rst:719 msgid "inconsistent business data, usually data loss" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:723 +#: ../../content/contributing/development/coding_guidelines.rst:720 msgid "workflow desynchronization, documents stuck permanently" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:724 +#: ../../content/contributing/development/coding_guidelines.rst:721 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 +#: ../../content/contributing/development/coding_guidelines.rst:732 msgid "Here is the very simple rule:" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:729 +#: ../../content/contributing/development/coding_guidelines.rst:726 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 +#: ../../content/contributing/development/coding_guidelines.rst:730 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 have in doubt!)" +#: ../../content/contributing/development/coding_guidelines.rst:734 +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 +#: ../../content/contributing/development/coding_guidelines.rst:746 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 +#: ../../content/contributing/development/coding_guidelines.rst:753 msgid "Use translation method correctly" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:758 +#: ../../content/contributing/development/coding_guidelines.rst:755 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 +#: ../../content/contributing/development/coding_guidelines.rst:764 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 +#: ../../content/contributing/development/coding_guidelines.rst:767 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 +#: ../../content/contributing/development/coding_guidelines.rst:772 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 +#: ../../content/contributing/development/coding_guidelines.rst:815 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 +#: ../../content/contributing/development/coding_guidelines.rst:835 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 +#: ../../content/contributing/development/coding_guidelines.rst:842 msgid "Symbols and Conventions" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:855 +#: ../../content/contributing/development/coding_guidelines.rst:852 msgid "Model name (using the dot notation, prefix by the module name) :" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:848 +#: ../../content/contributing/development/coding_guidelines.rst:845 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 +#: ../../content/contributing/development/coding_guidelines.rst:847 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 +#: ../../content/contributing/development/coding_guidelines.rst:851 msgid "When defining *report* model (SQL views e.i.) : use ``.report.``, based on the Transient convention." msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:857 +#: ../../content/contributing/development/coding_guidelines.rst:854 msgid "Odoo Python Class : use camelcase (Object-oriented style)." msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:868 +#: ../../content/contributing/development/coding_guidelines.rst:865 msgid "Variable name :" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:866 +#: ../../content/contributing/development/coding_guidelines.rst:863 msgid "use camelcase for model variable" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:867 +#: ../../content/contributing/development/coding_guidelines.rst:864 msgid "use underscore lowercase notation for common variable." msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:868 +#: ../../content/contributing/development/coding_guidelines.rst:865 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 +#: ../../content/contributing/development/coding_guidelines.rst:873 msgid "``One2Many`` and ``Many2Many`` fields should always have *_ids* as suffix (example: sale_order_line_ids)" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:877 +#: ../../content/contributing/development/coding_guidelines.rst:874 msgid "``Many2One`` fields should have *_id* as suffix (example : partner_id, user_id, ...)" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:887 +#: ../../content/contributing/development/coding_guidelines.rst:884 msgid "Method conventions" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:879 +#: ../../content/contributing/development/coding_guidelines.rst:876 msgid "Compute Field : the compute method pattern is *_compute_*" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:880 +#: ../../content/contributing/development/coding_guidelines.rst:877 msgid "Search method : the search method pattern is *_search_*" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:881 +#: ../../content/contributing/development/coding_guidelines.rst:878 msgid "Default method : the default method pattern is *_default_*" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:882 +#: ../../content/contributing/development/coding_guidelines.rst:879 msgid "Selection method: the selection method pattern is *_selection_*" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:883 +#: ../../content/contributing/development/coding_guidelines.rst:880 msgid "Onchange method : the onchange method pattern is *_onchange_*" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:884 +#: ../../content/contributing/development/coding_guidelines.rst:881 msgid "Constraint method : the constraint method pattern is *_check_*" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:885 +#: ../../content/contributing/development/coding_guidelines.rst:882 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 +#: ../../content/contributing/development/coding_guidelines.rst:895 msgid "In a Model attribute order should be" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:890 -msgid "Private attributes (``_name``, ``_description``, ``_inherit``, ...)" +#: ../../content/contributing/development/coding_guidelines.rst:887 +msgid "Private attributes (``_name``, ``_description``, ``_inherit``, ``_sql_constraints``, ...)" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:891 -msgid "Default method and ``_default_get``" +#: ../../content/contributing/development/coding_guidelines.rst:888 +msgid "Default method and ``default_get``" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:892 +#: ../../content/contributing/development/coding_guidelines.rst:889 msgid "Field declarations" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:893 +#: ../../content/contributing/development/coding_guidelines.rst:890 msgid "Compute, inverse and search methods in the same order as field declaration" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:894 +#: ../../content/contributing/development/coding_guidelines.rst:891 msgid "Selection method (methods used to return computed values for selection fields)" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:895 +#: ../../content/contributing/development/coding_guidelines.rst:892 msgid "Constrains methods (``@api.constrains``) and onchange methods (``@api.onchange``)" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:896 +#: ../../content/contributing/development/coding_guidelines.rst:893 msgid "CRUD methods (ORM overrides)" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:897 +#: ../../content/contributing/development/coding_guidelines.rst:894 msgid "Action methods" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:898 +#: ../../content/contributing/development/coding_guidelines.rst:895 msgid "And finally, other business methods." msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:954 +#: ../../content/contributing/development/coding_guidelines.rst:951 msgid "Javascript and CSS" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:957 +#: ../../content/contributing/development/coding_guidelines.rst:954 msgid "Static files organization" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:959 +#: ../../content/contributing/development/coding_guidelines.rst:956 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 +#: ../../content/contributing/development/coding_guidelines.rst:959 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 +#: ../../content/contributing/development/coding_guidelines.rst:964 msgid "The convention is to organize the code according to the following structure:" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:969 +#: ../../content/contributing/development/coding_guidelines.rst:966 msgid "*static*: all static files in general" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:971 +#: ../../content/contributing/development/coding_guidelines.rst:968 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 +#: ../../content/contributing/development/coding_guidelines.rst:970 msgid "*static/src*: the generic static source code folder" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:975 +#: ../../content/contributing/development/coding_guidelines.rst:972 msgid "*static/src/css*: all css files" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:976 +#: ../../content/contributing/development/coding_guidelines.rst:973 msgid "*static/src/fonts*" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:977 +#: ../../content/contributing/development/coding_guidelines.rst:974 msgid "*static/src/img*" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:978 +#: ../../content/contributing/development/coding_guidelines.rst:975 msgid "*static/src/js*" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:980 +#: ../../content/contributing/development/coding_guidelines.rst:977 msgid "*static/src/js/tours*: end user tour files (tutorials, not tests)" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:982 +#: ../../content/contributing/development/coding_guidelines.rst:979 msgid "*static/src/scss*: scss files" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:983 +#: ../../content/contributing/development/coding_guidelines.rst:980 msgid "*static/src/xml*: all qweb templates that will be rendered in JS" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:985 +#: ../../content/contributing/development/coding_guidelines.rst:982 msgid "*static/tests*: this is where we put all test related files." msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:987 +#: ../../content/contributing/development/coding_guidelines.rst:984 msgid "*static/tests/tours*: this is where we put all tour test files (not tutorials)." msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:990 +#: ../../content/contributing/development/coding_guidelines.rst:987 msgid "Javascript coding guidelines" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:992 +#: ../../content/contributing/development/coding_guidelines.rst:989 msgid "``use strict;`` is recommended for all javascript files" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:993 +#: ../../content/contributing/development/coding_guidelines.rst:990 msgid "Use a linter (jshint, ...)" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:994 +#: ../../content/contributing/development/coding_guidelines.rst:991 msgid "Never add minified Javascript Libraries" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:995 +#: ../../content/contributing/development/coding_guidelines.rst:992 msgid "Use camelcase for class declaration" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:997 +#: ../../content/contributing/development/coding_guidelines.rst:994 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 +#: ../../content/contributing/development/coding_guidelines.rst:999 msgid "CSS coding guidelines" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:1004 +#: ../../content/contributing/development/coding_guidelines.rst:1001 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 +#: ../../content/contributing/development/coding_guidelines.rst:1006 msgid "Avoid using *id* tag" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:1010 +#: ../../content/contributing/development/coding_guidelines.rst:1007 msgid "Use Bootstrap native classes" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:1011 +#: ../../content/contributing/development/coding_guidelines.rst:1008 msgid "Use underscore lowercase notation to name class" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:1016 -msgid "Git" +#: ../../content/contributing/development/git_guidelines.rst:3 +msgid "Git guidelines" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:1019 +#: ../../content/contributing/development/git_guidelines.rst:6 msgid "Configure your git" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:1021 +#: ../../content/contributing/development/git_guidelines.rst:8 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 +#: ../../content/contributing/development/git_guidelines.rst:11 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 +#: ../../content/contributing/development/git_guidelines.rst:17 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 +#: ../../content/contributing/development/git_guidelines.rst:21 msgid "Commit message structure" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:1036 +#: ../../content/contributing/development/git_guidelines.rst:23 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 +#: ../../content/contributing/development/git_guidelines.rst:46 msgid "Tag and module name" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:1061 +#: ../../content/contributing/development/git_guidelines.rst:48 msgid "Tags are used to prefix your commit. They should be one of the following" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:1063 +#: ../../content/contributing/development/git_guidelines.rst:50 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 +#: ../../content/contributing/development/git_guidelines.rst:52 msgid "**[REF]** for refactoring: when a feature is heavily rewritten;" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:1066 +#: ../../content/contributing/development/git_guidelines.rst:53 msgid "**[ADD]** for adding new modules;" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:1067 +#: ../../content/contributing/development/git_guidelines.rst:54 msgid "**[REM]** for removing resources: removing dead code, removing views, removing modules, ...;" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:1069 +#: ../../content/contributing/development/git_guidelines.rst:56 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 +#: ../../content/contributing/development/git_guidelines.rst:58 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 +#: ../../content/contributing/development/git_guidelines.rst:61 msgid "**[REL]** for release commits: new major or minor stable versions;" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:1075 +#: ../../content/contributing/development/git_guidelines.rst:62 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 +#: ../../content/contributing/development/git_guidelines.rst:64 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 +#: ../../content/contributing/development/git_guidelines.rst:66 msgid "**[CLA]** for signing the Odoo Individual Contributor License;" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:1080 +#: ../../content/contributing/development/git_guidelines.rst:67 msgid "**[I18N]** for changes in translation files;" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:1082 +#: ../../content/contributing/development/git_guidelines.rst:69 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 +#: ../../content/contributing/development/git_guidelines.rst:76 msgid "Commit message header" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:1091 +#: ../../content/contributing/development/git_guidelines.rst:78 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 +#: ../../content/contributing/development/git_guidelines.rst:83 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 +#: ../../content/contributing/development/git_guidelines.rst:89 msgid "Commit message full description" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:1104 +#: ../../content/contributing/development/git_guidelines.rst:91 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 +#: ../../content/contributing/development/git_guidelines.rst:94 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 +#: ../../content/contributing/development/git_guidelines.rst:98 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 +#: ../../content/contributing/development/git_guidelines.rst:102 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 +#: ../../content/contributing/development/git_guidelines.rst:106 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 +#: ../../content/contributing/development/git_guidelines.rst:110 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 +#: ../../content/contributing/development/git_guidelines.rst:113 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 +#: ../../content/contributing/development/git_guidelines.rst:118 msgid "Finally here are some examples of correct commit messages :" msgstr "" -#: ../../content/contributing/development/coding_guidelines.rst:1154 +#: ../../content/contributing/development/git_guidelines.rst:141 msgid "Use the long description to explain the *why* not the *what*, the *what* can be seen in the diff" msgstr "" @@ -925,340 +1274,180 @@ msgid "This introductory guide will help you acquire the tools and knowledge you msgstr "" #: ../../content/contributing/documentation.rst:21 -msgid "reStructuredText" +msgid "Read the :ref:`introduction to the reStructuredText language ` if you are not familiar with it. Then, you have two courses of action to start contributing to the documentation, depending on whether you want to propose minor changes to existing content or you instead want to work on significant changes to new and existing content." 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." +#: ../../content/contributing/documentation.rst:26 +msgid "**For minor changes**, for example, adding a paragraph or fixing a typo, we recommend **using the GitHub interface**. This is the easiest and fastest way to submit your changes, and it is suitable for non-technical people. Jump directly to the :ref:`contributing/documentation/first-contribution` section to get started." 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." +#: ../../content/contributing/documentation.rst:30 +msgid "**For more complex changes**, it is necessary to **use Git** and work from a local copy of the documentation. Follow the instructions in the :ref:`contributing/documentation/setup` section to first prepare your environment." 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." +#: ../../content/contributing/documentation.rst:37 +msgid "reStructuredText (RST)" msgstr "" -#: ../../content/contributing/documentation.rst:40 +#: ../../content/contributing/documentation.rst:39 +msgid "The documentation is written in **reStructuredText** (RST), a `lightweight markup language `_ consisting of regular 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 minor changes to the content." +msgstr "" + +#: ../../content/contributing/documentation.rst:45 +msgid "If you need to learn about a specific markup, head over to our :doc:`cheat sheet for RST `; it contains all the information you should ever need for the documentation of Odoo." +msgstr "" + +#: ../../content/contributing/documentation.rst:50 +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 the Odoo team reviews them." +msgstr "" + +#: ../../content/contributing/documentation.rst:56 msgid ":doc:`documentation/content_guidelines`" msgstr "" -#: ../../content/contributing/documentation.rst:41 +#: ../../content/contributing/documentation.rst:57 msgid ":doc:`documentation/rst_cheat_sheet`" msgstr "" -#: ../../content/contributing/documentation.rst:42 +#: ../../content/contributing/documentation.rst:58 msgid ":doc:`documentation/rst_guidelines`" msgstr "" -#: ../../content/contributing/documentation.rst:47 -msgid "Getting started" +#: ../../content/contributing/documentation.rst:65 +msgid "The instructions below help you prepare your environment for making local changes to the documentation and then push them to GitHub. Skip this section and go to :ref:`contributing/documentation/first-contribution` if you have already completed this step or want to make changes from the GitHub interface." 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." +#: ../../content/contributing/documentation.rst:72 +msgid "Go to `github.com/odoo/documentation `_ and click on the :guilabel:`Fork` button in the top right corner to create a fork (:dfn:`your own copy`) of the repository on your account. This creates a copy of the codebase to which you can make changes without affecting the main codebase. Skip this step if you work at Odoo." 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:" +#: ../../content/contributing/documentation.rst:78 +msgid "Clone the sources with Git and navigate into the local repository." 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." +#: ../../content/contributing/documentation.rst:85 +msgid "Configure Git to push changes to your fork rather than to the main codebase. In the commands below, replace `` with the name of the GitHub account on which you created the fork. Skip this step if you work at Odoo." 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." +#: ../../content/contributing/documentation.rst:93 +msgid "Configure Git to ease the collaboration between writers coming from different systems." msgstr "" -#: ../../content/contributing/documentation.rst:66 -msgid "Use the GitHub interface" +#: ../../content/contributing/documentation.rst:111 +msgid "Install the latest release of `Python `_ and `pip `_ on your machine." 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." +#: ../../content/contributing/documentation.rst:113 +msgid "Install the Python dependencies of the documentation with pip." 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" +#: ../../content/contributing/documentation.rst:119 +msgid "Verify that the installation directory of the Python dependencies is included in your system's `PATH` variable." msgstr "" #: ../../content/contributing/documentation.rst:126 -msgid "Prepare your machine" +msgid "Follow the `guide to update the PATH variable on Linux and macOS `_ with the installation path of the Python dependencies (by default :file:`~/.local/bin`)." msgstr "" -#: ../../content/contributing/documentation.rst:131 -msgid "Install Git" +#: ../../content/contributing/documentation.rst:132 +msgid "Follow the `guide to update the PATH variable on Windows `_ with the installation path of the Python dependencies." 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." +#: ../../content/contributing/documentation.rst:136 +msgid "Install Make." 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." +#: ../../content/contributing/documentation.rst:148 +msgid "Follow the `guide to install Make on Windows `_." msgstr "" -#: ../../content/contributing/documentation.rst:141 -msgid "Download and install **Git** on your machine." +#: ../../content/contributing/documentation.rst:151 +msgid "`Install pngquant `_." msgstr "" -#: ../../content/contributing/documentation.rst:142 -msgid "Verify that `the installation folder of Git is included in your system's PATH variable `_." +#: ../../content/contributing/documentation.rst:152 +msgid "That's it! You are ready to :ref:`make your first contribution ` with Git." 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." +#: ../../content/contributing/documentation.rst:162 +msgid "Contribute from the GitHub interface" msgstr "" #: ../../content/contributing/documentation.rst:164 -msgid "Go to `github.com/odoo/documentation `_ and click on the **Fork** button in the top right corner." +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: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." +#: ../../content/contributing/documentation.rst:166 +msgid "Head to the page that you want to change and click on the :guilabel:`Edit on GitHub` button in the top right corner of the page." 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." +#: ../../content/contributing/documentation.rst:168 +msgid "Click on the :guilabel:`Fork this repository` button to create a fork (:dfn:`your own copy`) of the repository on your account. This creates a copy of the codebase to which you can make changes without affecting the main codebase. Skip this step if you work at Odoo." msgstr "" -#: ../../content/contributing/documentation.rst:185 -msgid "Windows:" +#: ../../content/contributing/documentation.rst:175 +#: ../../content/contributing/documentation.rst:230 +msgid "Make the desired changes while taking care of following the :doc:`content ` and :doc:`RST ` guidelines." msgstr "" -#: ../../content/contributing/documentation.rst:193 -msgid "Linux or Mac OS:" +#: ../../content/contributing/documentation.rst:180 +msgid "Click on the :guilabel:`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 shown as plain text." 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." +#: ../../content/contributing/documentation.rst:184 +msgid "Scroll to the bottom of the page and fill out the small form to propose your changes. In the first text box, write a very short summary of your changes. For instance, \"Fix a typo\" or \"Add documentation for invoicing of sales orders\". In the second text box, explain *why* you are proposing these changes. Then, click on the :guilabel:`Propose changes` button." +msgstr "" + +#: ../../content/contributing/documentation.rst:195 +msgid "Review the summary that you wrote about your changes and click on the :guilabel:`Create pull request` button again." +msgstr "" + +#: ../../content/contributing/documentation/changes_approved.rst:1 +#: ../../content/contributing/documentation/changes_approved.rst:1 +#: ../../content/contributing/documentation/changes_approved.rst:1 +#: ../../content/contributing/documentation/changes_approved.rst:1 +#: ../../content/contributing/documentation/changes_approved.rst:1 +msgid "Once your changes are approved, the reviewer merges them and they appear online the next day!" +msgstr "" + +#: ../../content/contributing/documentation.rst:201 +msgid "Contribute with Git" +msgstr "" + +#: ../../content/contributing/documentation.rst:208 +msgid "Now that your environment is set up, you can start contributing to the documentation. In a terminal, navigate to the directory where you cloned the sources and follow the guide below." 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!" +msgid "Choose the version of the documentation to which you want to make changes. Keep in mind that contributions targeting an :doc:`unsupported version of Odoo ` are not accepted. This guide assumes that the changes target the documentation of Odoo 14, which corresponds to branch `14.0`." msgstr "" -#: ../../content/contributing/documentation.rst:216 -msgid "Python comes with its own package manager: `pip `_. It allows installing Python dependencies in a single command." +#: ../../content/contributing/documentation.rst:233 +msgid "Compress all PNG images that you added or modified." msgstr "" -#: ../../content/contributing/documentation.rst:220 -msgid "Download and install the recommended release (`see README file `_) of **Python 3** on your machine." +#: ../../content/contributing/documentation.rst:240 +msgid "Write a `redirect rule `_ for every RST file that your renamed." 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``" +#: ../../content/contributing/documentation.rst:243 +msgid "Build the documentation with :command:`make`. Then, open :file:`_build/index.html` in your web browser to browse the documentation with your changes." 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." +msgid "Use :command:`make help` to learn about other useful commands." msgstr "" #: ../../content/contributing/documentation.rst:265 -msgid "Download and install **pngquant** on your machine." +msgid "If you work at Odoo, push your changes directly to the main codebase whose remote alias is `origin`." msgstr "" -#: ../../content/contributing/documentation.rst:266 -msgid "Verify that `the installation folder of pngquant is included in your system's PATH variable `_." +#: ../../content/contributing/documentation.rst:276 +msgid "Go to the `compare page of the odoo/documentation codebase `_." 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." +#: ../../content/contributing/documentation.rst:280 +msgid "Select **/odoo** for the head repository. Replace `` with the name of the GitHub account on which you created the fork. Skip this step if you work at Odoo." msgstr "" #: ../../content/contributing/documentation/content_guidelines.rst:3 @@ -1535,102 +1724,106 @@ msgid "Adding a few images to illustrate your text helps the readers to understa msgstr "" #: ../../content/contributing/documentation/content_guidelines.rst:185 -msgid "Don't forget to :ref:`compress your PNG files with pngquant `." +msgid "Don't forget to :ref:`compress your PNG files with pngquant `." msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:190 +#: ../../content/contributing/documentation/content_guidelines.rst:191 msgid "Screenshots" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:192 +#: ../../content/contributing/documentation/content_guidelines.rst:193 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:196 +#: ../../content/contributing/documentation/content_guidelines.rst:197 msgid "A few tips to improve your screenshots:" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:198 +#: ../../content/contributing/documentation/content_guidelines.rst:199 msgid "**Zoom** in your browser. We recommend a 110% zoom for better results." msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:199 +#: ../../content/contributing/documentation/content_guidelines.rst:200 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:201 +#: ../../content/contributing/documentation/content_guidelines.rst:202 msgid "**Select** the relevant area, rather than keeping the full window." msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:202 +#: ../../content/contributing/documentation/content_guidelines.rst:203 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:210 +#: ../../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:211 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 +#: ../../content/contributing/documentation/content_guidelines.rst:217 msgid "Media files" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:218 +#: ../../content/contributing/documentation/content_guidelines.rst:219 msgid "A **media filename**:" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:220 +#: ../../content/contributing/documentation/content_guidelines.rst:221 msgid "is written in **lower-case letters**" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:221 +#: ../../content/contributing/documentation/content_guidelines.rst:222 msgid "is **relevant** to the media's content. (E.g., :file:`screenshot-tips.gif`.)" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:222 +#: ../../content/contributing/documentation/content_guidelines.rst:223 msgid "separates its words with a **hyphen** ``-`` (E.g., :file:`awesome-filename.png`.)" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:224 +#: ../../content/contributing/documentation/content_guidelines.rst:225 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 +#: ../../content/contributing/documentation/content_guidelines.rst:228 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 +#: ../../content/contributing/documentation/content_guidelines.rst:240 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:248 +#: ../../content/contributing/documentation/content_guidelines.rst:249 msgid "ALT tags" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:250 +#: ../../content/contributing/documentation/content_guidelines.rst:251 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:255 +#: ../../content/contributing/documentation/content_guidelines.rst:256 msgid "Good ALT tags are:" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:257 +#: ../../content/contributing/documentation/content_guidelines.rst:258 msgid "**Short** (one line maximum)" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:258 +#: ../../content/contributing/documentation/content_guidelines.rst:259 msgid "**Not a repetition** of a previous sentence or title" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:259 +#: ../../content/contributing/documentation/content_guidelines.rst:260 msgid "A **good description** of the action happening on the image" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:260 +#: ../../content/contributing/documentation/content_guidelines.rst:261 msgid "Easily **understandable** if read aloud" msgstr "" -#: ../../content/contributing/documentation/content_guidelines.rst:263 +#: ../../content/contributing/documentation/content_guidelines.rst:264 msgid ":ref:`RST cheat sheet: image directive `" msgstr "" @@ -1994,6 +2187,10 @@ msgstr "" msgid "The ``image`` markup allows inserting images in a document." msgstr "" +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:0 +msgid "Create an invoice." +msgstr "" + #: ../../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 "" @@ -2193,182 +2390,190 @@ msgid "Code blocks" msgstr "" #: ../../content/contributing/documentation/rst_cheat_sheet.rst:720 -msgid "Content tabs" -msgstr "" - -#: ../../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:725 -msgid "The tabs' headers cannot be translated." -msgstr "" - -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:726 -msgid "A tab cannot contain :ref:`headings `." +msgid "Spoilers" msgstr "" #: ../../content/contributing/documentation/rst_cheat_sheet.rst:727 -msgid "An :ref:`alert block ` cannot contain tabs." +msgid "**42**" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:728 -msgid "A tab cannot contain :ref:`custom anchors `." +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:738 +msgid "Content tabs" 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." +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:741 +msgid "The `tabs` markup may not work well in some situations. In particular:" msgstr "" #: ../../content/contributing/documentation/rst_cheat_sheet.rst:743 -msgid "Odoo Online" +msgid "The tabs' headers cannot be translated." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:744 +msgid "A tab cannot contain :ref:`headings `." msgstr "" #: ../../content/contributing/documentation/rst_cheat_sheet.rst:745 -msgid "Content dedicated to Odoo Online users." +msgid "An :ref:`alert block ` cannot contain tabs." 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." +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:746 +msgid "A tab cannot contain :ref:`custom anchors `." msgstr "" #: ../../content/contributing/documentation/rst_cheat_sheet.rst:751 -msgid "On-premise" +msgid "Basic tabs" msgstr "" #: ../../content/contributing/documentation/rst_cheat_sheet.rst:753 +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:761 +msgid "Odoo Online" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:763 +msgid "Content dedicated to Odoo Online users." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:765 +msgid "Odoo.sh" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:767 +msgid "Alternative for Odoo.sh users." +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:769 +msgid "On-premise" +msgstr "" + +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:771 msgid "Third version for On-premise users." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:774 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:792 msgid "Nested tabs" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:776 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:794 msgid "Tabs can be nested inside one another." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:783 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:801 msgid "Stars" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:787 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:805 msgid "The Sun" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:789 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:807 msgid "The closest star to us." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:791 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:809 msgid "Proxima Centauri" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:793 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:811 msgid "The second closest star to us." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:795 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:813 msgid "Polaris" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:797 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:815 msgid "The North Star." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:799 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:817 msgid "Moons" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:803 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:821 msgid "The Moon" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:805 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:823 msgid "Orbits the Earth." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:807 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:825 msgid "Titan" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:809 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:827 msgid "Orbits Jupiter." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:846 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:864 msgid "Group tabs" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:848 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:866 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 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:875 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:877 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:889 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 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:883 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:885 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:904 msgid "Java" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:938 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:956 msgid "Code tabs" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:940 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:958 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 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1009 msgid "Document metadata" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:993 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1011 msgid "Sphinx supports document-wide metadata markups that specify a behavior for the entire page." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:994 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1012 msgid "They must be placed between colons (`:`) at the top of the source file." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:997 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1015 msgid "**Metadata**" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:997 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1015 msgid "**Purpose**" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:999 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1017 msgid "`show-content`" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:999 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1017 msgid "Make a toctree page accessible from the navigation menu." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1001 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1019 msgid "`show-toc`" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1001 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1019 msgid "Show the table of content on a page that has the `show-content` metadata markup." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1004 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1022 msgid "`code-column`" msgstr "" @@ -2380,59 +2585,59 @@ msgstr "" msgid "For example, see :doc:`/applications/finance/accounting/getting_started/memento`." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1009 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1027 msgid "`hide-page-toc`" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1009 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1027 msgid "Hide the \"On this page\" sidebar and use full page width for the content." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1011 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1029 msgid "`custom-css`" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1011 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1029 msgid "Link CSS files (comma-separated) to the document." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1013 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1031 msgid "`custom-js`" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1013 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1031 msgid "Link JS files (comma-separated) to the document." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1015 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1033 msgid "`classes`" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1015 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1033 msgid "Assign the specified classes to the `
` element of the document." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1017 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1035 msgid "`orphan`" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1017 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1035 msgid "Suppress the need to include the document in a toctree." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1019 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1037 msgid "`nosearch`" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1019 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1037 msgid "Exclude the document from search results." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1025 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1043 msgid "Formatting tips" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1030 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1048 msgid "Break the line but not the paragraph" msgstr "" @@ -2444,15 +2649,15 @@ msgstr "" msgid "A second line that follows a line break." msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1048 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1066 msgid "Escape markup symbols (Advanced)" msgstr "" -#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1050 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1068 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:1054 +#: ../../content/contributing/documentation/rst_cheat_sheet.rst:1072 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 "" @@ -2465,7 +2670,7 @@ msgid "Use relative links for internal URLs" msgstr "" #: ../../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." +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 ``../`` 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:19 diff --git a/locale/sources/developer.pot b/locale/sources/developer.pot deleted file mode 100644 index c60252f56..000000000 --- a/locale/sources/developer.pot +++ /dev/null @@ -1,27026 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) Odoo S.A. -# This file is distributed under the same license as the Odoo package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: Odoo 14.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-01 15:09+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: ../../content/developer.rst:9 -msgid "Developer" -msgstr "" - -#: ../../content/developer.rst:11 -msgid "Learn through tutorials and get help using reference guides." -msgstr "" - -#: ../../content/developer/api.rst:5 -#: ../../content/developer/reference/addons/http.rst:52 -#: ../../content/developer/reference/addons/orm.rst:48 -#: ../../content/developer/reference/javascript/qweb.rst:592 -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 "Connection" -msgstr "" - -#: ../../content/developer/api/external_api.rst:14 -msgid "Configuration" -msgstr "" - -#: ../../content/developer/api/external_api.rst:16 -msgid "If you already have an Odoo server installed, you can just use its parameters." -msgstr "" - -#: ../../content/developer/api/external_api.rst:20 -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:26 -msgid "Log in your instance with an administrator account." -msgstr "" - -#: ../../content/developer/api/external_api.rst:27 -msgid "Go to :menuselection:`Settings --> Users & Companies --> Users`." -msgstr "" - -#: ../../content/developer/api/external_api.rst:28 -msgid "Click on the user you want to use for XML-RPC access." -msgstr "" - -#: ../../content/developer/api/external_api.rst:29 -msgid "Click on :guilabel:`Action` and select :guilabel:`Change Password`." -msgstr "" - -#: ../../content/developer/api/external_api.rst:30 -msgid "Set a :guilabel:`New Password` value then click :guilabel:`Change Password`." -msgstr "" - -#: ../../content/developer/api/external_api.rst:32 -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:68 -msgid "API Keys" -msgstr "" - -#: ../../content/developer/api/external_api.rst:72 -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:75 -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:80 -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:86 -msgid "then open the :guilabel:`Account Security` tab, and click :guilabel:`New API Key`:" -msgstr "" - -#: ../../content/developer/api/external_api.rst:92 -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:96 -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:102 -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:108 -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:112 -msgid "Test database" -msgstr "" - -#: ../../content/developer/api/external_api.rst:114 -msgid "To make exploration simpler, you can also ask https://demo.odoo.com for a test database:" -msgstr "" - -#: ../../content/developer/api/external_api.rst:131 -msgid "PHP" -msgstr "" - -#: ../../content/developer/api/external_api.rst:140 -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:146 -msgid "Since calls are performed over `HTTPS `_, it also requires that the `OpenSSL extension `_ be enabled." -msgstr "" - -#: ../../content/developer/api/external_api.rst:151 -msgid "Java" -msgstr "" - -#: ../../content/developer/api/external_api.rst:168 -msgid "These examples use the `Apache XML-RPC library `_." -msgstr "" - -#: ../../content/developer/api/external_api.rst:170 -msgid "The examples do not include imports as these imports couldn't be pasted in the code." -msgstr "" - -#: ../../content/developer/api/external_api.rst:174 -msgid "Logging in" -msgstr "" - -#: ../../content/developer/api/external_api.rst:176 -msgid "Odoo requires users of the API to be authenticated before they can query most data." -msgstr "" - -#: ../../content/developer/api/external_api.rst:179 -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:210 -#: ../../content/developer/api/external_api.rst:296 -#: ../../content/developer/api/external_api.rst:338 -#: ../../content/developer/api/external_api.rst:377 -#: ../../content/developer/api/external_api.rst:417 -#: ../../content/developer/api/external_api.rst:481 -#: ../../content/developer/api/external_api.rst:514 -#: ../../content/developer/api/external_api.rst:562 -#: ../../content/developer/api/external_api.rst:645 -#: ../../content/developer/api/external_api.rst:716 -#: ../../content/developer/api/external_api.rst:785 -#: ../../content/developer/api/external_api.rst:834 -#: ../../content/developer/api/external_api.rst:946 -#: ../../content/developer/api/external_api.rst:1111 -#: ../../content/developer/howtos/web.rst:655 -msgid "Result:" -msgstr "" - -#: ../../content/developer/api/external_api.rst:243 -msgid "Calling methods" -msgstr "" - -#: ../../content/developer/api/external_api.rst:245 -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:248 -msgid "Each call to ``execute_kw`` takes the following parameters:" -msgstr "" - -#: ../../content/developer/api/external_api.rst:250 -msgid "the database to use, a string" -msgstr "" - -#: ../../content/developer/api/external_api.rst:251 -msgid "the user id (retrieved through ``authenticate``), an integer" -msgstr "" - -#: ../../content/developer/api/external_api.rst:252 -msgid "the user's password, a string" -msgstr "" - -#: ../../content/developer/api/external_api.rst:253 -msgid "the model name, a string" -msgstr "" - -#: ../../content/developer/api/external_api.rst:254 -msgid "the method name, a string" -msgstr "" - -#: ../../content/developer/api/external_api.rst:255 -msgid "an array/list of parameters passed by position" -msgstr "" - -#: ../../content/developer/api/external_api.rst:256 -msgid "a mapping/dict of parameters to pass by keyword (optional)" -msgstr "" - -#: ../../content/developer/api/external_api.rst:260 -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:303 -msgid "List records" -msgstr "" - -#: ../../content/developer/api/external_api.rst:305 -msgid "Records can be listed and filtered via :meth:`~odoo.models.Model.search`." -msgstr "" - -#: ../../content/developer/api/external_api.rst:307 -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:313 -msgid "To list customer companies, for instance:" -msgstr "" - -#: ../../content/developer/api/external_api.rst:345 -msgid "Pagination" -msgstr "" - -#: ../../content/developer/api/external_api.rst:347 -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:384 -msgid "Count records" -msgstr "" - -#: ../../content/developer/api/external_api.rst:386 -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:424 -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:429 -msgid "Read records" -msgstr "" - -#: ../../content/developer/api/external_api.rst:431 -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:487 -msgid "Conversely, picking only three fields deemed interesting." -msgstr "" - -#: ../../content/developer/api/external_api.rst:521 -msgid "Even if the ``id`` field is not requested, it is always returned." -msgstr "" - -#: ../../content/developer/api/external_api.rst:524 -msgid "List record fields" -msgstr "" - -#: ../../content/developer/api/external_api.rst:526 -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:529 -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:604 -msgid "Search and read" -msgstr "" - -#: ../../content/developer/api/external_api.rst:606 -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:612 -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:683 -msgid "Create records" -msgstr "" - -#: ../../content/developer/api/external_api.rst:685 -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:688 -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:723 -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:727 -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:729 -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:734 -msgid "Update records" -msgstr "" - -#: ../../content/developer/api/external_api.rst:736 -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:740 -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:792 -msgid "Delete records" -msgstr "" - -#: ../../content/developer/api/external_api.rst:794 -msgid "Records can be deleted in bulk by providing their ids to :meth:`~odoo.models.Model.unlink`." -msgstr "" - -#: ../../content/developer/api/external_api.rst:841 -msgid "Inspection and introspection" -msgstr "" - -#: ../../content/developer/api/external_api.rst:843 -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:852 -msgid "``ir.model``" -msgstr "" - -#: ../../content/developer/api/external_api.rst:854 -msgid "Provides information about Odoo models via its various fields." -msgstr "" - -#: ../../content/developer/api/external_api.rst:856 -#: ../../content/developer/api/external_api.rst:992 -#: ../../content/developer/howtos/web.rst:1326 -#: ../../content/developer/reference/addons/actions.rst:19 -#: ../../content/developer/reference/addons/actions.rst:416 -#: ../../content/developer/reference/addons/data.rst:221 -#: ../../content/developer/reference/addons/views.rst:1487 -#: ../../content/developer/reference/addons/views.rst:1523 -#: ../../content/developer/reference/addons/views.rst:1607 -#: ../../content/developer/reference/addons/views.rst:1728 -#: ../../content/developer/reference/addons/views.rst:1901 -#: ../../content/developer/reference/addons/views.rst:2039 -msgid "``name``" -msgstr "" - -#: ../../content/developer/api/external_api.rst:857 -msgid "a human-readable description of the model" -msgstr "" - -#: ../../content/developer/api/external_api.rst:858 -#: ../../content/developer/reference/addons/views.rst:1855 -msgid "``model``" -msgstr "" - -#: ../../content/developer/api/external_api.rst:859 -msgid "the name of each model in the system" -msgstr "" - -#: ../../content/developer/api/external_api.rst:861 -#: ../../content/developer/api/external_api.rst:999 -#: ../../content/developer/reference/addons/actions.rst:231 -msgid "``state``" -msgstr "" - -#: ../../content/developer/api/external_api.rst:861 -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:864 -msgid "``field_id``" -msgstr "" - -#: ../../content/developer/api/external_api.rst:864 -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:867 -#: ../../content/developer/reference/addons/actions.rst:148 -msgid "``view_ids``" -msgstr "" - -#: ../../content/developer/api/external_api.rst:867 -msgid ":class:`~odoo.fields.One2many` to the :ref:`reference/views` defined for the model" -msgstr "" - -#: ../../content/developer/api/external_api.rst:871 -msgid "``access_ids``" -msgstr "" - -#: ../../content/developer/api/external_api.rst:870 -msgid ":class:`~odoo.fields.One2many` relation to the :ref:`reference/security/acl` set on the model" -msgstr "" - -#: ../../content/developer/api/external_api.rst:873 -msgid "``ir.model`` can be used to" -msgstr "" - -#: ../../content/developer/api/external_api.rst:875 -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:877 -msgid "Get information about a specific model (generally by listing the fields associated with it)." -msgstr "" - -#: ../../content/developer/api/external_api.rst:879 -msgid "Create new models dynamically over RPC." -msgstr "" - -#: ../../content/developer/api/external_api.rst:882 -msgid "Custom model names must start with ``x_``." -msgstr "" - -#: ../../content/developer/api/external_api.rst:883 -msgid "The ``state`` must be provided and set to ``manual``, otherwise the model will not be loaded." -msgstr "" - -#: ../../content/developer/api/external_api.rst:885 -msgid "It is not possible to add new *methods* to a custom model, only fields." -msgstr "" - -#: ../../content/developer/api/external_api.rst:889 -msgid "A custom model will initially contain only the \"built-in\" fields available on all models:" -msgstr "" - -#: ../../content/developer/api/external_api.rst:984 -msgid "``ir.model.fields``" -msgstr "" - -#: ../../content/developer/api/external_api.rst:986 -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:990 -#: ../../content/developer/reference/addons/actions.rst:229 -#: ../../content/developer/reference/addons/actions.rst:433 -msgid "``model_id``" -msgstr "" - -#: ../../content/developer/api/external_api.rst:990 -msgid ":class:`~odoo.fields.Many2one` to :ref:`reference/webservice/inspection/models` to which the field belongs" -msgstr "" - -#: ../../content/developer/api/external_api.rst:993 -msgid "the field's technical name (used in ``read`` or ``write``)" -msgstr "" - -#: ../../content/developer/api/external_api.rst:994 -msgid "``field_description``" -msgstr "" - -#: ../../content/developer/api/external_api.rst:995 -msgid "the field's user-readable label (e.g. ``string`` in ``fields_get``)" -msgstr "" - -#: ../../content/developer/api/external_api.rst:996 -msgid "``ttype``" -msgstr "" - -#: ../../content/developer/api/external_api.rst:997 -msgid "the :ref:`type ` of field to create" -msgstr "" - -#: ../../content/developer/api/external_api.rst:999 -msgid "whether the field was created via Python code (``base``) or via ``ir.model.fields`` (``manual``)" -msgstr "" - -#: ../../content/developer/api/external_api.rst:1001 -msgid "``required``, ``readonly``, ``translate``" -msgstr "" - -#: ../../content/developer/api/external_api.rst:1002 -msgid "enables the corresponding flag on the field" -msgstr "" - -#: ../../content/developer/api/external_api.rst:1004 -#: ../../content/developer/reference/addons/data.rst:226 -#: ../../content/developer/reference/addons/data.rst:250 -#: ../../content/developer/reference/addons/views.rst:878 -#: ../../content/developer/reference/addons/views.rst:1532 -#: ../../content/developer/reference/addons/views.rst:1933 -#: ../../content/developer/reference/addons/views.rst:2045 -#: ../../content/developer/reference/addons/views.rst:2109 -msgid "``groups``" -msgstr "" - -#: ../../content/developer/api/external_api.rst:1004 -msgid ":ref:`field-level access control `, a :class:`~odoo.fields.Many2many` to ``res.groups``" -msgstr "" - -#: ../../content/developer/api/external_api.rst:1008 -msgid "``selection``, ``size``, ``on_delete``, ``relation``, ``relation_field``, ``domain``" -msgstr "" - -#: ../../content/developer/api/external_api.rst:1007 -msgid "type-specific properties and customizations, see :ref:`the fields documentation ` for details" -msgstr "" - -#: ../../content/developer/api/external_api.rst:1011 -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:1013 -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 -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/addons/http.rst:78 -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/addons/actions.rst:219 -#: ../../content/developer/reference/addons/data.rst:70 -#: ../../content/developer/reference/addons/data.rst:155 -#: ../../content/developer/reference/addons/data.rst:232 -#: ../../content/developer/reference/addons/data.rst:242 -#: ../../content/developer/reference/addons/views.rst:849 -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 -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:184 -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:184 -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/addons/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/addons/views.rst:600 -#: ../../content/developer/reference/addons/views.rst:717 -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 -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/addons/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/javascript/javascript_reference.rst:18 -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:407 -#: ../../content/developer/api/iap.rst:409 -#: ../../content/developer/api/iap.rst:510 -#: ../../content/developer/howtos/company.rst:229 -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:96 -#: ../../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/addons/actions.rst:176 -#: ../../../odoo/odoo/api.py:docstring of odoo.api:3 -#: ../../content/developer/reference/addons/orm.rst:620 -#: ../../content/developer/reference/addons/orm.rst:622 -#: ../../content/developer/reference/addons/orm.rst:737 -#: ../../content/developer/reference/addons/orm.rst:894 -#: ../../content/developer/reference/addons/security.rst:28 -#: ../../content/developer/reference/addons/security.rst:186 -#: ../../content/developer/reference/addons/views.rst:13 -#: ../../content/developer/reference/addons/views.rst:70 -#: ../../content/developer/reference/addons/views.rst:81 -#: ../../content/developer/reference/addons/views.rst:179 -#: ../../content/developer/reference/addons/views.rst:241 -#: ../../content/developer/reference/addons/views.rst:857 -#: ../../content/developer/reference/addons/views.rst:981 -#: ../../content/developer/reference/addons/views.rst:983 -#: ../../content/developer/reference/addons/views.rst:1278 -#: ../../content/developer/reference/addons/views.rst:1367 -#: ../../content/developer/reference/addons/views.rst:1385 -#: ../../content/developer/reference/addons/views.rst:1514 -#: ../../content/developer/reference/addons/views.rst:2211 -#: ../../content/developer/reference/javascript/qweb.rst:342 -#: ../../content/developer/reference/javascript/qweb.rst:423 -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/javascript/javascript_reference.rst:1097 -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:449 -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:462 -msgid "`coalroller_service/controllers/main.py`" -msgstr "" - -#: ../../content/developer/api/iap.rst:407 -msgid "for the actual IAP will the \"portal\" page be on odoo.com or iap.odoo.com?" -msgstr "" - -#: ../../content/developer/api/iap.rst:409 -msgid "\"My Account\" > \"Your InApp Services\"?" -msgstr "" - -#: ../../content/developer/api/iap.rst:412 -msgid "The :class:`~odoo.addons.iap.tools.iap_tools.iap_charge` helper will:" -msgstr "" - -#: ../../content/developer/api/iap.rst:414 -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:417 -msgid "execute the body of the ``with`` statement" -msgstr "" - -#: ../../content/developer/api/iap.rst:418 -msgid "if the body of the ``with`` executes successfully, update the price of the transaction if needed" -msgstr "" - -#: ../../content/developer/api/iap.rst:420 -msgid "capture (confirm) the transaction" -msgstr "" - -#: ../../content/developer/api/iap.rst:421 -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:426 -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:431 -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:436 -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:441 -#: ../../content/developer/reference/addons/reports.rst:197 -msgid "``description``" -msgstr "" - -#: ../../content/developer/api/iap.rst:440 -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:447 -msgid "``credit_template``" -msgstr "" - -#: ../../content/developer/api/iap.rst:444 -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:487 -msgid "`coalroller_service/views/no-credit.xml`" -msgstr "" - -#: ../../content/developer/api/iap.rst:510 -msgid "how do you test your service?" -msgstr "" - -#: ../../content/developer/api/iap.rst:513 -msgid "JSON-RPC2_ Transaction API" -msgstr "" - -#: ../../content/developer/api/iap.rst:518 -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:520 -msgid "Calls use different *endpoints* but the same *method* on all endpoints (``call``)." -msgstr "" - -#: ../../content/developer/api/iap.rst:522 -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:525 -msgid "`iap.odoo.com documentation`_ for additional information." -msgstr "" - -#: ../../content/developer/api/iap.rst:528 -#: ../../content/developer/api/iap.rst:770 -msgid "Authorize" -msgstr "" - -#: ../../content/developer/api/iap.rst:532 -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:535 -msgid "Any amount currently on hold by a pending transaction is considered unavailable to further authorize calls." -msgstr "" - -#: ../../content/developer/api/iap.rst:538 -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.WebRequest:0 -#: ../../../odoo/odoo/http.py:docstring of odoo.http.WebRequest.csrf_token:0 -#: ../../../odoo/odoo/http.py:docstring of odoo.http.HttpRequest.make_response:0 -#: ../../../odoo/odoo/http.py:docstring of odoo.http.HttpRequest.render:0 -#: ../../../odoo/odoo/http.py:docstring of odoo.http.Response:0 -#: ../../content/developer/reference/addons/mixins.rst:0 -#: ../../content/developer/reference/addons/mixins.rst:0 -#: ../../content/developer/reference/addons/mixins.rst:0 -#: ../../content/developer/reference/addons/mixins.rst:0 -#: ../../content/developer/reference/addons/mixins.rst:0 -#: ../../content/developer/reference/addons/mixins.rst:0 -#: ../../content/developer/reference/addons/mixins.rst:0 -#: ../../content/developer/reference/addons/mixins.rst:0 -#: ../../content/developer/reference/addons/mixins.rst:0 -#: ../../content/developer/reference/addons/mixins.rst:0 -#: ../../content/developer/reference/addons/mixins.rst:0 -#: ../../content/developer/reference/addons/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.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.invalidate_cache: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.flush: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.fields_view_get: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/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/javascript/qweb.rst:0 -msgid "Parameters" -msgstr "" - -#: ../../content/developer/api/iap.rst:544 -msgid "optional, helps users identify the reason for charges on their account" -msgstr "" - -#: ../../content/developer/api/iap.rst:546 -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:0 -#: ../../../odoo/odoo/http.py:docstring of odoo.http.WebRequest.csrf_token:0 -#: ../../content/developer/reference/addons/mixins.rst:0 -#: ../../content/developer/reference/addons/mixins.rst:0 -#: ../../content/developer/reference/addons/mixins.rst:0 -#: ../../content/developer/reference/addons/mixins.rst:0 -#: ../../content/developer/reference/addons/mixins.rst:0 -#: ../../content/developer/reference/addons/mixins.rst:0 -#: ../../content/developer/reference/addons/mixins.rst:0 -#: ../../content/developer/reference/addons/mixins.rst:0 -#: ../../content/developer/reference/addons/mixins.rst:0 -#: ../../content/developer/reference/addons/mixins.rst:0 -#: ../../content/developer/reference/addons/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.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_view_get: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/javascript/javascript_reference.rst:0 -#: ../../content/developer/reference/javascript/javascript_reference.rst:0 -#: ../../content/developer/reference/javascript/javascript_reference.rst:0 -#: ../../content/developer/reference/javascript/mobile.rst:0 -#: ../../content/developer/reference/javascript/mobile.rst:0 -#: ../../content/developer/reference/javascript/qweb.rst:0 -msgid "Returns" -msgstr "" - -#: ../../content/developer/api/iap.rst:548 -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:549 -msgid ":class:`~odoo.exceptions.AccessError` if the service token is invalid" -msgstr "" - -#: ../../content/developer/api/iap.rst:550 -msgid ":class:`~odoo.addons.iap.models.iap.InsufficientCreditError` if the account does not have enough credits" -msgstr "" - -#: ../../content/developer/api/iap.rst:551 -msgid "``TypeError`` if the ``credit`` value is not an integer or a float" -msgstr "" - -#: ../../content/developer/api/iap.rst:573 -#: ../../content/developer/api/iap.rst:849 -msgid "Capture" -msgstr "" - -#: ../../content/developer/api/iap.rst:577 -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:580 -msgid "Capture calls are idempotent: performing capture calls on an already captured transaction has no further effect." -msgstr "" - -#: ../../content/developer/api/iap.rst:585 -msgid "optional parameter to capture a smaller amount of credits than authorized" -msgstr "" - -#: ../../content/developer/api/iap.rst:586 -#: ../../content/developer/api/iap.rst:618 -msgid ":class:`~odoo.exceptions.AccessError`" -msgstr "" - -#: ../../content/developer/api/iap.rst:606 -#: ../../content/developer/api/iap.rst:811 -msgid "Cancel" -msgstr "" - -#: ../../content/developer/api/iap.rst:610 -msgid "Cancels the specified transaction, releasing the hold on the user's credits." -msgstr "" - -#: ../../content/developer/api/iap.rst:613 -msgid "Cancel calls are idempotent: performing capture calls on an already cancelled transaction has no further effect." -msgstr "" - -#: ../../content/developer/api/iap.rst:636 -#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:127 -msgid "Types" -msgstr "" - -#: ../../content/developer/api/iap.rst:638 -msgid "Exceptions aside, these are *abstract types* used for clarity, you should not care how they are implemented." -msgstr "" - -#: ../../content/developer/api/iap.rst:643 -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:648 -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:651 -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:655 -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:661 -msgid "Identifier for a user account." -msgstr "" - -#: ../../content/developer/api/iap.rst:665 -msgid "Transaction identifier, returned by the authorization process and consumed by either capturing or cancelling the transaction." -msgstr "" - -#: ../../content/developer/api/iap.rst:670 -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:677 -msgid "Raised by:" -msgstr "" - -#: ../../content/developer/api/iap.rst:679 -msgid "any operation to which a service token is required, if the service token is invalid; or" -msgstr "" - -#: ../../content/developer/api/iap.rst:680 -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:685 -msgid "Raised by any unexpected behaviour at the discretion of the App developer (*you*)." -msgstr "" - -#: ../../content/developer/api/iap.rst:689 -msgid "Test the API" -msgstr "" - -#: ../../content/developer/api/iap.rst:691 -msgid "In order to test the developed app, we propose a sandbox platform that allows you to:" -msgstr "" - -#: ../../content/developer/api/iap.rst:693 -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:696 -msgid "Test the API." -msgstr "" - -#: ../../content/developer/api/iap.rst:698 -msgid "The latter consists in specific tokens that will work on **IAP-Sandbox only**." -msgstr "" - -#: ../../content/developer/api/iap.rst:700 -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:702 -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:704 -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:710 -msgid "Those tokens are only active on the IAP-Sanbox server." -msgstr "" - -#: ../../content/developer/api/iap.rst:711 -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:715 -msgid "Odoo Helpers" -msgstr "" - -#: ../../content/developer/api/iap.rst:717 -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:723 -msgid "Charging" -msgstr "" - -#: ../../content/developer/api/iap.rst:727 -msgid "A *context manager* for authorizing and automatically capturing or cancelling transactions for use in the backend/proxy." -msgstr "" - -#: ../../content/developer/api/iap.rst:730 -msgid "Works much like e.g. a cursor context manager:" -msgstr "" - -#: ../../content/developer/api/iap.rst:732 -msgid "immediately authorizes a transaction with the specified parameters;" -msgstr "" - -#: ../../content/developer/api/iap.rst:733 -msgid "executes the ``with`` body;" -msgstr "" - -#: ../../content/developer/api/iap.rst:734 -msgid "if the body executes in full without error, captures the transaction;" -msgstr "" - -#: ../../content/developer/api/iap.rst:735 -msgid "otherwise cancels it." -msgstr "" - -#: ../../content/developer/api/iap.rst:737 -#: ../../content/developer/api/iap.rst:776 -#: ../../content/developer/api/iap.rst:817 -#: ../../content/developer/api/iap.rst:855 -msgid "used to retrieve the ``iap.endpoint`` configuration key" -msgstr "" - -#: ../../content/developer/api/iap.rst:774 -msgid "Will authorize everything." -msgstr "" - -#: ../../content/developer/api/iap.rst:815 -msgid "Will cancel an authorized transaction." -msgstr "" - -#: ../../content/developer/api/iap.rst:853 -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 "Running the server" -msgstr "" - -#: ../../content/developer/cli.rst:48 -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:52 -msgid "For advanced database options, take a look :ref:`below `." -msgstr "" - -#: ../../content/developer/cli.rst:56 -msgid "comma-separated list of modules to install before running the server (requires :option:`-d`)." -msgstr "" - -#: ../../content/developer/cli.rst:61 -msgid "comma-separated list of modules to update before running the server (requires :option:`-d`)." -msgstr "" - -#: ../../content/developer/cli.rst:66 -msgid "comma-separated list of directories in which modules are stored. These directories are scanned for modules." -msgstr "" - -#: ../../content/developer/cli.rst:73 -msgid "provide an alternate :ref:`configuration file `" -msgstr "" - -#: ../../content/developer/cli.rst:77 -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:83 -msgid "disables demo data loading for modules installed comma-separated, use ``all`` for all modules." -msgstr "" - -#: ../../content/developer/cli.rst:88 -msgid "runs tests after module installation" -msgstr "" - -#: ../../content/developer/cli.rst:92 -msgid "Comma-separated list of specs to filter which tests to execute. Enable unit tests if set." -msgstr "" - -#: ../../content/developer/cli.rst:94 -msgid "Example: `--test-tags :TestClass.test_func,/test_module,external`" -msgstr "" - -#: ../../content/developer/cli.rst:96 -msgid "The `-` specifies if we want to include or exclude tests matching this spec." -msgstr "" - -#: ../../content/developer/cli.rst:97 -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:100 -msgid "`*` will match all tags." -msgstr "" - -#: ../../content/developer/cli.rst:101 -msgid "If tag is omitted on include mode, its value is `standard`." -msgstr "" - -#: ../../content/developer/cli.rst:102 -msgid "If tag is omitted on exclude mode, its value is `*`." -msgstr "" - -#: ../../content/developer/cli.rst:103 -msgid "The module, class, and method will respectively match the module name, test class name and test method name." -msgstr "" - -#: ../../content/developer/cli.rst:105 -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:113 -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:118 -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:125 -msgid "Database" -msgstr "" - -#: ../../content/developer/cli.rst:129 -msgid "database username, used to connect to PostgreSQL." -msgstr "" - -#: ../../content/developer/cli.rst:133 -msgid "database password, if using `password authentication`_." -msgstr "" - -#: ../../content/developer/cli.rst:137 -msgid "host for the database server" -msgstr "" - -#: ../../content/developer/cli.rst:139 -msgid "``localhost`` on Windows" -msgstr "" - -#: ../../content/developer/cli.rst:140 -msgid "UNIX socket otherwise" -msgstr "" - -#: ../../content/developer/cli.rst:144 -msgid "port the database listens on, defaults to 5432" -msgstr "" - -#: ../../content/developer/cli.rst:148 -msgid "hides databases that do not match ````. The filter is a `regular expression`_, with the additions that:" -msgstr "" - -#: ../../content/developer/cli.rst:151 -msgid "``%h`` is replaced by the whole hostname the request is made on." -msgstr "" - -#: ../../content/developer/cli.rst:152 -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:156 -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:160 -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:164 -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:172 -msgid "Restrict access to databases whose name starts with 11" -msgstr "" - -#: ../../content/developer/cli.rst:178 -msgid "Restrict access to only two databases, 11firstdatabase and 11seconddatabase" -msgstr "" - -#: ../../content/developer/cli.rst:184 -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:193 -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:200 -msgid "when creating new databases from the database-management screens, use the specified `template database`_. Defaults to ``template0``." -msgstr "" - -#: ../../content/developer/cli.rst:205 -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:211 -msgid "Suppresses the ability to list databases available on the system" -msgstr "" - -#: ../../content/developer/cli.rst:215 -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:223 -msgid "Emails" -msgstr "" - -#: ../../content/developer/cli.rst:227 -msgid "Email address used as when Odoo needs to send mails" -msgstr "" - -#: ../../content/developer/cli.rst:231 -msgid "Address of the SMTP server to connect to in order to send mails" -msgstr "" - -#: ../../content/developer/cli.rst:237 -msgid "If set, odoo should use SSL/STARTSSL SMTP connections" -msgstr "" - -#: ../../content/developer/cli.rst:241 -msgid "Username to connect to the SMTP server" -msgstr "" - -#: ../../content/developer/cli.rst:245 -msgid "Password to connect to the SMTP server" -msgstr "" - -#: ../../content/developer/cli.rst:250 -msgid "Internationalisation" -msgstr "" - -#: ../../content/developer/cli.rst:252 -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:258 -msgid "specifies the languages (separated by commas) for the translations you want to be loaded" -msgstr "" - -#: ../../content/developer/cli.rst:263 -msgid "specify the language of the translation file. Use it with --i18n-export or --i18n-import" -msgstr "" - -#: ../../content/developer/cli.rst:268 -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:273 -msgid "import a CSV or a PO file with translations and exit. The '-l' option is required." -msgstr "" - -#: ../../content/developer/cli.rst:278 -msgid "overwrites existing translation terms on updating a module or importing a CSV or a PO file." -msgstr "" - -#: ../../content/developer/cli.rst:283 -msgid "specify modules to export. Use in combination with --i18n-export" -msgstr "" - -#: ../../content/developer/cli.rst:288 -msgid "Advanced Options" -msgstr "" - -#: ../../content/developer/cli.rst:293 -msgid "Developer features" -msgstr "" - -#: ../../content/developer/cli.rst:297 -msgid "``all``: all the features below are activated" -msgstr "" - -#: ../../content/developer/cli.rst:299 -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/cli.rst:303 -msgid "``reload``: restart server when python file are updated (may not be detected depending on the text editor used)" -msgstr "" - -#: ../../content/developer/cli.rst:306 -msgid "``qweb``: break in the evaluation of qweb template when a node contains ``t-debug='debugger'``" -msgstr "" - -#: ../../content/developer/cli.rst:308 -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:315 -msgid "HTTP" -msgstr "" - -#: ../../content/developer/cli.rst:319 -msgid "do not start the HTTP or long-polling workers (may still start :ref:`cron ` workers)" -msgstr "" - -#: ../../content/developer/cli.rst:322 -msgid "has no effect if :option:`--test-enable` is set, as tests require an accessible HTTP server" -msgstr "" - -#: ../../content/developer/cli.rst:327 -msgid "TCP/IP address on which the HTTP server listens, defaults to ``0.0.0.0`` (all addresses)" -msgstr "" - -#: ../../content/developer/cli.rst:332 -msgid "Port on which the HTTP server listens, defaults to 8069." -msgstr "" - -#: ../../content/developer/cli.rst:336 -msgid "TCP port for long-polling connections in multiprocessing or gevent mode, defaults to 8072. Not used in default (threaded) mode." -msgstr "" - -#: ../../content/developer/cli.rst:341 -msgid "enables the use of ``X-Forwarded-*`` headers through `Werkzeug's proxy support`_." -msgstr "" - -#: ../../content/developer/cli.rst:344 -msgid "proxy mode *must not* be enabled outside of a reverse proxy scenario" -msgstr "" - -#: ../../content/developer/cli.rst:350 -msgid "Logging" -msgstr "" - -#: ../../content/developer/cli.rst:352 -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:359 -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:366 -msgid "logs to the system's event logger: `syslog on unices `_ and `the Event Log on Windows `_." -msgstr "" - -#: ../../content/developer/cli.rst:369 -msgid "Neither is configurable" -msgstr "" - -#: ../../content/developer/cli.rst:373 -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:379 -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:383 -msgid "The colon ``:`` is mandatory" -msgstr "" - -#: ../../content/developer/cli.rst:384 -msgid "The logger can be omitted to configure the root (default) handler" -msgstr "" - -#: ../../content/developer/cli.rst:385 -msgid "If the level is omitted, the logger is set to ``INFO``" -msgstr "" - -#: ../../content/developer/cli.rst:387 -msgid "The option can be repeated to configure multiple loggers e.g." -msgstr "" - -#: ../../content/developer/cli.rst:395 -msgid "enable DEBUG logging for RPC requests, equivalent to ``--log-handler=odoo.http.rpc.request:DEBUG``" -msgstr "" - -#: ../../content/developer/cli.rst:400 -msgid "enable DEBUG logging for RPC responses, equivalent to ``--log-handler=odoo.http.rpc.response:DEBUG``" -msgstr "" - -#: ../../content/developer/cli.rst:405 -msgid "enables DEBUG logging of HTTP requests and responses, equivalent to ``--log-handler=odoo.http:DEBUG``" -msgstr "" - -#: ../../content/developer/cli.rst:410 -msgid "enables DEBUG logging of SQL querying, equivalent to ``--log-handler=odoo.sql_db:DEBUG``" -msgstr "" - -#: ../../content/developer/cli.rst:415 -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:420 -msgid "Odoo also provides debugging pseudo-levels which apply to different sets of loggers:" -msgstr "" - -#: ../../content/developer/cli.rst:425 -msgid "``debug_sql``" -msgstr "" - -#: ../../content/developer/cli.rst:424 -msgid "sets the SQL logger to ``debug``" -msgstr "" - -#: ../../content/developer/cli.rst:426 -msgid "equivalent to ``--log-sql``" -msgstr "" - -#: ../../content/developer/cli.rst:429 -msgid "``debug_rpc``" -msgstr "" - -#: ../../content/developer/cli.rst:428 -msgid "sets the ``odoo`` and HTTP request loggers to ``debug``" -msgstr "" - -#: ../../content/developer/cli.rst:430 -msgid "equivalent to ``--log-level debug --log-request``" -msgstr "" - -#: ../../content/developer/cli.rst:435 -msgid "``debug_rpc_answer``" -msgstr "" - -#: ../../content/developer/cli.rst:432 -msgid "sets the ``odoo`` and HTTP request and response loggers to ``debug``" -msgstr "" - -#: ../../content/developer/cli.rst:435 -msgid "equivalent to ``--log-level debug --log-request --log-response``" -msgstr "" - -#: ../../content/developer/cli.rst:439 -msgid "In case of conflict between :option:`--log-level` and :option:`--log-handler`, the latter is used" -msgstr "" - -#: ../../content/developer/cli.rst:445 -msgid "Multiprocessing" -msgstr "" - -#: ../../content/developer/cli.rst:449 -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:453 -msgid "multiprocessing mode is only available on Unix-based systems" -msgstr "" - -#: ../../content/developer/cli.rst:455 -msgid "A number of options allow limiting and recycling workers:" -msgstr "" - -#: ../../content/developer/cli.rst:459 -msgid "Number of requests a worker will process before being recycled and restarted." -msgstr "" - -#: ../../content/developer/cli.rst:462 -msgid "Defaults to *8196*." -msgstr "" - -#: ../../content/developer/cli.rst:466 -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:469 -msgid "Defaults to *2048MiB*." -msgstr "" - -#: ../../content/developer/cli.rst:473 -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:477 -msgid "Defaults to *2560MiB*." -msgstr "" - -#: ../../content/developer/cli.rst:481 -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:484 -msgid "Defaults to *60*." -msgstr "" - -#: ../../content/developer/cli.rst:488 -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:491 -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:494 -msgid "Defaults to *120*." -msgstr "" - -#: ../../content/developer/cli.rst:498 -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:501 -msgid "For multi-processing mode, this is in addition to the HTTP worker processes." -msgstr "" - -#: ../../content/developer/cli.rst:506 -msgid "Configuration file" -msgstr "" - -#: ../../content/developer/cli.rst:510 -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:515 -msgid "Some conversions don't match the pattern:" -msgstr "" - -#: ../../content/developer/cli.rst:517 -msgid ":option:`--db-filter` becomes ``dbfilter``" -msgstr "" - -#: ../../content/developer/cli.rst:518 -msgid ":option:`--no-http` corresponds to the ``http_enable`` boolean" -msgstr "" - -#: ../../content/developer/cli.rst:519 -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:522 -msgid ":option:`--smtp` is stored as ``smtp_server``" -msgstr "" - -#: ../../content/developer/cli.rst:523 -msgid ":option:`--database` is stored as ``db_name``" -msgstr "" - -#: ../../content/developer/cli.rst:524 -msgid ":option:`--i18n-import` and :option:`--i18n-export` aren't available at all from configuration files" -msgstr "" - -#: ../../content/developer/cli.rst:527 -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:533 -msgid "Here is a sample file:" -msgstr "" - -#: ../../content/developer/cli.rst:558 -msgid "Shell" -msgstr "" - -#: ../../content/developer/cli.rst:560 -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:570 -msgid "Specify a preferred REPL to use in shell mode." -msgstr "" - -#: ../../content/developer/cli.rst:576 -msgid "Scaffolding" -msgstr "" - -#: ../../content/developer/cli.rst:580 -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:585 -msgid "Scaffolding is available via the :command:`odoo-bin scaffold` subcommand." -msgstr "" - -#: ../../content/developer/cli.rst:593 -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:598 -msgid "directory in which to create the new module, defaults to the current directory" -msgstr "" - -#: ../../content/developer/cli.rst:603 -msgid "a template directory, files are passed through jinja2_ then copied to the ``destination`` directory" -msgstr "" - -#: ../../content/developer/cli.rst:607 -msgid "This will create module *my_module* in directory */addons/*." -msgstr "" - -#: ../../content/developer/cli.rst:612 -msgid "Database Population" -msgstr "" - -#: ../../content/developer/cli.rst:616 -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:626 -msgid "list of models for which the database should be filled" -msgstr "" - -#: ../../content/developer/cli.rst:630 -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:636 -msgid ":ref:`reference/testing/populate`" -msgstr "" - -#: ../../content/developer/cli.rst:641 -msgid "Cloc" -msgstr "" - -#: ../../content/developer/cli.rst:645 -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/cli.rst:650 -msgid "Command-line options" -msgstr "" - -#: ../../content/developer/cli.rst:655 -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:657 -msgid "The :option:`--addons-path` option is required to specify the path(s) to the module folder(s)." -msgstr "" - -#: ../../content/developer/cli.rst:660 -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:667 -msgid ":ref:`reference/cmdline/cloc/database-option`" -msgstr "" - -#: ../../content/developer/cli.rst:672 -msgid "Process the files in the provided path." -msgstr "" - -#: ../../content/developer/cli.rst:675 -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:682 -msgid "Multiple paths can be provided by repeating the option." -msgstr "" - -#: ../../content/developer/cli.rst:689 -msgid ":ref:`reference/cmdline/cloc/path-option`" -msgstr "" - -#: ../../content/developer/cli.rst:695 -msgid "Comma-separated list of directories in which modules are stored. These directories are scanned for modules." -msgstr "" - -#: ../../content/developer/cli.rst:696 -msgid "Required if the :option:`--database` option is used." -msgstr "" - -#: ../../content/developer/cli.rst:701 -msgid "Specify a configuration file to use in place of the :option:`--addons-path` option." -msgstr "" - -#: ../../content/developer/cli.rst:710 -msgid "Show the details of lines counted for each file." -msgstr "" - -#: ../../content/developer/cli.rst:714 -msgid "Processed files" -msgstr "" - -#: ../../content/developer/cli.rst:719 -msgid "With the :option:`--database` option" -msgstr "" - -#: ../../content/developer/cli.rst:721 -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/cli.rst:726 -msgid "Some files are excluded from the count by default:" -msgstr "" - -#: ../../content/developer/cli.rst:728 -msgid "The manifest (:file:`__manifest__.py` or :file:`__openerp__.py`)" -msgstr "" - -#: ../../content/developer/cli.rst:729 -msgid "The contents of the folder :file:`static/lib`" -msgstr "" - -#: ../../content/developer/cli.rst:730 -msgid "The tests defined in the folder :file:`tests` and :file:`static/tests`" -msgstr "" - -#: ../../content/developer/cli.rst:731 -msgid "The migrations scripts defined in the folder :file:`migrations`" -msgstr "" - -#: ../../content/developer/cli.rst:732 -msgid "The XML files declared in the ``demo`` or ``demo_xml`` sections of the manifest" -msgstr "" - -#: ../../content/developer/cli.rst:734 -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:746 -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:748 -msgid "For more information about the pattern syntax, see `glob `_." -msgstr "" - -#: ../../content/developer/cli.rst:755 -msgid "With the :option:`--path` option" -msgstr "" - -#: ../../content/developer/cli.rst:757 -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:763 -msgid "Identifying Extra Modules" -msgstr "" - -#: ../../content/developer/cli.rst:765 -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:772 -msgid "Error Handling" -msgstr "" - -#: ../../content/developer/cli.rst:774 -msgid "Some file cannot be counted by Odoo Cloc. Those file are reported at the end of the output." -msgstr "" - -#: ../../content/developer/cli.rst:778 -msgid "Max file size exceeded" -msgstr "" - -#: ../../content/developer/cli.rst:780 -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:783 -msgid "A generated XML file that contains lots of data. It should be excluded in the manifest." -msgstr "" - -#: ../../content/developer/cli.rst:784 -msgid "A JavaScript library that should be placed in the :file:`static/lib` folder." -msgstr "" - -#: ../../content/developer/cli.rst:787 -msgid "Syntax Error" -msgstr "" - -#: ../../content/developer/cli.rst:789 -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/glossary.rst:5 -msgid "Glossary" -msgstr "" - -#: ../../content/developer/glossary.rst:8 -msgid "external id" -msgstr "" - -#: ../../content/developer/glossary.rst:9 -msgid "external identifier" -msgstr "" - -#: ../../content/developer/glossary.rst:10 -msgid "external identifiers" -msgstr "" - -#: ../../content/developer/glossary.rst:12 -msgid "string identifier stored in ``ir.model.data``, can be used to refer to a record regardless of its database identifier during data imports or export/import roundtrips." -msgstr "" - -#: ../../content/developer/glossary.rst:16 -msgid "External identifiers are in the form :samp:`{module}.{id}` (e.g. ``account.invoice_graph``). From within a module, the :samp:`{module}.` prefix can be left out." -msgstr "" - -#: ../../content/developer/glossary.rst:20 -msgid "Sometimes referred to as \"xml id\" or ``xml_id`` as XML-based :ref:`reference/data` make extensive use of them." -msgstr "" - -#: ../../content/developer/glossary.rst:22 -msgid "format string" -msgstr "" - -#: ../../content/developer/glossary.rst:24 -msgid "inspired by `jinja variables`_, format strings allow more easily mixing literal content and computed content (expressions): content between ``{{`` and ``}}`` is interpreted as an expression and evaluated, other content is interpreted as literal strings and displayed as-is" -msgstr "" - -#: ../../content/developer/glossary.rst:29 -msgid "GIS" -msgstr "" - -#: ../../content/developer/glossary.rst:30 -msgid "Geographic Information System" -msgstr "" - -#: ../../content/developer/glossary.rst:32 -msgid "any computer system or subsystem to capture, store, manipulate, analyze, manage or present spatial and geographical data." -msgstr "" - -#: ../../content/developer/glossary.rst:34 -msgid "minified" -msgstr "" - -#: ../../content/developer/glossary.rst:35 -msgid "minification" -msgstr "" - -#: ../../content/developer/glossary.rst:37 -msgid "process of removing extraneous/non-necessary sections of files (comments, whitespace) and possibly recompiling them using equivalent but shorter structures (`ternary operator`_ instead of ``if/else``) in order to reduce network traffic" -msgstr "" - -#: ../../content/developer/howtos.rst:5 -msgid "Tutorials" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:7 -msgid "Building a Module" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:11 -msgid "This tutorial requires :ref:`having installed Odoo `" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:14 -msgid "Start/Stop the Odoo server" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:16 -msgid "Odoo uses a client/server architecture in which clients are web browsers accessing the Odoo server via RPC." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:19 -msgid "Business logic and extension is generally performed on the server side, although supporting client features (e.g. new data representation such as interactive maps) can be added to the client." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:23 -msgid "In order to start the server, simply invoke the command :ref:`odoo-bin ` in the shell, adding the full path to the file if necessary:" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:31 -msgid "The server is stopped by hitting ``Ctrl-C`` twice from the terminal, or by killing the corresponding OS process." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:35 -msgid "Build an Odoo module" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:37 -msgid "Both server and client extensions are packaged as *modules* which are optionally loaded in a *database*." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:40 -msgid "Odoo modules can either add brand new business logic to an Odoo system, or alter and extend existing business logic: a module can be created to add your country's accounting rules to Odoo's generic accounting support, while the next module adds support for real-time visualisation of a bus fleet." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:45 -msgid "Everything in Odoo thus starts and ends with modules." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:48 -#: ../../content/developer/howtos/rdtraining/01_architecture.rst:52 -msgid "Composition of a module" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:50 -msgid "An Odoo module can contain a number of elements:" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:54 -msgid "Business objects" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:53 -msgid "Declared as Python classes, these resources are automatically persisted by Odoo based on their configuration" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:57 -#: ../../content/developer/howtos/rdtraining/01_architecture.rst:62 -msgid ":ref:`Object views `" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:57 -msgid "Definition of business objects UI display" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:65 -#: ../../content/developer/howtos/rdtraining/01_architecture.rst:70 -msgid ":ref:`Data files `" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:60 -msgid "XML or CSV files declaring the model metadata :" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:62 -#: ../../content/developer/howtos/rdtraining/01_architecture.rst:67 -msgid ":ref:`views ` or :ref:`reports `," -msgstr "" - -#: ../../content/developer/howtos/backend.rst:63 -#: ../../content/developer/howtos/rdtraining/01_architecture.rst:68 -msgid "configuration data (modules parametrization, :ref:`security rules `)," -msgstr "" - -#: ../../content/developer/howtos/backend.rst:64 -#: ../../content/developer/howtos/rdtraining/01_architecture.rst:69 -msgid "demonstration data" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:65 -#: ../../content/developer/howtos/rdtraining/01_architecture.rst:70 -msgid "and more" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:68 -#: ../../content/developer/howtos/rdtraining/01_architecture.rst:73 -msgid ":ref:`Web controllers `" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:68 -#: ../../content/developer/howtos/rdtraining/01_architecture.rst:73 -msgid "Handle requests from web browsers" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:71 -#: ../../content/developer/howtos/rdtraining/01_architecture.rst:76 -msgid "Static web data" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:71 -msgid "Images, CSS or javascript files used by the web interface or website" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:74 -#: ../../content/developer/howtos/rdtraining/01_architecture.rst:85 -msgid "Module structure" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:76 -#: ../../content/developer/howtos/rdtraining/01_architecture.rst:87 -msgid "Each module is a directory within a *module directory*. Module directories are specified by using the :option:`--addons-path ` option." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:83 -msgid "most command-line options can also be set using :ref:`a configuration file `" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:86 -#: ../../content/developer/howtos/rdtraining/01_architecture.rst:91 -msgid "An Odoo module is declared by its :ref:`manifest `." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:88 -msgid "A module is also a `Python package `_ with a ``__init__.py`` file, containing import instructions for various Python files in the module." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:93 -msgid "For instance, if the module has a single ``mymodule.py`` file ``__init__.py`` might contain::" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:98 -msgid "Odoo provides a mechanism to help set up a new module, :ref:`odoo-bin ` has a subcommand :ref:`scaffold ` to create an empty module:" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:106 -msgid "The command creates a subdirectory for your module, and automatically creates a bunch of standard files for a module. Most of them simply contain commented code or XML. The usage of most of those files will be explained along this tutorial." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:110 -msgid "Module creation" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:112 -msgid "Use the command line above to create an empty module Open Academy, and install it in Odoo." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:116 -#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:17 -msgid "Object-Relational Mapping" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:118 -msgid "A key component of Odoo is the :abbr:`ORM (Object-Relational Mapping)` layer. This layer avoids having to write most :abbr:`SQL (Structured Query Language)` by hand and provides extensibility and security services\\ [#rawsql]_." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:122 -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/backend.rst:126 -msgid "Models can be configured by setting a number of attributes at 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 minimally complete definition of a model::" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:137 -#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:107 -msgid "Model fields" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:139 -msgid "Fields are used to define what the model can store and where. Fields are defined as attributes on the model class::" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:150 -#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:212 -msgid "Common Attributes" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:152 -msgid "Much like the model itself, its fields can be configured, by passing configuration attributes as parameters::" -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 "" - -#: ../../content/developer/howtos/backend.rst:159 -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 "" - -#: ../../content/developer/howtos/backend.rst:162 -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/backend.rst:164 -msgid ":attr:`~odoo.fields.Field.help` (``unicode``, default: ``''``)" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:165 -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 "" - -#: ../../content/developer/howtos/backend.rst:170 -msgid "Simple fields" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:172 -msgid "There are two broad categories of fields: \"simple\" fields which are atomic values stored directly in the model's table and \"relational\" fields linking records (of the same model or of different models)." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:176 -msgid "Example of simple fields are :class:`~odoo.fields.Boolean`, :class:`~odoo.fields.Date`, :class:`~odoo.fields.Char`." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:180 -msgid "Reserved fields" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:182 -msgid "Odoo creates a few fields in all models\\ [#autofields]_. These fields are managed by the system and shouldn't be written to. They can be read if useful or necessary:" -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 "" - -#: ../../content/developer/howtos/backend.rst:187 -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 "" - -#: ../../content/developer/howtos/backend.rst:195 -msgid "user who last modified the record." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:198 -msgid "Special fields" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:200 -msgid "By default, Odoo also requires a ``name`` field on all models for various display and search behaviors. The field used for these purposes can be overridden by setting :attr:`~odoo.models.Model._rec_name`." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:204 -msgid "Define a model" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:206 -msgid "Define a new data model *Course* in the *openacademy* module. A course has a title and a description. Courses must have a title." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:210 -msgid "Data files" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:212 -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." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:215 -msgid "some modules exist solely to add data into Odoo" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:218 -msgid "Module data is declared via :ref:`data files `, XML files with ```` elements. Each ```` element creates or updates a database record." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:232 -msgid "``model`` is the name of the Odoo model for the record." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:233 -msgid "``id`` is an :term:`external identifier`, it allows referring to the record (without having to know its in-database identifier)." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:235 -msgid "```` elements have a ``name`` which is the name of the field in the model (e.g. ``description``). Their body is the field's value." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:238 -msgid "Data files have to be declared in the manifest file to be loaded, they can be declared in the ``'data'`` list (always loaded) or in the ``'demo'`` list (only loaded in demonstration mode)." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:242 -msgid "Define demonstration data" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:244 -msgid "Create demonstration data filling the *Courses* model with a few demonstration courses." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:247 -msgid "The content of the data files is only loaded when a module is installed or updated." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:250 -msgid "After making some changes, do not forget to use :ref:`odoo-bin -u openacademy ` to save the changes to your database." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:257 -msgid "Actions and Menus" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:259 -msgid "Actions and menus are regular records in database, usually declared through data files. Actions can be triggered in three ways:" -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 "" - -#: ../../content/developer/howtos/backend.rst:266 -msgid "Because menus are somewhat complex to declare there is a ```` shortcut to declare an ``ir.ui.menu`` and connect it to the corresponding action more easily." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:283 -msgid "The action must be declared before its corresponding menu in the XML file." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:285 -msgid "Data files are executed sequentially, the action's ``id`` must be present in the database before the menu can be created." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:288 -msgid "Define new menu entries" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:290 -msgid "Define new menu entries to access courses under the OpenAcademy menu entry. A user should be able to :" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:293 -msgid "display a list of all the courses" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:294 -msgid "create/modify courses" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:297 -msgid "Basic views" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:299 -msgid "Views define the way the records of a model are displayed. Each type of view represents a mode of visualization (a list of records, a graph of their aggregation, …). Views can either be requested generically via their type (e.g. *a list of partners*) or specifically via their id. For generic requests, the view with the correct type and the lowest priority will be used (so the lowest-priority view of each type is the default view for that type)." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:307 -msgid ":ref:`View inheritance ` allows altering views declared elsewhere (adding or removing content)." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:311 -msgid "Generic view declaration" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:313 -msgid "A view is declared as a record of the model ``ir.ui.view``. The view type is implied by the root element of the ``arch`` field:" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:327 -msgid "The view's content is XML." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:330 -msgid "The ``arch`` field must thus be declared as ``type=\"xml\"`` to be parsed correctly." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:334 -#: ../../content/developer/howtos/backend.rst:855 -msgid "Tree views" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:336 -msgid "Tree views, also called list views, display records in a tabular form." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:338 -msgid "Their root element is ````. The simplest form of the tree view simply lists all the fields to display in the table (each field as a column):" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:351 -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 "" - -#: ../../content/developer/howtos/backend.rst:356 -msgid "Their root element is ``
``. They are composed of high-level structure elements (groups, notebooks) and interactive elements (buttons and fields):" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:385 -msgid "Customise form view using XML" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:387 -msgid "Create your own form view for the Course object. Data displayed should be: the name and the description of the course." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:390 -msgid "Notebooks" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:392 -msgid "In the Course form view, put the description field under a tab, such that it will be easier to add other tabs later, containing additional information." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:396 -msgid "Form views can also use plain HTML for more flexible layouts:" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:423 -#: ../../content/developer/howtos/backend.rst:928 -#: ../../content/developer/howtos/backend.rst:970 -msgid "Search views" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:425 -msgid "Search views customize the search field associated with the list view (and other aggregated views). Their root element is ```` and they're composed of fields defining which fields can be searched on:" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:436 -msgid "If no search view exists for the model, Odoo generates one which only allows searching on the ``name`` field." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:439 -msgid "Search courses" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:441 -msgid "Allow searching for courses based on their title or their description." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:444 -#: ../../content/developer/howtos/website.rst:644 -msgid "Relations between models" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:446 -msgid "A record from a model may be related to a record from another model. For instance, a sale order record is related to a client record that contains the client data; it is also related to its sale order line records." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:450 -msgid "Create a session model" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:452 -msgid "For the module Open Academy, we consider a model for *sessions*: a session is an occurrence of a course taught at a given time for a given audience." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:455 -msgid "Create a model for *sessions*. A session has a name, a start date, a duration and a number of seats. Add an action and a menu item to display them. Make the new model visible via a menu item." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:460 -#: ../../content/developer/reference/javascript/javascript_reference.rst:2054 -msgid "Relational fields" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:462 -msgid "Relational fields link records, either of the same model (hierarchies) or between different models." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:465 -msgid "Relational field types are:" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:472 -msgid ":class:`Many2one(other_model, ondelete='set null') `" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:468 -msgid "A simple link to an other object::" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:472 -msgid "`foreign keys `_" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:486 -msgid ":class:`One2many(other_model, related_field) `" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:475 -msgid "A virtual relationship, inverse of a :class:`~odoo.fields.Many2one`. A :class:`~odoo.fields.One2many` behaves as a container of records, accessing it results in a (possibly empty) set of records::" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:484 -msgid "Because a :class:`~odoo.fields.One2many` is a virtual relationship, there *must* be a :class:`~odoo.fields.Many2one` field in the :samp:`{other_model}`, and its name *must* be :samp:`{related_field}`" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:494 -msgid ":class:`Many2many(other_model) `" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:489 -msgid "Bidirectional multiple relationship, any record on one side can be related to any number of records on the other side. Behaves as a container of records, accessing it also results in a possibly empty set of records::" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:496 -msgid "Many2one relations" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:498 -msgid "Using a many2one, modify the *Course* and *Session* models to reflect their relation with other models:" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:501 -msgid "A course has a *responsible* user; the value of that field is a record of the built-in model ``res.users``." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:503 -msgid "A session has an *instructor*; the value of that field is a record of the built-in model ``res.partner``." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:505 -msgid "A session is related to a *course*; the value of that field is a record of the model ``openacademy.course`` and is required." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:507 -msgid "Adapt the views." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:509 -msgid "Inverse one2many relations" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:511 -msgid "Using the inverse relational field one2many, modify the models to reflect the relation between courses and sessions." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:514 -msgid "Multiple many2many relations" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:516 -msgid "Using the relational field many2many, modify the *Session* model to relate every session to a set of *attendees*. Attendees will be represented by partner records, so we will relate to the built-in model ``res.partner``. Adapt the views accordingly." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:522 -#: ../../content/developer/reference/addons/views.rst:184 -#: ../../content/developer/reference/javascript/javascript_reference.rst:412 -msgid "Inheritance" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:525 -msgid "Model inheritance" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:527 -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:108 -msgid "Odoo provides two *inheritance* mechanisms to extend an existing model in a modular way." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:530 -msgid "The first inheritance mechanism allows a module to modify the behavior of a model defined in another module:" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:533 -msgid "add fields to a model," -msgstr "" - -#: ../../content/developer/howtos/backend.rst:534 -msgid "override the definition of fields on a model," -msgstr "" - -#: ../../content/developer/howtos/backend.rst:535 -msgid "add constraints to a model," -msgstr "" - -#: ../../content/developer/howtos/backend.rst:536 -msgid "add methods to a model," -msgstr "" - -#: ../../content/developer/howtos/backend.rst:537 -msgid "override existing methods on a model." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:539 -msgid "The second inheritance mechanism (delegation) allows to link every record of a model to a record in a parent model, and provides transparent access to the fields of the parent record." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:548 -msgid ":attr:`~odoo.models.Model._inherit`" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:549 -msgid ":attr:`~odoo.models.Model._inherits`" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:552 -msgid "View inheritance" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:554 -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, and can add or remove content from their parent." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:558 -msgid "An extension view references its parent using the ``inherit_id`` field, and instead of a single view its ``arch`` field is composed of any number of ``xpath`` elements selecting and altering the content of their parent view:" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:579 -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:197 -msgid "``expr``" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:579 -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:197 -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:213 -msgid "``position``" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:582 -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:200 -msgid "Operation to apply to the matched element:" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:584 -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:202 -msgid "``inside``" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:585 -msgid "appends ``xpath``'s body at the end of the matched element" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:587 -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:205 -#: ../../content/developer/reference/addons/views.rst:284 -#: ../../content/developer/reference/javascript/qweb.rst:530 -msgid "``replace``" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:587 -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:205 -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/howtos/rdtraining/13_inheritance.rst:207 -#: ../../content/developer/reference/addons/views.rst:290 -#: ../../content/developer/reference/javascript/qweb.rst:524 -msgid "``before``" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:590 -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:208 -msgid "inserts the ``xpath``'s body as a sibling before the matched element" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:591 -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:209 -#: ../../content/developer/reference/addons/views.rst:287 -#: ../../content/developer/reference/javascript/qweb.rst:526 -msgid "``after``" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:592 -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:210 -msgid "inserts the ``xpaths``'s body as a sibling after the matched element" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:595 -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:213 -#: ../../content/developer/reference/addons/views.rst:310 -#: ../../content/developer/reference/javascript/qweb.rst:535 -msgid "``attributes``" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:594 -msgid "alters the attributes of the matched element using special ``attribute`` elements in the ``xpath``'s body" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:599 -msgid "When matching a single element, the ``position`` attribute can be set directly on the element to be found. Both inheritances below will give the same result." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:613 -msgid "Alter existing content" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:615 -msgid "Using model inheritance, modify the existing *Partner* model to add an ``instructor`` boolean field, and a many2many field that corresponds to the session-partner relation" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:618 -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 -msgid "Domains" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:623 -msgid "In Odoo, :ref:`reference/orm/domains` are values that encode conditions on records. A domain is a list of criteria used to select a subset of a model's records. Each criteria is a triple with a field name, an operator and a value." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:627 -msgid "For instance, when used on the *Product* model the following domain selects all *services* with a unit price over *1000*::" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:632 -msgid "By default criteria are combined with an implicit AND. 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/backend.rst:644 -msgid "A ``domain`` parameter can be added to relational fields to limit valid records for the relation when trying to select records in the client interface." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:647 -msgid "Domains on relational fields" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:649 -msgid "When selecting the instructor for a *Session*, only instructors (partners with ``instructor`` set to ``True``) should be visible." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:652 -msgid "More complex domains" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:654 -msgid "Create new partner categories *Teacher / Level 1* and *Teacher / Level 2*. The instructor for a session can be either an instructor or a teacher (of any level)." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:659 -msgid "Computed fields and default values" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:661 -msgid "So far fields have been stored directly in and retrieved directly from the database. Fields can also be *computed*. In that 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/backend.rst:666 -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 simply set the value of the field to compute on every record in ``self``." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:671 -msgid "``self`` is a collection" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:674 -msgid "The object ``self`` is a *recordset*, i.e., an ordered collection of records. It supports the standard Python operations on collections, like ``len(self)`` and ``iter(self)``, plus extra set operations like ``recs1 + recs2``." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:679 -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, like ``record.name``." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:699 -#: ../../content/developer/howtos/rdtraining/09_compute_onchange.rst:59 -msgid "Dependencies" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:701 -msgid "The value of a computed field usually depends on the values of other fields on 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/backend.rst:720 -msgid "Computed fields" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:722 -msgid "Add the percentage of taken seats to the *Session* model" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:723 -msgid "Display that field in the tree and form views" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:724 -msgid "Display the field as a progress bar" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:727 -msgid "Default values" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:729 -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 recordset and returning a value::" -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 "" - -#: ../../content/developer/howtos/backend.rst:749 -msgid "Active objects – Default values" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:751 -msgid "Define the start_date default value as today (see :class:`~odoo.fields.Date`)." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:753 -msgid "Add a field ``active`` in the class Session, and set sessions as active by default." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:757 -msgid "Onchange" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:759 -msgid "The \"onchange\" mechanism provides a way for the client interface to update a form whenever the user has filled in a value in a field, without saving anything to the database." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:763 -msgid "For instance, suppose a model has three fields ``amount``, ``unit_price`` and ``price``, and you want to update the price on the form when any of the other fields is modified. To achieve this, define a method where ``self`` represents the record in the form view, and decorate it with :func:`~odoo.api.onchange` to specify on which field it has to be triggered. Any change you make on ``self`` will be reflected on the form." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:792 -msgid "For computed fields, valued ``onchange`` behavior is built-in as can be seen by playing with the *Session* form: change the number of seats or participants, and the ``taken_seats`` progressbar is automatically updated." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:796 -msgid "Warning" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:798 -msgid "Add an explicit onchange to warn about invalid values, like a negative number of seats, or more participants than seats." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:802 -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 "" - -#: ../../content/developer/howtos/backend.rst:808 -msgid "A Python constraint is defined as a method decorated with :func:`~odoo.api.constrains`, and invoked on a recordset. The decorator specifies which fields are involved in the constraint, so that the constraint is automatically evaluated when one of them is modified. The method is expected to raise an exception if its invariant is not satisfied::" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:823 -msgid "Add Python constraints" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:825 -msgid "Add a constraint that checks that the instructor is not present in the attendees of his/her own session." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:828 -msgid "SQL constraints are defined through the model attribute :attr:`~odoo.models.Model._sql_constraints`. The latter is assigned to a list of triples of 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/backend.rst:834 -msgid "Add SQL constraints" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:836 -msgid "With the help of `PostgreSQL's documentation`_ , add the following constraints:" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:839 -msgid "CHECK that the course description and the course title are different" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:840 -msgid "Make the Course's name UNIQUE" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:842 -msgid "Exercise 6 - Add a duplicate option" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:844 -msgid "Since we added a constraint for the Course name uniqueness, it is not possible to use the \"duplicate\" function anymore (:menuselection:`Form --> Duplicate`)." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:848 -msgid "Re-implement your own \"copy\" method which allows to duplicate the Course object, changing the original name into \"Copy of [original name]\"." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:852 -msgid "Advanced Views" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:857 -msgid "Tree views can take supplementary attributes to further customize their behavior:" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:885 -#: ../../content/developer/reference/addons/views.rst:1023 -#: ../../content/developer/reference/addons/views.rst:1436 -#: ../../content/developer/reference/addons/views.rst:1567 -msgid "``decoration-{$name}``" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:861 -#: ../../content/developer/reference/addons/views.rst:1010 -#: ../../content/developer/reference/addons/views.rst:1432 -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/addons/views.rst:104 -#: ../../content/developer/reference/addons/views.rst:1013 -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/addons/views.rst:109 -#: ../../content/developer/reference/addons/views.rst:1018 -msgid "``uid``: the id of the current user," -msgstr "" - -#: ../../content/developer/howtos/backend.rst:870 -#: ../../content/developer/reference/addons/views.rst:110 -#: ../../content/developer/reference/addons/views.rst:1019 -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/addons/views.rst:111 -#: ../../content/developer/reference/addons/views.rst:1020 -msgid "``now``: same as ``today`` with the addition of the current time. This value is formatted as ``YYYY-MM-DD hh:mm:ss``." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:874 -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/howtos/backend.rst:890 -#: ../../content/developer/reference/addons/views.rst:1416 -msgid "``editable``" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:888 -msgid "Either ``\"top\"`` or ``\"bottom\"``. Makes the tree view editable in-place (rather than having to go through the form view), the value is the position where new rows appear." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:892 -msgid "List coloring" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:894 -msgid "Modify the Session tree view in such a way that sessions lasting less than 5 days are colored blue, and the ones lasting more than 15 days are colored red." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:899 -msgid "Calendars" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:901 -msgid "Displays records as calendar events. Their root element is ```` and their most common attributes are:" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:907 -#: ../../content/developer/reference/addons/views.rst:422 -#: ../../content/developer/reference/addons/views.rst:1007 -#: ../../content/developer/reference/addons/views.rst:2118 -msgid "``color``" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:905 -msgid "The name of the field used for *color segmentation*. Colors are automatically distributed to events, but events in the same color segment (records which have the same value for their ``@color`` field) will be given the same color." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:909 -msgid "``date_start``" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:910 -msgid "record's field holding the start date/time for the event" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:911 -msgid "``date_stop`` (optional)" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:912 -msgid "record's field holding the end date/time for the event" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:914 -#: ../../content/developer/reference/addons/views.rst:940 -#: ../../content/developer/reference/addons/views.rst:1064 -#: ../../content/developer/reference/addons/views.rst:1464 -#: ../../content/developer/reference/addons/views.rst:1526 -#: ../../content/developer/reference/addons/views.rst:1730 -#: ../../content/developer/reference/addons/views.rst:1779 -#: ../../content/developer/reference/addons/views.rst:1903 -#: ../../content/developer/reference/addons/views.rst:2112 -msgid "``string``" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:914 -msgid "record's field to define the label for each calendar event" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:922 -msgid "Calendar view" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:924 -msgid "Add a Calendar view to the *Session* model enabling the user to view the events associated to the Open Academy." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:930 -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 fields ``name`` and ``description``." -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/addons/views.rst:891 -#: ../../content/developer/reference/addons/views.rst:1857 -#: ../../content/developer/reference/addons/views.rst:1938 -msgid "``domain``" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:939 -msgid "add the given domain to the current search" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:942 -#: ../../content/developer/howtos/web.rst:1710 -#: ../../content/developer/reference/addons/data.rst:72 -#: ../../content/developer/reference/addons/views.rst:893 -#: ../../content/developer/reference/addons/views.rst:1338 -#: ../../content/developer/reference/addons/views.rst:1512 -#: ../../content/developer/reference/addons/views.rst:1649 -#: ../../content/developer/reference/addons/views.rst:1859 -#: ../../content/developer/reference/addons/views.rst:1931 -#: ../../content/developer/reference/addons/views.rst:2035 -msgid "``context``" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:941 -msgid "add some context to the current search; use the key ``group_by`` to group results on the given field name" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:961 -msgid "To use a non-default search view in an action, it should be linked using the ``search_view_id`` field of the action record." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:964 -msgid "The action can also set default values for search fields through its ``context`` field: context keys of the form :samp:`search_default_{field_name}` will initialize *field_name* with the provided value. Search filters must have an optional ``@name`` to have a default and behave as booleans (they can only be enabled by default)." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:972 -msgid "Add a button to filter the courses for which the current user is the responsible in the course search view. Make it selected by default." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:974 -msgid "Add a button to group courses by responsible user." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:977 -#: ../../content/developer/reference/addons/views.rst:988 -msgid "Gantt" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:981 -msgid "The gantt view requires the web_gantt module which is present in :ref:`the enterprise edition ` version." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:984 -msgid "Horizontal bar charts typically used to show project planning and advancement, their root element is ````." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:995 -msgid "Gantt charts" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:997 -msgid "Add a Gantt Chart enabling the user to view the sessions scheduling linked to the Open Academy module. The sessions should be grouped by instructor." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1001 -msgid "Graph views" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1003 -msgid "Graph views allow aggregated overview and analysis of models, their root element is ````." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1007 -msgid "Pivot views (element ````) a multidimensional table, allows the selection of filers and dimensions to get the right aggregated dataset before moving to a more graphical overview. The pivot view shares the same content definition as graph views." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1012 -msgid "Graph views have 4 display modes, the default mode is selected using the ``@type`` attribute." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1019 -msgid "Bar (default)" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1016 -msgid "a bar chart, the first dimension is used to define groups on the horizontal axis, other dimensions define aggregated bars within each group." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1019 -msgid "By default bars are side-by-side, they can be stacked by using ``@stacked=\"True\"`` on the ````" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1021 -msgid "Line" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1022 -msgid "2-dimensional line chart" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1024 -msgid "Pie" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1024 -msgid "2-dimensional pie" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1026 -msgid "Graph views contain ```` with a mandatory ``@type`` attribute taking the values:" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1029 -#: ../../content/developer/reference/addons/views.rst:1206 -#: ../../content/developer/reference/addons/views.rst:1787 -msgid "``row`` (default)" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1030 -msgid "the field should be aggregated by default" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1032 -#: ../../content/developer/reference/addons/views.rst:1211 -#: ../../content/developer/reference/addons/views.rst:1791 -msgid "``measure``" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1032 -msgid "the field should be aggregated rather than grouped on" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1043 -msgid "Graph views perform aggregations on database values, they do not work with non-stored computed fields." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1046 -msgid "Graph view" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1048 -msgid "Add a Graph view in the Session object that displays, for each course, the number of attendees under the form of a bar chart." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1052 -#: ../../content/developer/reference/addons/views.rst:1230 -msgid "Kanban" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1054 -msgid "Used to organize tasks, production processes, etc… their root element is ````." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1057 -msgid "A kanban view shows a set of cards possibly grouped in columns. Each card represents a record, and each column the values of an aggregation field." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1060 -msgid "For instance, project tasks may be organized by stage (each column is a stage), or by responsible (each column is a user), and so on." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1063 -msgid "Kanban views define the structure of each card as a mix of form elements (including basic HTML) and :ref:`reference/qweb`." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1066 -msgid "Kanban view" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1068 -msgid "Add a Kanban view that displays sessions grouped by course (columns are thus courses)." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1072 -msgid "Security" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1074 -msgid "Access control mechanisms must be configured to achieve a coherent security policy." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1078 -msgid "Group-based access control mechanisms" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1080 -msgid "Groups are created as normal records on the model ``res.groups``, and granted menu access via menu definitions. However even without a menu, objects may still be accessible indirectly, so actual object-level permissions (read, write, create, unlink) must be defined for groups. They are usually inserted via CSV files inside modules. It is also possible to restrict access to specific fields on a view or object using the field's groups attribute." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1088 -msgid "Access rights" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1090 -msgid "Access rights are defined as records of the model ``ir.model.access``. Each access right is associated to a model, a group (or no group for global access), and a set of permissions: read, write, create, unlink. Such access rights are usually created by a CSV file named after its model: ``ir.model.access.csv``." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1102 -msgid "Add access control through the Odoo interface" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1104 -msgid "Create a new user \"John Smith\". Then create a group \"OpenAcademy / Session Read\" with read access to the *Session* model." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1107 -msgid "Add access control through data files in your module" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1109 -msgid "Using data files," -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1111 -msgid "Create a group *OpenAcademy / Manager* with full access to all OpenAcademy models" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1113 -msgid "Make *Session* and *Course* readable by all users" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1116 -msgid "Record rules" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1118 -msgid "A record rule restricts the access rights to a subset of records of the given model. A rule is a record of the model ``ir.rule``, and is associated to a model, a number of groups (many2many field), permissions to which the restriction applies, and a domain. The domain specifies to which records the access rights are limited." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1124 -msgid "Here is an example of a rule that prevents the deletion of leads that are not in state ``cancel``. Notice that the value of the field ``groups`` must follow the same convention as the method :meth:`~odoo.models.Model.write` of the ORM." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1141 -msgid "Record rule" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1143 -msgid "Add a record rule for the model Course and the group \"OpenAcademy / Manager\", that restricts ``write`` and ``unlink`` accesses to the responsible of a course. If a course has no responsible, all users of the group must be able to modify it." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1151 -msgid "Wizards" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1153 -msgid "Wizards describe interactive sessions with the user (or dialog boxes) through dynamic forms. A wizard is simply a model that extends the class :class:`~odoo.models.TransientModel` instead of :class:`~odoo.models.Model`. The class :class:`~odoo.models.TransientModel` extends :class:`~odoo.models.Model` and reuse all its existing mechanisms, with the following particularities:" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1160 -msgid "Wizard records are not meant to be persistent; they are automatically deleted from the database after a certain time. This is why they are called *transient*." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1163 -msgid "Wizard records may refer to regular records or wizard records through relational fields(many2one or many2many), but regular records *cannot* refer to wizard records through a many2one field." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1167 -msgid "We want to create a wizard that allow users to create attendees for a particular session, or for a list of sessions at once." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1170 -msgid "Define the wizard" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1172 -msgid "Create a wizard model with a many2one relationship with the *Session* model and a many2many relationship with the *Partner* model." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1176 -msgid "Launching wizards" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1178 -msgid "Wizards are simply :ref:`window actions ` with a ``target`` field set to the value ``new``, which opens the view (usually :ref:`a form `) in a separate dialog. The action may be triggered via a menu item, but is more generally triggered by a button." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1184 -msgid "An other way to launch wizards is through the :menuselection:`Action` menu of a tree or form view. This is done through the ``binding_model_id`` field of the action. Setting this field will make the action appear on the views of the model the action is \"bound\" to." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1201 -msgid "While wizards use regular views and buttons, normally clicking any button in a form would first save the form then close the dialog. Because this is often undesirable in wizards, a special attribute ``special=\"cancel\"`` is available which immediately closes the wizard without saving the form." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1206 -msgid "Launch the wizard" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1208 -msgid "Define a form view for the wizard." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1209 -msgid "Add the action to launch it in the context of the *Session* model." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1210 -msgid "Define a default value for the session field in the wizard; use the context parameter ``self._context`` to retrieve the current session." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1213 -msgid "Register attendees" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1215 -msgid "Add buttons to the wizard, and implement the corresponding method for adding the attendees to the given session." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1218 -msgid "Register attendees to multiple sessions" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1220 -msgid "Modify the wizard model so that attendees can be registered to multiple sessions." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1224 -msgid "Internationalization" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1226 -msgid "Each module can provide its own translations within the i18n directory, by having files named LANG.po where LANG is the locale code for the language, or the language and country combination when they differ (e.g. pt.po or pt_BR.po). Translations will be loaded automatically by Odoo for all enabled languages. Developers always use English when creating a module, then export the module terms using Odoo's gettext POT export feature (:menuselection:`Settings --> Translations --> Import/Export --> Export Translation` without specifying a language), to create the module template POT file, and then derive the translated PO files. Many IDE's have plugins or modes for editing and merging PO/POT files." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1237 -msgid "The Portable Object files generated by Odoo are published on `Transifex `__, making it easy to translate the software." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1252 -msgid "By default Odoo's POT export only extracts labels inside XML files or inside field definitions in Python code, but any Python string can be translated this way by surrounding it with the function :func:`odoo._` (e.g. ``_(\"Label\")``)" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1257 -msgid "Translate a module" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1259 -msgid "Choose a second language for your Odoo installation. Translate your module using the facilities provided by Odoo." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1263 -msgid "Reporting" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1266 -msgid "Printed reports" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1268 -msgid "Odoo uses a report engine based on :ref:`reference/qweb`, `Twitter Bootstrap`_ and Wkhtmltopdf_." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1271 -msgid "A report is a combination two elements:" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1273 -msgid "an ``ir.actions.report`` which configures various basic parameters for the report (default type, whether the report should be saved to the database after generation,…)" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1294 -msgid "Because it largerly a standard action, as with :ref:`howto/module/wizard` it is generally useful to add the report as a *contextual item* on the tree and / or form views of the model being reported on via the ``binding_model_id`` field." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1299 -msgid "Here we are also using ``binding_type`` in order for the report to be in the *report* contextual menu rather than the *action* one. There is no technical difference but putting elements in the right place helps users." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1303 -msgid "A standard :ref:`QWeb view ` for the actual report:" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1317 -msgid "the standard rendering context provides a number of elements, the most important being:" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1320 -#: ../../content/developer/reference/addons/reports.rst:70 -msgid "``docs``" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1321 -msgid "the records for which the report is printed" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1323 -#: ../../content/developer/reference/addons/reports.rst:31 -#: ../../content/developer/reference/addons/security.rst:124 -msgid "``user``" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1323 -msgid "the user printing the report" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1325 -msgid "Because reports are standard web pages, they are available through a URL and output parameters can be manipulated through this URL, for instance the HTML version of the *Invoice* report is available through http://localhost:8069/report/html/account.report_invoice/1 (if ``account`` is installed) and the PDF version through http://localhost:8069/report/pdf/account.report_invoice/1." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1336 -msgid "If it appears that your PDF report is missing the styles (i.e. the text appears but the style/layout is different from the html version), probably your wkhtmltopdf_ process cannot reach your web server to download them." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1340 -msgid "If you check your server logs and see that the CSS styles are not being downloaded when generating a PDF report, most surely this is the problem." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1343 -msgid "The wkhtmltopdf_ process will use the ``web.base.url`` system parameter as the *root path* to all linked files, but this parameter is automatically updated each time the Administrator is logged in. If your server resides behind some kind of proxy, that could not be reachable. You can fix this by adding one of these system parameters:" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1349 -msgid "``report.url``, pointing to an URL reachable from your server (probably ``http://localhost:8069`` or something similar). It will be used for this particular purpose only." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1353 -msgid "``web.base.url.freeze``, when set to ``True``, will stop the automatic updates to ``web.base.url``." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1356 -msgid "Create a report for the Session model" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1358 -msgid "For each session, it should display session's name, its start and end, and list the session's attendees." -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1362 -msgid "Dashboards" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1364 -msgid "Define a Dashboard" -msgstr "" - -#: ../../content/developer/howtos/backend.rst:1366 -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/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 -msgid "writing raw SQL queries is possible, but requires care as it bypasses all Odoo authentication and security mechanisms." -msgstr "" - -#: ../../content/developer/howtos/company.rst:6 -msgid "Multi-company Guidelines" -msgstr "" - -#: ../../content/developer/howtos/company.rst:10 -msgid "This tutorial requires good knowledge of Odoo. Please refer to the :ref:`basic tutorial ` first if needed." -msgstr "" - -#: ../../content/developer/howtos/company.rst:13 -msgid "As of version 13.0, a user can be logged in multiple companies at once. This allows the user to access information from multiple companies but also to create/edit records in a multi-company environment." -msgstr "" - -#: ../../content/developer/howtos/company.rst:17 -msgid "If not handled correctly, it may be the source of a lot of inconsistent multi-company behaviors. For instance, a user logged in both companies A and B could create a sales order in company A and add products belonging to company B to it. It is only when the user will log out from company B that access errors will occur for the sales order." -msgstr "" - -#: ../../content/developer/howtos/company.rst:22 -msgid "To correctly manage multi-company behaviors, Odoo's ORM provides multiple features:" -msgstr "" - -#: ../../content/developer/howtos/company.rst:24 -msgid ":ref:`Company-dependent fields `" -msgstr "" - -#: ../../content/developer/howtos/company.rst:25 -msgid ":ref:`Multi-company consistency `" -msgstr "" - -#: ../../content/developer/howtos/company.rst:26 -msgid ":ref:`Default company `" -msgstr "" - -#: ../../content/developer/howtos/company.rst:27 -msgid ":ref:`Views `" -msgstr "" - -#: ../../content/developer/howtos/company.rst:28 -msgid ":ref:`Security rules `" -msgstr "" - -#: ../../content/developer/howtos/company.rst:33 -msgid "Company-dependent fields" -msgstr "" - -#: ../../content/developer/howtos/company.rst:35 -msgid "When a record is available from multiple companies, we must expect that different values will be assigned to a given field depending on the company from which the value is set." -msgstr "" - -#: ../../content/developer/howtos/company.rst:38 -msgid "For the field of a same record to support several values, it must be defined with the attribute `company_dependent` set to `True`." -msgstr "" - -#: ../../content/developer/howtos/company.rst:57 -msgid "The `_compute_display_info` method is decorated with `depends_context('company')` (see :attr:`~odoo.api.depends_context`) to ensure that the computed field is recomputed depending on the current company (`self.env.company`)." -msgstr "" - -#: ../../content/developer/howtos/company.rst:61 -msgid "When a company-dependent field is read, the current company is used to retrieve its value. In other words, if a user is logged in companies A and B with A as main company and creates a record for company B, the values of company-dependent fields will be that of company A." -msgstr "" - -#: ../../content/developer/howtos/company.rst:65 -msgid "To read the values of company-dependent fields set from another company than the current one, we need to ensure the company we are using is the correct one. This can be done with :meth:`~odoo.models.Model.with_company`, which updates the current company." -msgstr "" - -#: ../../content/developer/howtos/company.rst:80 -msgid "Whenever you are computing/creating/... things that may behave differently in different companies, you should make sure whatever you are doing is done in the right company. It doesn't cost much to always use `with_company` to avoid problems later on." -msgstr "" - -#: ../../content/developer/howtos/company.rst:101 -msgid "Multi-company consistency" -msgstr "" - -#: ../../content/developer/howtos/company.rst:103 -msgid "When a record is made shareable between several companies by the mean of a `company_id` field, we must take care that it cannot be linked to the record of another company through a relational field. For instance, we do not want to have a sales order and its invoice belonging to different companies." -msgstr "" - -#: ../../content/developer/howtos/company.rst:107 -msgid "To ensure this multi-company consistency, you must:" -msgstr "" - -#: ../../content/developer/howtos/company.rst:109 -msgid "Set the class attribute `_check_company_auto` to `True`." -msgstr "" - -#: ../../content/developer/howtos/company.rst:110 -msgid "Define relational fields with the attribute `check_company` set to `True` if their model has a `company_id` field." -msgstr "" - -#: ../../content/developer/howtos/company.rst:113 -msgid "On each :meth:`~odoo.models.Model.create` and :meth:`~odoo.models.Model.write`, automatic checks will be triggered to ensure the multi-company consistency of the record." -msgstr "" - -#: ../../content/developer/howtos/company.rst:127 -msgid "The field `company_id` must not be defined with `check_company=True`." -msgstr "" - -#: ../../../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/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.fields_view_get: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 "" - -#: ../../content/developer/howtos/company.rst:138 -msgid "When no domain is defined on the field and `check_company` is set to `True`, a default domain is added: `['|', '('company_id', '=', False), ('company_id', '=', company_id)]`" -msgstr "" - -#: ../../content/developer/howtos/company.rst:144 -msgid "Default company" -msgstr "" - -#: ../../content/developer/howtos/company.rst:146 -msgid "When the field `company_id` is made required on a model, a good practice is to set a default company. It eases the setup flow for the user or even guarantees its validity when the company is hidden from the view. Indeed, the company is usually hidden if the user does not have access to multiple companies (i.e. when the user does not have the group `base.group_multi_company`)." -msgstr "" - -#: ../../content/developer/howtos/company.rst:168 -#: ../../content/developer/reference/addons/views.rst:6 -#: ../../content/developer/reference/javascript/javascript_reference.rst:1422 -msgid "Views" -msgstr "" - -#: ../../content/developer/howtos/company.rst:170 -msgid "As stated in :ref:`above `, the company is usually hidden from the view if the user does not have access to multiple companies. This is tested with the group `base.group_multi_company`." -msgstr "" - -#: ../../content/developer/howtos/company.rst:197 -msgid "Security rules" -msgstr "" - -#: ../../content/developer/howtos/company.rst:199 -msgid "When working with records shared across companies or restricted to a single company, we must take care that a user does not have access to records belonging to other companies." -msgstr "" - -#: ../../content/developer/howtos/company.rst:202 -msgid "This is achieved with security rules based on `company_ids`, which contains the current companies of the user (the companies the user checked in the multi-company widget)." -msgstr "" - -#: ../../content/developer/howtos/company.rst:229 -msgid "check_company on company_dependent fields." -msgstr "" - -#: ../../content/developer/howtos/localization.rst:4 -msgid "Accounting Localization" -msgstr "" - -#: ../../content/developer/howtos/localization.rst:8 -msgid "This tutorial requires knowledges about how to build a module in Odoo (see :doc:`/developer/howtos/backend`)." -msgstr "" - -#: ../../content/developer/howtos/localization.rst:12 -msgid "Building a localization module" -msgstr "" - -#: ../../content/developer/howtos/localization.rst:14 -msgid "When installing the ``accounting`` 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." -msgstr "" - -#: ../../content/developer/howtos/localization.rst:17 -msgid "For example, ``l10n_be`` will be installed if the company has ``Belgium`` as country." -msgstr "" - -#: ../../content/developer/howtos/localization.rst:19 -msgid "This behavior is allowed by the presence of a *.xml* file containing the following code:" -msgstr "" - -#: ../../content/developer/howtos/localization.rst:27 -msgid "Where ``module.template_xmlid`` is the **fully-qualified** xmlid of the corresponding template." -msgstr "" - -#: ../../content/developer/howtos/localization.rst:29 -msgid "Usually located in the ``data`` folder, it must be loaded at the very last in the ``__manifest__.py`` file." -msgstr "" - -#: ../../content/developer/howtos/localization.rst:33 -msgid "If the *.xml* file is missing, the right chart of accounts won't be loaded on time!" -msgstr "" - -#: ../../content/developer/howtos/localization.rst:37 -msgid "Configuring my own Chart of Accounts?" -msgstr "" - -#: ../../content/developer/howtos/localization.rst:39 -msgid "First of all, before I proceed, we need to talk about the templates. A template is a record that allows replica of itself. This mechanism is needed when working in multi-companies. For example, the creation of a new account is done using the ``account.account.template`` model. However, each company using this chart of accounts will be linked to a replica having ``account.account`` as model. So, the templates are never used directly by the company." -msgstr "" - -#: ../../content/developer/howtos/localization.rst:44 -msgid "Then, when a chart of accounts needs to be installed, all templates dependent of this one will create a replica and link this newly generated record to the company's user. It means all such templates must be linked to the chart of accounts in some way. To do so, each one must reference the desired chart of accounts using the ``chart_template_id`` field. For this reason, we need to define an instance of the ``account.chart.template`` model before creating its templates." -msgstr "" - -#: ../../content/developer/howtos/localization.rst:87 -msgid "For example, let's take a look to the Belgium chart of accounts." -msgstr "" - -#: ../../content/developer/howtos/localization.rst:99 -msgid "Now that the chart of accounts is created, we can focus on the creation of the templates. As said previously, each record must reference this record through the ``chart_template_id`` field. If not, the template will be ignored. The following sections show in details how to create these templates." -msgstr "" - -#: ../../content/developer/howtos/localization.rst:104 -msgid "Adding a new account to my Chart of Accounts" -msgstr "" - -#: ../../content/developer/howtos/localization.rst:106 -msgid "It's time to create our accounts. It consists to creating records of ``account.account.template`` type. Each ``account.account.template`` is able to create an ``account.account`` for each company." -msgstr "" - -#: ../../content/developer/howtos/localization.rst:137 -msgid "Some of the described fields above deserve a bit more explanation." -msgstr "" - -#: ../../content/developer/howtos/localization.rst:139 -msgid "The ``user_type_id`` field requires a value of type ``account.account.type``. Although some additional types could be created in a localization module, we encourage the usage of the existing types in the `account/data/data_account_type.xml `_ file. The usage of these generic types ensures the generic reports working correctly in addition to those that you could create in your localization module." -msgstr "" - -#: ../../content/developer/howtos/localization.rst:145 -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/localization.rst:150 -msgid "Only one account of type payable/receivable is enough." -msgstr "" - -#: ../../content/developer/howtos/localization.rst:152 -msgid "Although the ``tag_ids`` field is optional, this one remains a very powerful feature. Indeed, this one allows you to define some tags for your accounts to spread them correctly on your reports. For example, suppose you want to create a financial report having multiple lines but you have no way to find a rule to dispatch the accounts according their ``code`` or ``name``. The solution is the usage of tags, one for each report line, to spread and aggregate your accounts like you want." -msgstr "" - -#: ../../content/developer/howtos/localization.rst:157 -msgid "Like any other record, a tag can be created with the following xml structure:" -msgstr "" - -#: ../../content/developer/howtos/localization.rst:170 -msgid "As you can well imagine with the usage of tags, this feature can also be used with taxes." -msgstr "" - -#: ../../content/developer/howtos/localization.rst:172 -msgid "An examples coming from the ``l10n_be`` module:" -msgstr "" - -#: ../../content/developer/howtos/localization.rst:185 -msgid "Don't create too much accounts: 200-300 is enough." -msgstr "" - -#: ../../content/developer/howtos/localization.rst:188 -msgid "Adding a new tax to my Chart of Accounts" -msgstr "" - -#: ../../content/developer/howtos/localization.rst:190 -msgid "To create a new tax record, you just need to follow the same process as the creation of accounts. The only difference being that you must use the ``account.tax.template`` model." -msgstr "" - -#: ../../content/developer/howtos/localization.rst:271 -msgid "An example found in the ``l10n_pl`` module:" -msgstr "" - -#: ../../content/developer/howtos/localization.rst:290 -msgid "Adding a new fiscal position to my Chart of Accounts" -msgstr "" - -#: ../../content/developer/howtos/localization.rst:294 -msgid "If you need more information about what is a fiscal position and how it works in Odoo, please refer to :doc:`/applications/finance/accounting/taxation/taxes/fiscal_positions`." -msgstr "" - -#: ../../content/developer/howtos/localization.rst:297 -msgid "To create a new fiscal position, simply use the ``account.fiscal.position.template`` model:" -msgstr "" - -#: ../../content/developer/howtos/localization.rst:313 -msgid "Adding the properties to my Chart of Accounts" -msgstr "" - -#: ../../content/developer/howtos/localization.rst:315 -msgid "When the whole accounts are generated, you have the possibility to override the newly generated chart of accounts by adding some properties that correspond to default accounts used in certain situations. This must be done after the creation of accounts before each one must be linked to the chart of accounts." -msgstr "" - -#: ../../content/developer/howtos/localization.rst:348 -msgid "For example, let's come back to the Belgium PCMN. This chart of accounts is override in this way to add some properties." -msgstr "" - -#: ../../content/developer/howtos/localization.rst:363 -msgid "How to create a new bank operation model?" -msgstr "" - -#: ../../content/developer/howtos/localization.rst:367 -msgid "How a bank operation model works exactly in Odoo? See :doc:`/applications/finance/accounting/bank/reconciliation/reconciliation_models`." -msgstr "" - -#: ../../content/developer/howtos/localization.rst:369 -msgid "Since ``V10``, a new feature is available in the bank statement reconciliation widget: the bank operation model. This allows the user to pre-fill some accounting entries with a single click. The creation of an ``account.reconcile.model.template`` record is quite easy:" -msgstr "" - -#: ../../content/developer/howtos/localization.rst:415 -msgid "How to create a new dynamic report?" -msgstr "" - -#: ../../content/developer/howtos/localization.rst:417 -msgid "If you need to add some reports on your localization, you need to create a new module named **l10n_xx_reports**. Furthermore, this additional module must be present in the ``enterprise`` repository and must have at least two dependencies, one to bring all the stuff for your localization module and one more, ``account_reports``, to design dynamic reports." -msgstr "" - -#: ../../content/developer/howtos/localization.rst:425 -msgid "Once it's done, you can start the creation of your report statements. The documentation is available in the following `slides `_." -msgstr "" - -#: ../../content/developer/howtos/profilecode.rst:3 -msgid "Profiling Odoo code" -msgstr "" - -#: ../../content/developer/howtos/profilecode.rst:7 -msgid "This tutorial requires :ref:`having installed Odoo ` and :doc:`writing Odoo code `" -msgstr "" - -#: ../../content/developer/howtos/profilecode.rst:11 -msgid "Graph a method" -msgstr "" - -#: ../../content/developer/howtos/profilecode.rst:13 -msgid "Odoo embeds a profiler of code. This embedded profiler output can be used to generate a graph of calls triggered by the method, number of queries, percentage of time taken in the method itself as well as the time that the method took and its sub-called methods." -msgstr "" - -#: ../../content/developer/howtos/profilecode.rst:25 -msgid "This produces a file called /temp/prof.profile" -msgstr "" - -#: ../../content/developer/howtos/profilecode.rst:27 -msgid "A tool called *gprof2dot* will produce a graph with this result:" -msgstr "" - -#: ../../content/developer/howtos/profilecode.rst:33 -msgid "A tool called *xdot* will display the resulting graph:" -msgstr "" - -#: ../../content/developer/howtos/profilecode.rst:40 -msgid "Log a method" -msgstr "" - -#: ../../content/developer/howtos/profilecode.rst:42 -msgid "Another profiler can be used to log statistics on a method:" -msgstr "" - -#: ../../content/developer/howtos/profilecode.rst:52 -msgid "The statistics will be displayed into the logs once the method to be analysed is completely reviewed." -msgstr "" - -#: ../../content/developer/howtos/profilecode.rst:83 -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 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 -msgid "Tracing code execution" -msgstr "" - -#: ../../content/developer/howtos/profilecode.rst:93 -msgid "Instead of sending the SIGQUIT signal to an Odoo process often enough, to check where the processes are performing worse than expected, we can use the `py-spy`_ tool to do it for us." -msgstr "" - -#: ../../content/developer/howtos/profilecode.rst:98 -msgid "Install py-spy" -msgstr "" - -#: ../../content/developer/howtos/profilecode.rst:105 -msgid "Record executed code" -msgstr "" - -#: ../../content/developer/howtos/profilecode.rst:107 -msgid "As py-spy is installed, we now record the executed code lines. This tool will record, multiple times a second, the stacktrace of the process." -msgstr "" - -#: ../../content/developer/howtos/profilecode.rst:118 -msgid "where is the process ID of the odoo process you want to graph." -msgstr "" - -#: ../../content/developer/howtos/profilecode.rst:120 -msgid "To open profile.json you can use online tool `speedscope.app`_." -msgstr "" - -#: ../../content/developer/howtos/profilecode.rst:122 -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:79 -msgid ":doc:`rdtraining/B_acl_irrules`" -msgstr "" - -#: ../../content/developer/howtos/rdtraining.rst:80 -msgid ":doc:`rdtraining/C_data`" -msgstr "" - -#: ../../content/developer/howtos/rdtraining.rst:81 -msgid ":doc:`rdtraining/E_unittest`" -msgstr "" - -#: ../../content/developer/howtos/rdtraining.rst:82 -msgid ":doc:`rdtraining/J_reports`" -msgstr "" - -#: ../../content/developer/howtos/rdtraining.rst:83 -msgid ":doc:`rdtraining/K_dashboard`" -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: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 "Odoo modules" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/01_architecture.rst:35 -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:39 -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:44 -msgid "Everything in Odoo starts and ends with modules." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/01_architecture.rst:46 -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:54 -msgid "An Odoo module **can** contain a number of elements:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/01_architecture.rst:59 -msgid ":ref:`Business objects `" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/01_architecture.rst:57 -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:62 -msgid "Define UI display" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/01_architecture.rst:65 -msgid "XML or CSV files declaring the model data:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/01_architecture.rst:76 -msgid "Images, CSS or JavaScript files used by the web interface or website" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/01_architecture.rst:78 -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:93 -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:98 -msgid "Here is a simplified module directory:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/01_architecture.rst:112 -msgid "Odoo Editions" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/01_architecture.rst:114 -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:119 -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 appropriate section of the installation guide, depending on whether you are on :ref:`Windows ` or :ref:`Mac OS `. The steps remain essentially the same." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:16 -msgid "Set up Git" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:19 -msgid "Install and configure Git" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:21 -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:29 -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:35 -msgid "Once installed, register your name and email:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:43 -msgid "Configure GitHub" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:45 -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:49 -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:54 -msgid "The following step-by-step procedure is based based on the `official GitHub documentation `_." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:57 -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:66 -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:71 -msgid "On the user settings sidebar, click on :guilabel:`SSH and GPG keys`." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:75 -msgid "Click on :guilabel:`New SSH key` or on :guilabel:`Add SSH key`." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:79 -msgid "In the :guilabel:`Title` field, add a descriptive label for the new key." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:80 -msgid "Paste your key into the :guilabel:`Key` field." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:84 -msgid "Click on :guilabel:`Add SSH key`." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:87 -msgid "Fetch the sources" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:89 -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:97 -msgid "Then, clone the two repositories with SSH as explained in the :ref:`Installing Odoo guide `." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:101 -msgid "Cloning the repositories will take a while, enjoy a cup of coffee while you wait." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:106 -msgid "Configure the Git repositories" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:108 -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:115 -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:118 -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:135 -msgid "Install the dependencies" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:137 -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:143 -msgid "Some useful SQL commands:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:157 -msgid "Run the server" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:160 -msgid "Launch with `odoo-bin`" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:162 -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:170 -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:175 -msgid "The database that is going to be used." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:179 -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:184 -msgid "Prevent the worker from using more than CPU seconds for each request." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:188 -msgid "Prevent the worker from taking longer than seconds to process a request." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:191 -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:205 -msgid "Other commonly used arguments are:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:207 -msgid ":option:`-i `: Install some modules before running the server (comma-separated list)." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:209 -msgid ":option:`-u `: Update some modules before running the server (comma-separated list)." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:213 -msgid "Log in to Odoo" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:215 -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:219 -msgid "To log in as the administrator user, use the following credentials:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:221 -msgid "email: `admin`" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:222 -msgid "password: `admin`" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:225 -msgid "Enable the developer mode" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:227 -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:230 -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:234 -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:238 -msgid "Extra tools" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:241 -msgid "Useful Git commands" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:243 -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:257 -msgid "Fetch and rebase:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:270 -msgid "Code Editor" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:272 -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:277 -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:281 -msgid "For Python, we use PEP8 with these options ignored:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:283 -msgid "`E501`: line too long" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:284 -msgid "`E301`: expected 1 blank line, found 0" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:285 -msgid "`E302`: expected 2 blank lines, found 1" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:287 -msgid "For JavaScript, we use ESLint and you can find a `configuration file example here `_." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:291 -msgid "Administrator tools for PostgreSQL" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:293 -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:297 -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:299 -msgid "Host name/address: `/var/run/postgresql`" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:300 -msgid "Port: `5432`" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:301 -msgid "Username: `$USER`" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:304 -msgid "Python Debugging" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:306 -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:309 -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:313 -msgid "In the following example we use ipdb, but the process is similar with other libraries." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:315 -msgid "Install the library:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:321 -msgid "Place a trigger (breakpoint):" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:340 -msgid "Here is a list of commands:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:344 -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:349 -msgid "The value of the `expression` is pretty-printed using the `pprint` module." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:353 -msgid "Print a stack trace with the most recent frame at the bottom." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:357 -msgid "Move the current frame one level down in the stack trace (to a newer frame)." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:361 -msgid "Move the current frame one level up in the stack trace (to an older frame)." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:365 -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:369 -msgid "Continue the execution and only stop when a breakpoint is encountered." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:373 -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:378 -msgid "Quit the debugger. The program being executed is aborted." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/02_setup.rst:382 -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: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: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: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: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:149 -#: ../../content/developer/howtos/rdtraining/C_data.rst:175 -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:300 -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:149 -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:300 -msgid "Type" -msgstr "" - -#: ../../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:177 -#: ../../content/developer/reference/addons/data/res.country.state.csv:1 -msgid "name" -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:179 -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:180 -msgid "postcode" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:185 -#: ../../content/developer/howtos/rdtraining/C_data.rst:181 -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:182 -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:183 -msgid "selling_price" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:188 -#: ../../content/developer/howtos/rdtraining/C_data.rst:184 -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:302 -msgid "Integer" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:189 -#: ../../content/developer/howtos/rdtraining/C_data.rst:185 -msgid "living_area" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:190 -#: ../../content/developer/howtos/rdtraining/C_data.rst:186 -msgid "facades" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:191 -#: ../../content/developer/howtos/rdtraining/C_data.rst:187 -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:188 -msgid "garden" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:193 -#: ../../content/developer/howtos/rdtraining/C_data.rst:189 -msgid "garden_area" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/04_basicmodel.rst:194 -#: ../../content/developer/howtos/rdtraining/C_data.rst:190 -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:303 -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:305 -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/javascript/javascript_reference.rst:2024 -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 -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:137 -#: ../../content/developer/reference/addons/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/addons/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: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: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: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/addons/views.rst:1395 -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: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/addons/views.rst:757 -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: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/addons/views.rst:1876 -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: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:304 -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:306 -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: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: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/addons/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: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: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:175 -#: ../../content/developer/howtos/rdtraining/C_data.rst:175 -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:304 -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:89 -#: ../../content/developer/reference/addons/orm.rst:232 -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: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: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: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:44 -msgid "Once an offer is accepted, the selling price and the buyer should be set:" -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:32 -msgid "Property types and tags should have a unique name" -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/addons/security.rst:450 -#: ../../content/developer/reference/addons/security.rst:452 -#: ../../content/developer/reference/addons/testing.rst:665 -#: ../../content/developer/reference/javascript/qweb.rst:334 -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: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: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/javascript/javascript_reference.rst:491 -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: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:248 -#: ../../content/developer/reference/addons/orm.rst:90 -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:304 -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 -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:306 -msgid "``estate.property.type``" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:191 -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:318 -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 -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: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: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: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:432 -msgid "Change the living area search." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:434 -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:438 -msgid "Stat Buttons" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:442 -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:449 -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:454 -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:459 -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:463 -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:474 -msgid "is equivalent to:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:488 -msgid "Every time the partner name is changed, the description is modified." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:490 -msgid "Add a stat button to property type." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/12_sprinkles.rst:492 -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:495 -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:498 -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:501 -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:504 -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:508 -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:512 -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:515 -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:519 -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: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: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 "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:79 -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:81 -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:84 -msgid "Add business logic to the CRUD methods." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:86 -msgid "Prevent deletion of a property if its state is not 'New' or 'Canceled'" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:88 -msgid "Tip: override :meth:`~odoo.models.Model.unlink` and remember that ``self`` can be a recordset with more than one record." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:91 -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:94 -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:99 -msgid "Model Inheritance" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:101 -msgid "**Reference**: the documentation related to this topic can be found in :ref:`reference/orm/inheritance`." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:104 -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:110 -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:113 -msgid "adding fields to the model," -msgstr "" - -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:114 -msgid "overriding the definition of fields in the model," -msgstr "" - -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:115 -msgid "adding constraints to the model," -msgstr "" - -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:116 -msgid "adding methods to the model," -msgstr "" - -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:117 -msgid "overriding existing methods in the model." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:119 -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:127 -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:137 -msgid "A practical example where two fields are added to a model can be found `here `__." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:141 -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:144 -msgid "Add a field to Users." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:146 -msgid "Add the following field to ``res.users``:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:151 -msgid "property_ids" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:151 -msgid "One2many inverse of ``user_id`` to ``estate.property``" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:154 -msgid "Add a domain to the field so it only lists the available properties." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:156 -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:159 -msgid "View Inheritance" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:161 -msgid "**Reference**: the documentation related to this topic can be found in :ref:`reference/views/inheritance`." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:166 -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:173 -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:177 -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:203 -msgid "appends ``xpath``'s body to the end of the matched element" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:212 -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:215 -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:228 -msgid "An example of a view inheritance extension can be found `here `__." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:231 -msgid "Add fields to the Users view." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:233 -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:235 -msgid "Tip: an example an inheritance of the users' view can be found `here `__." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/13_inheritance.rst:238 -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:241 -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: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' described in :ref:`reference/orm/models/crud`. This format is a list of triplets executed sequentially, where each triplet is a command to execute on the set of records. 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 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 "Additional Info for Odoo Staff" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:147 -msgid "Now that you know the basics, here are some more useful pages if you haven't seen them already:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:149 -msgid "Our `welcome `__ page has extra info about working at Odoo as well as additional `tutorials `__ that are both language and Odoo specific." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:153 -msgid "Once you are ready to start doing tasks, it is important to note that Odoo follows a `rebasing workflow instead of merging `__ for your PRs. `This cheatsheet `__ describes how to do this flow. If you want to become more of a rebasing master, then `this tutorial `__ is extra useful." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:161 -msgid "Test on the runbot" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:163 -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:167 -msgid "Play with the runbot." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/16_guidelines_pr.rst:169 -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/D_mixins.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/N_security.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:9 -msgid "This tutorial assumes you have completed the :ref:`Core Training `." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:12 -#: ../../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 14.0-core from the repository XXX, 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:17 -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:21 -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:23 -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:27 -msgid "However:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:29 -msgid "We do not want third parties to be able to access properties directly." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:30 -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:33 -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:35 -msgid "Real-estate agents can have *exclusive* properties, we do not want one agent to be able to manage another's exclusivities." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:37 -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:43 -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:45 -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 limiting access: users can relax that access if necessary or convenient." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:50 -msgid "Groups" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:54 -msgid "The documentation related to this topic can be found in :ref:`the security reference `." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:57 -msgid ":doc:`/contributing/development/coding_guidelines` document the format and location of master data items." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:60 -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:142 -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:207 -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:276 -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:320 -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:397 -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:468 -msgid "**Goal**" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:62 -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:144 -msgid "At the end of this section," -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:64 -msgid "We can make employees *real-estate agents* or *real-estate managers*." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:65 -msgid "The ``admin`` user is a real-estate manager." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:66 -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:69 -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:73 -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:78 -msgid "This baseline seems sufficient for us:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:80 -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:82 -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:85 -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:89 -msgid "As simple example `can be found here `_." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:91 -msgid "what is the *category_id*?" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:93 -msgid "``category_id`` a *module category*, it is automatically generated from the :ref:`category defined in module manifest files `." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:96 -msgid "the demo module needs to have the category set, to *Real Estate/Brokerage*, ideally the newapp part would already do that" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:102 -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:105 -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:108 -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:115 -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:118 -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:123 -msgid "Set the admin user to be a *Real Estate manager*." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:127 -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:130 -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:139 -msgid "The documentation related to this topic can be found at :ref:`reference/security/acl`." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:146 -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:148 -msgid "Real-estate agents will not be able to update the property types or tags." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:150 -msgid "Access rights were first introduced in :ref:`howto/rdtraining/05_securityintro`." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:152 -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:155 -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:158 -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:163 -msgid "group" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:163 -msgid "create" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:163 -msgid "read" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:163 -msgid "update" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:163 -msgid "delete" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:165 -msgid "A" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:165 -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:165 -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:166 -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:167 -msgid "X" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:166 -msgid "B" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:167 -msgid "C" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:170 -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:175 -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:178 -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:180 -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:183 -msgid "Update the access rights file to:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:185 -msgid "Give full access to all objects to your Real Estate Manager group." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:186 -msgid "Give agents (real estate users) only read access to types and tags." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:187 -msgid "Give nobody the right to delete properties." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:188 -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:194 -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:197 -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:202 -#: ../../content/developer/reference/addons/security.rst:83 -msgid "Record Rules" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:204 -msgid "The documentation related to this topic can be found at :ref:`reference/security/rules`." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:209 -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:213 -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:217 -msgid "Record *rules* provide that precision: they can grant or reject access to individual records:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:233 -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:238 -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:241 -msgid "The rule above:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:243 -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:246 -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:248 -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:253 -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:259 -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:262 -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:265 -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:268 -msgid "The ``estate_group_manager`` group needs to imply ``estate_group_user``." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:271 -msgid "Security Override" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:274 -msgid "Bypassing Security" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:278 -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:281 -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:286 -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:289 -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:294 -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:297 -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:300 -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:305 -msgid "Update ``estate_account`` to bypass access rights and rules when creating the invoice." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:310 -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:314 -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:318 -msgid "Programmatically checking security" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:322 -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:325 -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:330 -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:334 -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:340 -msgid "You should see ``reached`` in your Odoo log, followed by an access error." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:342 -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:345 -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:350 -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:355 -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:359 -msgid "Explicit security checks can be performed by:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:361 -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:363 -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:365 -msgid "Calling the ``check_access_rights(operation)`` method on a recorset, this verifies whether the current user has access to the model itself." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:367 -msgid "Calling ``check_access_rule(operations)`` on a non-empty recorset, 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:371 -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:377 -msgid "Before creating the invoice, use ``check_access_rights`` and ``check_access_rule`` to ensure that the current user can update properties in general, and this specific property in particular." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:381 -msgid "Re-run the bypass script, check that the error occurs before the print." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:386 -msgid "Multi-company security" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:390 -msgid ":ref:`reference/howtos/company` for an overview of multi-company facilities in general, and :ref:`multi-company security rules ` this in particular." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:394 -msgid "Documentation on rules in general can, again, be found at :ref:`reference/security/rules`." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:399 -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:402 -msgid "For one reason or an other we might need to manage our real-estate business as multiple companies e.g. we might have largely autonomous agencies, or 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:408 -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 like 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:413 -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:417 -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:421 -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:424 -msgid "``company_ids`` is all the companies to which the current user has access" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:425 -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:428 -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:444 -msgid "Multi-company rules are usually :ref:`global `, otherwise there is a high risk that additional rules would allow bypassing the muti-company rules." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:450 -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:453 -msgid "Create a new company, with a new estate agent in that company." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:454 -msgid "The manager should be a member of both companies." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:455 -msgid "The old agent should only be a member of the old company." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:456 -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:459 -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:462 -msgid "remember to ``--update`` your module when you change its model or data" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:466 -msgid "Visibility != security" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:470 -msgid "At the end of this section, real-estate agents should not see the Settings menu of the rea-estate application, but should still be able to set the property type or tags." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:474 -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:478 -msgid "*Visibility* features mean a user can still access the model or record otherwise, either through an other part of the interface or by :doc:`perform 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:482 -msgid "*Security* features mean a user can not access records, fields or operations." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:484 -msgid "Here are some examples:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:486 -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:489 -msgid "Example: in server actions, `only system users can see or update Python code `_." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:491 -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:495 -msgid "Example: `only managers have an immediate filter to see their teams' leaves `_." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:497 -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:501 -msgid "Example: `only system administrators can see the elearning settings menu `_." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:506 -msgid "Real Estate agents can not add property types or tags, and can see their options from the Property form view when creating it." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:509 -msgid "The Settings menu just adds noise to their interface, it should only be visible to managers." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/B_acl_irrules.rst:512 -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:516 -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:521 -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 14.0-core from the repository XXX. It contains a basic module we will use as a starting point" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:13 -msgid "Data Types" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:16 -msgid "Master Data" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:18 -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:22 -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:26 -msgid "On top of technical data, business data can be defined: countries, currencies, units of measure but also complete country localization (legal reports, tax definitions, chart of account), and much more..." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:31 -msgid "Demo Data" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:33 -msgid "Next to master data which are requirements for the modules to work properly, we also like having data for demonstration purpose setups:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:36 -msgid "Help the sales representatives to make their demos quickly." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:37 -msgid "Have a set of working data for developers to test the new features and see what it looks like with something they might not have created without it." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:39 -msgid "Test that the data is loaded correctly, without raising an error." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:40 -msgid "Be ready to use most of the features quickly when creating a new database." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:42 -msgid "Demo data is automatically loaded when you start the server if you didn't say explicitly 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:65 -msgid "Data Declaration" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:68 -#: ../../content/developer/reference/addons/module.rst:11 -msgid "Manifest" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:70 -msgid "**Reference**: the documentation related to this topic can be found in :ref:`Module Manifests`." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:73 -msgid "The data is declared either in CSV either 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:76 -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 path to the files declaring the data." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:80 -msgid "Usually, the demo data is set in a ``demo`` folder, the views and actions are put in a ``views`` folder, the security related data is put in a ``security`` folder, and the other data is set in a ``data`` folder." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:84 -msgid "If your work tree looks like this:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:103 -msgid "Your manifest should look like this:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:126 -msgid "CSV" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:128 -msgid "**Reference**: the documentation related to this topic can be found in :ref:`CSV data files`." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:131 -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 in the other cases." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:140 -msgid "Your IDE has probably an extension to have a syntax highlighting of the CSV files" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:142 -msgid "`Atom `__." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:143 -msgid "`PyCharm/IntelliJ `__." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:144 -msgid "`Vim `__." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:145 -msgid "`Visual Studio `__." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:147 -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:151 -msgid "XML" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:153 -msgid "**Reference**: the documentation related to this topic can be found in :ref:`Data Files`." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:156 -msgid "When the data to create is a bit more complex it can be useful, or even needed, to do it in XML." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:172 -msgid "Create some demo data for the `estate` module." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:177 -#: ../../content/developer/howtos/rdtraining/C_data.rst:241 -#: ../../content/developer/howtos/rdtraining/C_data.rst:242 -#: ../../content/developer/howtos/rdtraining/C_data.rst:243 -msgid "Big Villa" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:177 -msgid "Trailer home" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:178 -msgid "state" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:178 -msgid "New" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:178 -msgid "Canceled" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:179 -msgid "A nice and big villa" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:179 -msgid "Home in a trailer park" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:180 -msgid "12345" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:180 -msgid "54321" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:181 -msgid "2020-02-02" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:181 -msgid "1970-01-01" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:182 -msgid "1,600,000" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:182 -msgid "100,000" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:183 -msgid "120,000" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:185 -msgid "100" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:185 -msgid "10" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:186 -#: ../../content/developer/howtos/rdtraining/C_data.rst:186 -msgid "4" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:187 -#: ../../content/developer/howtos/rdtraining/C_data.rst:188 -#: ../../content/developer/reference/addons/mixins.rst:154 -#: ../../content/developer/reference/addons/mixins.rst:182 -#: ../../content/developer/reference/addons/mixins.rst:192 -msgid "True" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:187 -msgid "False" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:189 -msgid "100000" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:190 -msgid "South" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:194 -msgid "Data Extension" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:196 -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:200 -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:219 -#: ../../content/developer/reference/addons/data.rst:104 -msgid "``ref``" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:221 -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:234 -msgid "Create some demo data offers for the properties you created." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:236 -msgid "Create offers using the partners defined in ``base``" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:239 -msgid "Partner" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:239 -msgid "Estate" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:239 -msgid "Price" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:239 -msgid "Validity" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:241 -#: ../../content/developer/howtos/rdtraining/C_data.rst:242 -msgid "Azure Interior" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:241 -msgid "10000" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:241 -#: ../../content/developer/howtos/rdtraining/C_data.rst:242 -#: ../../content/developer/howtos/rdtraining/C_data.rst:243 -msgid "14" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:242 -msgid "1500000" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:243 -msgid "Deco Addict" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:243 -msgid "1500001" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:246 -msgid "Both properties should be Residential properties." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:249 -#: ../../content/developer/reference/addons/data.rst:145 -msgid "``eval``" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:251 -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:263 -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:267 -#: ../../content/developer/reference/addons/data.rst:98 -#: ../../content/developer/reference/addons/data.rst:159 -msgid "``search``" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:269 -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:282 -msgid "In this code snippet, it is needed because the master data actually depends on the localization installed." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:286 -#: ../../content/developer/reference/addons/data.rst:164 -msgid "``function``" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:288 -msgid "You might also need to execute python code when loading the data." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:296 -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:303 -msgid "Add X2many fields" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:305 -msgid "**Reference**: the documentation related to this topic can be found in :ref:`Common ORM methods`." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:308 -msgid "If you need to add related data in a One2many or a Many2many field, you can do so by using the common ORM methods." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:334 -msgid "Create one new Property, but this time with some offers created directly inside the One2many field linking to the Offers." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:338 -#: ../../content/developer/howtos/website.rst:234 -msgid "Accessing the data" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:340 -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:343 -msgid "There are multiple ways to access the master/demo data." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:345 -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:348 -msgid "In XML, you can use the `ref` key like this" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:358 -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:361 -msgid "In CSV, the title of the column must be suffixed with ``:id`` or ``/id``." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:370 -msgid "In SQL, it is more complicated, see :ref:`the advanced section`." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:372 -msgid "Data can always be deleted by the user. Always code defensively, taking this into account." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:379 -msgid "Advanced" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:384 -msgid "What is the XML id?" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:386 -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:389 -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:393 -msgid "No update" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:395 -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:398 -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:411 -msgid "Import as SQL" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:413 -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:416 -msgid "Generally using raw SQL also bypasses ACLs and increases the risks of injections." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:418 -msgid "**Reference**: :ref:`Security in Odoo`" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:420 -msgid "It can help to speed the import time by a lot `with huge files `__." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:422 -msgid "For more complex imports like for the `translations `__." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/C_data.rst:424 -msgid "It can be necessary to `initialize the database `__." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/D_mixins.rst:7 -msgid "Advanced D: Mixins" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:5 -msgid "Advanced E: Python Unit Tests" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:12 -msgid "**Reference**: `Odoo's Test Framework: Learn Best Practices `__ (Odoo Experience 2020) on Youtube." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:16 -msgid "Writing tests is a necessity for multiple reasons. Here is a non exhaustive list:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:18 -msgid "Ensure it will not be broken in the future" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:19 -msgid "Define the scope of your code" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:20 -msgid "Give examples of use cases" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:21 -msgid "It is one way to technically document the code" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:22 -msgid "Help you develop by defining your goal before working towards it" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:25 -msgid "Running Tests" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:27 -msgid "Before knowing how to write tests, we need to know how to run them." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:79 -msgid "Integration Bots" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:81 -msgid "This section is only for Odoo employees and people that are contributing to `github.com/odoo`. We highly recommend having your own CI if it is not the case." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:84 -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:93 -msgid "Runbot" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:95 -msgid "**Reference**: the documentation related to this topic can be found in `Runbot FAQ `__." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:98 -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:101 -msgid "You can see the state of a commit/branch by filtering on the runbot dashboard." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:103 -msgid "A **bundle** is created for each branch. A bundle consists of a configuration and contains the batches." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:106 -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:109 -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:114 -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:119 -msgid "All tests are run whatever the modifications done. Correcting a typo in an error message or refactoring a whole module triggers the same tests. It will install all the modules. This means something might not work if Runbot green but your changes depend on something you don't depend on." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:123 -msgid "The localization modules (i.e. country-specific modules) are not installed on Runbot (except the generic one), some modules with external dependencies can be excluded also." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:125 -msgid "There is a nightly build running additional tests, like 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:129 -msgid "You can also login on 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:135 -msgid "Robodoo" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:137 -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:140 -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 on the main repositories." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:143 -msgid "When the last batch is green, the reviewer can ask robodoo to merge your PR (actually it is more a `rebase` than a `merge`). It will then go to the mergebot." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:147 -msgid "Mergebot" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:149 -msgid "`Mergebot `__ is the last testing phase before merging a PR." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:151 -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:155 -msgid "This step can fail with a `Staging failed` error message. This could be due to" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:157 -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:159 -msgid "a nondeterministic bug that you introduced but wasn't detected in the CI before" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:160 -msgid "an incompatibility with another commit merged right before and what you are trying to merge" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:161 -msgid "an incompatibility with the enterprise repository if you only did changes in the community repo" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:163 -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:167 -msgid "Modules" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:169 -msgid "Because Odoo is modular, the tests need to be modular also. This means the modules are defined in the module that adds the functionality you add; and that tests cannot depend on functionality coming from modules your module doesn't depend on." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:173 -msgid "**Reference**: the documentation related to this topic can be found in :ref:`Special Tags`." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:194 -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:199 -msgid "Writing a test" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:201 -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:205 -msgid "Here are a few things to take into consideration before writing a test" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:207 -msgid "The tests should be independent from the data currently in the database (including demo data)" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:208 -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:211 -msgid "For a bug fix, the test should fail before applying the fix and pass after." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:212 -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:214 -msgid "You shouldn't need to flush data into the database." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:216 -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:220 -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:236 -msgid "Some older tests are extending ``odoo.tests.common.TransactionCase``, but they are less scalable. The difference is that the setup is done per test method and not per test class. The data changed are rollbacked between each test in `SavepointCase` to have the same behavior as in `TransactionCase`." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:241 -msgid "All the tests should extend ``odoo.tests.common.SavepointCase``. You usually define a ``setUpClass``, and the tests. After doing the `setUpClass`, you have an `env` available on the class and can start interacting with the ORM." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:245 -msgid "These test classes are built on top of the ``unittest`` python module." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:288 -msgid "For more 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; that common class can define the whole set up for the module. For instance in `account `__." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:293 -msgid "Ensure no one can create an offer for a sold Property, and create a test for it." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/E_unittest.rst:296 -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:299 -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:17 -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:24 -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:29 -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:34 -msgid "File Structure" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/J_reports.rst:31 -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 ``_report_views.xml`` regardless of the number of reports it contains." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/J_reports.rst:40 -msgid "Therefore it is expected that your work tree will look something like:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/J_reports.rst:58 -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:63 -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:68 -msgid "Basic Report" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/J_reports.rst:72 -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:79 -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:83 -msgid "Report Data" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/J_reports.rst:85 -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:90 -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:91 -msgid "At least 2-3 offers for our \"sold\" and \"offer received\" properties" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/J_reports.rst:93 -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:116 -msgid "If you don't have a set of data like this already, you can either:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/J_reports.rst:95 -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:118 -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:97 -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:120 -msgid "Manually create the data in your database." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/J_reports.rst:98 -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:103 -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:109 -msgid "Minimal Template" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/J_reports.rst:111 -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:153 -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:156 -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:159 -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:161 -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:165 -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:171 -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:173 -msgid "the ``t-foreach`` and ``t-as`` usage is the equivalent to the Python:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/J_reports.rst:180 -msgid "Report Action" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/J_reports.rst:182 -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:189 -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:201 -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:206 -msgid "Make a Report" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/J_reports.rst:208 -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:210 -msgid "Make a report." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/J_reports.rst:212 -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:214 -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:217 -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:221 -msgid "Remember to check that your PDF reports match your data as expected." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/J_reports.rst:225 -msgid "Sub-templates" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/J_reports.rst:229 -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:235 -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:240 -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:245 -msgid "Create and use a sub-template." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/J_reports.rst:247 -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:250 -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:255 -msgid "Your end result should look similar to the image in the **Goal** of this section." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/J_reports.rst:257 -msgid "Remember to check that your reports match your data as expected!" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/J_reports.rst:260 -msgid "Report Inheritance" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/J_reports.rst:264 -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:271 -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:275 -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:279 -msgid "Inherit a report." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/J_reports.rst:281 -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:284 -msgid "Again, remember to check that your reports match your data as expected!" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/J_reports.rst:287 -msgid "Additional Features" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/J_reports.rst:289 -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:293 -#: ../../content/developer/howtos/web.rst:1227 -msgid "Translations" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/J_reports.rst:295 -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:300 -#: ../../content/developer/reference/addons/reports.rst:309 -msgid "Reports are web pages" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/J_reports.rst:302 -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:308 -#: ../../content/developer/reference/addons/reports.rst:148 -msgid "Barcodes" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/J_reports.rst:310 -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:17 -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:24 -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:31 -msgid "The documentation related to this topic can be found in :ref:`reference/views/dashboard`." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:36 -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:42 -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:50 -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:61 -msgid "It is expected that your work tree will look something like:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:82 -msgid "Dashboard View" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:86 -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:93 -msgid "Dashboards can display data in different ways, including:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:95 -msgid "showing an ``aggregate`` of a field" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:96 -msgid "using aggregated fields in a ``formula``" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:97 -msgid "using a ``widget``" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:98 -msgid "using another ``view`` as a subview" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:100 -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:106 -msgid "Data" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:107 -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:113 -msgid "At least 3 properties with different property types, expected prices, and average living area." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:114 -msgid "At least 1 sold property and at least 1 canceled property" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:121 -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:126 -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:130 -msgid "Aggregations" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:131 -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:145 -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:150 -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:153 -msgid "Make a dashboard view." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:155 -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:160 -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:164 -msgid "Pie Charts" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:165 -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:175 -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:178 -msgid "Add some pie charts." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:180 -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:184 -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:187 -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:192 -msgid "Subviews" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:193 -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:206 -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:214 -msgid "Add subviews." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:216 -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:222 -msgid "SQL Views" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:226 -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:233 -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:241 -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:249 -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:261 -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:269 -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:272 -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:276 -msgid "Now we override the ``BaseModel.init()`` method mentioned earlier::" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:287 -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:295 -msgid "Create report model." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:297 -msgid "Create a report model with the following fields:" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:300 -msgid "Note" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:302 -#: ../../content/developer/reference/addons/data/res.country.state.csv:1 -msgid "id" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:302 -msgid "Corresponds to ``id`` of ``estate.property.offer``" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:303 -msgid "offer_state" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:303 -msgid "Equals ``state`` choices of ``estate.property.offer``" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:305 -msgid "property_state" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:305 -msgid "Equals ``state`` choices of ``estate.property``" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:306 -msgid "property_type_id" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:309 -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:311 -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:319 -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:325 -msgid "Create report view." -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:327 -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:330 -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:334 -msgid "Extra Tips" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/K_dashboard.rst:335 -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:347 -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:353 -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/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:7 -msgid "Advanced N: Security" -msgstr "" - -#: ../../content/developer/howtos/rdtraining/O_perf.rst:7 -msgid "Advanced O: Performances" -msgstr "" - -#: ../../content/developer/howtos/themes.rst:4 -msgid "Theme Tutorial" -msgstr "" - -#: ../../content/developer/howtos/themes.rst:8 -msgid "This tutorial provides a great overview of what you can do creating an Odoo theme. It is however incomplete. We are currently working on a new detailed theme tutorial, come back here soon to unleash the true power of Odoo themes!" -msgstr "" - -#: ../../content/developer/howtos/themes.rst:15 -msgid "Odoo celebrates freedom. Freedom for the designer to go further and freedom for the user to customize everything according to their needs." -msgstr "" - -#: ../../content/developer/howtos/themes.rst:18 -msgid "Ready to create your own theme? Great. Here are some things you should know before you begin. This tutorial is a guide to creating an Odoo theme." -msgstr "" - -#: ../../content/developer/howtos/themes.rst:24 -msgid "An introduction for web designers" -msgstr "" - -#: ../../content/developer/howtos/themes.rst:26 -msgid "If you are a web designer using Odoo for the first time, you are in the right place. This introduction will outline the basics of Odoo theme creation. Odoo’s team has created a framework that’s powerful and easy to use." -msgstr "" - -#: ../../content/developer/howtos/themes.rst:30 -msgid "From common CMS to Odoo" -msgstr "" - -#: ../../content/developer/howtos/themes.rst:34 -msgid "If you always think and work in the same way, you’ll probably get the same results. If you want something completely new, then try something different." -msgstr "" - -#: ../../content/developer/howtos/themes.rst:38 -msgid "Where is my header.php file?" -msgstr "" - -#: ../../content/developer/howtos/themes.rst:40 -msgid "This is usually the first question from a web designer used to working with Wordpress or Joomla and coming to Odoo for the first time." -msgstr "" - -#: ../../content/developer/howtos/themes.rst:50 -msgid "Indeed, when using common CMSs, you have to code several files (like header.php, page.php, post.php, etc.) in order to create a basic structure for your website. With those systems, this base structure acts as a design foundation that you have to update over time to ensure compatibility within your CMS. So, even after you have spent hours coding the files, you have not even started on the design yet." -msgstr "" - -#: ../../content/developer/howtos/themes.rst:52 -msgid "This **does not** apply to creating Odoo themes." -msgstr "" - -#: ../../content/developer/howtos/themes.rst:56 -msgid "We think that theme design should be simple (and powerful). When we created our Website Builder, we decided to start from scratch instead of relying on what already existed. This approach gave us the freedom to focus on the things that are really important for designers: styles, content and the logic behind them. No more struggling with technical stuff." -msgstr "" - -#: ../../content/developer/howtos/themes.rst:59 -msgid "Odoo default theme structure" -msgstr "" - -#: ../../content/developer/howtos/themes.rst:65 -msgid "Odoo comes with a default website structure. It is a very basic “theme” that provides minimal structure and layout. When you create a new theme, you are actually **extending** this. Indeed it’s always enabled in your setup and it acts exactly like the CMS’s base structure we mentioned above, except that you don’t have to create or maintain it. It will upgrade automatically within your Odoo installation and, since it is included in the Website Builder module, everything is smoothly integrated by default." -msgstr "" - -#: ../../content/developer/howtos/themes.rst:70 -msgid "As a result, you are totally free to focus on design while this structure does the job of providing integrations and functionality." -msgstr "" - -#: ../../content/developer/howtos/themes.rst:80 -msgid "**Main features:**" -msgstr "" - -#: ../../content/developer/howtos/themes.rst:82 -msgid "Basic layouts for pages, blog, eCommerce and much more" -msgstr "" - -#: ../../content/developer/howtos/themes.rst:83 -msgid "Website Builder integration" -msgstr "" - -#: ../../content/developer/howtos/themes.rst:84 -msgid "Basic Snippets" -msgstr "" - -#: ../../content/developer/howtos/themes.rst:85 -msgid "Automatic Sass compiling" -msgstr "" - -#: ../../content/developer/howtos/themes.rst:86 -msgid "Automatic Js and CSS minification and combination" -msgstr "" - -#: ../../content/developer/howtos/themes.rst:90 -msgid "**Main technologies:**" -msgstr "" - -#: ../../content/developer/howtos/themes.rst:92 -msgid "Twitter Bootstrap" -msgstr "" - -#: ../../content/developer/howtos/themes.rst:93 -msgid "jQuery" -msgstr "" - -#: ../../content/developer/howtos/themes.rst:94 -msgid "jQuery UI" -msgstr "" - -#: ../../content/developer/howtos/themes.rst:95 -msgid "underscore.js" -msgstr "" - -#: ../../content/developer/howtos/themes.rst:98 -msgid "Thinking \"modular\"" -msgstr "" - -#: ../../content/developer/howtos/themes.rst:100 -msgid "An Odoo theme is not a folder containing HTML or PHP files, it’s a modular framework written in XML. Never worked with XML files before? Don’t worry, after following the tutorial, you’ll be able to create your first theme with only basic knowledge of HTML." -msgstr "" - -#: ../../content/developer/howtos/themes.rst:102 -msgid "Using classical web design workflows, you usually code the layout of the entire page. The result of this is a “static” web page. You can update the content, of course, but your client will need you to work on making even basic changes." -msgstr "" - -#: ../../content/developer/howtos/themes.rst:104 -msgid "Creating themes for Odoo is a total change of perspective. Instead of defining the complete layout for a page, you can create blocks (snippets) and let the user choose where to “drag&drop” them, creating the page layout on their own. We call this modular design." -msgstr "" - -#: ../../content/developer/howtos/themes.rst:107 -msgid "Imagine an Odoo theme as a “list” of elements and options that you have to create or extend. As a designer, your goal is to style these elements in order to achieve a wonderful result, regardless of where the end user chooses to place them." -msgstr "" - -#: ../../content/developer/howtos/themes.rst:110 -msgid "Let’s take a tour of our “list” elements:" -msgstr "" - -#: ../../content/developer/howtos/themes.rst:117 -msgid "Snippets (or building-blocks)" -msgstr "" - -#: ../../content/developer/howtos/themes.rst:119 -msgid "A piece of HTML code. The user will drag&drop, modify and combine them using our built-in Website Builder interface. You can define sets of options and styles for each snippet. The user will choose from them according to their needs." -msgstr "" - -#: ../../content/developer/howtos/themes.rst:124 -msgid "Pages" -msgstr "" - -#: ../../content/developer/howtos/themes.rst:126 -msgid "These are normal web pages, except that they will be editable by the final user and that you can define an empty area that the user can “fill” by dragging snippets into it." -msgstr "" - -#: ../../content/developer/howtos/themes.rst:137 -msgid "Styles" -msgstr "" - -#: ../../content/developer/howtos/themes.rst:139 -msgid "Styles are defined using SCSS files (or you can use standard CSS files). You can define a style as **default** or **optional**. The default styles are always active in your theme, the optional styles can be enabled or disabled by the user." -msgstr "" - -#: ../../content/developer/howtos/themes.rst:144 -msgid "Functionalities" -msgstr "" - -#: ../../content/developer/howtos/themes.rst:146 -msgid "Thanks to Odoo’s modularity, everything can be personalized even more. This means there are endless possibilities for your creativity. Adding functionalities is easy and it’s simple to provide the end user with customizable options." -msgstr "" - -#: ../../content/developer/howtos/themes.rst:150 -msgid "Odoo's XML files, an overview" -msgstr "" - -#: ../../content/developer/howtos/themes.rst:152 -msgid "Any Odoo XML file starts with encoding specifications. After that, you have to write your code inside a ```` tag." -msgstr "" - -#: ../../content/developer/howtos/themes.rst:165 -msgid "Almost every element and option that you create has to be placed inside a ``