diff --git a/doc/api_integration.rst b/doc/api_integration.rst index 172eb0f3fa4..a0f26d39343 100644 --- a/doc/api_integration.rst +++ b/doc/api_integration.rst @@ -15,7 +15,7 @@ easily available over XML-RPC_ and accessible from a variety of languages. .. Odoo XML-RPC idiosyncracies: * uses multiple endpoint and a nested call syntax instead of a - "hierarchical" server structure (e.g. ``openerp.res.partner.read()``) + "hierarchical" server structure (e.g. ``odoo.res.partner.read()``) * uses its own own manual auth system instead of basic auth or sessions (basic is directly supported the Python and Ruby stdlibs as well as ws-xmlrpc, not sure about ripcord) @@ -360,9 +360,9 @@ Each call to ``execute_kw`` takes the following parameters: List records ------------ -Records can be listed and filtered via :meth:`~openerp.models.Model.search`. +Records can be listed and filtered via :meth:`~odoo.models.Model.search`. -:meth:`~openerp.models.Model.search` takes a mandatory +:meth:`~odoo.models.Model.search` takes a mandatory :ref:`domain ` filter (possibly empty), and returns the database identifiers of all records matching the filter. To list customer companies for instance: @@ -456,10 +456,10 @@ Count records ------------- Rather than retrieve a possibly gigantic list of records and count them, -:meth:`~openerp.models.Model.search_count` can be used to retrieve +: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:`~openerp.models.Model.search` and no other parameter. +:meth:`~odoo.models.Model.search` and no other parameter. .. container:: doc-aside @@ -507,9 +507,9 @@ only the number of records matching the query. It takes the same Read records ------------ -Record data is accessible via the :meth:`~openerp.models.Model.read` method, +Record data is accessible via the :meth:`~odoo.models.Model.read` method, which takes a list of ids (as returned by -:meth:`~openerp.models.Model.search`) and optionally a list of fields to +:meth:`~odoo.models.Model.search`) and optionally a list of fields to fetch. By default, it will fetch all the fields the current user can read, which tends to be a huge amount. @@ -620,7 +620,7 @@ Conversedly, picking only three fields deemed interesting. Listing record fields --------------------- -:meth:`~openerp.models.Model.fields_get` can be used to inspect +:meth:`~odoo.models.Model.fields_get` can be used to inspect a model's fields and check which ones seem to be of interest. Because it returns a large amount of meta-information (it is also used by client @@ -705,13 +705,13 @@ Search and read --------------- Because it is a very common task, Odoo provides a -:meth:`~openerp.models.Model.search_read` shortcut which as its name suggests is -equivalent to a :meth:`~openerp.models.Model.search` followed by a -:meth:`~openerp.models.Model.read`, but avoids having to perform two requests +: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. -Its arguments are similar to :meth:`~openerp.models.Model.search`'s, but it -can also take a list of ``fields`` (like :meth:`~openerp.models.Model.read`, +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): .. container:: doc-aside @@ -793,10 +793,10 @@ if that list is not provided it will fetch all fields of matched records): Create records -------------- -Records of a model are created using :meth:`~openerp.models.Model.create`. The +Records of a model are created using :meth:`~odoo.models.Model.create`. The method will create a single record and return its database identifier. -:meth:`~openerp.models.Model.create` takes a mapping of fields to values, used +: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. @@ -837,21 +837,21 @@ set through the mapping argument, the default value will be used. .. warning:: while most value types are what would be expected (integer for - :class:`~openerp.fields.Integer`, string for :class:`~openerp.fields.Char` - or :class:`~openerp.fields.Text`), + :class:`~odoo.fields.Integer`, string for :class:`~odoo.fields.Char` + or :class:`~odoo.fields.Text`), - * :class:`~openerp.fields.Date`, :class:`~openerp.fields.Datetime` and - :class:`~openerp.fields.Binary` fields use string values - * :class:`~openerp.fields.One2many` and :class:`~openerp.fields.Many2many` + * :class:`~odoo.fields.Date`, :class:`~odoo.fields.Datetime` and + :class:`~odoo.fields.Binary` fields use string values + * :class:`~odoo.fields.One2many` and :class:`~odoo.fields.Many2many` use a special command protocol detailed in :meth:`the documentation to - the write method `. + the write method `. Update records -------------- -Records can be updated using :meth:`~openerp.models.Model.write`, it takes +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:`~openerp.models.Model.create`. +to :meth:`~odoo.models.Model.create`. Multiple records can be updated simultanously, but they will all get the same values for the fields being set. It is not currently possible to perform @@ -911,7 +911,7 @@ Delete records -------------- Records can be deleted in bulk by providing their ids to -:meth:`~openerp.models.Model.unlink`. +:meth:`~odoo.models.Model.unlink`. .. container:: doc-aside @@ -966,7 +966,7 @@ Inspection and introspection xid currently associated with the record. And operating with xids isn't exactly fun in RPC. -While we previously used :meth:`~openerp.models.Model.fields_get` to query a +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 @@ -987,13 +987,13 @@ Provides information about Odoo models via its various fields whether the model was generated in Python code (``base``) or by creating an ``ir.model`` record (``manual``) ``field_id`` - list of the model's fields through a :class:`~openerp.fields.One2many` to + list of the model's fields through a :class:`~odoo.fields.One2many` to :ref:`reference/webservice/inspection/fields` ``view_ids`` - :class:`~openerp.fields.One2many` to the :ref:`reference/views` defined + :class:`~odoo.fields.One2many` to the :ref:`reference/views` defined for the model ``access_ids`` - :class:`~openerp.fields.One2many` relation to the + :class:`~odoo.fields.One2many` relation to the :ref:`reference/security/acl` set on the model ``ir.model`` can be used to @@ -1126,7 +1126,7 @@ Provides information about the fields of Odoo models and allows adding custom fields without using Python code ``model_id`` - :class:`~openerp.fields.Many2one` to + :class:`~odoo.fields.Many2one` to :ref:`reference/webservice/inspection/models` to which the field belongs ``name`` the field's technical name (used in ``read`` or ``write``) @@ -1141,7 +1141,7 @@ custom fields without using Python code enables the corresponding flag on the field ``groups`` :ref:`field-level access control `, a - :class:`~openerp.fields.Many2many` to ``res.groups`` + :class:`~odoo.fields.Many2many` to ``res.groups`` ``selection``, ``size``, ``on_delete``, ``relation``, ``relation_field``, ``domain`` type-specific properties and customizations, see :ref:`the fields documentation ` for details diff --git a/doc/howtos/backend.rst b/doc/howtos/backend.rst index b362624a274..cf86992af4c 100644 --- a/doc/howtos/backend.rst +++ b/doc/howtos/backend.rst @@ -123,16 +123,16 @@ This layer avoids having to write most :abbr:`SQL (Structured Query Language)` by hand and provides extensibility and security services\ [#rawsql]_. Business objects are declared as Python classes extending -:class:`~openerp.models.Model` which integrates them into the automated +:class:`~odoo.models.Model` which integrates them into the automated persistence system. Models can be configured by setting a number of attributes at their definition. The most important attribute is -:attr:`~openerp.models.Model._name` which is required and defines the name for +: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:: - from openerp import models + from odoo import models class MinimalModel(models.Model): _name = 'test.model' @@ -142,7 +142,7 @@ Model fields Fields are used to define what the model can store and where. Fields are defined as attributes on the model class:: - from openerp import models, fields + from odoo import models, fields class LessMinimalModel(models.Model): _name = 'test.model2' @@ -159,14 +159,14 @@ configuration attributes as parameters:: Some attributes are available on all fields, here are the most common ones: -:attr:`~openerp.fields.Field.string` (``unicode``, default: field's name) +:attr:`~odoo.fields.Field.string` (``unicode``, default: field's name) The label of the field in UI (visible by users). -:attr:`~openerp.fields.Field.required` (``bool``, default: ``False``) +:attr:`~odoo.fields.Field.required` (``bool``, default: ``False``) 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. -:attr:`~openerp.fields.Field.help` (``unicode``, default: ``''``) +:attr:`~odoo.fields.Field.help` (``unicode``, default: ``''``) Long-form, provides a help tooltip to users in the UI. -:attr:`~openerp.fields.Field.index` (``bool``, default: ``False``) +:attr:`~odoo.fields.Field.index` (``bool``, default: ``False``) Requests that Odoo create a `database index`_ on the column Simple fields @@ -176,8 +176,8 @@ 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). -Example of simple fields are :class:`~openerp.fields.Boolean`, -:class:`~openerp.fields.Date`, :class:`~openerp.fields.Char`. +Example of simple fields are :class:`~odoo.fields.Boolean`, +:class:`~odoo.fields.Date`, :class:`~odoo.fields.Char`. Reserved fields ############### @@ -186,15 +186,15 @@ 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: -:attr:`~openerp.fields.Model.id` (:class:`~openerp.fields.Id`) +:attr:`~odoo.fields.Model.id` (:class:`~odoo.fields.Id`) the unique identifier for a record in its model -:attr:`~openerp.fields.Model.create_date` (:class:`~openerp.fields.Datetime`) +:attr:`~odoo.fields.Model.create_date` (:class:`~odoo.fields.Datetime`) creation date of the record -:attr:`~openerp.fields.Model.create_uid` (:class:`~openerp.fields.Many2one`) +:attr:`~odoo.fields.Model.create_uid` (:class:`~odoo.fields.Many2one`) user who created the record -:attr:`~openerp.fields.Model.write_date` (:class:`~openerp.fields.Datetime`) +:attr:`~odoo.fields.Model.write_date` (:class:`~odoo.fields.Datetime`) last modification date of the record -:attr:`~openerp.fields.Model.write_uid` (:class:`~openerp.fields.Many2one`) +:attr:`~odoo.fields.Model.write_uid` (:class:`~odoo.fields.Many2one`) user who last modified the record Special fields @@ -202,7 +202,7 @@ Special fields 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:`~openerp.models.Model._rec_name`. +overridden by setting :attr:`~odoo.models.Model._rec_name`. .. exercise:: Define a model @@ -230,13 +230,13 @@ record. .. code-block:: xml - + {a value} - + * ``model`` is the name of the Odoo model for the record * ``id`` is an :term:`external identifier`, it allows referring to the record @@ -502,16 +502,16 @@ between different models. Relational field types are: -:class:`Many2one(other_model, ondelete='set null') ` +:class:`Many2one(other_model, ondelete='set null') ` A simple link to an other object:: print foo.other_id.name .. seealso:: `foreign keys `_ -:class:`One2many(other_model, related_field) ` - A virtual relationship, inverse of a :class:`~openerp.fields.Many2one`. - A :class:`~openerp.fields.One2many` behaves as a container of records, +:class:`One2many(other_model, related_field) ` + 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:: for other in foo.other_ids: @@ -519,11 +519,11 @@ Relational field types are: .. danger:: - Because a :class:`~openerp.fields.One2many` is a virtual relationship, - there *must* be a :class:`~openerp.fields.Many2one` field in the + 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}` -:class:`Many2many(other_model) ` +:class:`Many2many(other_model) ` 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:: @@ -604,8 +604,8 @@ fields of the parent record. .. seealso:: - * :attr:`~openerp.models.Model._inherit` - * :attr:`~openerp.models.Model._inherits` + * :attr:`~odoo.models.Model._inherit` + * :attr:`~odoo.models.Model._inherits` View inheritance ---------------- @@ -757,7 +757,7 @@ retrieved from the database but computed on-the-fly by calling a method of the model. To create a computed field, create a field and set its attribute -:attr:`~openerp.fields.Field.compute` to the name of a method. The computation +: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``. @@ -776,7 +776,7 @@ method should simply set the value of the field to compute on every record in .. code-block:: python import random - from openerp import models, fields, api + from odoo import models, fields, api class ComputedModel(models.Model): _name = 'test.computed' @@ -794,11 +794,11 @@ Dependencies 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:`~openerp.api.depends`. +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:: - from openerp import models, fields, api + from odoo import models, fields, api class ComputedModel(models.Model): _name = 'test.computed' @@ -850,7 +850,7 @@ float, string), or a function taking a recordset and returning a value:: .. exercise:: Active objects – Default values * Define the start_date default value as today (see - :class:`~openerp.fields.Date`). + :class:`~odoo.fields.Date`). * Add a field ``active`` in the class Session, and set sessions as active by default. @@ -873,7 +873,7 @@ to the database. 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:`~openerp.api.onchange` +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. @@ -916,16 +916,16 @@ Model constraints ================= Odoo provides two ways to set up automatically verified invariants: -:func:`Python constraints ` and -:attr:`SQL constraints `. +:func:`Python constraints ` and +:attr:`SQL constraints `. A Python constraint is defined as a method decorated with -:func:`~openerp.api.constrains`, and invoked on a recordset. The decorator +: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:: - from openerp.exceptions import ValidationError + from odoo.exceptions import ValidationError @api.constrains('age') def _check_something(self): @@ -944,7 +944,7 @@ raise an exception if its invariant is not satisfied:: .. patch:: SQL constraints are defined through the model attribute -:attr:`~openerp.models.Model._sql_constraints`. The latter is assigned to a list +: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. @@ -1390,7 +1390,7 @@ access rights are limited. 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:`~openerp.models.Model.write` of the ORM. +the same convention as the method :meth:`~odoo.models.Model.write` of the ORM. .. code-block:: xml @@ -1423,9 +1423,9 @@ Wizards Wizards describe interactive sessions with the user (or dialog boxes) through dynamic forms. A wizard is simply a model that extends the class -:class:`~openerp.models.TransientModel` instead of -:class:`~openerp.models.Model`. The class -:class:`~openerp.models.TransientModel` extends :class:`~openerp.models.Model` +: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: - Wizard records are not meant to be persistent; they are automatically deleted @@ -1537,7 +1537,7 @@ for editing and merging PO/POT files. 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:`openerp._` + translated this way by surrounding it with the function :func:`odoo._` (e.g. ``_("Label")``) .. exercise:: Translate a module @@ -1566,7 +1566,7 @@ for editing and merging PO/POT files. terms #. In ``models.py``, add an import statement for the function - ``openerp._`` and mark missing strings as translatable + ``odoo._`` and mark missing strings as translatable #. Repeat steps 3-6 @@ -1852,12 +1852,12 @@ Examples can be easily adapted from XML-RPC to JSON-RPC. * https://github.com/akretion/ooor * https://github.com/syleam/openobject-library - * https://github.com/nicolas-van/openerp-client-lib + * https://github.com/nicolas-van/odoo-client-lib * https://pypi.python.org/pypi/oersted/ - * https://github.com/abhishek-jaiswal/php-openerp-lib + * https://github.com/abhishek-jaiswal/php-odoo-lib .. [#autofields] it is possible to :attr:`disable the automatic creation of some - fields ` + fields ` .. [#rawsql] writing raw SQL queries is possible, but requires care as it bypasses all Odoo authentication and security mechanisms. diff --git a/doc/howtos/backend/exercise-access-rights b/doc/howtos/backend/exercise-access-rights index e653cbadcd5..65165f14b29 100644 --- a/doc/howtos/backend/exercise-access-rights +++ b/doc/howtos/backend/exercise-access-rights @@ -31,10 +31,10 @@ Index: addons/openacademy/security/security.xml --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ addons/openacademy/security/security.xml 2014-08-26 17:26:18.135783102 +0200 @@ -0,0 +1,7 @@ -+ ++ + + + OpenAcademy / Manager + + -+ ++ diff --git a/doc/howtos/backend/exercise-access-rules b/doc/howtos/backend/exercise-access-rules index 4ec91a3fcd4..40cdacfe03e 100644 --- a/doc/howtos/backend/exercise-access-rules +++ b/doc/howtos/backend/exercise-access-rules @@ -24,4 +24,4 @@ Index: addons/openacademy/security/security.xml + + - + diff --git a/doc/howtos/backend/exercise-basic-action b/doc/howtos/backend/exercise-basic-action index f5e5e9be9d5..b8876a1f9e8 100644 --- a/doc/howtos/backend/exercise-basic-action +++ b/doc/howtos/backend/exercise-basic-action @@ -18,7 +18,7 @@ Index: addons/openacademy/views/openacademy.xml +++ addons/openacademy/views/openacademy.xml 2014-08-26 17:25:53.511783468 +0200 @@ -0,0 +1,35 @@ + -+ ++ + + + + -+ ++ diff --git a/doc/howtos/backend/exercise-calendar b/doc/howtos/backend/exercise-calendar index 6d85a64e05a..9a86e6b03de 100644 --- a/doc/howtos/backend/exercise-calendar +++ b/doc/howtos/backend/exercise-calendar @@ -9,7 +9,7 @@ diff --git a/openacademy/models.py b/openacademy/models.py # -*- coding: utf-8 -*- +from datetime import timedelta - from openerp import models, fields, api, exceptions + from odoo import models, fields, api, exceptions class Session(models.Model): @@ -55,6 +56,8 @@ class Session(models.Model): diff --git a/doc/howtos/backend/exercise-constraint-python b/doc/howtos/backend/exercise-constraint-python index 290e09aa5a1..144a64e0325 100644 --- a/doc/howtos/backend/exercise-constraint-python +++ b/doc/howtos/backend/exercise-constraint-python @@ -8,8 +8,8 @@ diff --git a/openacademy/models.py b/openacademy/models.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- --from openerp import models, fields, api -+from openerp import models, fields, api, exceptions +-from odoo import models, fields, api ++from odoo import models, fields, api, exceptions class Course(models.Model): _name = 'openacademy.course' diff --git a/doc/howtos/backend/exercise-creation b/doc/howtos/backend/exercise-creation index 80911aa160e..490f7fd7a02 100644 --- a/doc/howtos/backend/exercise-creation +++ b/doc/howtos/backend/exercise-creation @@ -22,7 +22,7 @@ Index: addons/openacademy/__manifest__.py + 'website': "http://www.yourcompany.com", + + # Categories can be used to filter modules in modules listing -+ # Check https://github.com/odoo/odoo/blob/master/openerp/addons/base/module/module_data.xml ++ # Check https://github.com/odoo/odoo/blob/master/odoo/addons/base/module/module_data.xml + # for the full list + 'category': 'Test', + 'version': '0.1', @@ -54,7 +54,7 @@ Index: addons/openacademy/controllers.py +++ addons/openacademy/controllers.py 2014-08-26 17:25:49.791783523 +0200 @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- -+from openerp import http ++from odoo import http + +# class Openacademy(http.Controller): +# @http.route('/openacademy/openacademy/', auth='public') @@ -78,7 +78,7 @@ Index: addons/openacademy/demo.xml --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ addons/openacademy/demo.xml 2014-08-26 17:25:49.791783523 +0200 @@ -0,0 +1,25 @@ -+ ++ + + + @@ -102,7 +102,7 @@ Index: addons/openacademy/demo.xml + + + -+ ++ Index: addons/openacademy/models.py =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 @@ -110,7 +110,7 @@ Index: addons/openacademy/models.py @@ -0,0 +1,8 @@ +# -*- coding: utf-8 -*- + -+from openerp import models, fields, api ++from odoo import models, fields, api + +# class openacademy(models.Model): +# _name = 'openacademy.openacademy' @@ -128,7 +128,7 @@ Index: addons/openacademy/templates.xml --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ addons/openacademy/templates.xml 2014-08-26 17:25:49.791783523 +0200 @@ -0,0 +1,22 @@ -+ ++ + + + @@ -149,4 +149,4 @@ Index: addons/openacademy/templates.xml + + + -+ ++ diff --git a/doc/howtos/backend/exercise-dashboard b/doc/howtos/backend/exercise-dashboard index b1092479669..4a6eceb8fd9 100644 --- a/doc/howtos/backend/exercise-dashboard +++ b/doc/howtos/backend/exercise-dashboard @@ -28,7 +28,7 @@ Index: addons/openacademy/views/session_board.xml +++ addons/openacademy/views/session_board.xml 2014-08-26 17:26:21.531783052 +0200 @@ -0,0 +1,66 @@ + -+ ++ + + + Attendees by course @@ -92,4 +92,4 @@ Index: addons/openacademy/views/session_board.xml + sequence="1" + id="menu_board_session" icon="terp-graph"/> + -+ ++ diff --git a/doc/howtos/backend/exercise-demo b/doc/howtos/backend/exercise-demo index 96d591a5fc1..a03007d7fe9 100644 --- a/doc/howtos/backend/exercise-demo +++ b/doc/howtos/backend/exercise-demo @@ -6,7 +6,7 @@ Index: addons/openacademy/demo.xml --- addons.orig/openacademy/demo.xml 2014-08-26 17:25:52.683783480 +0200 +++ addons/openacademy/demo.xml 2014-08-26 17:25:52.679783480 +0200 @@ -1,25 +1,19 @@ - + - - @@ -45,4 +45,4 @@ Index: addons/openacademy/demo.xml + Course 2's description + - + diff --git a/doc/howtos/backend/exercise-domain-advanced b/doc/howtos/backend/exercise-domain-advanced index 4b27ad89143..bed90880dcd 100644 --- a/doc/howtos/backend/exercise-domain-advanced +++ b/doc/howtos/backend/exercise-domain-advanced @@ -40,4 +40,4 @@ Index: addons/openacademy/views/partner.xml + Teacher / Level 2 + - + diff --git a/doc/howtos/backend/exercise-formview b/doc/howtos/backend/exercise-formview index ad0dd4e9baf..8de3e69f7e6 100644 --- a/doc/howtos/backend/exercise-formview +++ b/doc/howtos/backend/exercise-formview @@ -7,7 +7,7 @@ Index: addons/openacademy/views/openacademy.xml +++ addons/openacademy/views/openacademy.xml 2014-08-26 17:25:54.283783457 +0200 @@ -1,6 +1,21 @@ - + + + course.form diff --git a/doc/howtos/backend/exercise-model b/doc/howtos/backend/exercise-model index 57be0edad57..4c3b8573107 100644 --- a/doc/howtos/backend/exercise-model +++ b/doc/howtos/backend/exercise-model @@ -6,7 +6,7 @@ Index: addons/openacademy/models.py +++ addons/openacademy/models.py 2014-08-26 17:25:51.639783496 +0200 @@ -2,7 +2,8 @@ - from openerp import models, fields, api + from odoo import models, fields, api -# class openacademy(models.Model): -# _name = 'openacademy.openacademy' diff --git a/doc/howtos/backend/exercise-model-inheritance b/doc/howtos/backend/exercise-model-inheritance index 941ce0442df..f74e5e95c33 100644 --- a/doc/howtos/backend/exercise-model-inheritance +++ b/doc/howtos/backend/exercise-model-inheritance @@ -28,7 +28,7 @@ Index: addons/openacademy/partner.py +++ addons/openacademy/partner.py 2014-08-26 17:26:01.223783354 +0200 @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- -+from openerp import fields, models ++from odoo import fields, models + +class Partner(models.Model): + _inherit = 'res.partner' @@ -45,7 +45,7 @@ Index: addons/openacademy/views/partner.xml +++ addons/openacademy/views/partner.xml 2014-08-26 17:26:01.223783354 +0200 @@ -0,0 +1,32 @@ + -+ ++ + + + @@ -75,4 +75,4 @@ Index: addons/openacademy/views/partner.xml + parent="configuration_menu" + action="contact_list_action"/> + -+ ++ diff --git a/doc/howtos/backend/exercise-report b/doc/howtos/backend/exercise-report index b06e3fbf6ee..6e8a2d78705 100644 --- a/doc/howtos/backend/exercise-report +++ b/doc/howtos/backend/exercise-report @@ -18,7 +18,7 @@ Index: addons/openacademy/reports.xml --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ addons/openacademy/reports.xml 2014-08-29 08:41:12.663540061 +0200 @@ -0,0 +1,30 @@ -+ ++ + + + + -+ ++ diff --git a/doc/howtos/backend/exercise-session b/doc/howtos/backend/exercise-session index 993ee0a7dd6..9a6fe886932 100644 --- a/doc/howtos/backend/exercise-session +++ b/doc/howtos/backend/exercise-session @@ -55,4 +55,4 @@ Index: addons/openacademy/views/openacademy.xml + parent="openacademy_menu" + action="session_list_action"/> - + diff --git a/doc/howtos/backend/exercise-state-workflow b/doc/howtos/backend/exercise-state-workflow index 6178913d164..d97dce1b1ea 100644 --- a/doc/howtos/backend/exercise-state-workflow +++ b/doc/howtos/backend/exercise-state-workflow @@ -50,7 +50,7 @@ new file mode 100644 --- /dev/null +++ b/openacademy/views/session_workflow.xml @@ -0,0 +1,50 @@ -+ ++ + + + OpenAcademy sessions workflow @@ -99,4 +99,4 @@ new file mode 100644 + done + + -+ ++ diff --git a/doc/howtos/backend/exercise-state-workflow-automatic b/doc/howtos/backend/exercise-state-workflow-automatic index 112d0a3cd20..c1f5d1c7e5a 100644 --- a/doc/howtos/backend/exercise-state-workflow-automatic +++ b/doc/howtos/backend/exercise-state-workflow-automatic @@ -16,4 +16,4 @@ Index: addons/openacademy/views/session_workflow.xml + taken_seats > 50 + - + diff --git a/doc/howtos/backend/exercise-translations b/doc/howtos/backend/exercise-translations index 707abe27557..8ade655253d 100644 --- a/doc/howtos/backend/exercise-translations +++ b/doc/howtos/backend/exercise-translations @@ -8,8 +8,8 @@ diff --git a/openacademy/models.py b/openacademy/models.py # -*- coding: utf-8 -*- from datetime import timedelta --from openerp import models, fields, api, exceptions -+from openerp import models, fields, api, exceptions, _ +-from odoo import models, fields, api, exceptions ++from odoo import models, fields, api, exceptions, _ class Course(models.Model): _name = 'openacademy.course' diff --git a/doc/howtos/backend/exercise-wizard b/doc/howtos/backend/exercise-wizard index 906cdef181b..400654c4ff3 100644 --- a/doc/howtos/backend/exercise-wizard +++ b/doc/howtos/backend/exercise-wizard @@ -14,7 +14,7 @@ Index: addons/openacademy/wizard.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- + -+from openerp import models, fields, api ++from odoo import models, fields, api + +class Wizard(models.TransientModel): + _name = 'openacademy.wizard' diff --git a/doc/howtos/backend/exercise-wizard-launch b/doc/howtos/backend/exercise-wizard-launch index bfd0f26bf30..605178e8375 100644 --- a/doc/howtos/backend/exercise-wizard-launch +++ b/doc/howtos/backend/exercise-wizard-launch @@ -43,4 +43,4 @@ Index: addons/openacademy/views/openacademy.xml + target="new" + key2="client_action_multi"/> - + diff --git a/doc/howtos/themes.rst b/doc/howtos/themes.rst index 9ad9c2a8673..531f5e2c8f0 100644 --- a/doc/howtos/themes.rst +++ b/doc/howtos/themes.rst @@ -144,17 +144,17 @@ Odoo's XML files, an overview ----------------------------- Any Odoo XML file starts with encoding specifications. -After that, you have to write your code inside a ```` tag, placed into an ```` tag. +After that, you have to write your code inside a ```` tag, placed into an ```` tag. .. code-block:: xml [XML] - +     ## YOUR CODE HERE   - + Almost every element and option that you create has to be placed inside a ``