From a4a9c2941f95cbd229171adf9d23c977485a1804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 17 Apr 2012 10:43:15 +0200 Subject: [PATCH 001/841] [REF] Moved nex features merges from api to revisions. bzr revid: tde@openerp.com-20120417084315-omitzsd21sq3mby0 --- doc/index.rst | 31 +++----------------- doc/index.rst.inc | 12 ++++---- doc/{api => revisions}/need_action_specs.rst | 0 doc/{api => revisions}/user_img_specs.rst | 0 4 files changed, 10 insertions(+), 33 deletions(-) rename doc/{api => revisions}/need_action_specs.rst (100%) rename doc/{api => revisions}/user_img_specs.rst (100%) diff --git a/doc/index.rst b/doc/index.rst index 815633aed54..51162354913 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -1,29 +1,6 @@ -.. OpenERP Web documentation master file, created by - sphinx-quickstart on Fri Mar 18 16:31:55 2011. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. +:orphan: -Welcome to OpenERP Web's documentation! -======================================= +OpenERP Server Developers Documentation +======================================== -Contents: - -.. toctree:: - :maxdepth: 2 - - search-view - - getting-started - production - widgets - addons - development - project - old-version - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` +.. include:: index.rst.inc diff --git a/doc/index.rst.inc b/doc/index.rst.inc index 80873a696ec..da37481785f 100644 --- a/doc/index.rst.inc +++ b/doc/index.rst.inc @@ -1,17 +1,17 @@ -OpenERP Server -'''''''''''''' +OpenERP Server Documentation +''''''''''''''''''''''''''''' .. toctree:: :maxdepth: 1 test-framework -New feature merges -++++++++++++++++++ +Main revisions and new features +++++++++++++++++++++++++++++++++ .. toctree:: :maxdepth: 1 - api/user_img_specs - api/need_action_specs + revisions/user_img_specs + revisions/need_action_specs diff --git a/doc/api/need_action_specs.rst b/doc/revisions/need_action_specs.rst similarity index 100% rename from doc/api/need_action_specs.rst rename to doc/revisions/need_action_specs.rst diff --git a/doc/api/user_img_specs.rst b/doc/revisions/user_img_specs.rst similarity index 100% rename from doc/api/user_img_specs.rst rename to doc/revisions/user_img_specs.rst From 05cbf324d405716eef963984eff530e27c55a02a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 17 Apr 2012 11:21:34 +0200 Subject: [PATCH 002/841] [REN] Renamed test-framework to 99_test_framework (temp modification to include dev book) bzr revid: tde@openerp.com-20120417092134-rpmk8rd14svdgde2 --- doc/99_test_framework.rst | 100 ++++++++++++++++++++++++++++++++++++++ doc/index.rst.inc | 3 +- 2 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 doc/99_test_framework.rst diff --git a/doc/99_test_framework.rst b/doc/99_test_framework.rst new file mode 100644 index 00000000000..56951b1a8e1 --- /dev/null +++ b/doc/99_test_framework.rst @@ -0,0 +1,100 @@ +.. _test-framework: + +Test framework +============== + +In addition to the YAML-based tests, OpenERP uses the unittest2_ testing +framework to test both the core ``openerp`` package and its addons. For the +core and each addons, tests are divided between three (overlapping) sets: + +1. A test suite that comprises all the tests that can be run right after the + addons is installed (or, for the core, right after a database is created). + That suite is called ``fast_suite`` and must contain only tests that can be run + frequently. Actually most of the tests should be considered fast enough to be + included in that ``fast_suite`` list and only tests that take a long time to run + (e.g. more than a minute) should not be listed. Those long tests should come up + pretty rarely. + +2. A test suite called ``checks`` provides sanity checks. These tests are + invariants that must be full-filled at any time. They are expected to always + pass: obviously they must pass right after the module is installed (i.e. just + like the ``fast_suite`` tests), but they must also pass after any other module is + installed, after a migration, or even after the database was put in production + for a few months. + +3. The third suite is made of all the tests: those provided by the two above + suites, but also tests that are not explicitely listed in ``fast_suite`` or + ``checks``. They are not explicitely listed anywhere and are discovered + automatically. + +As the sanity checks provide stronger guarantees about the code and database +structure, new tests must be added to the ``checks`` suite whenever it is +possible. Said with other words: one should try to avoid writing tests that +assume a freshly installed/unaltered module or database. + +It is possible to have tests that are not listed in ``fast_suite`` or +``checks``. This is useful if a test takes a lot of time. By default, when +using the testing infrastructure, tests should run fast enough so that people +can use them frequently. One can also use that possiblity for tests that +require some complex setup before they can be successfuly run. + +As a rule of thumb when writing a new test, try to add it to the ``checks`` +suite. If it really needs that the module it belongs to is freshly installed, +add it to ``fast_suite``. Finally, if it can not be run in an acceptable time +frame, don't add it to any explicit list. + +Writing tests +------------- + +The tests must be developed under ``.tests`` (or ``openerp.tests`` +for the core). For instance, with respect to the tests, a module ``foo`` +should be organized as follow:: + + foo/ + __init__.py # does not import .tests + tests/ + __init__.py # import some of the tests sub-modules, and + # list them in fast_suite or checks + test_bar.py # contains unittest2 classes + test_baz.py # idem + ... and so on ... + +The two explicit lists of tests are thus the variables ``foo.tests.fast_suite`` +and ``foo.tests.checks``. As an example, you can take a look at the +``openerp.tests`` module (which follows exactly the same conventions even if it +is not an addons). + +Note that the ``fast_suite`` and ``checks`` variables are really lists of +module objects. They could be directly unittest2 suite objects if necessary in +the future. + +Running the tests +----------------- + +To run the tests (see :ref:`above ` to learn how tests are +organized), the simplest way is to use the ``oe`` command (provided by the +``openerp-command`` project). + +:: + + > oe run-tests # will run all the fast_suite tests + > oe run-tests -m openerp # will run all the fast_suite tests defined in `openerp.tests` + > oe run-tests -m sale # will run all the fast_suite tests defined in `openerp.addons.sale.tests` + > oe run-tests -m foo.test_bar # will run the tests defined in `openerp.addons.foo.tests.test_bar` + +In addition to the above possibilities, when invoked with a non-existing module +(or module.sub-module) name, oe will reply with a list of available test +sub-modules. + +Depending on the unittest2_ class that is used to write the tests (see +``openerp.tests.common`` for some helper classes that you can re-use), a database +may be created before the test is run, and the module providing the test will +be installed on that database. + +Because creating a database, installing modules, and then dropping it is +expensive, it is possible to interleave the run of the ``fast_suite`` tests +with the initialization of a new database: the dabase is created, and after +each requested module is installed, its fast_suite tests are run. The database +is thus created and dropped (and the modules installed) only once. + +.. _unittest2: http://pypi.python.org/pypi/unittest2 diff --git a/doc/index.rst.inc b/doc/index.rst.inc index da37481785f..e36bccd79d5 100644 --- a/doc/index.rst.inc +++ b/doc/index.rst.inc @@ -5,7 +5,8 @@ OpenERP Server Documentation .. toctree:: :maxdepth: 1 - test-framework + 01_getting_started + 99_test_framework Main revisions and new features ++++++++++++++++++++++++++++++++ From efa85ca0809d109f377adef17fa209d6c81e4e7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 17 Apr 2012 11:22:05 +0200 Subject: [PATCH 003/841] [REF] Added first chapter from dev book: getting started. Rewrote the installation guide. bzr revid: tde@openerp.com-20120417092205-5mfvukv35qysj6h6 --- doc/01_getting_started.rst | 279 +++++++++++++++++++++++++++++++++++++ doc/test-framework.rst | 100 ------------- 2 files changed, 279 insertions(+), 100 deletions(-) create mode 100644 doc/01_getting_started.rst delete mode 100644 doc/test-framework.rst diff --git a/doc/01_getting_started.rst b/doc/01_getting_started.rst new file mode 100644 index 00000000000..e7bd882305a --- /dev/null +++ b/doc/01_getting_started.rst @@ -0,0 +1,279 @@ +========================================= +Getting started with OpenERP development +========================================= + +.. toctree:: + :maxdepth: 1 + +Installation from sources +++++++++++++++++++++++++++ + +.._getting_started_installation_source-link: + +Source code is hosted on Launchpad_. In order to get the sources, you will need Bazaar_ to pull the source from Launchpad. Bazaar is a version control system that helps you track project history over time and collaborate efficiently. You may have to create an account on Launchpad to be able to collaborate on OpenERP development. Please refer to the Launchpad and Bazaar documentation to install and setup your development environment. + +The running example of this section is based on an Ubuntu environment. You may have to adapt the steps according to your system. Once your working environment is ready, prepare a working directory that will contain the sources. For a ``source`` base directory, type:: + + mkdir source;cd source + +OpenERP provides a setup script that automatizes the tasks of creating a shared repository and getting the source code. Get the setup script of OpenERP by typing:: + + bzr cat -d lp:~openerp-dev/openerp-tools/trunk setup.sh | sh + +This will create the following two files in your ``source`` directory:: + + -rw-rw-r-- 1 openerp openerp 5465 2012-04-17 11:05 Makefile + -rw-rw-r-- 1 openerp openerp 2902 2012-04-17 11:05 Makefile_helper.py + +If you want some help about the available options, please type:: + + make help + +Next step is to initialize the shared repository and download the sources. Get the current trunk version of OpenERP by typing:: + + make init-trunk + +This will create the following structure inside your ``source`` directory, and fetch the latest source code from ``trunk``:: + + drwxrwxr-x 3 openerp openerp 4096 2012-04-17 11:10 addons + drwxrwxr-x 3 openerp openerp 4096 2012-04-17 11:10 client + drwxrwxr-x 3 openerp openerp 4096 2012-04-17 11:10 client-web + drwxrwxr-x 2 openerp openerp 4096 2012-04-17 11:10 dump + drwxrwxr-x 3 openerp openerp 4096 2012-04-17 11:10 misc + drwxrwxr-x 3 openerp openerp 4096 2012-04-17 11:10 server + drwxrwxr-x 3 openerp openerp 4096 2012-04-17 11:10 web + +Some dependencies are necessary to use OpenERP. Depending on your environment, you might have to install the following packages:: + + sudo apt-get install graphviz ghostscript postgresql + python-imaging python-matplotlib + +Next step is to initialize the database. This will create a new openerp role:: + + make db-setup + +Finally, launch the OpenERP server:: + + make server + +Testing your installation can be done on http://localhost:8069/ . You should see the OpenERP main login page. + +.. _Launchpad: https://launchpad.net/ +.. _Bazaar: http://bazaar.canonical.com/en/ + +Configuration +============= + +.. _getrting_started_configuration-link: + +Two configuration files are available: + + * one for the client: ~/.openerprc + * one for the server: ~/.openerp_serverrc + +Those files follow the convention used by python's ConfigParser module. + +Lines beginning with "#" or ";" are comments. + +The client configuration file is automatically generated upon the first start. The one of the server can automatically be created using the command: :: + + openerp-server.py -s + +If they are not found, the server and the client will start with the default configuration. + + +**Server Configuration File** + +The server configuration file .openerp_serverrc is used to save server startup options. Here is the list of the available options: + +:interface: + Address to which the server will be bound + +:port: + Port the server will listen on + +:database: + Name of the database to use + +:user: + Username used when connecting to the database + +:translate_in: + File used to translate OpenERP to your language + +:translate_out: + File used to export the language OpenERP use + +:language: + Use this language as the language of the server. This must be specified as an ISO country code, as specified by the W3C. + +:verbose: + Enable debug output + +:init: + init a module (use "all" for all modules) + +:update: + update a module (use "all" for all modules) + +:upgrade: + Upgrade/install/uninstall modules + +:db_name: + specify the database name + +:db_user: + specify the database user name + +:db_password: + specify the database password + +:pg_path: + specify the pg executable path + +:db_host: + specify the database host + +:db_port: + specify the database port + +:translate_modules: + Specify modules to export. Use in combination with --i18n-export + + +You can create your own configuration file by specifying -s or --save on the server command line. If you would like to write an alternative configuration file, use -c or --config= +Here is a basic configuration for a server:: + + [options] + verbose = False + xmlrpc = True + database = terp + update = {} + port = 8069 + init = {} + interface = 127.0.0.1 + reportgz = False + +Full Example for Server V5.0 :: + + [printer] + path = none + softpath_html = none + preview = True + softpath = none + + [logging] + output = stdout + logger = + verbose = True + level = error + + [help] + index = http://www.openerp.com/documentation/user-manual/ + context = http://www.openerp.com/scripts/context_index.php + + [form] + autosave = False + toolbar = True + + [support] + recipient = support@openerp.com + support_id = + + [tip] + position = 0 + autostart = False + + [client] + lang = en_US + default_path = /home/user + filetype = {} + theme = none + toolbar = icons + form_tab_orientation = 0 + form_tab = top + + [survey] + position = 3 + + [path] + pixmaps = /usr/share/pixmaps/openerp-client/ + share = /usr/share/openerp-client/ + + [login] + db = eo2 + login = admin + protocol = http:// + port = 8069 + server = localhost + + +Command line options +==================== + +General Options +--------------- + + --version show program version number and exit + -h, --help show this help message and exit + -c CONFIG, --config=CONFIG + specify alternate config file + -s, --save save configuration to ~/.terp_serverrc + -v, --verbose enable debugging + --pidfile=PIDFILE file where the server pid will be stored + --logfile=LOGFILE file where the server log will be stored + -n INTERFACE, --interface=INTERFACE + specify the TCP IP address + -p PORT, --port=PORT specify the TCP port + --net_interface=NETINTERFACE + specify the TCP IP address for netrpc + --net_port=NETPORT specify the TCP port for netrpc + --no-netrpc disable netrpc + --no-xmlrpc disable xmlrpc + -i INIT, --init=INIT init a module (use "all" for all modules) + --without-demo=WITHOUT_DEMO + load demo data for a module (use "all" for all + modules) + -u UPDATE, --update=UPDATE + update a module (use "all" for all modules) + --stop-after-init stop the server after it initializes + --debug enable debug mode + -S, --secure launch server over https instead of http + --smtp=SMTP_SERVER specify the SMTP server for sending mail + +Database related options: +------------------------- + + -d DB_NAME, --database=DB_NAME + specify the database name + -r DB_USER, --db_user=DB_USER + specify the database user name + -w DB_PASSWORD, --db_password=DB_PASSWORD + specify the database password + --pg_path=PG_PATH specify the pg executable path + --db_host=DB_HOST specify the database host + --db_port=DB_PORT specify the database port + +Internationalization options: +----------------------------- + + Use these options to translate OpenERP to another language.See i18n + section of the user manual. Option '-l' is mandatory. + + -l LANGUAGE, --language=LANGUAGE + specify the language of the translation file. Use it + with --i18n-export and --i18n-import + --i18n-export=TRANSLATE_OUT + export all sentences to be translated to a CSV file + and exit + --i18n-import=TRANSLATE_IN + import a CSV file with translations and exit + --modules=TRANSLATE_MODULES + specify modules to export. Use in combination with + --i18n-export + +Options from previous versions: +------------------------------- +Some options were removed in version 6. For example, ``price_accuracy`` is now +configured through the :ref:`decimal_accuracy` screen. + diff --git a/doc/test-framework.rst b/doc/test-framework.rst deleted file mode 100644 index 56951b1a8e1..00000000000 --- a/doc/test-framework.rst +++ /dev/null @@ -1,100 +0,0 @@ -.. _test-framework: - -Test framework -============== - -In addition to the YAML-based tests, OpenERP uses the unittest2_ testing -framework to test both the core ``openerp`` package and its addons. For the -core and each addons, tests are divided between three (overlapping) sets: - -1. A test suite that comprises all the tests that can be run right after the - addons is installed (or, for the core, right after a database is created). - That suite is called ``fast_suite`` and must contain only tests that can be run - frequently. Actually most of the tests should be considered fast enough to be - included in that ``fast_suite`` list and only tests that take a long time to run - (e.g. more than a minute) should not be listed. Those long tests should come up - pretty rarely. - -2. A test suite called ``checks`` provides sanity checks. These tests are - invariants that must be full-filled at any time. They are expected to always - pass: obviously they must pass right after the module is installed (i.e. just - like the ``fast_suite`` tests), but they must also pass after any other module is - installed, after a migration, or even after the database was put in production - for a few months. - -3. The third suite is made of all the tests: those provided by the two above - suites, but also tests that are not explicitely listed in ``fast_suite`` or - ``checks``. They are not explicitely listed anywhere and are discovered - automatically. - -As the sanity checks provide stronger guarantees about the code and database -structure, new tests must be added to the ``checks`` suite whenever it is -possible. Said with other words: one should try to avoid writing tests that -assume a freshly installed/unaltered module or database. - -It is possible to have tests that are not listed in ``fast_suite`` or -``checks``. This is useful if a test takes a lot of time. By default, when -using the testing infrastructure, tests should run fast enough so that people -can use them frequently. One can also use that possiblity for tests that -require some complex setup before they can be successfuly run. - -As a rule of thumb when writing a new test, try to add it to the ``checks`` -suite. If it really needs that the module it belongs to is freshly installed, -add it to ``fast_suite``. Finally, if it can not be run in an acceptable time -frame, don't add it to any explicit list. - -Writing tests -------------- - -The tests must be developed under ``.tests`` (or ``openerp.tests`` -for the core). For instance, with respect to the tests, a module ``foo`` -should be organized as follow:: - - foo/ - __init__.py # does not import .tests - tests/ - __init__.py # import some of the tests sub-modules, and - # list them in fast_suite or checks - test_bar.py # contains unittest2 classes - test_baz.py # idem - ... and so on ... - -The two explicit lists of tests are thus the variables ``foo.tests.fast_suite`` -and ``foo.tests.checks``. As an example, you can take a look at the -``openerp.tests`` module (which follows exactly the same conventions even if it -is not an addons). - -Note that the ``fast_suite`` and ``checks`` variables are really lists of -module objects. They could be directly unittest2 suite objects if necessary in -the future. - -Running the tests ------------------ - -To run the tests (see :ref:`above ` to learn how tests are -organized), the simplest way is to use the ``oe`` command (provided by the -``openerp-command`` project). - -:: - - > oe run-tests # will run all the fast_suite tests - > oe run-tests -m openerp # will run all the fast_suite tests defined in `openerp.tests` - > oe run-tests -m sale # will run all the fast_suite tests defined in `openerp.addons.sale.tests` - > oe run-tests -m foo.test_bar # will run the tests defined in `openerp.addons.foo.tests.test_bar` - -In addition to the above possibilities, when invoked with a non-existing module -(or module.sub-module) name, oe will reply with a list of available test -sub-modules. - -Depending on the unittest2_ class that is used to write the tests (see -``openerp.tests.common`` for some helper classes that you can re-use), a database -may be created before the test is run, and the module providing the test will -be installed on that database. - -Because creating a database, installing modules, and then dropping it is -expensive, it is possible to interleave the run of the ``fast_suite`` tests -with the initialization of a new database: the dabase is created, and after -each requested module is installed, its fast_suite tests are run. The database -is thus created and dropped (and the modules installed) only once. - -.. _unittest2: http://pypi.python.org/pypi/unittest2 From 8624a85a20be8c77c3d7ab118cf2f21e01e7163b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 17 Apr 2012 13:09:40 +0200 Subject: [PATCH 004/841] [DOC] getting_started: improved content bzr revid: tde@openerp.com-20120417110940-b8mq1sqone0wpycp --- doc/01_getting_started.rst | 547 ++++++++++++++++++++++++------------- 1 file changed, 355 insertions(+), 192 deletions(-) diff --git a/doc/01_getting_started.rst b/doc/01_getting_started.rst index e7bd882305a..d126c4ccb82 100644 --- a/doc/01_getting_started.rst +++ b/doc/01_getting_started.rst @@ -1,14 +1,14 @@ -========================================= +======================================== Getting started with OpenERP development -========================================= +======================================== .. toctree:: - :maxdepth: 1 + :maxdepth: 1 Installation from sources -++++++++++++++++++++++++++ +========================== -.._getting_started_installation_source-link: +.. _getting_started_installation_source-link: Source code is hosted on Launchpad_. In order to get the sources, you will need Bazaar_ to pull the source from Launchpad. Bazaar is a version control system that helps you track project history over time and collaborate efficiently. You may have to create an account on Launchpad to be able to collaborate on OpenERP development. Please refer to the Launchpad and Bazaar documentation to install and setup your development environment. @@ -45,8 +45,14 @@ This will create the following structure inside your ``source`` directory, and f Some dependencies are necessary to use OpenERP. Depending on your environment, you might have to install the following packages:: - sudo apt-get install graphviz ghostscript postgresql - python-imaging python-matplotlib + sudo apt-get install graphviz ghostscript postgresql-client + + sudo apt-get install python-dateutil python-feedparser python-gdata + python-ldap python-libxslt1 python-lxml python-mako, python-openid + python-psycopg2 python-pybabel python-pychart python-pydot + python-pyparsing python-reportlab python-simplejson python-tz + python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt + python-yaml python-zsi python-imaging python-matplotlib Next step is to initialize the database. This will create a new openerp role:: @@ -61,189 +67,46 @@ Testing your installation can be done on http://localhost:8069/ . You should see .. _Launchpad: https://launchpad.net/ .. _Bazaar: http://bazaar.canonical.com/en/ -Configuration -============= - -.. _getrting_started_configuration-link: - -Two configuration files are available: - - * one for the client: ~/.openerprc - * one for the server: ~/.openerp_serverrc - -Those files follow the convention used by python's ConfigParser module. - -Lines beginning with "#" or ";" are comments. - -The client configuration file is automatically generated upon the first start. The one of the server can automatically be created using the command: :: - - openerp-server.py -s - -If they are not found, the server and the client will start with the default configuration. - - -**Server Configuration File** - -The server configuration file .openerp_serverrc is used to save server startup options. Here is the list of the available options: - -:interface: - Address to which the server will be bound - -:port: - Port the server will listen on - -:database: - Name of the database to use - -:user: - Username used when connecting to the database - -:translate_in: - File used to translate OpenERP to your language - -:translate_out: - File used to export the language OpenERP use - -:language: - Use this language as the language of the server. This must be specified as an ISO country code, as specified by the W3C. - -:verbose: - Enable debug output - -:init: - init a module (use "all" for all modules) - -:update: - update a module (use "all" for all modules) - -:upgrade: - Upgrade/install/uninstall modules - -:db_name: - specify the database name - -:db_user: - specify the database user name - -:db_password: - specify the database password - -:pg_path: - specify the pg executable path - -:db_host: - specify the database host - -:db_port: - specify the database port - -:translate_modules: - Specify modules to export. Use in combination with --i18n-export - - -You can create your own configuration file by specifying -s or --save on the server command line. If you would like to write an alternative configuration file, use -c or --config= -Here is a basic configuration for a server:: - - [options] - verbose = False - xmlrpc = True - database = terp - update = {} - port = 8069 - init = {} - interface = 127.0.0.1 - reportgz = False - -Full Example for Server V5.0 :: - - [printer] - path = none - softpath_html = none - preview = True - softpath = none - - [logging] - output = stdout - logger = - verbose = True - level = error - - [help] - index = http://www.openerp.com/documentation/user-manual/ - context = http://www.openerp.com/scripts/context_index.php - - [form] - autosave = False - toolbar = True - - [support] - recipient = support@openerp.com - support_id = - - [tip] - position = 0 - autostart = False - - [client] - lang = en_US - default_path = /home/user - filetype = {} - theme = none - toolbar = icons - form_tab_orientation = 0 - form_tab = top - - [survey] - position = 3 - - [path] - pixmaps = /usr/share/pixmaps/openerp-client/ - share = /usr/share/openerp-client/ - - [login] - db = eo2 - login = admin - protocol = http:// - port = 8069 - server = localhost - - Command line options ==================== -General Options ---------------- +Using the command :: - --version show program version number and exit - -h, --help show this help message and exit - -c CONFIG, --config=CONFIG - specify alternate config file - -s, --save save configuration to ~/.terp_serverrc - -v, --verbose enable debugging - --pidfile=PIDFILE file where the server pid will be stored - --logfile=LOGFILE file where the server log will be stored - -n INTERFACE, --interface=INTERFACE - specify the TCP IP address - -p PORT, --port=PORT specify the TCP port - --net_interface=NETINTERFACE - specify the TCP IP address for netrpc - --net_port=NETPORT specify the TCP port for netrpc - --no-netrpc disable netrpc - --no-xmlrpc disable xmlrpc - -i INIT, --init=INIT init a module (use "all" for all modules) - --without-demo=WITHOUT_DEMO - load demo data for a module (use "all" for all - modules) - -u UPDATE, --update=UPDATE - update a module (use "all" for all modules) - --stop-after-init stop the server after it initializes - --debug enable debug mode - -S, --secure launch server over https instead of http - --smtp=SMTP_SERVER specify the SMTP server for sending mail - -Database related options: -------------------------- + ./openerp-server --help + +gives you the available command line options. For OpenERP server at revision 4133, an output example is given in the `Command line options example`_. Here are a few interesting command line options. + +General Options ++++++++++++++++ + +:: + + --version show program version number and exit + -h, --help show this help message and exit + -c CONFIG, --config=CONFIG specify alternate config file + -s, --save save configuration to ~/.terp_serverrc + -v, --verbose enable debugging + --pidfile=PIDFILE file where the server pid will be stored + --logfile=LOGFILE file where the server log will be stored + -n INTERFACE, --interface=INTERFACE specify the TCP IP address + -p PORT, --port=PORT specify the TCP port + --net_interface=NETINTERFACE specify the TCP IP address for netrpc + --net_port=NETPORT specify the TCP port for netrpc + --no-netrpc disable netrpc + --no-xmlrpc disable xmlrpc + -i INIT, --init=INIT init a module (use "all" for all modules) + --without-demo=WITHOUT_DEMO load demo data for a module (use "all" for all modules) + -u UPDATE, --update=UPDATE update a module (use "all" for all modules) + --stop-after-init stop the server after it initializes + --debug enable debug mode + -S, --secure launch server over https instead of http + --smtp=SMTP_SERVER specify the SMTP server for sending mail +Database related options +++++++++++++++++++++++++ + +:: + -d DB_NAME, --database=DB_NAME specify the database name -r DB_USER, --db_user=DB_USER @@ -254,11 +117,10 @@ Database related options: --db_host=DB_HOST specify the database host --db_port=DB_PORT specify the database port -Internationalization options: ------------------------------ +Internationalization options +++++++++++++++++++++++++++++ - Use these options to translate OpenERP to another language.See i18n - section of the user manual. Option '-l' is mandatory. +Use these options to translate OpenERP to another language.See i18n section of the user manual. Option '-l' is mandatory.:: -l LANGUAGE, --language=LANGUAGE specify the language of the translation file. Use it @@ -272,8 +134,309 @@ Internationalization options: specify modules to export. Use in combination with --i18n-export -Options from previous versions: -------------------------------- -Some options were removed in version 6. For example, ``price_accuracy`` is now +Options from previous versions +++++++++++++++++++++++++++++++ + +Some options were removed in OpenERP version 6. For example, ``price_accuracy`` is now configured through the :ref:`decimal_accuracy` screen. +Configuration +============== + +.. _getting_started_configuration-link: + +Two configuration files are available: + + * one for the client: ``~/.openerprc`` + * one for the server: ``~/.openerp_serverrc`` + +If they are not found, the server and the client will start with a default configuration. Those files follow the convention used by python's ConfigParser module. Please note that lines beginning with "#" or ";" are comments. The client configuration file is automatically generated upon the first start. The sezrver configuration file can automatically be created using the command :: + + ./openerp-server -s or ./openerp-server --save + +You can specify alternate configuration files with :: + + -c CONFIG, --config=CONFIG specify alternate config file + +An example of server configuration file for + +Appendix +======== + +Command line options example +++++++++++++++++++++++++++++ + +Usage: openerp-server [options] + +**Options**:: + + --version show program's version number and exit + -h, --help show this help message and exit + +**Common options**:: + + -c CONFIG, --config=CONFIG + specify alternate config file + -s, --save save configuration to ~/.openerp_serverrc + -i INIT, --init=INIT + install one or more modules (comma-separated list, use + "all" for all modules), requires -d + -u UPDATE, --update=UPDATE + update one or more modules (comma-separated list, use + "all" for all modules). Requires -d. + --without-demo=WITHOUT_DEMO + disable loading demo data for modules to be installed + (comma-separated, use "all" for all modules). Requires + -d and -i. Default is none + -P IMPORT_PARTIAL, --import-partial=IMPORT_PARTIAL + Use this for big data importation, if it crashes you + will be able to continue at the current state. Provide + a filename to store intermediate importation states. + --pidfile=PIDFILE file where the server pid will be stored + --addons-path=ADDONS_PATH + specify additional addons paths (separated by commas). + --load=SERVER_WIDE_MODULES + Comma-separated list of server-wide modules + default=web + +**XML-RPC Configuration**:: + + --xmlrpc-interface=XMLRPC_INTERFACE + Specify the TCP IP address for the XML-RPC protocol. + The empty string binds to all interfaces. + --xmlrpc-port=XMLRPC_PORT + specify the TCP port for the XML-RPC protocol + --no-xmlrpc disable the XML-RPC protocol + --proxy-mode Enable correct behavior when behind a reverse proxy + +**XML-RPC Secure Configuration**:: + + --xmlrpcs-interface=XMLRPCS_INTERFACE + Specify the TCP IP address for the XML-RPC Secure + protocol. The empty string binds to all interfaces. + --xmlrpcs-port=XMLRPCS_PORT + specify the TCP port for the XML-RPC Secure protocol + --no-xmlrpcs disable the XML-RPC Secure protocol + --cert-file=SECURE_CERT_FILE + specify the certificate file for the SSL connection + --pkey-file=SECURE_PKEY_FILE + specify the private key file for the SSL connection + +**NET-RPC Configuration**:: + + --netrpc-interface=NETRPC_INTERFACE + specify the TCP IP address for the NETRPC protocol + --netrpc-port=NETRPC_PORT + specify the TCP port for the NETRPC protocol + --no-netrpc disable the NETRPC protocol + +**Web interface Configuration**:: + + --db-filter=REGEXP Filter listed database + +**Static HTTP service**:: + + --static-http-enable + enable static HTTP service for serving plain HTML + files + --static-http-document-root=STATIC_HTTP_DOCUMENT_ROOT + specify the directory containing your static HTML + files (e.g '/var/www/') + --static-http-url-prefix=STATIC_HTTP_URL_PREFIX + specify the URL root prefix where you want web + browsers to access your static HTML files (e.g '/') + +**Testing Configuration**:: + + --test-file=TEST_FILE + Launch a YML test file. + --test-report-directory=TEST_REPORT_DIRECTORY + If set, will save sample of all reports in this + directory. + --test-enable Enable YAML and unit tests. + --test-commit Commit database changes performed by YAML or XML + tests. + +**Logging Configuration**:: + + --logfile=LOGFILE file where the server log will be stored + --no-logrotate do not rotate the logfile + --syslog Send the log to the syslog server + --log-handler=PREFIX:LEVEL + setup a handler at LEVEL for a given PREFIX. An empty + PREFIX indicates the root logger. This option can be + repeated. Example: "openerp.orm:DEBUG" or + "werkzeug:CRITICAL" (default: ":INFO") + --log-request shortcut for --log- + handler=openerp.netsvc.rpc.request:DEBUG + --log-response shortcut for --log- + handler=openerp.netsvc.rpc.response:DEBUG + --log-web shortcut for --log- + handler=openerp.addons.web.common.http:DEBUG + --log-sql shortcut for --log-handler=openerp.sql_db:DEBUG + --log-level=LOG_LEVEL + specify the level of the logging. Accepted values: + ['info', 'debug_rpc', 'warn', 'test', 'critical', + 'debug_sql', 'error', 'debug', 'debug_rpc_answer', + 'notset'] (deprecated option). + +**SMTP Configuration**:: + + --email-from=EMAIL_FROM + specify the SMTP email address for sending email + --smtp=SMTP_SERVER specify the SMTP server for sending email + --smtp-port=SMTP_PORT + specify the SMTP port + --smtp-ssl specify the SMTP server support SSL or not + --smtp-user=SMTP_USER + specify the SMTP username for sending email + --smtp-password=SMTP_PASSWORD + specify the SMTP password for sending email + +**Database related options**:: + + -d DB_NAME, --database=DB_NAME + specify the database name + -r DB_USER, --db_user=DB_USER + specify the database user name + -w DB_PASSWORD, --db_password=DB_PASSWORD + specify the database password + --pg_path=PG_PATH specify the pg executable path + --db_host=DB_HOST specify the database host + --db_port=DB_PORT specify the database port + --db_maxconn=DB_MAXCONN + specify the the maximum number of physical connections + to posgresql + --db-template=DB_TEMPLATE + specify a custom database template to create a new + database + +**Internationalisation options**:: + + Use these options to translate OpenERP to another language.See i18n + section of the user manual. Option '-d' is mandatory.Option '-l' is + mandatory in case of importation + + --load-language=LOAD_LANGUAGE + specifies the languages for the translations you want + to be loaded + -l LANGUAGE, --language=LANGUAGE + specify the language of the translation file. Use it + with --i18n-export or --i18n-import + --i18n-export=TRANSLATE_OUT + export all sentences to be translated to a CSV file, a + PO file or a TGZ archive and exit + --i18n-import=TRANSLATE_IN + import a CSV or a PO file with translations and exit. + The '-l' option is required. + --i18n-overwrite overwrites existing translation terms on updating a + module or importing a CSV or a PO file. + --modules=TRANSLATE_MODULES + specify modules to export. Use in combination with + --i18n-export + +**Security-related options**:: + + --no-database-list disable the ability to return the list of databases + +**Advanced options**:: + + --cache-timeout=CACHE_TIMEOUT + set the timeout for the cache system + --debug enable debug mode + --stop-after-init stop the server after its initialization + -t TIMEZONE, --timezone=TIMEZONE + specify reference timezone for the server (e.g. + Europe/Brussels + --osv-memory-count-limit=OSV_MEMORY_COUNT_LIMIT + Force a limit on the maximum number of records kept in + the virtual osv_memory tables. The default is False, + which means no count-based limit. + --osv-memory-age-limit=OSV_MEMORY_AGE_LIMIT + Force a limit on the maximum age of records kept in + the virtual osv_memory tables. This is a decimal value + expressed in hours, and the default is 1 hour. + --max-cron-threads=MAX_CRON_THREADS + Maximum number of threads processing concurrently cron + jobs. + --virtual-memory-limit=VIRTUAL_MEMORY_LIMIT + Maximum allowed virtual memory per Gunicorn process. + When the limit is reached, any memory allocation will + fail. + --virtual-memory-reset=VIRTUAL_MEMORY_RESET + Maximum allowed virtual memory per Gunicorn process. + When the limit is reached, the worker will be reset + after the current request. + --cpu-time-limit=CPU_TIME_LIMIT + Maximum allowed CPU time per Gunicorn process. When + the limit is reached, an exception is raised. + --unaccent Use the unaccent function provided by the database + when available. + +Server configuration file ++++++++++++++++++++++++++ + +:: + + [options] + addons_path = /home/openerp/workspace/openerp-dev/addons/trunk,/home/openerp/workspace/openerp-dev/web/trunk/addons + admin_passwd = admin + cache_timeout = 100000 + cpu_time_limit = 60 + csv_internal_sep = , + db_host = False + db_maxconn = 64 + db_name = False + db_password = False + db_port = False + db_template = template0 + db_user = openerp + dbfilter = .* + debug_mode = False + demo = {} + email_from = False + import_partial = + list_db = True + log_handler = [':INFO'] + log_level = info + logfile = False + login_message = False + logrotate = True + max_cron_threads = 4 + netrpc = True + netrpc_interface = + netrpc_port = 8070 + osv_memory_age_limit = 1.0 + osv_memory_count_limit = False + pg_path = None + pidfile = False + proxy_mode = False + reportgz = False + secure_cert_file = server.cert + secure_pkey_file = server.pkey + server_wide_modules = None + smtp_password = False + smtp_port = 25 + smtp_server = localhost + smtp_ssl = False + smtp_user = False + static_http_document_root = None + static_http_enable = False + static_http_url_prefix = None + syslog = False + test_commit = False + test_enable = False + test_file = False + test_report_directory = False + timezone = False + translate_modules = ['all'] + unaccent = False + virtual_memory_limit = 805306368 + virtual_memory_reset = 671088640 + without_demo = False + xmlrpc = True + xmlrpc_interface = + xmlrpc_port = 8069 + xmlrpcs = True + xmlrpcs_interface = + xmlrpcs_port = 8071 From 6d16d56970f1f01a5e360916e792c640bd127655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 17 Apr 2012 13:10:16 +0200 Subject: [PATCH 005/841] [DOC] [ADD] Added architecture chapter. bzr revid: tde@openerp.com-20120417111016-nnjncznndlcchyrg --- doc/02_architecture.rst | 569 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 569 insertions(+) create mode 100644 doc/02_architecture.rst diff --git a/doc/02_architecture.rst b/doc/02_architecture.rst new file mode 100644 index 00000000000..867d5be7c15 --- /dev/null +++ b/doc/02_architecture.rst @@ -0,0 +1,569 @@ +======================================== +Architecture +======================================== + +MVC architecture +================ + +According to `Wikipedia `_, "a Model-view-controller (MVC) is an architectural pattern used in software engineering". In complex computer applications presenting lots of data to the user, one often wishes to separate data (model) and user interface (view) concerns. Changes to the user interface does therefore not impact data management, and data can be reorganized without changing the user interface. The model-view-controller solves this problem by decoupling data access and business logic from data presentation and user interaction, by introducing an intermediate component: the controller. + +.. figure:: images/MVCDiagram.png + :scale: 100 + :align: center + + MVC Diagram + +For example in the diagram above, the solid lines for the arrows starting from the controller and going to both the view and the model mean that the controller has a complete access to both the view and the model. The dashed line for the arrow going from the view to the controller means that the view has a limited access to the controller. The reasons of this design are : + + * From **View** to **Model** : the model sends notification to the view when its data has been modified in order the view to redraw its content. The model doesn't need to know the inner workings of the view to perform this operation. However, the view needs to access the internal parts of the model. + * From **View** to **Controller** : the reason why the view has limited access to the controller is because the dependencies from the view to the controller need to be minimal: the controller can be replaced at any moment. + +MVC Model in OpenERP +-------------------- + +In OpenERP, we can apply this model-view-controller semantic with + + * model : The PostgreSQL tables. + * view : views are defined in XML files in OpenERP. + * controller : The objects of OpenERP. + + +MVCSQL +------ + +Example 1 ++++++++++ + +Suppose sale is a variable on a record of the sale.order object related to the 'sale_order' table. You can acquire such a variable doing this.:: + + sale = self.browse(cr, uid, ID) + +(where cr is the current row, from the database cursor, uid is the current user's ID for security checks, and ID is the sale order's ID or list of IDs if we want more than one) + +Suppose you want to get: the country name of the first contact of a partner related to the ID sale order. You can do the following in OpenERP:: + + country_name = sale.partner_id.address[0].country_id.name + +If you want to write the same thing in traditional SQL development, it will be in python: (we suppose cr is the cursor on the database, with psycopg) + +.. code-block:: python + + cr.execute('select partner_id from sale_order where id=%d', (ID,)) + partner_id = cr.fetchone()[0] + cr.execute('select country_id from res_partner_address where partner_id=%d', (partner_id,)) + country_id = cr.fetchone()[0] + cr.execute('select name from res_country where id=%d', (country_id,)) + del partner_id + del country_id + country_name = cr.fetchone()[0] + +Of course you can do better if you develop smartly in SQL, using joins or subqueries. But you have to be smart and most of the time you will not be able to make such improvements: + + * Maybe some parts are in others functions + * There may be a loop in different elements + * You have to use intermediate variables like country_id + +The first operation as an object call is much better for several reasons: + + * It uses objects facilities and works with modules inheritances, overload, ... + * It's simpler, more explicit and uses less code + * It's much more efficient as you will see in the following examples + * Some fields do not directly correspond to a SQL field (e.g.: function fields in Python) + + +Prefetching ++++++++++++ + +Suppose that later in the code, in another function, you want to access the name of the partner associated to your sale order. You can use this:: + + partner_name = sale.partner_id.name + +And this will not generate any SQL query as it has been prefetched by the object relational mapping engine of OpenERP. + + +Loops and special fields +++++++++++++++++++++++++ + +Suppose now that you want to compute the totals of 10 sales order by countries. You can do this in OpenERP within a OpenERP object: + +.. code-block:: python + + def get_totals(self, cr, uid, ids): + countries = {} + for sale in self.browse(cr, uid, ids): + country = sale.partner_invoice_id.country + countries.setdefault(country, 0.0) + countries[country] += sale.amount_untaxed + return countries + +And, to print them as a good way, you can add this on your object: + +.. code-block:: python + + def print_totals(self, cr, uid, ids): + result = self.get_totals(cr, uid, ids) + for country in result.keys(): + print '[%s] %s: %.2f' (country.code, country.name, result[country]) + +The 2 functions will generate 4 SQL queries in total ! This is due to the SQL engine of OpenERP that does prefetching, works on lists and uses caching methods. The 3 queries are: + + 1. Reading the sale.order to get ID's of the partner's address + 2. Reading the partner's address for the countries + 3. Calling the amount_untaxed function that will compute a total of the sale order lines + 4. Reading the countries info (code and name) + +That's great because if you run this code on 1000 sales orders, you have the guarantee to only have 4 SQL queries. + +Notes: + + * IDS is the list of the 10 ID's: [12,15,18,34, ...,99] + * The arguments of a function are always the same: + + - cr: the cursor database (from psycopg) + - uid: the user id (for security checks) + * If you run this code on 5000 sales orders, you may have 8 SQL queries because as SQL queries are not allowed to take too much memory, it may have to do two separate readings. + + +Complex example ++++++++++++++++ + +Here is a complete example, from the OpenERP official distribution, of the function that does bill of material explosion and computation of associated routings: + +.. code-block:: python + + class mrp_bom(osv.osv): + ... + def _bom_find(self, cr, uid, product_id, product_uom, properties=[]): + bom_result = False + # Why searching on BoM without parent ? + cr.execute('select id from mrp_bom where product_id=%d and bom_id is null + order by sequence', (product_id,)) + ids = map(lambda x: x[0], cr.fetchall()) + max_prop = 0 + result = False + for bom in self.pool.get('mrp.bom').browse(cr, uid, ids): + prop = 0 + for prop_id in bom.property_ids: + if prop_id.id in properties: + prop+=1 + if (prop>max_prop) or ((max_prop==0) and not result): + result = bom.id + max_prop = prop + return result + + def _bom_explode(self, cr, uid, bom, factor, properties, addthis=False, level=10): + factor = factor / (bom.product_efficiency or 1.0) + factor = rounding(factor, bom.product_rounding) + if factor`_, +`three-tier architecture +`_. +The application tier itself is written as a core, multiple additional +modules can be installed to create a particular configuration of +OpenERP. + +The core of OpenERP and its modules are written in `Python +`_. The functionality of a module is exposed through +XML-RPC (and/or NET-RPC depending on the server's configuration)[#]. Modules +typically make use of OpenERP's ORM to persist their data in a relational +database (PostgreSQL). Modules can insert data in the database during +installation by providing XML, CSV, or YML files. + +.. figure:: images/client_server.png + :scale: 85 + :align: center + +.. [#] JSON-RPC is planned for OpenERP v6.1. + +The OpenERP server +------------------ + +OpenERP provides an application server on which specific business applications +can be built. It is also a complete development framework, offering a range of +features to write those applications. The salient features are a flexible ORM, +a MVC architecture, extensible data models and views, different report engines, +all tied together in a coherent, network-accessible framework. + +From a developer perspective, the server acts both as a library which brings +the above benefits while hiding the low-level, nitty-gritty details, and as a +simple way to install, configure and run the written applications. + +Modules +------- + +By itself, the OpenERP server is not very useful. For any enterprise, the value +of OpenERP lies in its different modules. It is the role of the modules to +implement any business needs. The server is only the necessary machinery to run +the modules. A lot of modules already exist. Any official OpenERP release +includes about 170 of them, and hundreds of modules are available through the +community. Examples of modules are Account, CRM, HR, Marketing, MRP, Sale, etc. + +A module is usually composed of data models, together with some initial data, +views definitions (i.e. how data from specific data models should be displayed +to the user), wizards (specialized screens to help the user for specific +interactions), workflows definitions, and reports. + +Clients +------- + +Clients can communicate with an OpenERP server using XML-RPC. A custom, faster +protocol called NET-RPC is also provided but will shortly disappear, replaced +by JSON-RPC. XML-RPC, as JSON-RPC in the future, makes it possible to write +clients for OpenERP in a variety of programming languages. OpenERP S.A. +develops two different clients: a desktop client, written with the widely used +`GTK+ `_ graphical toolkit, and a web client that should +run in any modern web browser. + +As the logic of OpenERP should entirely reside on the server, the client is +conceptually very simple; it issues a request to the server and display the result +(e.g. a list of customers) in different manners (as forms, lists, calendars, +...). Upon user actions, it will send modified data to the server. + +Relational database server and ORM +---------------------------------- + +The data tier of OpenERP is provided by a PostgreSQL relational database. While +direct SQL queries can be executed from OpenERP modules, most database access +to the relational database is done through the `Object-Relational Mapping +`_. + +The ORM is one of the salient features mentioned above. The data models are +described in Python and OpenERP creates the underlying database tables. All the +benefits of RDBMS (unique constraints, relational integrity, efficient +querying, ...) are used when possible and completed by Python flexibility. For +instance, arbitrary constraints written in Python can be added to any model. +Different modular extensibility mechanisms are also afforded by OpenERP[#]. + +.. [#] It is important to understand the ORM responsibility before attempting to by-pass it and access directly the underlying database via raw SQL queries. When using the ORM, OpenERP can make sure the data remains free of any corruption. For instance, a module can react to data creation in a particular table. This reaction can only happen if the ORM is used to create that data. + +Models +------ + +To define data models and otherwise pursue any work with the associated data, +OpenERP as many ORMs uses the concept of 'model'. A model is the authoritative +specification of how some data are structured, constrained, and manipulated. In +practice, a model is written as a Python class. The class encapsulates anything +there is to know about the model: the different fields composing the model, +default values to be used when creating new records, constraints, and so on. It +also holds the dynamic aspect of the data it controls: methods on the class can +be written to implement any business needs (for instance, what to do upon user +action, or upon workflow transitions). + +There are two different models. One is simply called 'model', and the second is +called 'transient model'. The two models provide the same capabilities with a +single difference: transient models are automatically cleared from the +database (they can be cleaned when some limit on the number of records is +reached, or when they are untouched for some time). + +To describe the data model per se, OpenERP offers a range of different kind of +fields. There are basic fields such as integer, or text fields. There are +relational fields to implement one-to-many, many-to-one, and many-to-many +relationships. There are so-called function fields, which are dynamically +computed and are not necessarily available in database, and more. + +Access to data is controlled by OpenERP and configured by different mechanisms. +This ensures that different users can have read and/or write access to only the +relevant data. Access can be controlled with respect to user groups and rules +based on the value of the data themselves. + +Modules +------- + +OpenERP supports a modular approach both from a development perspective and a +deployment point of view. In essence, a module groups everything related to a +single concern in one meaningful entity. It is comprised of models, views, +workflows, and wizards. + +Services and WSGI +----------------- + +Everything in OpenERP, and models methods in particular, are exposed via the +network and a security layer. Access to the data model is in fact a 'service' +and it is possible to expose new services. For instance, a WebDAV service and a +FTP service are available. + +While not mandatory, the services can make use of the `WSGI +`_ stack. +WSGI is a standard solution in the Python ecosystem to write HTTP servers, +applications, and middleware which can be used in a mix-and-match fashion. +By using WSGI, it is possible to run OpenERP in any WSGI-compliant server, but +also to use OpenERP to host a WSGI application. + +A striking example of this possibility is the OpenERP Web project. OpenERP Web +is the server-side counter part to the web clients. It is OpenERP Web which +provides the web pages to the browser and manages web sessions. OpenERP Web is +a WSGI-compliant application. As such, it can be run as a stand-alone HTTP +server or embedded inside OpenERP. + +XML-RPC, JSON-RPC +----------------- + +The access to the models makes also use of the WSGI stack. This can be done +using the XML-RPC protocol, and JSON-RPC will be added soon. + + +Explanation of modules: + +**Server - Base distribution** + +We use a distributed communication mechanism inside the OpenERP server. Our engine supports most commonly distributed patterns: request/reply, publish/subscribe, monitoring, triggers/callback, ... + +Different business objects can be in different computers or the same objects can be on multiple computers to perform load-balancing. + +**Server - Object Relational Mapping (ORM)** + +This layer provides additional object functionality on top of PostgreSQL: + + * Consistency: powerful validity checks, + * Work with objects (methods, references, ...) + * Row-level security (per user/group/role) + * Complex actions on a group of resources + * Inheritance + +**Server - Web-Services** + +The web-service module offer a common interface for all web-services + + * SOAP + * XML-RPC + * NET-RPC + +Business objects can also be accessed via the distributed object mechanism. They can all be modified via the client interface with contextual views. + +**Server - Workflow Engine** + +Workflows are graphs represented by business objects that describe the dynamics of the company. Workflows are also used to track processes that evolve over time. + +An example of workflow used in OpenERP: + +A sales order generates an invoice and a shipping order + +**Server - Report Engine** + +Reports in OpenERP can be rendered in different ways: + + * Custom reports: those reports can be directly created via the client interface, no programming required. Those reports are represented by business objects (ir.report.custom) + * High quality personalized reports using openreport: no programming required but you have to write 2 small XML files: + + - a template which indicates the data you plan to report + - an XSL:RML stylesheet + * Hard coded reports + * OpenOffice Writer templates + +Nearly all reports are produced in PDF. + +**Server - Business Objects** + +Almost everything is a business object in OpenERP, they describe all data of the program (workflows, invoices, users, customized reports, ...). Business objects are described using the ORM module. They are persistent and can have multiple views (described by the user or automatically calculated). + +Business objects are structured in the /module directory. + +**Client - Wizards** + +Wizards are graphs of actions/windows that the user can perform during a session. + +**Client - Widgets** + +Widgets are probably, although the origin of the term seems to be very difficult to trace, "WIndow gaDGETS" in the IT world, which mean they are gadgets before anything, which implement elementary features through a portable visual tool. + +All common widgets are supported: + + * entries + * textboxes + * floating point numbers + * dates (with calendar) + * checkboxes + * ... + +And also all special widgets: + + * buttons that call actions + * references widgets + + - one2one + + - many2one + + - many2many + + - one2many in list + + - ... + +Widget have different appearances in different views. For example, the date widget in the search dialog represents two normal dates for a range of date (from...to...). + +Some widgets may have different representations depending on the context. For example, the one2many widget can be represented as a form with multiple pages or a multi-columns list. + +Events on the widgets module are processed with a callback mechanism. A callback mechanism is a process whereby an element defines the type of events he can handle and which methods should be called when this event is triggered. Once the event is triggered, the system knows that the event is bound to a specific method, and calls that method back. Hence callback. + + +Module Integrations +=================== + +The are many different modules available for OpenERP and suited for different business models. Nearly all of these are optional (except ModulesAdminBase), making it easy to customize OpenERP to serve specific business needs. All the modules are in a directory named addons/ on the server. You simply need to copy or delete a module directory in order to either install or delete the module on the OpenERP platform. + +Some modules depend on other modules. See the file addons/module/__openerp__.py for more information on the dependencies. + +Here is an example of __openerp__.py: + +.. code-block:: python + + { + "name" : "Open TERP Accounting", + "version" : "1.0", + "author" : "Bob Gates - Not So Tiny", + "website" : "http://www.openerp.com/", + "category" : "Generic Modules/Others", + "depends" : ["base"], + "description" : """A + Multiline + Description + """, + "init_xml" : ["account_workflow.xml", "account_data.xml", "account_demo.xml"], + "demo_xml" : ["account_demo.xml"], + "update_xml" : ["account_view.xml", "account_report.xml", "account_wizard.xml"], + "active": False, + "installable": True + } + +When initializing a module, the files in the init_xml list are evaluated in turn and then the files in the update_xml list are evaluated. When updating a module, only the files from the **update_xml** list are evaluated. + + +Inheritance +=========== + +Traditional Inheritance +----------------------- + +Introduction +++++++++++++ + +Objects may be inherited in some custom or specific modules. It is better to inherit an object to add/modify some fields. + +It is done with:: + + _inherit='object.name' + +Extension of an object +++++++++++++++++++++++ + +There are two possible ways to do this kind of inheritance. Both ways result in a new class of data, which holds parent fields and behaviour as well as additional fields and behaviour, but they differ in heavy programatical consequences. + +While Example 1 creates a new subclass "custom_material" that may be "seen" or "used" by any view or tree which handles "network.material", this will not be the case for Example 2. + +This is due to the table (other.material) the new subclass is operating on, which will never be recognized by previous "network.material" views or trees. + +Example 1:: + + class custom_material(osv.osv): + _name = 'network.material' + _inherit = 'network.material' + _columns = { + 'manuf_warranty': fields.boolean('Manufacturer warranty?'), + } + _defaults = { + 'manuf_warranty': lambda *a: False, + } + custom_material() + +.. tip:: Notice + + _name == _inherit + +In this example, the 'custom_material' will add a new field 'manuf_warranty' to the object 'network.material'. New instances of this class will be visible by views or trees operating on the superclasses table 'network.material'. + +This inheritancy is usually called "class inheritance" in Object oriented design. The child inherits data (fields) and behavior (functions) of his parent. + + +Example 2:: + + class other_material(osv.osv): + _name = 'other.material' + _inherit = 'network.material' + _columns = { + 'manuf_warranty': fields.boolean('Manufacturer warranty?'), + } + _defaults = { + 'manuf_warranty': lambda *a: False, + } + other_material() + +.. tip:: Notice + + _name != _inherit + +In this example, the 'other_material' will hold all fields specified by 'network.material' and it will additionally hold a new field 'manuf_warranty'. All those fields will be part of the table 'other.material'. New instances of this class will therefore never been seen by views or trees operating on the superclasses table 'network.material'. + +This type of inheritancy is known as "inheritance by prototyping" (e.g. Javascript), because the newly created subclass "copies" all fields from the specified superclass (prototype). The child inherits data (fields) and behavior (functions) of his parent. + +Inheritance by Delegation +------------------------- + + **Syntax :**:: + + class tiny_object(osv.osv) + _name = 'tiny.object' + _table = 'tiny_object' + _inherits = { 'tiny.object_a' : 'name_col_a', 'tiny.object_b' : 'name_col_b', + ..., 'tiny.object_n' : 'name_col_n' } + (...) + + +The object 'tiny.object' inherits from all the columns and all the methods from the n objects 'tiny.object_a', ..., 'tiny.object_n'. + +To inherit from multiple tables, the technique consists in adding one column to the table tiny_object per inherited object. This column will store a foreign key (an id from another table). The values *'name_col_a' 'name_col_b' ... 'name_col_n'* are of type string and determine the title of the columns in which the foreign keys from 'tiny.object_a', ..., 'tiny.object_n' are stored. + +This inheritance mechanism is usually called " *instance inheritance* " or " *value inheritance* ". A resource (instance) has the VALUES of its parents. From 597a2877235c88750b5441d4e5325b4561977f80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 17 Apr 2012 14:52:42 +0200 Subject: [PATCH 006/841] [DOC] [REF] Refactored architecture chapter. bzr revid: tde@openerp.com-20120417125242-5xy4tugaa9fd7e4q --- doc/02_architecture.rst | 727 +++++++++++----------------------------- doc/index.rst.inc | 3 +- 2 files changed, 196 insertions(+), 534 deletions(-) diff --git a/doc/02_architecture.rst b/doc/02_architecture.rst index 867d5be7c15..bf1b3192e37 100644 --- a/doc/02_architecture.rst +++ b/doc/02_architecture.rst @@ -2,568 +2,229 @@ Architecture ======================================== -MVC architecture -================ +OpenERP as a multitenant three-tiers architecture +================================================= -According to `Wikipedia `_, "a Model-view-controller (MVC) is an architectural pattern used in software engineering". In complex computer applications presenting lots of data to the user, one often wishes to separate data (model) and user interface (view) concerns. Changes to the user interface does therefore not impact data management, and data can be reorganized without changing the user interface. The model-view-controller solves this problem by decoupling data access and business logic from data presentation and user interaction, by introducing an intermediate component: the controller. +This section presents the OpenERP architecture along with technology details +of the application. The tiers composing OpenERP are presented. Communication +means and protocols between the application components are also presented. +Some details about used development languages and technology stack are then summarized. -.. figure:: images/MVCDiagram.png - :scale: 100 +OpenERP is a `multitenant `_, `three-tiers architecture +`_: +database tier for data storage, application tier for processing and functionalities +and presentation tier providing user interface. Those are separate layers +inside OpenERP. The application tier itself is written as a core; multiple +additional modules can be installed in order to create a particular instance +of OpenERP adapted to specific needs and requirements. Moreover, OpenERP +follows the Model-View-Controller (MVC) architectural pattern. + +A typical deployment of OpenERP is shown on `Figure 1`_. This deployment is +called Web embedded deployment. As shown, an OpenERP system consists of +three main components: + +- a PostgreSQL database server which contains all OpenERP databases. + Databases contain all application data, and also most of the OpenERP + system configuration elements. Note that this server can possibly be + deployed using clustered databases. +- the OpenERP Server, which contains all the enterprise logic and ensures + that OpenERP runs optimally. One layer of the server is dedicated to + communicate and interface with the PostgreSQL database, the ORM engine. + Another layer allows communications between the server and a web browser, + the Web layer. Having more than one server is possible, for example in + conjunction with a load balancing mechanism. +- the client, which allow users to access OpenERP. Two clients exist, a + desktop GTK client and a browser-based client + + - the GTK client access directly to the OpenERP Server + - users can also use standard web browsers to access OpenERP. In that + case, an OpenERP application is loaded. It handles communications between + the browser and the Web layer of the server. + +The database server and the OpenERP server can be installed on the same computer, +or distributed onto separate computer servers, for example for performance considerations. + +.. _`Figure 1`: +.. figure:: _static/02_openerp_architecture.png + :width: 50% + :alt: OpenERP 6.1 architecture for embedded web deployment :align: center + + OpenERP 6.1 architecture for embedded web deployment - MVC Diagram +The next subsections give details about the different tiers of the OpenERP +architecture. -For example in the diagram above, the solid lines for the arrows starting from the controller and going to both the view and the model mean that the controller has a complete access to both the view and the model. The dashed line for the arrow going from the view to the controller means that the view has a limited access to the controller. The reasons of this design are : +PostgreSQL database ++++++++++++++++++++ - * From **View** to **Model** : the model sends notification to the view when its data has been modified in order the view to redraw its content. The model doesn't need to know the inner workings of the view to perform this operation. However, the view needs to access the internal parts of the model. - * From **View** to **Controller** : the reason why the view has limited access to the controller is because the dependencies from the view to the controller need to be minimal: the controller can be replaced at any moment. +The data tier of OpenERP is provided by a PostgreSQL relational database. +While direct SQL queries can be executed from OpenERP modules, most accesses +to the relational database are done through the server Object Relational +Mapping layer. -MVC Model in OpenERP --------------------- +Databases contain all application data, and also most of the OpenERP system +configuration elements. Note that this server can possibly be deployed using +clustered databases. -In OpenERP, we can apply this model-view-controller semantic with - - * model : The PostgreSQL tables. - * view : views are defined in XML files in OpenERP. - * controller : The objects of OpenERP. - - -MVCSQL ------- - -Example 1 -+++++++++ - -Suppose sale is a variable on a record of the sale.order object related to the 'sale_order' table. You can acquire such a variable doing this.:: - - sale = self.browse(cr, uid, ID) - -(where cr is the current row, from the database cursor, uid is the current user's ID for security checks, and ID is the sale order's ID or list of IDs if we want more than one) - -Suppose you want to get: the country name of the first contact of a partner related to the ID sale order. You can do the following in OpenERP:: - - country_name = sale.partner_id.address[0].country_id.name - -If you want to write the same thing in traditional SQL development, it will be in python: (we suppose cr is the cursor on the database, with psycopg) - -.. code-block:: python - - cr.execute('select partner_id from sale_order where id=%d', (ID,)) - partner_id = cr.fetchone()[0] - cr.execute('select country_id from res_partner_address where partner_id=%d', (partner_id,)) - country_id = cr.fetchone()[0] - cr.execute('select name from res_country where id=%d', (country_id,)) - del partner_id - del country_id - country_name = cr.fetchone()[0] - -Of course you can do better if you develop smartly in SQL, using joins or subqueries. But you have to be smart and most of the time you will not be able to make such improvements: - - * Maybe some parts are in others functions - * There may be a loop in different elements - * You have to use intermediate variables like country_id - -The first operation as an object call is much better for several reasons: - - * It uses objects facilities and works with modules inheritances, overload, ... - * It's simpler, more explicit and uses less code - * It's much more efficient as you will see in the following examples - * Some fields do not directly correspond to a SQL field (e.g.: function fields in Python) - - -Prefetching -+++++++++++ - -Suppose that later in the code, in another function, you want to access the name of the partner associated to your sale order. You can use this:: - - partner_name = sale.partner_id.name - -And this will not generate any SQL query as it has been prefetched by the object relational mapping engine of OpenERP. - - -Loops and special fields -++++++++++++++++++++++++ - -Suppose now that you want to compute the totals of 10 sales order by countries. You can do this in OpenERP within a OpenERP object: - -.. code-block:: python - - def get_totals(self, cr, uid, ids): - countries = {} - for sale in self.browse(cr, uid, ids): - country = sale.partner_invoice_id.country - countries.setdefault(country, 0.0) - countries[country] += sale.amount_untaxed - return countries - -And, to print them as a good way, you can add this on your object: - -.. code-block:: python - - def print_totals(self, cr, uid, ids): - result = self.get_totals(cr, uid, ids) - for country in result.keys(): - print '[%s] %s: %.2f' (country.code, country.name, result[country]) - -The 2 functions will generate 4 SQL queries in total ! This is due to the SQL engine of OpenERP that does prefetching, works on lists and uses caching methods. The 3 queries are: - - 1. Reading the sale.order to get ID's of the partner's address - 2. Reading the partner's address for the countries - 3. Calling the amount_untaxed function that will compute a total of the sale order lines - 4. Reading the countries info (code and name) - -That's great because if you run this code on 1000 sales orders, you have the guarantee to only have 4 SQL queries. - -Notes: - - * IDS is the list of the 10 ID's: [12,15,18,34, ...,99] - * The arguments of a function are always the same: - - - cr: the cursor database (from psycopg) - - uid: the user id (for security checks) - * If you run this code on 5000 sales orders, you may have 8 SQL queries because as SQL queries are not allowed to take too much memory, it may have to do two separate readings. - - -Complex example -+++++++++++++++ - -Here is a complete example, from the OpenERP official distribution, of the function that does bill of material explosion and computation of associated routings: - -.. code-block:: python - - class mrp_bom(osv.osv): - ... - def _bom_find(self, cr, uid, product_id, product_uom, properties=[]): - bom_result = False - # Why searching on BoM without parent ? - cr.execute('select id from mrp_bom where product_id=%d and bom_id is null - order by sequence', (product_id,)) - ids = map(lambda x: x[0], cr.fetchall()) - max_prop = 0 - result = False - for bom in self.pool.get('mrp.bom').browse(cr, uid, ids): - prop = 0 - for prop_id in bom.property_ids: - if prop_id.id in properties: - prop+=1 - if (prop>max_prop) or ((max_prop==0) and not result): - result = bom.id - max_prop = prop - return result - - def _bom_explode(self, cr, uid, bom, factor, properties, addthis=False, level=10): - factor = factor / (bom.product_efficiency or 1.0) - factor = rounding(factor, bom.product_rounding) - if factor`_, -`three-tier architecture -`_. -The application tier itself is written as a core, multiple additional -modules can be installed to create a particular configuration of -OpenERP. - -The core of OpenERP and its modules are written in `Python -`_. The functionality of a module is exposed through -XML-RPC (and/or NET-RPC depending on the server's configuration)[#]. Modules -typically make use of OpenERP's ORM to persist their data in a relational -database (PostgreSQL). Modules can insert data in the database during -installation by providing XML, CSV, or YML files. - -.. figure:: images/client_server.png - :scale: 85 - :align: center - -.. [#] JSON-RPC is planned for OpenERP v6.1. - -The OpenERP server ------------------- +OpenERP server +++++++++++++++ OpenERP provides an application server on which specific business applications -can be built. It is also a complete development framework, offering a range of -features to write those applications. The salient features are a flexible ORM, -a MVC architecture, extensible data models and views, different report engines, -all tied together in a coherent, network-accessible framework. +can be built. It is also a complete development framework, offering a range +of features to write those applications. Among those features, the OpenERP +ORM provides functionalities and an interface on top of the PostgreSQL server. +The OpenERP server also features a specific layer designed to communicate +with the web browser-based client. This layer connects users using standard +browsers to the server. From a developer perspective, the server acts both as a library which brings -the above benefits while hiding the low-level, nitty-gritty details, and as a -simple way to install, configure and run the written applications. +the above benefits while hiding the low-level details, and as a simple way +to install, configure and run the written applications. The server also contains +other services, such as extensible data models and view, workflow engine or +reports engine. However, those are OpenERP services not specifically related +to security, and are therefore not discussed in details in this document. -Modules -------- +**Server - ORM** -By itself, the OpenERP server is not very useful. For any enterprise, the value -of OpenERP lies in its different modules. It is the role of the modules to -implement any business needs. The server is only the necessary machinery to run -the modules. A lot of modules already exist. Any official OpenERP release -includes about 170 of them, and hundreds of modules are available through the -community. Examples of modules are Account, CRM, HR, Marketing, MRP, Sale, etc. +The Object Relational Mapping ORM layer is one of the salient features of +the OpenERP Server. It provides additional and essential functionalities +on top of PostgreSQL server. Data models are described in Python and OpenERP +creates the underlying database tables using this ORM. All the benefits of +RDBMS such as unique constraints, relational integrity or efficient querying +are used and completed by Python flexibility. For instance, arbitrary constraints +written in Python can be added to any model. Different modular extensibility +mechanisms are also afforded by OpenERP. -A module is usually composed of data models, together with some initial data, -views definitions (i.e. how data from specific data models should be displayed -to the user), wizards (specialized screens to help the user for specific -interactions), workflows definitions, and reports. +It is important to understand the ORM responsibility before attempting to +by-pass it and to access directly the underlying database via raw SQL queries. +When using the ORM, OpenERP can make sure the data remains free of any corruption. +For instance, a module can react to data creation in a particular table. +This behavior can occur only if queries go through the ORM. + +The services granted by the ORM are among other : + + - consistency validation by powerful validity checks, + - providing an interface on objects (methods, references, ...) allowing + to design and implement efficient modules, + - row-level security per user and group; more details about users and user + groups are given in the section Users and User Roles, + - complex actions on a group of resources, + - inheritance service allowing fine modeling of new resources + +**Server - Web** + +The web layer offers an interface to communicate with standard browsers. +In the 6.1 version of OpenERP, the web-client has been rewritten and integrated +into the OpenERP server tier. This layer relies on CherryPy for the routing +layer of communications, especially for session and cookies management. + +**Modules** + +By itself, the OpenERP server is a core. For any enterprise, the value of +OpenERP lies in its different modules. The role of the modules is to implement +any business requirement. The server is the only necessary component to +add modules. Any official OpenERP release includes a lot of modules, and +hundreds of modules are available thanks to the community. Examples of +such modules are Account, CRM, HR, Marketing, MRP, Sale, etc. Clients -------- ++++++++ -Clients can communicate with an OpenERP server using XML-RPC. A custom, faster -protocol called NET-RPC is also provided but will shortly disappear, replaced -by JSON-RPC. XML-RPC, as JSON-RPC in the future, makes it possible to write -clients for OpenERP in a variety of programming languages. OpenERP S.A. -develops two different clients: a desktop client, written with the widely used -`GTK+ `_ graphical toolkit, and a web client that should -run in any modern web browser. +As the application logic is mainly contained server-side, the client is +conceptually simple. It issues a request to the server, gets data back +and display the result (e.g. a list of customers) in different ways +(as forms, lists, calendars, ...). Upon user actions, it sends queries +to modify data to the server. -As the logic of OpenERP should entirely reside on the server, the client is -conceptually very simple; it issues a request to the server and display the result -(e.g. a list of customers) in different manners (as forms, lists, calendars, -...). Upon user actions, it will send modified data to the server. +Two clients can be used for user access to OpenERP, a GTK client and a +browser-based client. The GTK client communicates directly with the server. +Using the GTK client requires the client to be installed on the workstation +of each user. -Relational database server and ORM ----------------------------------- +The browser-based client holds an OpenERP application that handles communications +between the browser and the Web layer of the server. The static code of the web +application is minimal. It consists of a minimal flow of HTML that is in charge +of loading the application code in Javascript. This client-side OpenERP application +sends user requests to the server, and gets data back. Data management is +done dynamically in this client. Using this client is therefore easy for +users, but also for administrators because it does not require any software +installation on the user machine. -The data tier of OpenERP is provided by a PostgreSQL relational database. While -direct SQL queries can be executed from OpenERP modules, most database access -to the relational database is done through the `Object-Relational Mapping -`_. -The ORM is one of the salient features mentioned above. The data models are -described in Python and OpenERP creates the underlying database tables. All the -benefits of RDBMS (unique constraints, relational integrity, efficient -querying, ...) are used when possible and completed by Python flexibility. For -instance, arbitrary constraints written in Python can be added to any model. -Different modular extensibility mechanisms are also afforded by OpenERP[#]. +MVC architecture in OpenERP +=========================== -.. [#] It is important to understand the ORM responsibility before attempting to by-pass it and access directly the underlying database via raw SQL queries. When using the ORM, OpenERP can make sure the data remains free of any corruption. For instance, a module can react to data creation in a particular table. This reaction can only happen if the ORM is used to create that data. +According to `Wikipedia `_, +"a Model-view-controller (MVC) is an architectural pattern used in software +engineering". In complex computer applications presenting lots of data to +the user, one often wishes to separate data (model) and user interface (view) +concerns. Changes to the user interface does therefore not impact data +management, and data can be reorganized without changing the user interface. +The model-view-controller solves this problem by decoupling data access +and business logic from data presentation and user interaction, by +introducing an intermediate component: the controller. -Models ------- +.. _`Figure 3`: +.. figure:: _static/02_mvc_diagram.png + :width: 35% + :alt: Model-View-Controller diagram + :align: center + + Model-View-Controller diagram -To define data models and otherwise pursue any work with the associated data, -OpenERP as many ORMs uses the concept of 'model'. A model is the authoritative -specification of how some data are structured, constrained, and manipulated. In -practice, a model is written as a Python class. The class encapsulates anything -there is to know about the model: the different fields composing the model, -default values to be used when creating new records, constraints, and so on. It -also holds the dynamic aspect of the data it controls: methods on the class can -be written to implement any business needs (for instance, what to do upon user -action, or upon workflow transitions). +For example in the diagram above, the solid lines for the arrows starting +from the controller and going to both the view and the model mean that the +controller has a complete access to both the view and the model. The dashed +line for the arrow going from the view to the controller means that the view +has a limited access to the controller. The reasons of this design are : -There are two different models. One is simply called 'model', and the second is -called 'transient model'. The two models provide the same capabilities with a -single difference: transient models are automatically cleared from the -database (they can be cleaned when some limit on the number of records is -reached, or when they are untouched for some time). + - From **View** to **Model** : the model sends notification to the view + when its data has been modified in order the view to redraw its content. + The model doesn't need to know the inner workings of the view to perform + this operation. However, the view needs to access the internal parts of the model. + - From **View** to **Controller** : the reason why the view has limited + access to the controller is because the dependencies from the view to + the controller need to be minimal: the controller can be replaced at + any moment. -To describe the data model per se, OpenERP offers a range of different kind of -fields. There are basic fields such as integer, or text fields. There are -relational fields to implement one-to-many, many-to-one, and many-to-many -relationships. There are so-called function fields, which are dynamically -computed and are not necessarily available in database, and more. +OpenERP follows the MVC semantic with -Access to data is controlled by OpenERP and configured by different mechanisms. -This ensures that different users can have read and/or write access to only the -relevant data. Access can be controlled with respect to user groups and rules -based on the value of the data themselves. + - model : The PostgreSQL tables. + - view : views are defined in XML files in OpenERP. + - controller : The objects of OpenERP. -Modules -------- -OpenERP supports a modular approach both from a development perspective and a -deployment point of view. In essence, a module groups everything related to a -single concern in one meaningful entity. It is comprised of models, views, -workflows, and wizards. +Network communications +====================== + +GTK clients communicate with the OpenERP server using XML-RPC protocol by +default. However, using a secured version XML-RPCS is possible when configurating +your OpenERP instance. In previous versions of OpenERP, a custom protocol +called NET-RPC was used. It was a binary version of the XML-RPC protocol, +allowing faster communications. However, this protocol will no longer be +used in OpenERP. The use of JSON-RPC is also planned for the 6.1 version +of OpenERP. + +Web-based clients communicate using HTTP protocol. As for XML-RPC, it is +possible to configure OpenERP to use secured HTTPS connections. Services and WSGI ------------------ - -Everything in OpenERP, and models methods in particular, are exposed via the -network and a security layer. Access to the data model is in fact a 'service' -and it is possible to expose new services. For instance, a WebDAV service and a -FTP service are available. - -While not mandatory, the services can make use of the `WSGI -`_ stack. -WSGI is a standard solution in the Python ecosystem to write HTTP servers, -applications, and middleware which can be used in a mix-and-match fashion. -By using WSGI, it is possible to run OpenERP in any WSGI-compliant server, but -also to use OpenERP to host a WSGI application. - -A striking example of this possibility is the OpenERP Web project. OpenERP Web -is the server-side counter part to the web clients. It is OpenERP Web which -provides the web pages to the browser and manages web sessions. OpenERP Web is -a WSGI-compliant application. As such, it can be run as a stand-alone HTTP -server or embedded inside OpenERP. - -XML-RPC, JSON-RPC ------------------ - -The access to the models makes also use of the WSGI stack. This can be done -using the XML-RPC protocol, and JSON-RPC will be added soon. - - -Explanation of modules: - -**Server - Base distribution** - -We use a distributed communication mechanism inside the OpenERP server. Our engine supports most commonly distributed patterns: request/reply, publish/subscribe, monitoring, triggers/callback, ... - -Different business objects can be in different computers or the same objects can be on multiple computers to perform load-balancing. - -**Server - Object Relational Mapping (ORM)** - -This layer provides additional object functionality on top of PostgreSQL: - - * Consistency: powerful validity checks, - * Work with objects (methods, references, ...) - * Row-level security (per user/group/role) - * Complex actions on a group of resources - * Inheritance - -**Server - Web-Services** - -The web-service module offer a common interface for all web-services - - * SOAP - * XML-RPC - * NET-RPC - -Business objects can also be accessed via the distributed object mechanism. They can all be modified via the client interface with contextual views. - -**Server - Workflow Engine** - -Workflows are graphs represented by business objects that describe the dynamics of the company. Workflows are also used to track processes that evolve over time. - -An example of workflow used in OpenERP: - -A sales order generates an invoice and a shipping order - -**Server - Report Engine** - -Reports in OpenERP can be rendered in different ways: - - * Custom reports: those reports can be directly created via the client interface, no programming required. Those reports are represented by business objects (ir.report.custom) - * High quality personalized reports using openreport: no programming required but you have to write 2 small XML files: - - - a template which indicates the data you plan to report - - an XSL:RML stylesheet - * Hard coded reports - * OpenOffice Writer templates - -Nearly all reports are produced in PDF. - -**Server - Business Objects** - -Almost everything is a business object in OpenERP, they describe all data of the program (workflows, invoices, users, customized reports, ...). Business objects are described using the ORM module. They are persistent and can have multiple views (described by the user or automatically calculated). - -Business objects are structured in the /module directory. - -**Client - Wizards** - -Wizards are graphs of actions/windows that the user can perform during a session. - -**Client - Widgets** - -Widgets are probably, although the origin of the term seems to be very difficult to trace, "WIndow gaDGETS" in the IT world, which mean they are gadgets before anything, which implement elementary features through a portable visual tool. - -All common widgets are supported: - - * entries - * textboxes - * floating point numbers - * dates (with calendar) - * checkboxes - * ... - -And also all special widgets: - - * buttons that call actions - * references widgets - - - one2one - - - many2one - - - many2many - - - one2many in list - - - ... - -Widget have different appearances in different views. For example, the date widget in the search dialog represents two normal dates for a range of date (from...to...). - -Some widgets may have different representations depending on the context. For example, the one2many widget can be represented as a form with multiple pages or a multi-columns list. - -Events on the widgets module are processed with a callback mechanism. A callback mechanism is a process whereby an element defines the type of events he can handle and which methods should be called when this event is triggered. Once the event is triggered, the system knows that the event is bound to a specific method, and calls that method back. Hence callback. - - -Module Integrations -=================== - -The are many different modules available for OpenERP and suited for different business models. Nearly all of these are optional (except ModulesAdminBase), making it easy to customize OpenERP to serve specific business needs. All the modules are in a directory named addons/ on the server. You simply need to copy or delete a module directory in order to either install or delete the module on the OpenERP platform. - -Some modules depend on other modules. See the file addons/module/__openerp__.py for more information on the dependencies. - -Here is an example of __openerp__.py: - -.. code-block:: python - - { - "name" : "Open TERP Accounting", - "version" : "1.0", - "author" : "Bob Gates - Not So Tiny", - "website" : "http://www.openerp.com/", - "category" : "Generic Modules/Others", - "depends" : ["base"], - "description" : """A - Multiline - Description - """, - "init_xml" : ["account_workflow.xml", "account_data.xml", "account_demo.xml"], - "demo_xml" : ["account_demo.xml"], - "update_xml" : ["account_view.xml", "account_report.xml", "account_wizard.xml"], - "active": False, - "installable": True - } - -When initializing a module, the files in the init_xml list are evaluated in turn and then the files in the update_xml list are evaluated. When updating a module, only the files from the **update_xml** list are evaluated. - - -Inheritance -=========== - -Traditional Inheritance ------------------------ - -Introduction -++++++++++++ - -Objects may be inherited in some custom or specific modules. It is better to inherit an object to add/modify some fields. - -It is done with:: - - _inherit='object.name' - -Extension of an object -++++++++++++++++++++++ - -There are two possible ways to do this kind of inheritance. Both ways result in a new class of data, which holds parent fields and behaviour as well as additional fields and behaviour, but they differ in heavy programatical consequences. - -While Example 1 creates a new subclass "custom_material" that may be "seen" or "used" by any view or tree which handles "network.material", this will not be the case for Example 2. - -This is due to the table (other.material) the new subclass is operating on, which will never be recognized by previous "network.material" views or trees. - -Example 1:: - - class custom_material(osv.osv): - _name = 'network.material' - _inherit = 'network.material' - _columns = { - 'manuf_warranty': fields.boolean('Manufacturer warranty?'), - } - _defaults = { - 'manuf_warranty': lambda *a: False, - } - custom_material() - -.. tip:: Notice - - _name == _inherit - -In this example, the 'custom_material' will add a new field 'manuf_warranty' to the object 'network.material'. New instances of this class will be visible by views or trees operating on the superclasses table 'network.material'. - -This inheritancy is usually called "class inheritance" in Object oriented design. The child inherits data (fields) and behavior (functions) of his parent. - - -Example 2:: - - class other_material(osv.osv): - _name = 'other.material' - _inherit = 'network.material' - _columns = { - 'manuf_warranty': fields.boolean('Manufacturer warranty?'), - } - _defaults = { - 'manuf_warranty': lambda *a: False, - } - other_material() - -.. tip:: Notice - - _name != _inherit - -In this example, the 'other_material' will hold all fields specified by 'network.material' and it will additionally hold a new field 'manuf_warranty'. All those fields will be part of the table 'other.material'. New instances of this class will therefore never been seen by views or trees operating on the superclasses table 'network.material'. - -This type of inheritancy is known as "inheritance by prototyping" (e.g. Javascript), because the newly created subclass "copies" all fields from the specified superclass (prototype). The child inherits data (fields) and behavior (functions) of his parent. - -Inheritance by Delegation -------------------------- - - **Syntax :**:: - - class tiny_object(osv.osv) - _name = 'tiny.object' - _table = 'tiny_object' - _inherits = { 'tiny.object_a' : 'name_col_a', 'tiny.object_b' : 'name_col_b', - ..., 'tiny.object_n' : 'name_col_n' } - (...) - - -The object 'tiny.object' inherits from all the columns and all the methods from the n objects 'tiny.object_a', ..., 'tiny.object_n'. - -To inherit from multiple tables, the technique consists in adding one column to the table tiny_object per inherited object. This column will store a foreign key (an id from another table). The values *'name_col_a' 'name_col_b' ... 'name_col_n'* are of type string and determine the title of the columns in which the foreign keys from 'tiny.object_a', ..., 'tiny.object_n' are stored. - -This inheritance mechanism is usually called " *instance inheritance* " or " *value inheritance* ". A resource (instance) has the VALUES of its parents. +================= + +Everything in OpenERP, and objects methods in particular, are exposed via +the network and a security layer. Access to the data model is in fact a ‘service’ +and it is possible to expose new services. For instance, a WebDAV service and +a FTP service are available. + +While not mandatory, the services can make use of the `WSGI +`_ stack. WSGI is +a standard solution in the Python ecosystem to write HTTP servers, applications, +and middleware which can be used in a mix-and-match fashion. By using WSGI, +it is possible to run OpenERP in any WSGI compliant server. It is also +possible to use OpenERP to host a WSGI application. + +A striking example of this possibility is the OpenERP Web layer that is +the server-side counter part to the web clients. It provides the requested +data to the browser and manages web sessions. It is a WSGI-compliant application. +As such, it can be run as a stand-alone HTTP server or embedded inside OpenERP. diff --git a/doc/index.rst.inc b/doc/index.rst.inc index e36bccd79d5..670ffd7f53d 100644 --- a/doc/index.rst.inc +++ b/doc/index.rst.inc @@ -3,9 +3,10 @@ OpenERP Server Documentation ''''''''''''''''''''''''''''' .. toctree:: - :maxdepth: 1 + :maxdepth: 2 01_getting_started + 02_architecture 99_test_framework Main revisions and new features From 7ceabb818d266458c4e52502e40ce03bca67c961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 17 Apr 2012 15:40:34 +0200 Subject: [PATCH 007/841] [DOC] [ADD] Added module development chapter from developer book. bzr revid: tde@openerp.com-20120417134034-dqrgog0nxhz3d10e --- doc/03_module_dev.rst | 12 + doc/03_module_dev_01.rst | 597 ++++++++++++++++ doc/03_module_dev_02.rst | 959 +++++++++++++++++++++++++ doc/03_module_dev_03.rst | 1428 ++++++++++++++++++++++++++++++++++++++ doc/03_module_dev_04.rst | 365 ++++++++++ doc/03_module_dev_05.rst | 91 +++ doc/api/startup.rst | 1 - doc/index.rst | 1 + doc/index.rst.inc | 15 +- 9 files changed, 3466 insertions(+), 3 deletions(-) create mode 100644 doc/03_module_dev.rst create mode 100644 doc/03_module_dev_01.rst create mode 100644 doc/03_module_dev_02.rst create mode 100644 doc/03_module_dev_03.rst create mode 100644 doc/03_module_dev_04.rst create mode 100644 doc/03_module_dev_05.rst diff --git a/doc/03_module_dev.rst b/doc/03_module_dev.rst new file mode 100644 index 00000000000..a019af94601 --- /dev/null +++ b/doc/03_module_dev.rst @@ -0,0 +1,12 @@ +======= +Modules +======= + +.. toctree:: + :maxdepth: 2 + + 03_module_dev_01 + 03_module_dev_02 + 03_module_dev_03 + 03_module_dev_04 + 03_module_dev_05 diff --git a/doc/03_module_dev_01.rst b/doc/03_module_dev_01.rst new file mode 100644 index 00000000000..2da148fe1ca --- /dev/null +++ b/doc/03_module_dev_01.rst @@ -0,0 +1,597 @@ +Module development +================== + +Module Structure ++++++++++++++++++ + +All the modules are located in the source/addons directory. The following +steps are necessary to create a new module: + + * create a subdirectory in the source/addons directory + * create the import **__init__.py** file + * create a module description file: **__openerp__.py** + * create the **Python** file containing the **objects** + * create **.xml files** that create the data (views, menu entries, demo data, ...) + * optionally create **reports**, **wizards** or **workflows**. + +Python Module Descriptor File __init__.py +----------------------------------------- + +The ``__init__.py`` file is, like any Python module, executed at the start +of the program. It needs to import the Python files that need to be loaded. + +So, if you create a "module.py" file, containing the description of your +objects, you have to write one line in __init__.py:: + + import module + +OpenERP Module Descriptor File __openerp__.py +--------------------------------------------- + +In the created module directory, you must add a **__openerp__.py** file. +This file, which must be in Python format, is responsible to + + 1. determine the *XML files that will be parsed* during the initialization + of the server, and also to + 2. determine the *dependencies* of the created module. + +This file must contain a Python dictionary with the following values: + +**name** + + The (Plain English) name of the module. + +**version** + + The version of the module. + +**description** + + The module description (text). + +**author** + + The author of the module. + +**website** + + The website of the module. + +**license** + + The license of the module (default:GPL-2). + +**depends** + + List of modules on which this module depends. The base module must + almost always be in the dependencies because some necessary data for + the views, reports, ... are in the base module. + +**init_xml** + + List of .xml files to load when the server is launched with the "--init=module" + argument. Filepaths must be relative to the directory where the module is. + OpenERP XML File Format is detailed in this section. + +**update_xml** + + List of .xml files to load when the server is launched with the "--update=module" + launched. Filepaths must be relative to the directory where the module is. + OpenERP XML File Format is detailed in this section. The files in **update_xml** + concern: views, reports and wizards. + +**installable** + + True or False. Determines if the module is installable or not. + +**active** + + True or False (default: False). Determines the modules that are installed + on the database creation. + +**Example** + +Here is an example of __openerp__.py file for the product module + +.. code-block:: python + + { + "name" : "Products & Pricelists", + "version" : "1.1", + "author" : "Open", + "category" : "Generic Modules/Inventory Control", + "depends" : ["base", "account"], + "init_xml" : [], + "demo_xml" : ["product_demo.xml"], + "update_xml" : ["product_data.xml", "product_report.xml", "product_wizard.xml", + "product_view.xml", "pricelist_view.xml"], + "installable": True, + "active": True + } + +The files that must be placed in init_xml are the ones that relate to the +workflow definition, data to load at the installation of the software and +the data for the demonstrations. + + +XML Files ++++++++++ + +XML files located in the module directory are used to modify the structure of +the database. They are used for many purposes, among which we can cite : + + * initialization and demonstration data declaration, + * views declaration, + * reports declaration, + * wizards declaration, + * workflows declaration. + +General structure of OpenERP XML files is more detailed in the +:ref:`xml-serialization` section. Look here if you are interested in learning +more about *initialization* and *demonstration data declaration* XML files. The +following section are only related to XML specific to *actions, menu entries, +reports, wizards* and *workflows* declaration. + + +Objects ++++++++ + +All OpenERP resources are objects: menus, actions, reports, invoices, partners, ... OpenERP is based on an object relational mapping of a database to control the information. Object names are hierarchical, as in the following examples: + + * account.transfer : a money transfer + * account.invoice : an invoice + * account.invoice.line : an invoice line + +Generally, the first word is the name of the module: account, stock, sale. + +Other advantages of an ORM; + + * simpler relations : invoice.partner.address[0].city + * objects have properties and methods: invoice.pay(3400 EUR), + * inheritance, high level constraints, ... + +It is easier to manipulate one object (example, a partner) than several tables (partner address, categories, events, ...) + + +.. figure:: images/pom_3_0_3.png + :scale: 50 + :align: center + + *The Physical Objects Model of [OpenERP version 3.0.3]* + + +PostgreSQL and ORM +------------------ + +The ORM of OpenERP is constructed over PostgreSQL. It is thus possible to +query the object used by OpenERP using the object interface or by directly +using SQL statements. + +But it is dangerous to write or read directly in the PostgreSQL database, as +you will shortcut important steps like constraints checking or workflow +modification. + +.. note:: + + The Physical Database Model of OpenERP + +Pre-Installed Data +------------------ + +Data can be inserted or updated into the PostgreSQL tables corresponding to the +OpenERP objects using XML files. The general structure of an OpenERP XML file +is as follows: + +.. code-block:: xml + + + + + + + "field1 content" + + + "field2 content" + + (...) + + + (...) + + (...) + + + +Fields content are strings that must be encoded as *UTF-8* in XML files. + +Let's review an example taken from the OpenERP source (base_demo.xml in the base module): + +.. code-block:: xml + + + Tiny sprl + + + + +.. code-block:: xml + + + admin + admin + Administrator + Administrator + + + + + + + +This last record defines the admin user : + + * The fields login, password, etc are straightforward. + * The ref attribute allows to fill relations between the records : + +.. code-block:: xml + + + +The field **company_id** is a many-to-one relation from the user object to the company object, and **main_company** is the id of to associate. + + * The **eval** attribute allows to put some python code in the xml: here the groups_id field is a many2many. For such a field, "[(6,0,[group_admin])]" means : Remove all the groups associated with the current user and use the list [group_admin] as the new associated groups (and group_admin is the id of another record). + + * The **search** attribute allows to find the record to associate when you do not know its xml id. You can thus specify a search criteria to find the wanted record. The criteria is a list of tuples of the same form than for the predefined search method. If there are several results, an arbitrary one will be chosen (the first one): + +.. code-block:: xml + + + +This is a classical example of the use of **search** in demo data: here we do not really care about which partner we want to use for the test, so we give an empty list. Notice the **model** attribute is currently mandatory. + +Record Tag +////////// + +**Description** + +The addition of new data is made with the record tag. This one takes a mandatory attribute : model. Model is the object name where the insertion has to be done. The tag record can also take an optional attribute: id. If this attribute is given, a variable of this name can be used later on, in the same file, to make reference to the newly created resource ID. + +A record tag may contain field tags. They indicate the record's fields value. If a field is not specified the default value will be used. + +**Example** + +.. code-block:: xml + + + account.invoice + Invoices List + account.invoice.list + account/report/invoice.xsl + account/report/invoice.xml + + +Field tag +///////// + +The attributes for the field tag are the following: + +name : mandatory + the field name + +eval : optional + python expression that indicating the value to add + +ref + reference to an id defined in this file + +model + model to be looked up in the search + +search + a query + +Function tag +//////////// + +A function tag can contain other function tags. + +model : mandatory + The model to be used + +name : mandatory + the function given name + +eval + should evaluate to the list of parameters of the method to be called, excluding cr and uid + +**Example** + +.. code-block:: xml + + + +Getitem tag +/////////// + +Takes a subset of the evaluation of the last child node of the tag. + +type : mandatory + int or list + +index : mandatory + int or string (a key of a dictionary) + +**Example** + +Evaluates to the first element of the list of ids returned by the function node + +.. code-block:: xml + + + + + +i18n +"""" + +Improving Translations +////////////////////// + +.. describe:: Translating in launchpad + +Translations are managed by +the `Launchpad Web interface `_. Here, you'll +find the list of translatable projects. + +Please read the `FAQ `_ before asking questions. + +.. describe:: Translating your own module + +.. versionchanged:: 5.0 + +Contrary to the 4.2.x version, the translations are now done by module. So, +instead of an unique ``i18n`` folder for the whole application, each module has +its own ``i18n`` folder. In addition, OpenERP can now deal with ``.po`` [#f_po]_ +files as import/export format. The translation files of the installed languages +are automatically loaded when installing or updating a module. OpenERP can also +generate a .tgz archive containing well organised ``.po`` files for each selected +module. + +.. [#f_po] http://www.gnu.org/software/autoconf/manual/gettext/PO-Files.html#PO-Files + +Process +""""""" + +Defining the process +//////////////////// + +Through the interface and module recorder. +Then, put the generated XML in your own module. + +Views +""""" + +Technical Specifications - Architecture - Views +/////////////////////////////////////////////// + +Views are a way to represent the objects on the client side. They indicate to the client how to lay out the data coming from the objects on the screen. + +There are two types of views: + + * form views + * tree views + +Lists are simply a particular case of tree views. + +A same object may have several views: the first defined view of a kind (*tree, form*, ...) will be used as the default view for this kind. That way you can have a default tree view (that will act as the view of a one2many) and a specialized view with more or less information that will appear when one double-clicks on a menu item. For example, the products have several views according to the product variants. + +Views are described in XML. + +If no view has been defined for an object, the object is able to generate a view to represent itself. This can limit the developer's work but results in less ergonomic views. + + +Usage example +///////////// + +When you open an invoice, here is the chain of operations followed by the client: + + * An action asks to open the invoice (it gives the object's data (account.invoice), the view, the domain (e.g. only unpaid invoices) ). + * The client asks (with XML-RPC) to the server what views are defined for the invoice object and what are the data it must show. + * The client displays the form according to the view + +.. figure:: images/arch_view_use.png + :scale: 50 + :align: center + +To develop new objects +////////////////////// + +The design of new objects is restricted to the minimum: create the objects and optionally create the views to represent them. The PostgreSQL tables do not have to be written by hand because the objects are able to automatically create them (or adapt them in case they already exist). + +Reports +""""""" + +OpenERP uses a flexible and powerful reporting system. Reports are generated either in PDF or in HTML. Reports are designed on the principle of separation between the data layer and the presentation layer. + +Reports are described more in details in the `Reporting `_ chapter. + +Wizards +""""""" + +Here's an example of a .XML file that declares a wizard. + +.. code-block:: xml + + + + + + + + +A wizard is declared using a wizard tag. See "Add A New Wizard" for more information about wizard XML. + +also you can add wizard in menu using following xml entry + +.. code-block:: xml + + + + + + + + + +Workflow +"""""""" + +The objects and the views allow you to define new forms very simply, lists/trees and interactions between them. But that is not enough, you must define the dynamics of these objects. + +A few examples: + + * a confirmed sale order must generate an invoice, according to certain conditions + * a paid invoice must, only under certain conditions, start the shipping order + +The workflows describe these interactions with graphs. One or several workflows may be associated to the objects. Workflows are not mandatory; some objects don't have workflows. + +Below is an example workflow used for sale orders. It must generate invoices and shipments according to certain conditions. + +.. figure:: images/arch_workflow_sale.png + :scale: 85 + :align: center + + +In this graph, the nodes represent the actions to be done: + + * create an invoice, + * cancel the sale order, + * generate the shipping order, ... + +The arrows are the conditions; + + * waiting for the order validation, + * invoice paid, + * click on the cancel button, ... + +The squared nodes represent other Workflows; + + * the invoice + * the shipping + + +Profile Module +++++++++++++++ + +The purpose of a profile is to initialize OpenERP with a set of modules directly after the database has been created. A profile is a special kind of module that contains no code, only *dependencies on other modules*. + +In order to create a profile, you only have to create a new directory in server/addons (you *should* call this folder profile_modulename), in which you put an *empty* __init__.py file (as every directory Python imports must contain an __init__.py file), and a __openerp__.py whose structure is as follows : + +.. code-block:: python + + { + "name":"''Name of the Profile'', + "version":"''Version String''", + "author":"''Author Name''", + "category":"Profile", + "depends":[''List of the modules to install with the profile''], + "demo_xml":[], + "update_xml":[], + "active":False, + "installable":True, + } + +Here's the code of the file source/addons/profile_tools/__openerp__.py, +which corresponds to the tools profile in OpenERP. + +.. code-block:: python + + { + "name" : "Miscellaneous Tools", + "version" : "1.0", + "depends" : ["base", "base_setup"], + "author" : "OpenERP SA", + "category" : "Hidden/Dependency", + 'complexity': "easy", + "description": """ + Installer for extra Hidden like lunch, survey, idea, share, etc. + ================================================================ + + Makes the Extra Hidden Configuration available from where you can install + modules like share, lunch, pad, idea, survey and subscription. + """, + 'website': 'http://www.openerp.com', + 'init_xml': [], + 'update_xml': [ + ], + 'demo_xml': [], + 'installable': True, + 'auto_install': False, + 'certificate' : '00557100228403879621', + 'images': ['images/config_extra_Hidden.jpeg'], + } + + + + + +Action creation +--------------- + +Linking events to action +++++++++++++++++++++++++ + +The available type of events are: + + * **client_print_multi** (print from a list or form) + * **client_action_multi** (action from a list or form) + * **tree_but_open** (double click on the item of a tree, like the menu) + * **tree_but_action** (action on the items of a tree) + +To map an events to an action: + +.. code-block:: xml + + + tree_but_open + account.journal.period + Open Journal + + + + +If you double click on a journal/period (object: account.journal.period), this will open the selected wizard. (id="action_move_journal_line_form_select"). + +You can use a res_id field to allow this action only if the user click on a specific object. + +.. code-block:: xml + + + tree_but_open + account.journal.period + Open Journal + + + + + +The action will be triggered if the user clicks on the account.journal.period n°3. + +When you declare wizard, report or menus, the ir.values creation is automatically made with these tags: + + * + * + * + +So you usually do not need to add the mapping by yourself. diff --git a/doc/03_module_dev_02.rst b/doc/03_module_dev_02.rst new file mode 100644 index 00000000000..c7075a8f7ae --- /dev/null +++ b/doc/03_module_dev_02.rst @@ -0,0 +1,959 @@ +Objects, Fields and Methods +=========================== + +OpenERP Objects +--------------- + +.. This chapter is dedicated to detailed objects definition: + all fields + all objects + inheritancies + +All the ERP's pieces of data are accessible through "objects". As an example, there is a res.partner object to access the data concerning the partners, an account.invoice object for the data concerning the invoices, etc... + +Please note that there is an object for every type of resource, and not an +object per resource. We have thus a res.partner object to manage all the +partners and not a *res.partner* object per partner. If we talk in "object +oriented" terms, we could also say that there is an object per level. + +The direct consequences is that all the methods of objects have a common parameter: the "ids" parameter. This specifies on which resources (for example, on which partner) the method must be applied. Precisely, this parameter contains a list of resource ids on which the method must be applied. + +For example, if we have two partners with the identifiers 1 and 5, and we want to call the res_partner method "send_email", we will write something like:: + + res_partner.send_email(... , [1, 5], ...) + +We will see the exact syntax of object method calls further in this document. + +In the following section, we will see how to define a new object. Then, we will check out the different methods of doing this. + +For developers: + +* OpenERP "objects" are usually called classes in object oriented programming. +* A OpenERP "resource" is usually called an object in OO programming, instance of a class. + +It's a bit confusing when you try to program inside OpenERP, because the language used is Python, and Python is a fully object oriented language, and has objects and instances ... + +Luckily, an OpenERP "resource" can be converted magically into a nice Python object using the "browse" class method (OpenERP object method). + + +The ORM - Object-relational mapping - Models +-------------------------------------------- + +The ORM, short for Object-Relational Mapping, is a central part of OpenERP. + +In OpenERP, the data model is described and manipulated through Python classes +and objects. It is the ORM job to bridge the gap -- as transparently as +possible for the developer -- between Python and the underlying relational +database (PostgreSQL), which will provide the persistence we need for our +objects. + + +OpenERP Object Attributes +------------------------- + +Objects Introduction +++++++++++++++++++++ + +To define a new object, you must define a new Python class then instantiate it. This class must inherit from the osv class in the osv module. + +Object definition ++++++++++++++++++ + +The first line of the object definition will always be of the form:: + + class name_of_the_object(osv.osv): + _name = 'name.of.the.object' + _columns = { ... } + ... + name_of_the_object() + +An object is defined by declaring some fields with predefined names in the +class. Two of them are required (_name and _columns), the rest are optional. +The predefined fields are: + +Predefined fields ++++++++++++++++++ + +`_auto` + Determines whether a corresponding PostgreSQL table must be generated + automatically from the object. Setting _auto to False can be useful in case + of OpenERP objects generated from PostgreSQL views. See the "Reporting From + PostgreSQL Views" section for more details. + +`_columns (required)` + The object fields. See the :ref:`fields ` section for further details. + +`_constraints` + The constraints on the object. See the constraints section for details. + +`_sql_constraints` + The SQL Constraint on the object. See the SQL constraints section for further details. + +`_defaults` + The default values for some of the object's fields. See the default value section for details. + +`_inherit` + The name of the osv object which the current object inherits from. See the :ref:`object inheritance section` + (first form) for further details. + +`_inherits` + The list of osv objects the object inherits from. This list must be given in + a python dictionary of the form: {'name_of_the_parent_object': + 'name_of_the_field', ...}. See the :ref:`object inheritance section` + (second form) for further details. Default value: {}. + +`_log_access` + Determines whether or not the write access to the resource must be logged. + If true, four fields will be created in the SQL table: create_uid, + create_date, write_uid, write_date. Those fields represent respectively the + id of the user who created the record, the creation date of record, the id + of the user who last modified the record, and the date of that last + modification. This data may be obtained by using the perm_read method. + +`_name (required)` + Name of the object. Default value: None. + +`_order` + Name of the fields used to sort the results of the search and read methods. + + Default value: 'id'. + + Examples:: + + _order = "name" + _order = "date_order desc" + +`_rec_name` + Name of the field in which the name of every resource is stored. Default + value: 'name'. Note: by default, the name_get method simply returns the + content of this field. + +`_sequence` + Name of the SQL sequence that manages the ids for this object. Default value: None. + +`_sql` + SQL code executed upon creation of the object (only if _auto is True). It means this code gets executed after the table is created. + +`_table` + Name of the SQL table. Default value: the value of the _name field above + with the dots ( . ) replaced by underscores ( _ ). + + +.. _inherit-link: + +Object Inheritance - _inherit +----------------------------- + +Introduction +++++++++++++ + +Objects may be inherited in some custom or specific modules. It is better to +inherit an object to add/modify some fields. + +It is done with:: + + _inherit='object.name' + +Extension of an object +++++++++++++++++++++++ + +There are two possible ways to do this kind of inheritance. Both ways result in +a new class of data, which holds parent fields and behaviour as well as +additional fields and behaviour, but they differ in heavy programatical +consequences. + +While Example 1 creates a new subclass "custom_material" that may be "seen" or +"used" by any view or tree which handles "network.material", this will not be +the case for Example 2. + +This is due to the table (other.material) the new subclass is operating on, +which will never be recognized by previous "network.material" views or trees. + +Example 1:: + + class custom_material(osv.osv): + _name = 'network.material' + _inherit = 'network.material' + _columns = { + 'manuf_warranty': fields.boolean('Manufacturer warranty?'), + } + _defaults = { + 'manuf_warranty': lambda *a: False, + } + custom_material() + +.. tip:: Notice + + _name == _inherit + +In this example, the 'custom_material' will add a new field 'manuf_warranty' to +the object 'network.material'. New instances of this class will be visible by +views or trees operating on the superclasses table 'network.material'. + +This inheritancy is usually called "class inheritance" in Object oriented +design. The child inherits data (fields) and behavior (functions) of his +parent. + + +Example 2:: + + class other_material(osv.osv): + _name = 'other.material' + _inherit = 'network.material' + _columns = { + 'manuf_warranty': fields.boolean('Manufacturer warranty?'), + } + _defaults = { + 'manuf_warranty': lambda *a: False, + } + other_material() + +.. tip:: Notice + + _name != _inherit + +In this example, the 'other_material' will hold all fields specified by +'network.material' and it will additionally hold a new field 'manuf_warranty'. +All those fields will be part of the table 'other.material'. New instances of +this class will therefore never been seen by views or trees operating on the +superclasses table 'network.material'. + +This type of inheritancy is known as "inheritance by prototyping" (e.g. +Javascript), because the newly created subclass "copies" all fields from the +specified superclass (prototype). The child inherits data (fields) and behavior +(functions) of his parent. + + +.. _inherits-link: + +Inheritance by Delegation - _inherits +------------------------------------- + + **Syntax :**:: + + class tiny_object(osv.osv) + _name = 'tiny.object' + _table = 'tiny_object' + _inherits = { + 'tiny.object_a': 'object_a_id', + 'tiny.object_b': 'object_b_id', + ... , + 'tiny.object_n': 'object_n_id' + } + (...) + +The object 'tiny.object' inherits from all the columns and all the methods from +the n objects 'tiny.object_a', ..., 'tiny.object_n'. + +To inherit from multiple tables, the technique consists in adding one column to +the table tiny_object per inherited object. This column will store a foreign +key (an id from another table). The values *'object_a_id' 'object_b_id' ... +'object_n_id'* are of type string and determine the title of the columns in +which the foreign keys from 'tiny.object_a', ..., 'tiny.object_n' are stored. + +This inheritance mechanism is usually called " *instance inheritance* " or " +*value inheritance* ". A resource (instance) has the VALUES of its parents. + + +.. _fields-link: + +Fields Introduction +------------------- + +Objects may contain different types of fields. Those types can be divided into +three categories: simple types, relation types and functional fields. The +simple types are integers, floats, booleans, strings, etc ... ; the relation +types are used to represent relations between objects (one2one, one2many, +many2one). Functional fields are special fields because they are not stored in +the database but calculated in real time given other fields of the view. + +Here's the header of the initialization method of the class any field defined +in OpenERP inherits (as you can see in server/bin/osv/fields.py):: + + def __init__(self, string='unknown', required=False, readonly=False, + domain=None, context="", states=None, priority=0, change_default=False, size=None, + ondelete="set null", translate=False, select=False, **args) : + +There are a common set of optional parameters that are available to most field +types: + +:change_default: + Whether or not the user can define default values on other fields depending + on the value of this field. Those default values need to be defined in + the ir.values table. +:help: + A description of how the field should be used: longer and more descriptive + than `string`. It will appear in a tooltip when the mouse hovers over the + field. +:ondelete: + How to handle deletions in a related record. Allowable values are: + 'restrict', 'no action', 'cascade', 'set null', and 'set default'. +:priority: Not used? +:readonly: `True` if the user cannot edit this field, otherwise `False`. +:required: + `True` if this field must have a value before the object can be saved, + otherwise `False`. +:size: The size of the field in the database: number characters or digits. +:states: + Lets you override other parameters for specific states of this object. + Accepts a dictionary with the state names as keys and a list of name/value + tuples as the values. For example: `states={'posted':[('readonly',True)]}` +:string: + The field name as it should appear in a label or column header. Strings + containing non-ASCII characters must use python unicode objects. + For example: `'tested': fields.boolean(u'Testé')` +:translate: + `True` if the *content* of this field should be translated, otherwise + `False`. + +There are also some optional parameters that are specific to some field types: + +:context: + Define a variable's value visible in the view's context or an on-change + function. Used when searching child table of `one2many` relationship? +:domain: + Domain restriction on a relational field. + + Default value: []. + + Example: domain=[('field','=',value)]) +:invisible: Hide the field's value in forms. For example, a password. +:on_change: + Default value for the `on_change` attribute in the view. This will launch + a function on the server when the field changes in the client. For example, + `on_change="onchange_shop_id(shop_id)"`. +:relation: + Used when a field is an id reference to another table. This is the name of + the table to look in. Most commonly used with related and function field + types. +:select: + Default value for the `select` attribute in the view. 1 means basic search, + and 2 means advanced search. + + +Type of Fields +-------------- + +Basic Types ++++++++++++ + +:boolean: + + A boolean (true, false). + + Syntax:: + + fields.boolean('Field Name' [, Optional Parameters]), + +:integer: + + An integer. + + Syntax:: + + fields.integer('Field Name' [, Optional Parameters]), + +:float: + + A floating point number. + + Syntax:: + + fields.float('Field Name' [, Optional Parameters]), + + .. note:: + + The optional parameter digits defines the precision and scale of the + number. The scale being the number of digits after the decimal point + whereas the precision is the total number of significant digits in the + number (before and after the decimal point). If the parameter digits is + not present, the number will be a double precision floating point number. + Warning: these floating-point numbers are inexact (not any value can be + converted to its binary representation) and this can lead to rounding + errors. You should always use the digits parameter for monetary amounts. + + Example:: + + 'rate': fields.float( + 'Relative Change rate', + digits=(12,6) [, + Optional Parameters]), + +:char: + + A string of limited length. The required size parameter determines its size. + + Syntax:: + + fields.char( + 'Field Name', + size=n [, + Optional Parameters]), # where ''n'' is an integer. + + Example:: + + 'city' : fields.char('City Name', size=30, required=True), + +:text: + + A text field with no limit in length. + + Syntax:: + + fields.text('Field Name' [, Optional Parameters]), + +:date: + + A date. + + Syntax:: + + fields.date('Field Name' [, Optional Parameters]), + +:datetime: + + Allows to store a date and the time of day in the same field. + + Syntax:: + + fields.datetime('Field Name' [, Optional Parameters]), + +:binary: + + A binary chain + +:selection: + + A field which allows the user to make a selection between various predefined values. + + Syntax:: + + fields.selection((('n','Unconfirmed'), ('c','Confirmed')), + 'Field Name' [, Optional Parameters]), + + .. note:: + + Format of the selection parameter: tuple of tuples of strings of the form:: + + (('key_or_value', 'string_to_display'), ... ) + + .. note:: + You can specify a function that will return the tuple. Example :: + + def _get_selection(self, cursor, user_id, context=None): + return ( + ('choice1', 'This is the choice 1'), + ('choice2', 'This is the choice 2')) + + _columns = { + 'sel' : fields.selection( + _get_selection, + 'What do you want ?') + } + + *Example* + + Using relation fields **many2one** with **selection**. In fields definitions add:: + + ..., + 'my_field': fields.many2one( + 'mymodule.relation.model', + 'Title', + selection=_sel_func), + ..., + + And then define the _sel_func like this (but before the fields definitions):: + + def _sel_func(self, cr, uid, context=None): + obj = self.pool.get('mymodule.relation.model') + ids = obj.search(cr, uid, []) + res = obj.read(cr, uid, ids, ['name', 'id'], context) + res = [(r['id'], r['name']) for r in res] + return res + +Relational Types +++++++++++++++++ + +:one2one: + + A one2one field expresses a one:to:one relation between two objects. It is + deprecated. Use many2one instead. + + Syntax:: + + fields.one2one('other.object.name', 'Field Name') + +:many2one: + + Associates this object to a parent object via this Field. For example + Department an Employee belongs to would Many to one. i.e Many employees will + belong to a Department + + Syntax:: + + fields.many2one( + 'other.object.name', + 'Field Name', + optional parameters) + + Optional parameters: + + - ondelete: What should happen when the resource this field points to is deleted. + + Predefined value: "cascade", "set null", "restrict", "no action", "set default" + + Default value: "set null" + - required: True + - readonly: True + - select: True - (creates an index on the Foreign Key field) + + *Example* :: + + 'commercial': fields.many2one( + 'res.users', + 'Commercial', + ondelete='cascade'), + +:one2many: + + TODO + + Syntax:: + + fields.one2many( + 'other.object.name', + 'Field relation id', + 'Fieldname', + optional parameter) + + Optional parameters: + - invisible: True/False + - states: ? + - readonly: True/False + + *Example* :: + + 'address': fields.one2many( + 'res.partner.address', + 'partner_id', + 'Contacts'), + +:many2many: + + TODO + + Syntax:: + + fields.many2many('other.object.name', + 'relation object', + 'actual.object.id', + 'other.object.id', + 'Field Name') + + Where: + - other.object.name is the other object which belongs to the relation + - relation object is the table that makes the link + - actual.object.id and other.object.id are the fields' names used in the relation table + + Example:: + + 'category_ids': + fields.many2many( + 'res.partner.category', + 'res_partner_category_rel', + 'partner_id', + 'category_id', + 'Categories'), + + To make it bidirectional (= create a field in the other object):: + + class other_object_name2(osv.osv): + _inherit = 'other.object.name' + _columns = { + 'other_fields': fields.many2many( + 'actual.object.name', + 'relation object', + 'actual.object.id', + 'other.object.id', + 'Other Field Name'), + } + other_object_name2() + + Example:: + + class res_partner_category2(osv.osv): + _inherit = 'res.partner.category' + _columns = { + 'partner_ids': fields.many2many( + 'res.partner', + 'res_partner_category_rel', + 'category_id', + 'partner_id', + 'Partners'), + } + res_partner_category2() + +:related: + + Sometimes you need to refer to the relation of a relation. For example, + supposing you have objects: City -> State -> Country, and you need to refer to + the Country from a City, you can define a field as below in the City object:: + + 'country_id': fields.related( + 'state_id', + 'country_id', + type="many2one", + relation="res.country", + string="Country", + store=False) + + Where: + - The first set of parameters are the chain of reference fields to + follow, with the desired field at the end. + - :guilabel:`type` is the type of that desired field. + - Use :guilabel:`relation` if the desired field is still some kind of + reference. :guilabel:`relation` is the table to look up that + reference in. + + +Functional Fields ++++++++++++++++++ + +A functional field is a field whose value is calculated by a function (rather +than being stored in the database). + +**Parameters:** :: + + fnct, arg=None, fnct_inv=None, fnct_inv_arg=None, type="float", + fnct_search=None, obj=None, method=False, store=False, multi=False + +where + + * :guilabel:`fnct` is the function or method that will compute the field + value. It must have been declared before declaring the functional field. + * :guilabel:`fnct_inv` is the function or method that will allow writing + values in that field. + * :guilabel:`type` is the field type name returned by the function. It can + be any field type name except function. + * :guilabel:`fnct_search` allows you to define the searching behaviour on + that field. + * :guilabel:`method` whether the field is computed by a method (of an + object) or a global function + * :guilabel:`store` If you want to store field in database or not. Default + is False. + * :guilabel:`multi` is a group name. All fields with the same `multi` + parameter will be calculated in a single function call. + +fnct parameter +"""""""""""""" +If *method* is True, the signature of the method must be:: + + def fnct(self, cr, uid, ids, field_name, arg, context): + +otherwise (if it is a global function), its signature must be:: + + def fnct(cr, table, ids, field_name, arg, context): + +Either way, it must return a dictionary of values of the form +**{id'_1_': value'_1_', id'_2_': value'_2_',...}.** + +The values of the returned dictionary must be of the type specified by the type +argument in the field declaration. + +If *multi* is set, then *field_name* is replaced by *field_names*: a list +of the field names that should be calculated. Each value in the returned +dictionary is also a dictionary from field name to value. For example, if the +fields `'name'`, and `'age'` are both based on the `vital_statistics` function, +then the return value of `vital_statistics` might look like this when `ids` is +`[1, 2, 5]`:: + + { + 1: {'name': 'Bob', 'age': 23}, + 2: {'name': 'Sally', 'age', 19}, + 5: {'name': 'Ed', 'age': 62} + } + +fnct_inv parameter +"""""""""""""""""" +If *method* is true, the signature of the method must be:: + + def fnct(self, cr, uid, ids, field_name, field_value, arg, context): + + +otherwise (if it is a global function), it should be:: + + def fnct(cr, table, ids, field_name, field_value, arg, context): + +fnct_search parameter +""""""""""""""""""""" +If method is true, the signature of the method must be:: + + def fnct(self, cr, uid, obj, name, args, context): + +otherwise (if it is a global function), it should be:: + + def fnct(cr, uid, obj, name, args, context): + +The return value is a list containing 3-part tuples which are used in search function:: + + return [('id','in',[1,3,5])] + +*obj* is the same as *self*, and *name* receives the field name. *args* is a list +of 3-part tuples containing search criteria for this field, although the search +function may be called separately for each tuple. + +Example +""""""" +Suppose we create a contract object which is : + +.. code-block:: python + + class hr_contract(osv.osv): + _name = 'hr.contract' + _description = 'Contract' + _columns = { + 'name' : fields.char('Contract Name', size=30, required=True), + 'employee_id' : fields.many2one('hr.employee', 'Employee', required=True), + 'function' : fields.many2one('res.partner.function', 'Function'), + } + hr_contract() + +If we want to add a field that retrieves the function of an employee by looking its current contract, we use a functional field. The object hr_employee is inherited this way: + +.. code-block:: python + + class hr_employee(osv.osv): + _name = "hr.employee" + _description = "Employee" + _inherit = "hr.employee" + _columns = { + 'contract_ids' : fields.one2many('hr.contract', 'employee_id', 'Contracts'), + 'function' : fields.function( + _get_cur_function_id, + type='many2one', + obj="res.partner.function", + method=True, + string='Contract Function'), + } + hr_employee() + +.. note:: three points + + * :guilabel:`type` ='many2one' is because the function field must create + a many2one field; function is declared as a many2one in hr_contract also. + * :guilabel:`obj` ="res.partner.function" is used to specify that the + object to use for the many2one field is res.partner.function. + * We called our method :guilabel:`_get_cur_function_id` because its role + is to return a dictionary whose keys are ids of employees, and whose + corresponding values are ids of the function of those employees. The + code of this method is: + +.. code-block:: python + + def _get_cur_function_id(self, cr, uid, ids, field_name, arg, context): + for i in ids: + #get the id of the current function of the employee of identifier "i" + sql_req= """ + SELECT f.id AS func_id + FROM hr_contract c + LEFT JOIN res_partner_function f ON (f.id = c.function) + WHERE + (c.employee_id = %d) + """ % (i,) + + cr.execute(sql_req) + sql_res = cr.dictfetchone() + + if sql_res: #The employee has one associated contract + res[i] = sql_res['func_id'] + else: + #res[i] must be set to False and not to None because of XML:RPC + # "cannot marshal None unless allow_none is enabled" + res[i] = False + return res + +The id of the function is retrieved using a SQL query. Note that if the query +returns no result, the value of sql_res['func_id'] will be None. We force the +False value in this case value because XML:RPC (communication between the server +and the client) doesn't allow to transmit this value. + +store Parameter +""""""""""""""" +It will calculate the field and store the result in the table. The field will be +recalculated when certain fields are changed on other objects. It uses the +following syntax: + +.. code-block:: python + + store = { + 'object_name': ( + function_name, + ['field_name1', 'field_name2'], + priority) + } + +It will call function function_name when any changes are written to fields in the +list ['field1','field2'] on object 'object_name'. The function should have the +following signature:: + + def function_name(self, cr, uid, ids, context=None): + +Where `ids` will be the ids of records in the other object's table that have +changed values in the watched fields. The function should return a list of ids +of records in its own table that should have the field recalculated. That list +will be sent as a parameter for the main function of the field. + +Here's an example from the membership module: + +.. code-block:: python + + 'membership_state': + fields.function( + _membership_state, + method=True, + string='Current membership state', + type='selection', + selection=STATE, + store={ + 'account.invoice': (_get_invoice_partner, ['state'], 10), + 'membership.membership_line': (_get_partner_id,['state'], 10), + 'res.partner': ( + lambda self, cr, uid, ids, c={}: ids, + ['free_member'], + 10) + }), + +Property Fields ++++++++++++++++ + +.. describe:: Declaring a property + +A property is a special field: fields.property. + +.. code-block:: python + + class res_partner(osv.osv): + _name = "res.partner" + _inherit = "res.partner" + _columns = { + 'property_product_pricelist': + fields.property( + 'product.pricelist', + type='many2one', + relation='product.pricelist', + string="Sale Pricelist", + method=True, + view_load=True, + group_name="Pricelists Properties"), + } + + +Then you have to create the default value in a .XML file for this property: + +.. code-block:: xml + + + property_product_pricelist + + + + +.. + +.. tip:: + + if the default value points to a resource from another module, you can use the ref function like this: + + + +**Putting properties in forms** + +To add properties in forms, just put the tag in your form. This will automatically add all properties fields that are related to this object. The system will add properties depending on your rights. (some people will be able to change a specific property, others won't). + +Properties are displayed by section, depending on the group_name attribute. (It is rendered in the client like a separator tag). + +**How does this work ?** + +The fields.property class inherits from fields.function and overrides the read and write method. The type of this field is many2one, so in the form a property is represented like a many2one function. + +But the value of a property is stored in the ir.property class/table as a complete record. The stored value is a field of type reference (not many2one) because each property may point to a different object. If you edit properties values (from the administration menu), these are represented like a field of type reference. + +When you read a property, the program gives you the property attached to the instance of object you are reading. If this object has no value, the system will give you the default property. + +The definition of a property is stored in the ir.model.fields class like any other fields. In the definition of the property, you can add groups that are allowed to change to property. + +**Using properties or normal fields** + +When you want to add a new feature, you will have to choose to implement it as a property or as normal field. Use a normal field when you inherit from an object and want to extend this object. Use a property when the new feature is not related to the object but to an external concept. + + +Here are a few tips to help you choose between a normal field or a property: + +Normal fields extend the object, adding more features or data. + +A property is a concept that is attached to an object and have special features: + +* Different value for the same property depending on the company +* Rights management per field +* It's a link between resources (many2one) + +**Example 1: Account Receivable** + +The default "Account Receivable" for a specific partner is implemented as a property because: + + * This is a concept related to the account chart and not to the partner, so it is an account property that is visible on a partner form. Rights have to be managed on this fields for accountants, these are not the same rights that are applied to partner objects. So you have specific rights just for this field of the partner form: only accountants may change the account receivable of a partner. + + * This is a multi-company field: the same partner may have different account receivable values depending on the company the user belongs to. In a multi-company system, there is one account chart per company. The account receivable of a partner depends on the company it placed the sale order. + + * The default account receivable is the same for all partners and is configured from the general property menu (in administration). + +.. note:: + One interesting thing is that properties avoid "spaghetti" code. The account module depends on the partner (base) module. But you can install the partner (base) module without the accounting module. If you add a field that points to an account in the partner object, both objects will depend on each other. It's much more difficult to maintain and code (for instance, try to remove a table when both tables are pointing to each others.) + +**Example 2: Product Times** + +The product expiry module implements all delays related to products: removal date, product usetime, ... This module is very useful for food industries. + +This module inherits from the product.product object and adds new fields to it: + +.. code-block:: python + + class product_product(osv.osv): + + _inherit = 'product.product' + _name = 'product.product' + _columns = { + + 'life_time': fields.integer('Product lifetime'), + 'use_time': fields.integer('Product usetime'), + 'removal_time': fields.integer('Product removal time'), + 'alert_time': fields.integer('Product alert time'), + } + + product_product() + +.. + +This module adds simple fields to the product.product object. We did not use properties because: + + * We extend a product, the life_time field is a concept related to a product, not to another object. + * We do not need a right management per field, the different delays are managed by the same people that manage all products. + + +ORM methods +----------- + +Keeping the context in ORM methods +++++++++++++++++++++++++++++++++++ + +In OpenObject, the context holds very important data such as the language in +which a document must be written, whether function field needs updating or not, +etc. + +When calling an ORM method, you will probably already have a context - for +example the framework will provide you with one as a parameter of almost +every method. +If you do have a context, it is very important that you always pass it through +to every single method you call. + +This rule also applies to writing ORM methods. You should expect to receive a +context as parameter, and always pass it through to every other method you call.. diff --git a/doc/03_module_dev_03.rst b/doc/03_module_dev_03.rst new file mode 100644 index 00000000000..975ebbb3064 --- /dev/null +++ b/doc/03_module_dev_03.rst @@ -0,0 +1,1428 @@ +Views and Events +================ + +Introduction to Views +--------------------- + +As all data of the program is stored in objects, as explained in the Objects section, how are these objects exposed to the user ? We will try to answer this question in this section. + +First of all, let's note that every resource type uses its own interface. For example, the screen to modify a partner's data is not the same as the one to modify an invoice. + +Then, you have to know that the OpenERP user interface is dynamic, it means that it is not described "statically" by some code, but dynamically built from XML descriptions of the client screens. + +From now on, we will call these screen descriptions views. + +A notable characteristic of these views is that they can be edited at any moment (even during the program execution). After a modification to a displayed view has occurred, you simply need to close the tab corresponding to that 'view' and re-open it for the changes to appear. + +Views principles +++++++++++++++++ + +Views describe how each object (type of resource) is displayed. More precisely, for each object, we can define one (or several) view(s) to describe which fields should be drawn and how. + +There are two types of views: + + #. form views + #. tree views + +.. note:: Since OpenERP 4.1, form views can also contain graphs. + + +Form views +---------- + +The field disposition in a form view always follows the same principle. Fields are distributed on the screen following the rules below: + + * By default, each field is preceded by a label, with its name. + * Fields are placed on the screen from left to right, and from top to bottom, according to the order in which they are declared in the view. + * Every screen is divided into 4 columns, each column being able to contain either a label, or an "edition" field. As every edition field is preceded (by default) by a label with its name, there will be two fields (and their respective labels) on each line of the screen. The green and red zones on the screen-shot below, illustrate those 4 columns. They designate respectively the labels and their corresponding fields. + +.. figure:: images/sale_order.png + :scale: 50 + :align: center + + +Views also support more advanced placement options: + + * A view field can use several columns. For example, on the screen-shot below, the zone in the blue frame is, in fact, the only field of a "one to many". We will come back later on this note, but let's note that it uses the whole width of the screen and not only one column. + + .. figure:: images/sale_order_sale_order_lines.png + :scale: 50 + :align: center + + * We can also make the opposite operation: take a columns group and divide it in as many columns as desired. The surrounded green zones of the screen above are good examples. Precisely, the green framework up and on the right side takes the place of two columns, but contains 4 columns. + +As we can see below in the purple zone of the screen, there is also a way to distribute the fields of an object on different tabs. + +.. figure:: images/sale_order_notebook.png + :scale: 50 + :align: center + + +Tree views +----------- + +These views are used when we work in list mode (in order to visualize several resources at once) and in the search screen. These views are simpler than the form views and thus have less options. + +.. figure:: images/tree_view.png + :scale: 50 + :align: center + +Graph views +-------------- + +A graph is a new mode of view for all views of type form. If, for example, a sale order line must be visible as list or as graph, define it like this in the action that open this sale order line. Do not set the view mode as "tree,form,graph" or "form,graph" - it must be "graph,tree" to show the graph first or "tree,graph" to show the list first. (This view mode is extra to your "form,tree" view and should have a separate menu item): + +.. code-block:: xml + + form + tree,graph + +view_type:: + + tree = (tree with shortcuts at the left), form = (switchable view form/list) + +view_mode:: + + tree,graph : sequences of the views when switching + +Then, the user will be able to switch from one view to the other. Unlike forms and trees, OpenERP is not able to automatically create a view on demand for the graph type. So, you must define a view for this graph: + + +.. code-block:: xml + + + sale.order.line.graph + sale.order.line + graph + + + + + + + + + +The graph view + +A view of type graph is just a list of fields for the graph. + +Graph tag +++++++++++ + +The default type of the graph is a pie chart - to change it to a barchart change **** to **** You also may change the orientation. + +:Example : + +.. code-block:: xml + + + +Field tag ++++++++++ + +The first field is the X axis. The second one is the Y axis and the optional third one is the Z axis for 3 dimensional graphs. You can apply a few attributes to each field/axis: + + * **group**: if set to true, the client will group all item of the same value for this field. For each other field, it will apply an operator + * **operator**: the operator to apply is another field is grouped. By default it's '+'. Allowed values are: + + + +: addition + + \*: multiply + + \**: exponent + + min: minimum of the list + + max: maximum of the list + +:Defining real statistics on objects: + +The easiest method to compute real statistics on objects is: + + 1. Define a statistic object which is a postgresql view + 2. Create a tree view and a graph view on this object + +You can get en example in all modules of the form: report\_.... Example: report_crm. + + +Search views +-------------- + +Search views are a new feature of OpenERP supported as of version 6.0 +It creates a customized search panel, and is declared quite similarly to a form view, +except that the view type and root element change to ``search`` instead of ``form``. + +.. image:: images/search.png + :scale: 50 + :align: center + +Following is the list of new elements and features supported in search views. + +Group tag ++++++++++ + +Unlike form group elements, search view groups support unlimited number of widget(fields or filters) +in a row (no automatic line wrapping), and only use the following attributes: + + + ``expand``: turns on the expander icon on the group (1 for expanded by default, 0 for collapsed) + + ``string``: label for the group + +.. code-block:: xml + + + + + + + + +In the screenshot above the green area is an expandable group. + +Filter tag ++++++++++++ +Filters are displayed as a toggle button on search panel +Filter elements can add new values in the current domain or context of the search view. +Filters can be added as a child element of field too, to indicate that they apply specifically +to that field (in this case the button's icon will smaller) + +In the picture above the red area contains filters at the top of the form while +the blue area highlights a field and it's child filter. + +.. code-block:: xml + + + + + + +Group By +++++++++ + +.. code-block:: xml + + + +Above filters groups records sharing the same ``project_id`` value. Groups are loaded +lazily, so the inner records are only loaded when the group is expanded. +The group header lines contain the common values for all records in that group, and all numeric +fields currently displayed in the view are replaced by the sum of the values in that group. + +It is also possible to group on multiple values by specifying a list of fields instead of a single string. +In this case nested groups will be displayed:: + + + +Fields +++++++ + +Field elements in search views are used to get user-provided values +for searches. As a result, as for group elements, they are quite +different than form view's fields: + +* a search field can contain filters, which generally indicate that + both field and filter manage the same field and are related. + + Those inner filters are rendered as smaller buttons, right next to + the field, and *must not* have a ``string`` attribute. + +* a search field really builds a domain composed of ``[(field_name, + operator, field_value)]``. This domain can be overridden in two + ways: + + * ``@operator`` replaces the default operator for the field (which + depends on its type) + + * ``@filter_domain`` lets you provide a fully custom domain, which + will replace the default domain creation + +* a search field does not create a context by default, but you can + provide an ``@context`` which will be evaluated and merged into the + wider context (as with a ``filter`` element). + +To get the value of the field in your ``@context`` or +``@filter_domain``, you can use the variable ``self``: + +.. code-block:: xml + + + +or + +.. code-block:: xml + + + +Range fields (date, datetime, time) +""""""""""""""""""""""""""""""""""" + +The range fields are composed of two input widgets (from and two) +instead of just one. + +This leads to peculiarities (compared to non-range search fields): + +* It is not possible to override the operator of a range field via + ``@operator``, as the domain is built of two sections and each + section uses a different operator. + +* Instead of being a simple value (integer, string, float) ``self`` + for use in ``@filter_domain`` and ``@context`` is a ``dict``. + + Because each input widget of a range field can be empty (and the + field itself will still be valid), care must be taken when using + ``self``: it has two string keys ``"from"`` and ``"to"``, but any of + these keys can be either missing entirely or set to the value + ``False``. + +Actions for Search view ++++++++++++++++++++++++ + +After declaring a search view, it will be used automatically for all tree views on the same model. +If several search views exist for a single model, the one with the highest priority (lowest sequence) will +be used. Another option is to explicitly select the search view you want to use, by setting the +``search_view_id`` field of the action. + +In addition to being able to pass default form values in the context of the action, OpenERP 6.0 now +supports passing initial values for search views too, via the context. The context keys need to match the +``search_default_XXX`` format. ``XXX`` may refer to the ``name`` of a ```` or ```` +in the search view (as the ``name`` attribute is not required on filters, this only works for filters that have +an explicit ``name`` set). The value should be either the initial value for search fields, or +simply a boolean value for filters, to toggle them + +.. code-block:: xml + + + Tasks + project.task + form + tree,form,calendar,gantt,graph + + + {"search_default_current":1,"search_default_user_id":uid} + + + +Custom Filters +++++++++++++++ + +As of v6.0, all search views also features custom search filters, as show below. +Users can define their own custom filters using any of the fields available on the current model, +combining them with AND/OR operators. It is also possible to save any search context (the combination +of all currently applied domain and context values) as a personal filter, which can be recalled +at any time. Filters can also be turned into Shortcuts directly available in the User's homepage. + +.. image:: images/filter.png + :scale: 50 + :align: center + + +In above screenshot we filter Partner where Salesman = Demo user and Country = Belgium, +We can save this search criteria as a Shortcut or save as Filter. + +Filters are user specific and can be modified via the Manage Filters option in the filters drop-down. + + +Calendar Views +-------------- + +Calendar view provides timeline/schedule view for the data. + +View Specification +++++++++++++++++++ + +Here is an example view: + +.. code-block:: xml + + + + + + +Here is the list of supported attributes for ``calendar`` tag: + + ``string`` + The title string for the view. + + ``date_start`` + A ``datetime`` field to specify the starting date for the calendar item. This + attribute is required. + + ``date_stop`` + A ``datetime`` field to specify the end date. Ignored if ``date_delay`` + attribute is specified. + + ``date_delay`` + A ``numeric`` field to specify time in hours for a record. This attribute + will get preference over ``date_stop`` and ``date_stop`` will be ignored. + + ``day_length`` + An ``integer`` value to specify working day length. Default is ``8`` hours. + + ``color`` + A field, generally ``many2one``, to colorize calendar/gantt items. + + ``mode`` + A string value to set default view/zoom mode. For ``calendar`` view, this can be + one of following (default is ``month``): + + * ``day`` + * ``week`` + * ``month`` + +Screenshots ++++++++++++ + +Month Calendar: + +.. figure:: images/calendar_month.png + :scale: 50% + :align: center + +Week Calendar: + +.. figure:: images/calendar_week.png + :scale: 50% + :align: center + + +Gantt Views +----------- + +Gantt view provides timeline view for the data. Generally, it can be used to display +project tasks and resource allocation. + +A Gantt chart is a graphical display of all the tasks that a project is composed of. +Each bar on the chart is a graphical representation of the length of time the task is +planned to take. + +A resource allocation summary bar is shown on top of all the grouped tasks, +representing how effectively the resources are allocated among the tasks. + +Color coding of the summary bar is as follows: + + * `Gray` shows that the resource is not allocated to any task at that time + * `Blue` shows that the resource is fully allocated at that time. + * `Red` shows that the resource is overallocated + +View Specification +++++++++++++++++++ + +Here is an example view: + +.. code-block:: xml + + + + + + + +The ``attributes`` accepted by the ``gantt`` tag are similar to ``calendar`` view tag. The +``level`` tag is used to group the records by some ``many2one`` field. Currently, only +one level is supported. + +Here is the list of supported attributes for ``gantt`` tag: + + ``string`` + The title string for the view. + + ``date_start`` + A ``datetime`` field to specify the starting date for the gantt item. This + attribute is required. + + ``date_stop`` + A ``datetime`` field to specify the end date. Ignored if ``date_delay`` + attribute is specified. + + ``date_delay`` + A ``numeric`` field to specify time in hours for a record. This attribute + will get preference over ``date_stop`` and ``date_stop`` will be ignored. + + ``day_length`` + An ``integer`` value to specify working day length. Default is ``8`` hours. + + ``color`` + A field, generally ``many2one``, to colorize calendar/gantt items. + + ``mode`` + A string value to set default view/zoom mode. For ``gantt`` view, this can be + one of following (default is ``month``): + + * ``day`` + * ``3days`` + * ``week`` + * ``3weeks`` + * ``month`` + * ``3months`` + * ``year`` + * ``3years`` + * ``5years`` + +The ``level`` tag supports following attributes: + + ``object`` + An openerp object having many2one relationship with view object. + + ``link`` + The field name in current object that links to the given ``object``. + + ``domain`` + The domain to be used to filter the given ``object`` records. + +Drag and Drop ++++++++++++++ + +The left side pane displays list of the tasks grouped by the given ``level`` field. +You can reorder or change the group of any records by dragging them. + +The main content pane displays horizontal bars plotted on a timeline grid. A group +of bars are summarized with a top summary bar displaying resource allocation of all +the underlying tasks. + +You can change the task start time by dragging the tasks horizontally. While +end time can be changed by dragging right end of a bar. + +.. note:: + + The time is calculated considering ``day_length`` so a bar will span more + then one day if total time for a task is greater then ``day_length`` value. + +Screenshots ++++++++++++ + +.. figure:: images/gantt.png + :scale: 50% + :align: center + + +Design Elements +--------------- + +The files describing the views are of the form: + +:Example: + +.. code-block:: xml + + + + + [view definitions] + + + +The view definitions contain mainly three types of tags: + + * **** tags with the attribute model="ir.ui.view", which contain the view definitions themselves + * **** tags with the attribute model="ir.actions.act_window", which link actions to these views + * **** tags, which create entries in the menu, and link them with actions + +New : You can specify groups for whom the menu is accessible using the groups +attribute in the `menuitem` tag. + +New : You can now add shortcut using the `shortcut` tag. + +:Example: + +.. code-block:: xml + + + +Note that you should add an id attribute on the `menuitem` which is referred by +menu attribute. + +.. code-block:: xml + + + sale.order.form + sale.order + + +
+ ......... +
+
+
+ +Default value for the priority field : 16. When not specified the system will use the view with the lower priority. + +View Types +++++++++++ + +Tree View +""""""""" +You can specify the columns to include in the list, along with some details of +the list's appearance. The search fields aren't specified here, they're +specified by the `select` attribute in the form view fields. + +.. code-block:: xml + + + stock.location.tree + stock.location + tree + + + + + + + + + + + + +That example is just a flat list, but you can also display a real tree structure +by specifying a `field_parent`. The name is a bit misleading, though; the field +you specify must contain a list of all **child** entries. + +.. code-block:: xml + + + stock.location.tree + stock.location + tree + child_ids + + + + + + + + +On the `tree` element, the following attributes are supported: + +colors + Conditions for applying different colors to items in the list. The default + is black. +toolbar + Set this to 1 if you want a tree structure to list the top level entries + in a separate toolbar area. When you click on an entry in the toolbar, all + its descendants will be displayed in the main tree. The value is ignored + for flat lists. + +Grouping Elements ++++++++++++++++++ + +Separator +""""""""" + +Adds a separator line + +:Example: + +.. code-block:: xml + + + +The string attribute defines its label and the colspan attribute defines his horizontal size (in number of columns). + +Notebook +"""""""" + +: With notebooks you can distribute the view fields on different tabs (each one defined by a page tag). You can use the tabpos properties to set tab at: up, down, left, right. + +:Example: + +.. code-block:: xml + + .... + +Group +""""" + +: groups several columns and split the group in as many columns as desired. + + * **colspan**: the number of columns to use + * **rowspan**: the number of rows to use + * **expand**: if we should expand the group or not + * **col**: the number of columns to provide (to its children) + * **string**: (optional) If set, a frame will be drawn around the group of fields, with a label containing the string. Otherwise, the frame will be invisible. + +:Example: + +.. code-block:: xml + + + +
+ +
From 4a8e00cac7ba39a99f2a4fac9cdd4a4f171370ed Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Mon, 25 Jun 2012 12:21:09 +0530 Subject: [PATCH 022/841] [FIX]base:fix the issue convert to quote is not working via Scheduled Calls lp bug: https://launchpad.net/bugs/1017353 fixed bzr revid: mma@tinyerp.com-20120625065109-5ciy82syodgtbcg9 --- addons/sale_crm/wizard/crm_make_sale.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/sale_crm/wizard/crm_make_sale.py b/addons/sale_crm/wizard/crm_make_sale.py index 9484b87652e..fd84e33610f 100644 --- a/addons/sale_crm/wizard/crm_make_sale.py +++ b/addons/sale_crm/wizard/crm_make_sale.py @@ -64,7 +64,9 @@ class crm_make_sale(osv.osv_memory): """ if context is None: context = {} - + # update context: if come from phonecall, default state values can make the quote crash lp:1017353 + context.pop('default_state', False) + case_obj = self.pool.get('crm.lead') sale_obj = self.pool.get('sale.order') partner_obj = self.pool.get('res.partner') From eab2e225a223d0919ee4dde65f4dfe7e269fa01c Mon Sep 17 00:00:00 2001 From: "Nimesh (Open ERP)" Date: Fri, 6 Jul 2012 14:46:08 +0530 Subject: [PATCH 023/841] [FIX]: add date validation. bzr revid: nco@tinyerp.com-20120706091608-f5o08ke6z84oilui --- addons/membership/membership.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/addons/membership/membership.py b/addons/membership/membership.py index dc4eadbada9..f7007ac28e7 100644 --- a/addons/membership/membership.py +++ b/addons/membership/membership.py @@ -478,7 +478,14 @@ class Product(osv.osv): 'membership_date_from': fields.date('Date from', help='Date from which membership becomes active.'), 'membership_date_to': fields.date('Date to', help='Date until which membership remains active.'), } - + def _check_end_date(self, cr, uid, ids, context=None): + for membership in self.browse(cr, uid, ids, context=context): + if membership.membership_date_to < membership.membership_date_from: + return False + return True + _constraints = [ + (_check_end_date, 'Error ! Ending Date cannot be set before Beginning Date.', ['membership_date_to']), + ] _defaults = { 'membership': False, } From e46502580a5c9e19c31e15dd308e99307bbb68ed Mon Sep 17 00:00:00 2001 From: "Bharat Devnani (OpenERP)" Date: Wed, 25 Jul 2012 16:43:27 +0530 Subject: [PATCH 024/841] [IMP] changed the condition in def create_move of account_asset/account_asset.py bzr revid: bde@tinyerp.com-20120725111327-rd1se9de0yoj8wgg --- addons/account_asset/account_asset.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account_asset/account_asset.py b/addons/account_asset/account_asset.py index 8cd73c60aa7..fe0ee8b3922 100644 --- a/addons/account_asset/account_asset.py +++ b/addons/account_asset/account_asset.py @@ -366,8 +366,6 @@ class account_asset_depreciation_line(osv.osv): currency_obj = self.pool.get('res.currency') created_move_ids = [] for line in self.browse(cr, uid, ids, context=context): - if currency_obj.is_zero(cr, uid, line.asset_id.currency_id, line.remaining_value): - can_close = True depreciation_date = line.asset_id.prorata and line.asset_id.purchase_date or time.strftime('%Y-%m-%d') period_ids = period_obj.find(cr, uid, depreciation_date, context=context) company_currency = line.asset_id.company_id.currency_id.id @@ -419,6 +417,8 @@ class account_asset_depreciation_line(osv.osv): }) self.write(cr, uid, line.id, {'move_id': move_id}, context=context) created_move_ids.append(move_id) + if currency_obj.is_zero(cr, uid, line.asset_id.currency_id, line.asset_id.value_residual): + can_close = True if can_close: asset_obj.write(cr, uid, [line.asset_id.id], {'state': 'close'}, context=context) return created_move_ids From b54a4164ce20782bab62523f262e6b7d0895af34 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Tue, 18 Sep 2012 18:51:41 +0200 Subject: [PATCH 025/841] [ADD]Project initialization bzr revid: dle@openerp.com-20120918165141-15gqir34wwa2lein --- addons/hr_fleet_management/__init.py__ | 1 + addons/hr_fleet_management/__openerp__.py | 17 +++++++++++++++++ .../hr_fleet_management/hr_fleet_management.py | 10 ++++++++++ .../view/hr_fleet_management_view.xml | 14 ++++++++++++++ 4 files changed, 42 insertions(+) create mode 100644 addons/hr_fleet_management/__init.py__ create mode 100644 addons/hr_fleet_management/__openerp__.py create mode 100644 addons/hr_fleet_management/hr_fleet_management.py create mode 100644 addons/hr_fleet_management/view/hr_fleet_management_view.xml diff --git a/addons/hr_fleet_management/__init.py__ b/addons/hr_fleet_management/__init.py__ new file mode 100644 index 00000000000..4fe53db08ca --- /dev/null +++ b/addons/hr_fleet_management/__init.py__ @@ -0,0 +1 @@ +import hr_fleet_management diff --git a/addons/hr_fleet_management/__openerp__.py b/addons/hr_fleet_management/__openerp__.py new file mode 100644 index 00000000000..c701d545707 --- /dev/null +++ b/addons/hr_fleet_management/__openerp__.py @@ -0,0 +1,17 @@ +{ + "name": "Fleet Management", + "version": "0.1", + "depends": ["base"], + "author": "Denis Ledoux", + "category": "Test", + "description": """ + Fleet management module for managing company vehicles: + - managing cars + - managing cars insurance + - remind insurance renewing + """, + 'data': [’hr_fleet_management_view.xml’], + 'demo': [], + 'installable': True, + 'auto_install': False, +} diff --git a/addons/hr_fleet_management/hr_fleet_management.py b/addons/hr_fleet_management/hr_fleet_management.py new file mode 100644 index 00000000000..fb6cda1da39 --- /dev/null +++ b/addons/hr_fleet_management/hr_fleet_management.py @@ -0,0 +1,10 @@ +from osv import osv, fields + +class Car (osv.Model): + + _name = ’hr_fleet_management.car’ + + _columns = { + ’name’ : fields.char(’Car name’, 128, required = True), + ’description’ : fields.text(’Description’), + } diff --git a/addons/hr_fleet_management/view/hr_fleet_management_view.xml b/addons/hr_fleet_management/view/hr_fleet_management_view.xml new file mode 100644 index 00000000000..95eb0c046ff --- /dev/null +++ b/addons/hr_fleet_management/view/hr_fleet_management_view.xml @@ -0,0 +1,14 @@ + + + + + + + Cars + car_fleet_management.car + form + tree,form + + + + From 6821ec7b869b9e96f6e1865fb616bca7f4f85989 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Wed, 19 Sep 2012 10:02:42 +0200 Subject: [PATCH 026/841] [FIX]Syntax Errors bzr revid: dle@openerp.com-20120919080242-cdwzf8n2r5z6r47j --- addons/hr_fleet_management/__openerp__.py | 14 +++++++------- .../view/hr_fleet_management_view.xml | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/hr_fleet_management/__openerp__.py b/addons/hr_fleet_management/__openerp__.py index c701d545707..9e35814f5d4 100644 --- a/addons/hr_fleet_management/__openerp__.py +++ b/addons/hr_fleet_management/__openerp__.py @@ -1,16 +1,16 @@ { - "name": "Fleet Management", - "version": "0.1", - "depends": ["base"], - "author": "Denis Ledoux", - "category": "Test", - "description": """ + 'name': 'Fleet Management', + 'version': '0.1', + 'depends': ['base'], + 'author': 'OpenERP SA', + 'category': 'Test', + 'description': """ Fleet management module for managing company vehicles: - managing cars - managing cars insurance - remind insurance renewing """, - 'data': [’hr_fleet_management_view.xml’], + 'data': ['hr_fleet_management_view.xml'], 'demo': [], 'installable': True, 'auto_install': False, diff --git a/addons/hr_fleet_management/view/hr_fleet_management_view.xml b/addons/hr_fleet_management/view/hr_fleet_management_view.xml index 95eb0c046ff..963c339a1bb 100644 --- a/addons/hr_fleet_management/view/hr_fleet_management_view.xml +++ b/addons/hr_fleet_management/view/hr_fleet_management_view.xml @@ -9,6 +9,6 @@ form tree,form - + From e12222d2afa4acfb18a81c2a20a5125e5b0015f3 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Wed, 19 Sep 2012 11:02:51 +0200 Subject: [PATCH 027/841] [FIX]init.py name issue bzr revid: dle@openerp.com-20120919090251-1yr44930z25nfh5j --- addons/hr_fleet_management/{__init.py__ => __init__.py} | 0 addons/hr_fleet_management/__openerp__.py | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename addons/hr_fleet_management/{__init.py__ => __init__.py} (100%) diff --git a/addons/hr_fleet_management/__init.py__ b/addons/hr_fleet_management/__init__.py similarity index 100% rename from addons/hr_fleet_management/__init.py__ rename to addons/hr_fleet_management/__init__.py diff --git a/addons/hr_fleet_management/__openerp__.py b/addons/hr_fleet_management/__openerp__.py index 9e35814f5d4..a38e815e364 100644 --- a/addons/hr_fleet_management/__openerp__.py +++ b/addons/hr_fleet_management/__openerp__.py @@ -1,7 +1,7 @@ { 'name': 'Fleet Management', 'version': '0.1', - 'depends': ['base'], + 'depends': ['base','hr'], 'author': 'OpenERP SA', 'category': 'Test', 'description': """ From b659893dbcd707078b98754a94b412e10b3eb2d1 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Wed, 19 Sep 2012 11:26:30 +0200 Subject: [PATCH 028/841] [FIX]Encodage declared bzr revid: dle@openerp.com-20120919092630-jistvpazjete84fm --- addons/hr_fleet_management/__openerp__.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/addons/hr_fleet_management/__openerp__.py b/addons/hr_fleet_management/__openerp__.py index a38e815e364..1a3acb9b742 100644 --- a/addons/hr_fleet_management/__openerp__.py +++ b/addons/hr_fleet_management/__openerp__.py @@ -1,3 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + { 'name': 'Fleet Management', 'version': '0.1', From acc87133f4a78686694dbe4344d8a5b1fe9fb595 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Wed, 19 Sep 2012 13:22:55 +0200 Subject: [PATCH 029/841] [FIX]XML Syntax Error bzr revid: dle@openerp.com-20120919112255-uyel7xe66ghj294k --- addons/hr_fleet_management/__init__.py | 2 ++ addons/hr_fleet_management/__openerp__.py | 2 +- .../hr_fleet_management.py | 18 ++++++++--- .../view/hr_fleet_management_view.xml | 32 +++++++++++++++---- 4 files changed, 43 insertions(+), 11 deletions(-) diff --git a/addons/hr_fleet_management/__init__.py b/addons/hr_fleet_management/__init__.py index 4fe53db08ca..4da53d5adab 100644 --- a/addons/hr_fleet_management/__init__.py +++ b/addons/hr_fleet_management/__init__.py @@ -1 +1,3 @@ +# -*- coding: utf-8 -*- + import hr_fleet_management diff --git a/addons/hr_fleet_management/__openerp__.py b/addons/hr_fleet_management/__openerp__.py index 1a3acb9b742..7823e967699 100644 --- a/addons/hr_fleet_management/__openerp__.py +++ b/addons/hr_fleet_management/__openerp__.py @@ -31,7 +31,7 @@ - managing cars insurance - remind insurance renewing """, - 'data': ['hr_fleet_management_view.xml'], + 'data': ['view/hr_fleet_management_view.xml'], 'demo': [], 'installable': True, 'auto_install': False, diff --git a/addons/hr_fleet_management/hr_fleet_management.py b/addons/hr_fleet_management/hr_fleet_management.py index fb6cda1da39..46efcdfd46e 100644 --- a/addons/hr_fleet_management/hr_fleet_management.py +++ b/addons/hr_fleet_management/hr_fleet_management.py @@ -1,10 +1,20 @@ +# -*- coding: utf-8 -*- from osv import osv, fields -class Car (osv.Model): +class fleet_vehicle_model (osv.Model): - _name = ’hr_fleet_management.car’ + _name = 'fleet.vehicle.model' + _description = '...' _columns = { - ’name’ : fields.char(’Car name’, 128, required = True), - ’description’ : fields.text(’Description’), + 'name' : fields.char('Car name', 128, required = True), + } + +class fleet_vehicle(osv.Model): + _name = 'fleet.vehicle' + _description = 'Fleet Vehicle' + + _columns = { + 'name' : fields.char('Name', size=32, required=True), + 'model_id' : fields.many2one('fleet.vehicle.model','Model', required=True), } diff --git a/addons/hr_fleet_management/view/hr_fleet_management_view.xml b/addons/hr_fleet_management/view/hr_fleet_management_view.xml index 963c339a1bb..9deb8786382 100644 --- a/addons/hr_fleet_management/view/hr_fleet_management_view.xml +++ b/addons/hr_fleet_management/view/hr_fleet_management_view.xml @@ -1,14 +1,34 @@ - - - - Cars - car_fleet_management.car + + + fleet.vehicle.model.form + fleet.vehicle.model + +
+ + +
+
+ + + fleet.vehicle.model.tree + fleet.vehicle.model + + + + + + + + Vehicle Model + fleet.vehicle.model form tree,form - + + +
From 3637d57127dd4cbdefd3f11d86d742f8a5c8fecb Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Wed, 19 Sep 2012 18:13:27 +0200 Subject: [PATCH 030/841] [ADD]Stephane classes and views bzr revid: dle@openerp.com-20120919161327-u72nqktzmowzdjg9 --- addons/hr_car/__init__.py | 2 + addons/hr_car/__openerp__.py | 18 ++++ addons/hr_car/hr_car.py | 76 +++++++++++++++++ addons/hr_car/hr_car_view.xml | 154 ++++++++++++++++++++++++++++++++++ 4 files changed, 250 insertions(+) create mode 100644 addons/hr_car/__init__.py create mode 100644 addons/hr_car/__openerp__.py create mode 100644 addons/hr_car/hr_car.py create mode 100644 addons/hr_car/hr_car_view.xml diff --git a/addons/hr_car/__init__.py b/addons/hr_car/__init__.py new file mode 100644 index 00000000000..ec344119076 --- /dev/null +++ b/addons/hr_car/__init__.py @@ -0,0 +1,2 @@ +# import the hr_car code +import hr_car \ No newline at end of file diff --git a/addons/hr_car/__openerp__.py b/addons/hr_car/__openerp__.py new file mode 100644 index 00000000000..f24d0efc758 --- /dev/null +++ b/addons/hr_car/__openerp__.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +{ + 'name' : 'Car Management', + 'version' : '0.1', + 'depends' : [ + 'base', + 'hr', + ], + 'author' : 'OpenERP S.A.', + 'description' : """ + I'm a good module and I will handle the cars of your company ! + """, + 'installable' : True, + 'application' : True, + 'data' : [ + 'hr_car_view.xml', + ] +} \ No newline at end of file diff --git a/addons/hr_car/hr_car.py b/addons/hr_car/hr_car.py new file mode 100644 index 00000000000..74dcb123af1 --- /dev/null +++ b/addons/hr_car/hr_car.py @@ -0,0 +1,76 @@ +from osv import osv, fields + +class fleet_vehicle_model(osv.Model): + _name = 'fleet.vehicle.model' + _description = '...' + + _columns = { + 'name' : fields.char('Name', size=32, required=True), + } + +class fleet_vehicle(osv.Model): + _name = 'fleet.vehicle' + _description = 'Fleet Vehicle' + + _columns = { + 'name' : fields.char('Name', size=32, required=True), + 'model_id' : fields.many2one('fleet.vehicle.model', 'Model', required=True), + 'log_ids' : fields.one2many('fleet.vehicle.log', 'vehicle_id', 'Logs'), + + 'next_repair_km' : fields.integer('Next Repair Km'), + 'message' : fields.char('Message', size=128, readonly=True), + } + + def on_change_model(self, cr, uid, ids, model_id, context=None): + # print "ids: %r" % (ids,) + # print "model_id: %r" % (model_id,) + # print "context: %r" % (context,) + # import logging + # logger = logging.getLogger('fleet.vehicle') + # logger.info('Hello') + + # import ipdb + # ipdb.set_trace() + + if not model_id: + return {} + + model = self.pool.get('fleet.vehicle.model').browse(cr, uid, model_id, context=context) + + print "model: %r" % (model.name,) + + return { + 'value' : { + 'message' : "You have selected this %s model" % (model.name,), + } + } + +class fleet_vehicle_log_type(osv.Model): + _name = 'fleet.vehicle.log.type' + + _columns = { + 'name' : fields.char('Name', size=32, required=True), + } + +class fleet_vehicle_log(osv.Model): + _name = 'fleet.vehicle.log' + + _columns = { + 'employee_id' : fields.many2one('hr.employee', 'Employee', required=True), + 'vehicle_id' : fields.many2one('fleet.vehicle', 'Vehicle', required=True), + + 'create_date' : fields.datetime('Creation Date', readonly=True), + + 'description' : fields.text('Description'), + 'type' : fields.many2one('fleet.vehicle.log.type', 'Type', required=True), + + + } + +class hr_employee(osv.Model): + _inherit = 'hr.employee' + + _columns = { + 'vehicle_id' : fields.many2one('fleet.vehicle', 'Vehicle', required=True), + 'log_ids' : fields.one2many('fleet.vehicle.log', 'employee_id', 'Logs'), + } \ No newline at end of file diff --git a/addons/hr_car/hr_car_view.xml b/addons/hr_car/hr_car_view.xml new file mode 100644 index 00000000000..eff345d7b90 --- /dev/null +++ b/addons/hr_car/hr_car_view.xml @@ -0,0 +1,154 @@ + + + + + fleet.vehicle.model.form + fleet.vehicle.model + +
+ + +
+
+ + fleet.vehicle.model.tree + fleet.vehicle.model + + + + + + + + + Vehicle Model + fleet.vehicle.model + form + tree,form + + + + + + + + fleet.vehicle.form + fleet.vehicle + +
+ + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + fleet.vehicle.tree + fleet.vehicle + + + + + + + + + + Vehicles + fleet.vehicle + form + tree,form + + + + + + + fleet.vehicle.log.form + fleet.vehicle.log + +
+ + + + + + + + + +
+
+
+ + + fleet.vehicle.log.tree + fleet.vehicle.log + + + + + + + + + + + + + Vehicle Logs + fleet.vehicle.log + form + tree,form + + + + + + + fleet.hr.employee.form + hr.employee + form + + + + + + + + + + + + + +
+
From a3c51b5e7ca72b00271c988f14d5d854f4ae0fdf Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Thu, 20 Sep 2012 10:26:38 +0200 Subject: [PATCH 031/841] [ADD][REM]Renaming of the folder module bzr revid: dle@openerp.com-20120920082638-3kfu4qt1ebh5ccub --- addons/{hr_car => fleet}/__init__.py | 0 addons/{hr_car => fleet}/__openerp__.py | 0 addons/{hr_car => fleet}/hr_car.py | 0 addons/{hr_car => fleet}/hr_car_view.xml | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename addons/{hr_car => fleet}/__init__.py (100%) rename addons/{hr_car => fleet}/__openerp__.py (100%) rename addons/{hr_car => fleet}/hr_car.py (100%) rename addons/{hr_car => fleet}/hr_car_view.xml (100%) diff --git a/addons/hr_car/__init__.py b/addons/fleet/__init__.py similarity index 100% rename from addons/hr_car/__init__.py rename to addons/fleet/__init__.py diff --git a/addons/hr_car/__openerp__.py b/addons/fleet/__openerp__.py similarity index 100% rename from addons/hr_car/__openerp__.py rename to addons/fleet/__openerp__.py diff --git a/addons/hr_car/hr_car.py b/addons/fleet/hr_car.py similarity index 100% rename from addons/hr_car/hr_car.py rename to addons/fleet/hr_car.py diff --git a/addons/hr_car/hr_car_view.xml b/addons/fleet/hr_car_view.xml similarity index 100% rename from addons/hr_car/hr_car_view.xml rename to addons/fleet/hr_car_view.xml From a491f75c5c2ab7d74095b51b3a9fb94a72886048 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Thu, 20 Sep 2012 11:08:46 +0200 Subject: [PATCH 032/841] rename files to match module name bzr revid: csn@openerp.com-20120920090846-obht1omarbvlt38o --- addons/fleet/__init__.py | 2 +- addons/fleet/__openerp__.py | 2 +- addons/fleet/{hr_car.py => fleet.py} | 0 addons/fleet/{hr_car_view.xml => fleet_view.xml} | 0 4 files changed, 2 insertions(+), 2 deletions(-) rename addons/fleet/{hr_car.py => fleet.py} (100%) rename addons/fleet/{hr_car_view.xml => fleet_view.xml} (100%) diff --git a/addons/fleet/__init__.py b/addons/fleet/__init__.py index ec344119076..a09fca549ce 100644 --- a/addons/fleet/__init__.py +++ b/addons/fleet/__init__.py @@ -1,2 +1,2 @@ # import the hr_car code -import hr_car \ No newline at end of file +import fleet \ No newline at end of file diff --git a/addons/fleet/__openerp__.py b/addons/fleet/__openerp__.py index f24d0efc758..4c144090af0 100644 --- a/addons/fleet/__openerp__.py +++ b/addons/fleet/__openerp__.py @@ -13,6 +13,6 @@ 'installable' : True, 'application' : True, 'data' : [ - 'hr_car_view.xml', + 'fleet_view.xml', ] } \ No newline at end of file diff --git a/addons/fleet/hr_car.py b/addons/fleet/fleet.py similarity index 100% rename from addons/fleet/hr_car.py rename to addons/fleet/fleet.py diff --git a/addons/fleet/hr_car_view.xml b/addons/fleet/fleet_view.xml similarity index 100% rename from addons/fleet/hr_car_view.xml rename to addons/fleet/fleet_view.xml From 2019d656e982cd28f7a60a4cbbcd74df0317500e Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Thu, 20 Sep 2012 13:52:04 +0200 Subject: [PATCH 033/841] add a submodel field to vehicule model bzr revid: csn@openerp.com-20120920115204-6ip6c3gvh84o6b14 --- addons/fleet/fleet.py | 1 + addons/fleet/fleet_view.xml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 74dcb123af1..e807bb82998 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -6,6 +6,7 @@ class fleet_vehicle_model(osv.Model): _columns = { 'name' : fields.char('Name', size=32, required=True), + 'submodel' : fields.char('Submodel',size=32,required=True), } class fleet_vehicle(osv.Model): diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index eff345d7b90..cc41662459c 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -7,6 +7,7 @@
+ @@ -16,6 +17,7 @@ + From 460bed1f3a47d311b4d24f22c7591760ece8fb2b Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Thu, 20 Sep 2012 13:57:55 +0200 Subject: [PATCH 034/841] [ADD]Fields bzr revid: dle@openerp.com-20120920115755-l2ta12vdttcfu71t --- addons/fleet/fleet.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index e807bb82998..40ac85b501a 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -5,6 +5,8 @@ class fleet_vehicle_model(osv.Model): _description = '...' _columns = { + 'type' : fields.char('Type', size=32, required=True), + 'brand' : fields.char('Brand', size=32, required=True), 'name' : fields.char('Name', size=32, required=True), 'submodel' : fields.char('Submodel',size=32,required=True), } @@ -14,7 +16,8 @@ class fleet_vehicle(osv.Model): _description = 'Fleet Vehicle' _columns = { - 'name' : fields.char('Name', size=32, required=True), + 'registration' : fields.char('registration', size=32, required=True), + 'driver' : fields.many2one('fleet.vehicle', 'employee_id', required=False), 'model_id' : fields.many2one('fleet.vehicle.model', 'Model', required=True), 'log_ids' : fields.one2many('fleet.vehicle.log', 'vehicle_id', 'Logs'), From 3fabc8ef5a777036c1074ad35d506925a9da24b8 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Thu, 20 Sep 2012 14:16:36 +0200 Subject: [PATCH 035/841] [ADD]Add vendor field in vehicle model bzr revid: dle@openerp.com-20120920121636-dhz39kuvtiw9rxuo --- addons/fleet/fleet.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 40ac85b501a..439a938d2a9 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -8,7 +8,8 @@ class fleet_vehicle_model(osv.Model): 'type' : fields.char('Type', size=32, required=True), 'brand' : fields.char('Brand', size=32, required=True), 'name' : fields.char('Name', size=32, required=True), - 'submodel' : fields.char('Submodel',size=32,required=True), + 'make' : fields.char('Make',size=32,required=True), + 'vendors': fields.many2many('fleet.vehicle.model','fleet.vehicle.model.vendors','partner_id','Vendors'); } class fleet_vehicle(osv.Model): @@ -16,7 +17,7 @@ class fleet_vehicle(osv.Model): _description = 'Fleet Vehicle' _columns = { - 'registration' : fields.char('registration', size=32, required=True), + 'registration' : fields.char('Registration', size=32, required=True), 'driver' : fields.many2one('fleet.vehicle', 'employee_id', required=False), 'model_id' : fields.many2one('fleet.vehicle.model', 'Model', required=True), 'log_ids' : fields.one2many('fleet.vehicle.log', 'vehicle_id', 'Logs'), From 2f35d71a26391c0596c3831e4188b58f852e5ceb Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Thu, 20 Sep 2012 14:24:35 +0200 Subject: [PATCH 036/841] [FIX]Rename errors bzr revid: dle@openerp.com-20120920122435-jwweq52c8f82eo9d --- addons/fleet/fleet.py | 2 +- addons/fleet/fleet_view.xml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 439a938d2a9..d003adb3447 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -9,7 +9,7 @@ class fleet_vehicle_model(osv.Model): 'brand' : fields.char('Brand', size=32, required=True), 'name' : fields.char('Name', size=32, required=True), 'make' : fields.char('Make',size=32,required=True), - 'vendors': fields.many2many('fleet.vehicle.model','fleet.vehicle.model.vendors','partner_id','Vendors'); + 'vendors': fields.many2many('fleet.vehicle.model','fleet_vehicle_model_vendors','partner_id','Vendors'), } class fleet_vehicle(osv.Model): diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index cc41662459c..2b8fccb5659 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -7,7 +7,7 @@
- + @@ -17,7 +17,7 @@ - + @@ -40,7 +40,7 @@
- + @@ -69,7 +69,7 @@ fleet.vehicle - + From 2c03c650a1f78e254ce23f51679b649a7772fe7e Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Thu, 20 Sep 2012 14:49:37 +0200 Subject: [PATCH 037/841] [FIX]Many2many vendors arguments issue bzr revid: dle@openerp.com-20120920124937-npuspa3ge4oyn2eg --- addons/fleet/__openerp__.py | 2 +- addons/fleet/fleet.py | 2 +- addons/fleet/fleet_view.xml | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/addons/fleet/__openerp__.py b/addons/fleet/__openerp__.py index 4c144090af0..34cc89514a9 100644 --- a/addons/fleet/__openerp__.py +++ b/addons/fleet/__openerp__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- { - 'name' : 'Car Management', + 'name' : 'Fleet Management', 'version' : '0.1', 'depends' : [ 'base', diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index d003adb3447..771767c117d 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -9,7 +9,7 @@ class fleet_vehicle_model(osv.Model): 'brand' : fields.char('Brand', size=32, required=True), 'name' : fields.char('Name', size=32, required=True), 'make' : fields.char('Make',size=32,required=True), - 'vendors': fields.many2many('fleet.vehicle.model','fleet_vehicle_model_vendors','partner_id','Vendors'), + 'partner_id': fields.many2many('fleet.vehicle.model','fleet_vehicle_model_vendors','model_id', 'partner_id',string='Vendors',required=False), } class fleet_vehicle(osv.Model): diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 2b8fccb5659..823170356d7 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -6,8 +6,11 @@ fleet.vehicle.model + + + @@ -16,8 +19,11 @@ fleet.vehicle.model + + + From a476b48b94540ba82742977638ce3aaf1bc1446c Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Thu, 20 Sep 2012 14:56:21 +0200 Subject: [PATCH 038/841] [FIX]Many2many vendors wrong resource id fixed bzr revid: dle@openerp.com-20120920125621-uc6uqnksvayub0ei --- addons/fleet/fleet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 771767c117d..328814bd810 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -9,7 +9,7 @@ class fleet_vehicle_model(osv.Model): 'brand' : fields.char('Brand', size=32, required=True), 'name' : fields.char('Name', size=32, required=True), 'make' : fields.char('Make',size=32,required=True), - 'partner_id': fields.many2many('fleet.vehicle.model','fleet_vehicle_model_vendors','model_id', 'partner_id',string='Vendors',required=False), + 'partner_id': fields.many2many('res.partner','fleet_vehicle_model_vendors','model_id', 'partner_id',string='Vendors',required=False), } class fleet_vehicle(osv.Model): From d42f3d1627e6344b68113385c010a2e105f2ccba Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Thu, 20 Sep 2012 15:07:14 +0200 Subject: [PATCH 039/841] [ADD]Vehicle Type object bzr revid: dle@openerp.com-20120920130714-3ebx1yi23653vnty --- addons/fleet/fleet.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 328814bd810..ce30f82b611 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -1,11 +1,18 @@ from osv import osv, fields +class fleet_vehicle_model(osv.Model): + _name = 'fleet.vehicle.type' + _description = 'Type of the vehicle' + _columns = { + 'name' : fields.char('Name', size=32, required=True), + } + class fleet_vehicle_model(osv.Model): _name = 'fleet.vehicle.model' _description = '...' _columns = { - 'type' : fields.char('Type', size=32, required=True), + 'type' : fields.many2one('fleet.vehicle.type', 'Vehicle Type', required=True), 'brand' : fields.char('Brand', size=32, required=True), 'name' : fields.char('Name', size=32, required=True), 'make' : fields.char('Make',size=32,required=True), From 586914863f88e654662b8b5e1ba41d3258fdb2c7 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Thu, 20 Sep 2012 15:11:32 +0200 Subject: [PATCH 040/841] [MERGE]add object brand bzr revid: csn@openerp.com-20120920131132-i3eq3et5y3x0cyuk --- addons/fleet/fleet.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index ce30f82b611..a02e26aa64d 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -9,16 +9,23 @@ class fleet_vehicle_model(osv.Model): class fleet_vehicle_model(osv.Model): _name = 'fleet.vehicle.model' - _description = '...' + _description = '' _columns = { + 'brand' : fields.many2one('fleet.vehicle.model.brand', 'brand', required=True), 'type' : fields.many2one('fleet.vehicle.type', 'Vehicle Type', required=True), - 'brand' : fields.char('Brand', size=32, required=True), 'name' : fields.char('Name', size=32, required=True), 'make' : fields.char('Make',size=32,required=True), 'partner_id': fields.many2many('res.partner','fleet_vehicle_model_vendors','model_id', 'partner_id',string='Vendors',required=False), } +class fleet_vehicle_model_brand(osv.Model): + _name = 'fleet.vehicle.model.brand' + _description = 'Brand model of the vehicle' + _columns = { + 'name' : fields.char('Brand Name',size=32, required=True), + } + class fleet_vehicle(osv.Model): _name = 'fleet.vehicle' _description = 'Fleet Vehicle' From 0b9d4cd9735044d65c441659b577db18b7ccbac0 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Thu, 20 Sep 2012 15:18:04 +0200 Subject: [PATCH 041/841] [add]add object for model name and model make bzr revid: csn@openerp.com-20120920131804-sieluxv9tnz8qlhp --- addons/fleet/fleet.py | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index a02e26aa64d..ffee441c858 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -12,10 +12,10 @@ class fleet_vehicle_model(osv.Model): _description = '' _columns = { - 'brand' : fields.many2one('fleet.vehicle.model.brand', 'brand', required=True), + 'brand' : fields.many2one('fleet.vehicle.model.brand', 'Model brand', required=True), 'type' : fields.many2one('fleet.vehicle.type', 'Vehicle Type', required=True), - 'name' : fields.char('Name', size=32, required=True), - 'make' : fields.char('Make',size=32,required=True), + 'name' : fields.many2one('fleet.vehicle.model.name', 'Model name', required=True), + 'make' : fields.many2one('fleet.vehicle.model.make', 'Model make', required=True), 'partner_id': fields.many2many('res.partner','fleet_vehicle_model_vendors','model_id', 'partner_id',string='Vendors',required=False), } @@ -26,6 +26,20 @@ class fleet_vehicle_model_brand(osv.Model): 'name' : fields.char('Brand Name',size=32, required=True), } +class fleet_vehicle_model_name(osv.Model): + _name = 'fleet.vehicle.model.name' + _description = 'Name model of the vehicle' + _columns = { + 'name' : fields.char('Name',size=32, required=True), + } + +class fleet_vehicle_model_make(osv.Model): + _name = 'fleet.vehicle.model.make' + _description = 'Make model of the vehicle' + _columns = { + 'name' : fields.char('Make',size=32, required=True), + } + class fleet_vehicle(osv.Model): _name = 'fleet.vehicle' _description = 'Fleet Vehicle' From ee0be8846b78ac2eaf3f757dafb8e90e1cbe720d Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Thu, 20 Sep 2012 15:48:53 +0200 Subject: [PATCH 042/841] [add]add some fields in vehicle object and associated view bzr revid: csn@openerp.com-20120920134853-tq1e7b58opf93a06 --- addons/fleet/fleet.py | 8 +++++++- addons/fleet/fleet_view.xml | 21 +++++++++++++++++---- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index ffee441c858..b219c702636 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -45,10 +45,16 @@ class fleet_vehicle(osv.Model): _description = 'Fleet Vehicle' _columns = { - 'registration' : fields.char('Registration', size=32, required=True), + 'registration' : fields.char('Registration', size=32, required=False), + 'vin_sn' : fields.char('VIN SN', size=32, required=False), 'driver' : fields.many2one('fleet.vehicle', 'employee_id', required=False), 'model_id' : fields.many2one('fleet.vehicle.model', 'Model', required=True), 'log_ids' : fields.one2many('fleet.vehicle.log', 'vehicle_id', 'Logs'), + 'acquisition_date' : fields.date('Acquisition date', required=False), + 'acquisition_price' : fields.integer('Price'), + 'color' : fields.char('Color',size=32), + 'status' : fields.char('Status',size=32), + 'location' : fields.char('Location',size=32), 'next_repair_km' : fields.integer('Next Repair Km'), 'message' : fields.char('Message', size=128, readonly=True), diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 823170356d7..c46d8b4afa6 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -45,10 +45,21 @@
- - - - + + + + + + + + + + + + + + + @@ -77,6 +88,8 @@ + + From ea636eb033cc62516282fd73c4c431404e83d315 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Thu, 20 Sep 2012 17:21:21 +0200 Subject: [PATCH 043/841] [CHANGE]Correct some mistakes in an object name bzr revid: csn@openerp.com-20120920152121-24nlyjripej2v502 --- addons/fleet/fleet.py | 9 +++++---- addons/fleet/fleet_view.xml | 6 ++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index b219c702636..51e4e92d874 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -1,6 +1,6 @@ from osv import osv, fields -class fleet_vehicle_model(osv.Model): +class fleet_vehicle_model_type(osv.Model): _name = 'fleet.vehicle.type' _description = 'Type of the vehicle' _columns = { @@ -9,12 +9,13 @@ class fleet_vehicle_model(osv.Model): class fleet_vehicle_model(osv.Model): _name = 'fleet.vehicle.model' - _description = '' + _description = 'Model of a vehicle' _columns = { + 'name' : fields.char('Name',size=32, required=True), 'brand' : fields.many2one('fleet.vehicle.model.brand', 'Model brand', required=True), 'type' : fields.many2one('fleet.vehicle.type', 'Vehicle Type', required=True), - 'name' : fields.many2one('fleet.vehicle.model.name', 'Model name', required=True), + 'modelname' : fields.many2one('fleet.vehicle.model.name', 'Model name', required=True), 'make' : fields.many2one('fleet.vehicle.model.make', 'Model make', required=True), 'partner_id': fields.many2many('res.partner','fleet_vehicle_model_vendors','model_id', 'partner_id',string='Vendors',required=False), } @@ -47,7 +48,7 @@ class fleet_vehicle(osv.Model): _columns = { 'registration' : fields.char('Registration', size=32, required=False), 'vin_sn' : fields.char('VIN SN', size=32, required=False), - 'driver' : fields.many2one('fleet.vehicle', 'employee_id', required=False), + 'driver' : fields.many2one('hr.employee', 'Driver',required=False), 'model_id' : fields.many2one('fleet.vehicle.model', 'Model', required=True), 'log_ids' : fields.one2many('fleet.vehicle.log', 'vehicle_id', 'Logs'), 'acquisition_date' : fields.date('Acquisition date', required=False), diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index c46d8b4afa6..ec242704053 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -6,9 +6,10 @@ fleet.vehicle.model + - + @@ -19,9 +20,10 @@ fleet.vehicle.model + - + From 05172d18d73d9d425f6ef9d710589bad627dc549 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Fri, 21 Sep 2012 10:28:25 +0200 Subject: [PATCH 044/841] [ADD]Sheet style to view for models and new models fields bzr revid: dle@openerp.com-20120921082825-somoslhvu78fnafg --- addons/fleet/fleet.py | 6 ++++++ addons/fleet/fleet_view.xml | 38 ++++++++++++++++++++++++++++++------- 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 51e4e92d874..c4d21777d30 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -18,6 +18,12 @@ class fleet_vehicle_model(osv.Model): 'modelname' : fields.many2one('fleet.vehicle.model.name', 'Model name', required=True), 'make' : fields.many2one('fleet.vehicle.model.make', 'Model make', required=True), 'partner_id': fields.many2many('res.partner','fleet_vehicle_model_vendors','model_id', 'partner_id',string='Vendors',required=False), + + 'transmission' : fields.selection([('manual', 'Manual'),('automatic','Automatic')], 'Transmission', help='Transmission Used by the vehicle',required=False), + 'fuel_type' : fields.selection([('gasoline', 'Gasoline'),('diesel','Diesel'),('electric','Electric'),('hybrid','Hybrid')], 'Fuel Type', help='Fuel Used by the vehicle',required=False), + 'horses' : fields.integer('Horses',required=False), + 'power' : fields.integer('Power',required=False,help='Power in kW of the vehicle'), + 'co2' : fields.float('CO2 Emissions',required=False,help='CO2 emissions of the vehicle'), } class fleet_vehicle_model_brand(osv.Model): diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index ec242704053..81a4aa96138 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -5,13 +5,37 @@ fleet.vehicle.model.form fleet.vehicle.model -
- - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 7f581c3193720432e42b471c9f19a875ef88dcce Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Fri, 21 Sep 2012 10:33:26 +0200 Subject: [PATCH 045/841] [ADD]Year fields for vehicle model and renaming power (kW) label bzr revid: dle@openerp.com-20120921083326-eciail9u934t1o81 --- addons/fleet/fleet.py | 13 +++++++------ addons/fleet/fleet_view.xml | 3 ++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index c4d21777d30..2c36eb86c92 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -12,17 +12,18 @@ class fleet_vehicle_model(osv.Model): _description = 'Model of a vehicle' _columns = { - 'name' : fields.char('Name',size=32, required=True), - 'brand' : fields.many2one('fleet.vehicle.model.brand', 'Model brand', required=True), - 'type' : fields.many2one('fleet.vehicle.type', 'Vehicle Type', required=True), - 'modelname' : fields.many2one('fleet.vehicle.model.name', 'Model name', required=True), - 'make' : fields.many2one('fleet.vehicle.model.make', 'Model make', required=True), + 'name' : fields.char('Name',size=32, required=False), + 'brand' : fields.many2one('fleet.vehicle.model.brand', 'Model brand', required=False), + 'type' : fields.many2one('fleet.vehicle.type', 'Vehicle Type', required=False), + 'modelname' : fields.many2one('fleet.vehicle.model.name', 'Model name', required=False), + 'make' : fields.many2one('fleet.vehicle.model.make', 'Model make', required=False), + 'year' : fields.integer('Year', required=False), 'partner_id': fields.many2many('res.partner','fleet_vehicle_model_vendors','model_id', 'partner_id',string='Vendors',required=False), 'transmission' : fields.selection([('manual', 'Manual'),('automatic','Automatic')], 'Transmission', help='Transmission Used by the vehicle',required=False), 'fuel_type' : fields.selection([('gasoline', 'Gasoline'),('diesel','Diesel'),('electric','Electric'),('hybrid','Hybrid')], 'Fuel Type', help='Fuel Used by the vehicle',required=False), 'horses' : fields.integer('Horses',required=False), - 'power' : fields.integer('Power',required=False,help='Power in kW of the vehicle'), + 'power' : fields.integer('Power (kW)',required=False,help='Power in kW of the vehicle'), 'co2' : fields.float('CO2 Emissions',required=False,help='CO2 emissions of the vehicle'), } diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 81a4aa96138..f1a8ea81815 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -14,7 +14,8 @@
- + + From bf589e6a24b3ec2c9c3a0e83980149610431710c Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Fri, 21 Sep 2012 11:57:15 +0200 Subject: [PATCH 046/841] [ADD]Complete model name function bzr revid: dle@openerp.com-20120921095715-q3wl2w7wnemv0vc9 --- addons/fleet/fleet.py | 25 ++++++++++++++++++++++++- addons/fleet/fleet_view.xml | 1 - 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 2c36eb86c92..1ef220e9537 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -8,11 +8,34 @@ class fleet_vehicle_model_type(osv.Model): } class fleet_vehicle_model(osv.Model): + + def name_get(self, cr, uid, ids, context=None): + if not ids: + return [] + reads = self.read(cr, uid, ids, ['brand','modelname','make','year'], context=context) + res = [] + for record in reads: + name = '' + if record['modelname']: + name = name+ ' / ' +record['modelname'][1] + if record['modelname']: + name = name+ ' / ' +record['modelname'][1] + if record['make']: + name = name+ ' / ' +record['make'][1] + if record['year']: + name = name+ ' / ' +str(record['year']) + res.append((record['id'], name)) + return res + + def _name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None): + res = self.name_get(cr, uid, ids, context=context) + return dict(res) + _name = 'fleet.vehicle.model' _description = 'Model of a vehicle' _columns = { - 'name' : fields.char('Name',size=32, required=False), + 'name' : fields.function(_name_get_fnc, type="char", string='Name'), 'brand' : fields.many2one('fleet.vehicle.model.brand', 'Model brand', required=False), 'type' : fields.many2one('fleet.vehicle.type', 'Vehicle Type', required=False), 'modelname' : fields.many2one('fleet.vehicle.model.name', 'Model name', required=False), diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index f1a8ea81815..dcbc1ba39f9 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -45,7 +45,6 @@ fleet.vehicle.model - From 1ab5e7e100d16ecc0992839169ac02e056ef903c Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Fri, 21 Sep 2012 12:56:43 +0200 Subject: [PATCH 047/841] [CORRECT]correction of the name computation field in model object bzr revid: csn@openerp.com-20120921105643-j1hatbzx3odrqazo --- addons/fleet/fleet.py | 14 ++++++++------ addons/fleet/fleet_view.xml | 1 + 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 1ef220e9537..7b602406882 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -6,18 +6,20 @@ class fleet_vehicle_model_type(osv.Model): _columns = { 'name' : fields.char('Name', size=32, required=True), } - +#comment to delete class fleet_vehicle_model(osv.Model): def name_get(self, cr, uid, ids, context=None): if not ids: return [] - reads = self.read(cr, uid, ids, ['brand','modelname','make','year'], context=context) + reads = self.read(cr, uid, ids, ['type','brand','modelname','make','year'], context=context) res = [] for record in reads: name = '' - if record['modelname']: - name = name+ ' / ' +record['modelname'][1] + if record['type']: + name = record['type'][1] + " - " + if record['brand']: + name = name + record['brand'][1] if record['modelname']: name = name+ ' / ' +record['modelname'][1] if record['make']: @@ -36,8 +38,8 @@ class fleet_vehicle_model(osv.Model): _columns = { 'name' : fields.function(_name_get_fnc, type="char", string='Name'), - 'brand' : fields.many2one('fleet.vehicle.model.brand', 'Model brand', required=False), - 'type' : fields.many2one('fleet.vehicle.type', 'Vehicle Type', required=False), + 'brand' : fields.many2one('fleet.vehicle.model.brand', 'Model brand', required=True), + 'type' : fields.many2one('fleet.vehicle.type', 'Vehicle Type', required=True), 'modelname' : fields.many2one('fleet.vehicle.model.name', 'Model name', required=False), 'make' : fields.many2one('fleet.vehicle.model.make', 'Model make', required=False), 'year' : fields.integer('Year', required=False), diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index dcbc1ba39f9..d4043fa0628 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -197,5 +197,6 @@ --> + From 52c00df8d239f6a96b68a1dac86134d0036c6973 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Fri, 21 Sep 2012 13:20:51 +0200 Subject: [PATCH 048/841] [ADD]Add horsepower_tax field bzr revid: dle@openerp.com-20120921112051-qmv79v6v0r0eumuc --- addons/fleet/fleet.py | 4 +++- addons/fleet/fleet_view.xml | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 7b602406882..68408580155 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -47,7 +47,8 @@ class fleet_vehicle_model(osv.Model): 'transmission' : fields.selection([('manual', 'Manual'),('automatic','Automatic')], 'Transmission', help='Transmission Used by the vehicle',required=False), 'fuel_type' : fields.selection([('gasoline', 'Gasoline'),('diesel','Diesel'),('electric','Electric'),('hybrid','Hybrid')], 'Fuel Type', help='Fuel Used by the vehicle',required=False), - 'horses' : fields.integer('Horses',required=False), + 'horsepower' : fields.integer('Horsepower',required=False), + 'horsepower_tax': fields.float('Horsepower Taxation'), 'power' : fields.integer('Power (kW)',required=False,help='Power in kW of the vehicle'), 'co2' : fields.float('CO2 Emissions',required=False,help='CO2 emissions of the vehicle'), } @@ -71,6 +72,7 @@ class fleet_vehicle_model_make(osv.Model): _description = 'Make model of the vehicle' _columns = { 'name' : fields.char('Make',size=32, required=True), + 'country_id': fields.many2one('res.country', 'Country', required=False), } class fleet_vehicle(osv.Model): diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index d4043fa0628..59e38bdc7fd 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -27,11 +27,12 @@ + - + + - From 185530153085c415879195b32a87353a9b03ba18 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Fri, 21 Sep 2012 13:32:28 +0200 Subject: [PATCH 049/841] [ADD]add help messages to each field and removed the message field in vehicle object bzr revid: csn@openerp.com-20120921113228-75qsgqfyenpzegll --- addons/fleet/fleet.py | 36 +++++++++++++++++++++--------------- addons/fleet/fleet_view.xml | 4 ++-- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 68408580155..a124eb969df 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -38,11 +38,11 @@ class fleet_vehicle_model(osv.Model): _columns = { 'name' : fields.function(_name_get_fnc, type="char", string='Name'), - 'brand' : fields.many2one('fleet.vehicle.model.brand', 'Model brand', required=True), - 'type' : fields.many2one('fleet.vehicle.type', 'Vehicle Type', required=True), - 'modelname' : fields.many2one('fleet.vehicle.model.name', 'Model name', required=False), - 'make' : fields.many2one('fleet.vehicle.model.make', 'Model make', required=False), - 'year' : fields.integer('Year', required=False), + 'brand' : fields.many2one('fleet.vehicle.model.brand', 'Model brand', required=True, help='Brand of the vehicle'), + 'type' : fields.many2one('fleet.vehicle.type', 'Vehicle Type', required=True, help='Type of vehicle (car, bike, ...)'), + 'modelname' : fields.many2one('fleet.vehicle.model.name', 'Model name', required=False, help='Model name of the vehicle'), + 'make' : fields.many2one('fleet.vehicle.model.make', 'Model make', required=False, help='Make of the vehicle'), + 'year' : fields.integer('Year', required=False, help='Year of fabrication of the vehicle'), 'partner_id': fields.many2many('res.partner','fleet_vehicle_model_vendors','model_id', 'partner_id',string='Vendors',required=False), 'transmission' : fields.selection([('manual', 'Manual'),('automatic','Automatic')], 'Transmission', help='Transmission Used by the vehicle',required=False), @@ -80,19 +80,25 @@ class fleet_vehicle(osv.Model): _description = 'Fleet Vehicle' _columns = { - 'registration' : fields.char('Registration', size=32, required=False), - 'vin_sn' : fields.char('VIN SN', size=32, required=False), - 'driver' : fields.many2one('hr.employee', 'Driver',required=False), - 'model_id' : fields.many2one('fleet.vehicle.model', 'Model', required=True), + 'registration' : fields.char('Registration', size=32, required=False, help='Registration number of the vehicle (ie: plate number for a car)'), + 'vin_sn' : fields.char('Chassis Number', size=32, required=False, help='Unique number written on the vehicle motor (VIN/SN number)'), + 'driver' : fields.many2one('hr.employee', 'Driver',required=False, help='Driver of the vehicle'), + 'model_id' : fields.many2one('fleet.vehicle.model', 'Model', required=True, help='Model of the vehicle'), 'log_ids' : fields.one2many('fleet.vehicle.log', 'vehicle_id', 'Logs'), - 'acquisition_date' : fields.date('Acquisition date', required=False), - 'acquisition_price' : fields.integer('Price'), - 'color' : fields.char('Color',size=32), - 'status' : fields.char('Status',size=32), - 'location' : fields.char('Location',size=32), + 'acquisition_date' : fields.date('Acquisition date', required=False, help='Date when the vehicle has been bought'), + 'acquisition_price' : fields.integer('Price', help='Price of the bought vehicle'), + 'color' : fields.char('Color',size=32, help='Color of the vehicle'), + 'status' : fields.char('Status',size=32, help='Status of the vehicle (in repair, active, ...)'), + 'location' : fields.char('Location',size=32, help='Location of the vehicle (garage, ...)'), 'next_repair_km' : fields.integer('Next Repair Km'), - 'message' : fields.char('Message', size=128, readonly=True), + + 'transmission' : fields.selection([('manual', 'Manual'),('automatic','Automatic')], 'Transmission', help='Transmission Used by the vehicle',required=False), + 'fuel_type' : fields.selection([('gasoline', 'Gasoline'),('diesel','Diesel'),('electric','Electric'),('hybrid','Hybrid')], 'Fuel Type', help='Fuel Used by the vehicle',required=False), + 'horses' : fields.integer('Horses',required=False), + 'power' : fields.integer('Power (kW)',required=False,help='Power in kW of the vehicle'), + 'co2' : fields.float('CO2 Emissions',required=False,help='CO2 emissions of the vehicle'), + } def on_change_model(self, cr, uid, ids, model_id, context=None): diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 59e38bdc7fd..c746a9e6b16 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -50,6 +50,7 @@ + @@ -76,9 +77,8 @@ - + - From 80b84053d9a14c6a2b6b6a1e863f0ea829db2626 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Fri, 21 Sep 2012 14:12:37 +0200 Subject: [PATCH 050/841] [ADD]view for configuration menu bzr revid: csn@openerp.com-20120921121237-dh09b3gh9c6b8is6 --- addons/fleet/fleet_view.xml | 76 ++++++++++++++++++++++++++++++++++++- 1 file changed, 75 insertions(+), 1 deletion(-) diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index c746a9e6b16..bce81274543 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -63,9 +63,83 @@ tree,form + + fleet.vehicle.type.tree + fleet.vehicle.type + + + + + + + + + Type of Vehicle + fleet.vehicle.type + form + tree,form + + + + + fleet.vehicle.model.brand.tree + fleet.vehicle.model.brand + + + + + + + + + Model brand of Vehicle + fleet.vehicle.model.brand + form + tree,form + + + + fleet.vehicle.model.name.tree + fleet.vehicle.model.name + + + + + + + + + Model name of Vehicle + fleet.vehicle.model.name + form + tree,form + + + + fleet.vehicle.model.make.tree + fleet.vehicle.model.make + + + + + + + + + Model make of Vehicle + fleet.vehicle.model.make + form + tree,form + + - + + + + + + fleet.vehicle.form From 73400dac7bd985444860c7759a1d92705f4cd212 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Fri, 21 Sep 2012 15:16:02 +0200 Subject: [PATCH 051/841] [IMP] Make term changed to version, and change of relationship between version and its model bzr revid: dle@openerp.com-20120921131602-5rtzewizms4c353j --- addons/fleet/fleet.py | 32 ++++++++-------- addons/fleet/fleet_view.xml | 73 ++++++++++++++++++++++++------------- 2 files changed, 64 insertions(+), 41 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index a124eb969df..4e2cb890d1d 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -12,7 +12,7 @@ class fleet_vehicle_model(osv.Model): def name_get(self, cr, uid, ids, context=None): if not ids: return [] - reads = self.read(cr, uid, ids, ['type','brand','modelname','make','year'], context=context) + reads = self.read(cr, uid, ids, ['type','brand','modelname','version','year'], context=context) res = [] for record in reads: name = '' @@ -22,8 +22,8 @@ class fleet_vehicle_model(osv.Model): name = name + record['brand'][1] if record['modelname']: name = name+ ' / ' +record['modelname'][1] - if record['make']: - name = name+ ' / ' +record['make'][1] + if record['version']: + name = name+ ' / ' +record['version'][1] if record['year']: name = name+ ' / ' +str(record['year']) res.append((record['id'], name)) @@ -41,16 +41,9 @@ class fleet_vehicle_model(osv.Model): 'brand' : fields.many2one('fleet.vehicle.model.brand', 'Model brand', required=True, help='Brand of the vehicle'), 'type' : fields.many2one('fleet.vehicle.type', 'Vehicle Type', required=True, help='Type of vehicle (car, bike, ...)'), 'modelname' : fields.many2one('fleet.vehicle.model.name', 'Model name', required=False, help='Model name of the vehicle'), - 'make' : fields.many2one('fleet.vehicle.model.make', 'Model make', required=False, help='Make of the vehicle'), + 'version' : fields.one2many('fleet.vehicle.model.version', 'model_version_id', 'Versions'), 'year' : fields.integer('Year', required=False, help='Year of fabrication of the vehicle'), 'partner_id': fields.many2many('res.partner','fleet_vehicle_model_vendors','model_id', 'partner_id',string='Vendors',required=False), - - 'transmission' : fields.selection([('manual', 'Manual'),('automatic','Automatic')], 'Transmission', help='Transmission Used by the vehicle',required=False), - 'fuel_type' : fields.selection([('gasoline', 'Gasoline'),('diesel','Diesel'),('electric','Electric'),('hybrid','Hybrid')], 'Fuel Type', help='Fuel Used by the vehicle',required=False), - 'horsepower' : fields.integer('Horsepower',required=False), - 'horsepower_tax': fields.float('Horsepower Taxation'), - 'power' : fields.integer('Power (kW)',required=False,help='Power in kW of the vehicle'), - 'co2' : fields.float('CO2 Emissions',required=False,help='CO2 emissions of the vehicle'), } class fleet_vehicle_model_brand(osv.Model): @@ -67,12 +60,19 @@ class fleet_vehicle_model_name(osv.Model): 'name' : fields.char('Name',size=32, required=True), } -class fleet_vehicle_model_make(osv.Model): - _name = 'fleet.vehicle.model.make' - _description = 'Make model of the vehicle' +class fleet_vehicle_model_version(osv.Model): + _name = 'fleet.vehicle.model.version' + _description = 'version model of the vehicle' _columns = { - 'name' : fields.char('Make',size=32, required=True), - 'country_id': fields.many2one('res.country', 'Country', required=False), + 'name' : fields.char('name',size=32, required=True), + 'model_version_id' : fields.many2one('fleet.vehicle.model', 'Associated model', required=True, help='Model name of the vehicle associated to this version'), + + 'transmission' : fields.selection([('manual', 'Manual'),('automatic','Automatic')], 'Transmission', help='Transmission Used by the vehicle',required=False), + 'fuel_type' : fields.selection([('gasoline', 'Gasoline'),('diesel','Diesel'),('electric','Electric'),('hybrid','Hybrid')], 'Fuel Type', help='Fuel Used by the vehicle',required=False), + 'horsepower' : fields.integer('Horsepower',required=False), + 'horsepower_tax': fields.float('Horsepower Taxation'), + 'power' : fields.integer('Power (kW)',required=False,help='Power in kW of the vehicle'), + 'co2' : fields.float('CO2 Emissions',required=False,help='CO2 emissions of the vehicle'), } class fleet_vehicle(osv.Model): diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index bce81274543..53109f23336 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -13,29 +13,18 @@ - - + + + + - - - - - - - - - - - - - - +
@@ -49,7 +38,7 @@ - + @@ -115,19 +104,53 @@ tree,form - - fleet.vehicle.model.make.tree - fleet.vehicle.model.make + + fleet.vehicle.model.version.tree + fleet.vehicle.model.version - + + + - - Model make of Vehicle - fleet.vehicle.model.make + + fleet.vehicle.model.version.form + fleet.vehicle.model.version + +
+ + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + Model version of Vehicle + fleet.vehicle.model.version form tree,form @@ -139,7 +162,7 @@ - + fleet.vehicle.form From 0582e611407bd917d7ffceac92f1c3f52108d844 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Fri, 21 Sep 2012 16:34:15 +0200 Subject: [PATCH 052/841] [REM]Removing of models type, versions and engine. Too much complexity. bzr revid: dle@openerp.com-20120921143415-6fiuv49wanwhc75v --- addons/fleet/fleet.py | 59 ++--------------- addons/fleet/fleet_view.xml | 128 +++++++----------------------------- 2 files changed, 28 insertions(+), 159 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 4e2cb890d1d..5cb01797e48 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -9,41 +9,13 @@ class fleet_vehicle_model_type(osv.Model): #comment to delete class fleet_vehicle_model(osv.Model): - def name_get(self, cr, uid, ids, context=None): - if not ids: - return [] - reads = self.read(cr, uid, ids, ['type','brand','modelname','version','year'], context=context) - res = [] - for record in reads: - name = '' - if record['type']: - name = record['type'][1] + " - " - if record['brand']: - name = name + record['brand'][1] - if record['modelname']: - name = name+ ' / ' +record['modelname'][1] - if record['version']: - name = name+ ' / ' +record['version'][1] - if record['year']: - name = name+ ' / ' +str(record['year']) - res.append((record['id'], name)) - return res - - def _name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None): - res = self.name_get(cr, uid, ids, context=context) - return dict(res) - _name = 'fleet.vehicle.model' _description = 'Model of a vehicle' _columns = { - 'name' : fields.function(_name_get_fnc, type="char", string='Name'), + 'name' : fields.char('Brand Name',size=32, required=True), 'brand' : fields.many2one('fleet.vehicle.model.brand', 'Model brand', required=True, help='Brand of the vehicle'), - 'type' : fields.many2one('fleet.vehicle.type', 'Vehicle Type', required=True, help='Type of vehicle (car, bike, ...)'), - 'modelname' : fields.many2one('fleet.vehicle.model.name', 'Model name', required=False, help='Model name of the vehicle'), - 'version' : fields.one2many('fleet.vehicle.model.version', 'model_version_id', 'Versions'), - 'year' : fields.integer('Year', required=False, help='Year of fabrication of the vehicle'), - 'partner_id': fields.many2many('res.partner','fleet_vehicle_model_vendors','model_id', 'partner_id',string='Vendors',required=False), + 'vendors': fields.many2many('res.partner','fleet_vehicle_model_vendors','model_id', 'partner_id',string='Vendors',required=False), } class fleet_vehicle_model_brand(osv.Model): @@ -53,28 +25,6 @@ class fleet_vehicle_model_brand(osv.Model): 'name' : fields.char('Brand Name',size=32, required=True), } -class fleet_vehicle_model_name(osv.Model): - _name = 'fleet.vehicle.model.name' - _description = 'Name model of the vehicle' - _columns = { - 'name' : fields.char('Name',size=32, required=True), - } - -class fleet_vehicle_model_version(osv.Model): - _name = 'fleet.vehicle.model.version' - _description = 'version model of the vehicle' - _columns = { - 'name' : fields.char('name',size=32, required=True), - 'model_version_id' : fields.many2one('fleet.vehicle.model', 'Associated model', required=True, help='Model name of the vehicle associated to this version'), - - 'transmission' : fields.selection([('manual', 'Manual'),('automatic','Automatic')], 'Transmission', help='Transmission Used by the vehicle',required=False), - 'fuel_type' : fields.selection([('gasoline', 'Gasoline'),('diesel','Diesel'),('electric','Electric'),('hybrid','Hybrid')], 'Fuel Type', help='Fuel Used by the vehicle',required=False), - 'horsepower' : fields.integer('Horsepower',required=False), - 'horsepower_tax': fields.float('Horsepower Taxation'), - 'power' : fields.integer('Power (kW)',required=False,help='Power in kW of the vehicle'), - 'co2' : fields.float('CO2 Emissions',required=False,help='CO2 emissions of the vehicle'), - } - class fleet_vehicle(osv.Model): _name = 'fleet.vehicle' _description = 'Fleet Vehicle' @@ -90,15 +40,16 @@ class fleet_vehicle(osv.Model): 'color' : fields.char('Color',size=32, help='Color of the vehicle'), 'status' : fields.char('Status',size=32, help='Status of the vehicle (in repair, active, ...)'), 'location' : fields.char('Location',size=32, help='Location of the vehicle (garage, ...)'), + 'doors' : fields.integer('Number of doors', help='Number of doors of the vehicle'), 'next_repair_km' : fields.integer('Next Repair Km'), 'transmission' : fields.selection([('manual', 'Manual'),('automatic','Automatic')], 'Transmission', help='Transmission Used by the vehicle',required=False), 'fuel_type' : fields.selection([('gasoline', 'Gasoline'),('diesel','Diesel'),('electric','Electric'),('hybrid','Hybrid')], 'Fuel Type', help='Fuel Used by the vehicle',required=False), - 'horses' : fields.integer('Horses',required=False), + 'horsepower' : fields.integer('Horsepower',required=False), + 'horsepower_tax': fields.float('Horsepower Taxation'), 'power' : fields.integer('Power (kW)',required=False,help='Power in kW of the vehicle'), 'co2' : fields.float('CO2 Emissions',required=False,help='CO2 emissions of the vehicle'), - } def on_change_model(self, cr, uid, ids, model_id, context=None): diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 53109f23336..6e3a045cfab 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -9,22 +9,17 @@ - - + + - - + - - - - + - @@ -35,12 +30,9 @@ fleet.vehicle.model - + - - - - + @@ -51,25 +43,7 @@ form tree,form
- - - fleet.vehicle.type.tree - fleet.vehicle.type - - - - - - - - - Type of Vehicle - fleet.vehicle.type - form - tree,form - - - + fleet.vehicle.model.brand.tree fleet.vehicle.model.brand @@ -87,82 +61,11 @@ tree,form - - fleet.vehicle.model.name.tree - fleet.vehicle.model.name - - - - - - - - - Model name of Vehicle - fleet.vehicle.model.name - form - tree,form - - - - fleet.vehicle.model.version.tree - fleet.vehicle.model.version - - - - - - - - - - - fleet.vehicle.model.version.form - fleet.vehicle.model.version - -
- - - - - - - - - - - - - - - - - - - - - - -
-
-
- - - - Model version of Vehicle - fleet.vehicle.model.version - form - tree,form - - - - - fleet.vehicle.form @@ -176,9 +79,10 @@ + - + @@ -199,6 +103,20 @@ + + + + + + + + + + + + + +
From 059f36dd890f571e66e9abc9309ce59f00821fa0 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Fri, 21 Sep 2012 16:47:44 +0200 Subject: [PATCH 053/841] [FIX]correct bug when trying to create a new vehicle and add its log, remove the vehicle field bzr revid: csn@openerp.com-20120921144744-c9h5t2dq129rt3yr --- addons/fleet/fleet_view.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 6e3a045cfab..3b2f7a41923 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -101,6 +101,16 @@ +
+ + + + + + + + +
From 70b5da11839eb57d9006dd53e5a122805b10f614 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Fri, 21 Sep 2012 17:10:22 +0200 Subject: [PATCH 054/841] [ADD]add log object for fuel, insurance, services bzr revid: csn@openerp.com-20120921151022-yjp2vtpic6vl18kl --- addons/fleet/fleet.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 5cb01797e48..316d2e69733 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -98,6 +98,27 @@ class fleet_vehicle_log(osv.Model): } +class fleet_vehicle_log_fuel(osv.Model): + _inherit = 'fleet.vehicle.log' + _name = 'fleet.vehicle.log.fuel' + _columns = { + 'description' : fields.text('Description'), + } + +class fleet_vehicle_log_insurance(osv.Model): + _inherit = 'fleet.vehicle.log' + _name = 'fleet.vehicle.log.insurance' + _columns = { + 'description' : fields.text('Description'), + } + +class fleet_vehicle_log_services(osv.Model): + _inherit = 'fleet.vehicle.log' + _name = 'fleet.vehicle.log.services' + _columns = { + 'description' : fields.text('Description'), + } + class hr_employee(osv.Model): _inherit = 'hr.employee' From a4b56f7455bfdc7f44c8133368d62e8b29475468 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Fri, 21 Sep 2012 17:42:44 +0200 Subject: [PATCH 055/841] [ADD]Concatenate function to give Brand + model as complete name bzr revid: dle@openerp.com-20120921154244-g7hv96uljkfvyevz --- addons/fleet/fleet.py | 25 ++++++++++++++++++++++--- addons/fleet/fleet_view.xml | 5 ++--- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 316d2e69733..b95e4288c18 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -6,15 +6,34 @@ class fleet_vehicle_model_type(osv.Model): _columns = { 'name' : fields.char('Name', size=32, required=True), } -#comment to delete +#comment to delete#comment to delete class fleet_vehicle_model(osv.Model): + def name_get(self, cr, uid, ids, context=None): + if context is None: + context = {} + if not ids: + return [] + reads = self.browse(cr, uid, ids, context=context) + res = [] + for record in reads: + name = record.modelname + if record.brand: + name = record.brand.name+' / '+name + res.append((record.id, name)) + return res + + def _model_name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None): + res = self.name_get(cr, uid, ids, context=context) + return dict(res) + _name = 'fleet.vehicle.model' _description = 'Model of a vehicle' _columns = { - 'name' : fields.char('Brand Name',size=32, required=True), - 'brand' : fields.many2one('fleet.vehicle.model.brand', 'Model brand', required=True, help='Brand of the vehicle'), + 'name' : fields.function(_model_name_get_fnc, type="char", string='Name', store=True), + 'modelname' : fields.char('Model name', size=32, required=True), + 'brand' : fields.many2one('fleet.vehicle.model.brand', 'Model brand', required=False, help='Brand of the vehicle'), 'vendors': fields.many2many('res.partner','fleet_vehicle_model_vendors','model_id', 'partner_id',string='Vendors',required=False), } diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 3b2f7a41923..e54462c19ff 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -9,11 +9,10 @@ - - + - + From 45e76287a2a39e5f0b724e98a33d1a01ba179d87 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Mon, 24 Sep 2012 09:42:39 +0200 Subject: [PATCH 056/841] [ADD]add some fields for fuel logs and also create the form bzr revid: csn@openerp.com-20120924074239-862w7lqvkkafd48e --- addons/fleet/fleet.py | 5 ++++- addons/fleet/fleet_view.xml | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index b95e4288c18..78dae6c7b60 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -54,6 +54,7 @@ class fleet_vehicle(osv.Model): 'driver' : fields.many2one('hr.employee', 'Driver',required=False, help='Driver of the vehicle'), 'model_id' : fields.many2one('fleet.vehicle.model', 'Model', required=True, help='Model of the vehicle'), 'log_ids' : fields.one2many('fleet.vehicle.log', 'vehicle_id', 'Logs'), + 'log_fuel' : fields.one2many('fleet.vehicle.log.fuel','vehicle_id', 'Fuel Logs'), 'acquisition_date' : fields.date('Acquisition date', required=False, help='Date when the vehicle has been bought'), 'acquisition_price' : fields.integer('Price', help='Price of the bought vehicle'), 'color' : fields.char('Color',size=32, help='Color of the vehicle'), @@ -109,7 +110,7 @@ class fleet_vehicle_log(osv.Model): 'employee_id' : fields.many2one('hr.employee', 'Employee', required=True), 'vehicle_id' : fields.many2one('fleet.vehicle', 'Vehicle', required=True), - 'create_date' : fields.datetime('Creation Date', readonly=True), + 'create_date' : fields.datetime('Creation Date'), 'description' : fields.text('Description'), 'type' : fields.many2one('fleet.vehicle.log.type', 'Type', required=True), @@ -122,6 +123,8 @@ class fleet_vehicle_log_fuel(osv.Model): _name = 'fleet.vehicle.log.fuel' _columns = { 'description' : fields.text('Description'), + 'liter' : fields.integer('Liter'), + 'price_per_liter' : fields.float('Price per liter'), } class fleet_vehicle_log_insurance(osv.Model): diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index e54462c19ff..2204e8b937f 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -92,6 +92,28 @@ + + + + + + + + +
+ + + + + + + + + + +
+
+
From 87673678ada0b4fd86ac1e1bda2a19e54f2f5467 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Mon, 24 Sep 2012 11:14:26 +0200 Subject: [PATCH 057/841] [RESOLVED]solved conflicts in log object and removed log type object bzr revid: csn@openerp.com-20120924091426-i57amm2p6t1fskc1 --- addons/fleet/fleet.py | 20 ++++++-------------- addons/fleet/fleet_view.xml | 2 ++ 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index c2e233b12f7..e5e84550797 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -117,13 +117,6 @@ class fleet_vehicle(osv.Model): } } -class fleet_vehicle_log_type(osv.Model): - _name = 'fleet.vehicle.log.type' - - _columns = { - 'name' : fields.char('Name', size=32, required=True), - } - class fleet_vehicle_log(osv.Model): _name = 'fleet.vehicle.log' @@ -131,11 +124,12 @@ class fleet_vehicle_log(osv.Model): 'employee_id' : fields.many2one('hr.employee', 'Employee', required=True), 'vehicle_id' : fields.many2one('fleet.vehicle', 'Vehicle', required=True), - 'create_date' : fields.datetime('Creation Date'), + 'create_date' : fields.date('Creation Date'), 'description' : fields.text('Description'), - 'type' : fields.char('Type', size=32, required=False), - } + 'type' : fields.char('Type',size=32), + } + _defaults = { 'type' : 'Log', } @@ -147,11 +141,9 @@ class fleet_vehicle_log_fuel(osv.Model): 'description' : fields.text('Description'), 'liter' : fields.integer('Liter'), 'price_per_liter' : fields.float('Price per liter'), - 'type' : fields.char('Type', size=32, required=False), - } - _defaults = { - 'type' : 'Fuel', + 'type' : fields.char('Type',size=32), } + _defaults = {'type': 'Refueling',} class fleet_vehicle_log_insurance(osv.Model): _inherit = 'fleet.vehicle.log' diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index c19d9760197..9c611c9cea8 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -97,6 +97,8 @@ + +
From c94b5016a57edf0cc8a9784a5372d67936d3cdca Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Mon, 24 Sep 2012 11:20:48 +0200 Subject: [PATCH 058/841] [ADD]Invoice link for fuel log bzr revid: dle@openerp.com-20120924092048-ux61kn6howa0yaoe --- addons/fleet/__openerp__.py | 1 + addons/fleet/fleet.py | 3 ++- addons/fleet/fleet_view.xml | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/fleet/__openerp__.py b/addons/fleet/__openerp__.py index 34cc89514a9..b91071a575e 100644 --- a/addons/fleet/__openerp__.py +++ b/addons/fleet/__openerp__.py @@ -5,6 +5,7 @@ 'depends' : [ 'base', 'hr', + 'account', ], 'author' : 'OpenERP S.A.', 'description' : """ diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index e5e84550797..82702e5ca19 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -141,7 +141,8 @@ class fleet_vehicle_log_fuel(osv.Model): 'description' : fields.text('Description'), 'liter' : fields.integer('Liter'), 'price_per_liter' : fields.float('Price per liter'), - 'type' : fields.char('Type',size=32), + 'type' : fields.char('Type', size=32), + 'invoice' : fields.many2one('account.invoice', 'Invoice', required=False, help='Invoice of the refueling log'), } _defaults = {'type': 'Refueling',} diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 9c611c9cea8..2c2eda08eac 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -100,6 +100,7 @@ + @@ -109,6 +110,7 @@ + From 9d4d16263ecf8af81f92594473323c36e22bb26b Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Mon, 24 Sep 2012 12:17:20 +0200 Subject: [PATCH 059/841] [ADD] Amount field for fuel log, with get_price function and associated on_change bzr revid: dle@openerp.com-20120924101720-69eqj01p39irbj09 --- addons/fleet/fleet.py | 24 ++++++++++++++++++++++++ addons/fleet/fleet_view.xml | 6 ++++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 82702e5ca19..5fcbd54f20a 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -135,12 +135,36 @@ class fleet_vehicle_log(osv.Model): } class fleet_vehicle_log_fuel(osv.Model): + _inherit = 'fleet.vehicle.log' + + def _get_price(self, cr, uid, ids, fields, args, context=None): + result = {} + for record in self.browse(cr, uid, ids, context=None): + res = record.liter * record.price_per_liter + result[record.id] = { + 'amount' : res, + } + return result + + def on_change_fuel(self, cr, uid, ids, liter, price_per_liter, context=None): + + print 'Amount : ' + str(liter * price_per_liter) + + return { + 'value' : { + 'amount' : liter * price_per_liter, + } + } + + + _name = 'fleet.vehicle.log.fuel' _columns = { 'description' : fields.text('Description'), 'liter' : fields.integer('Liter'), 'price_per_liter' : fields.float('Price per liter'), + 'amount': fields.function(_get_price, type='float', multi='fuel', string='Fuel Amount'), 'type' : fields.char('Type', size=32), 'invoice' : fields.many2one('account.invoice', 'Invoice', required=False, help='Invoice of the refueling log'), } diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 2c2eda08eac..85a0472f8c6 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -99,6 +99,7 @@ +
@@ -107,8 +108,9 @@ - - + + + From 5e30915ed2d3f5d728a4f4d23adc1307c30f1638 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Mon, 24 Sep 2012 13:57:39 +0200 Subject: [PATCH 060/841] [ADD]OpenChatter and replace account.invoice by a simple reference number bzr revid: dle@openerp.com-20120924115739-nbpo80ugq6w0dl32 --- addons/fleet/__openerp__.py | 1 - addons/fleet/fleet.py | 4 +++- addons/fleet/fleet_view.xml | 8 ++++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/addons/fleet/__openerp__.py b/addons/fleet/__openerp__.py index b91071a575e..34cc89514a9 100644 --- a/addons/fleet/__openerp__.py +++ b/addons/fleet/__openerp__.py @@ -5,7 +5,6 @@ 'depends' : [ 'base', 'hr', - 'account', ], 'author' : 'OpenERP S.A.', 'description' : """ diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 5fcbd54f20a..162e2bada36 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -46,6 +46,8 @@ class fleet_vehicle_model_brand(osv.Model): class fleet_vehicle(osv.Model): + _inherit = 'mail.thread' + def name_get(self, cr, uid, ids, context=None): if context is None: context = {} @@ -166,7 +168,7 @@ class fleet_vehicle_log_fuel(osv.Model): 'price_per_liter' : fields.float('Price per liter'), 'amount': fields.function(_get_price, type='float', multi='fuel', string='Fuel Amount'), 'type' : fields.char('Type', size=32), - 'invoice' : fields.many2one('account.invoice', 'Invoice', required=False, help='Invoice of the refueling log'), + 'inv_ref' : fields.char('Invoice Ref.', size=32), } _defaults = {'type': 'Refueling',} diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 85a0472f8c6..f9b63fc4fbe 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -101,7 +101,7 @@ - +
@@ -112,7 +112,7 @@ - +
@@ -154,6 +154,10 @@
+
+ + +
From 3d2607669f964f0ab5b1acdf1a548061a3595e7d Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Mon, 24 Sep 2012 14:51:11 +0200 Subject: [PATCH 061/841] [ADD][FIX]Add services logs and fix relation between driver and his vehicles bzr revid: dle@openerp.com-20120924125111-7g3wheu0689pw4nv --- addons/fleet/fleet.py | 23 +++++++++++++++++++---- addons/fleet/fleet_view.xml | 30 +++++++++++++++++++++++++++--- 2 files changed, 46 insertions(+), 7 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 162e2bada36..da3ecec63a7 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -78,6 +78,7 @@ class fleet_vehicle(osv.Model): 'model_id' : fields.many2one('fleet.vehicle.model', 'Model', required=True, help='Model of the vehicle'), 'log_ids' : fields.one2many('fleet.vehicle.log', 'vehicle_id', 'Logs'), 'log_fuel' : fields.one2many('fleet.vehicle.log.fuel','vehicle_id', 'Fuel Logs'), + 'log_services' : fields.one2many('fleet.vehicle.log.services','vehicle_id', 'Services Logs'), 'acquisition_date' : fields.date('Acquisition date', required=False, help='Date when the vehicle has been bought'), 'acquisition_price' : fields.integer('Price', help='Price of the bought vehicle'), 'color' : fields.char('Color',size=32, help='Color of the vehicle'), @@ -85,8 +86,6 @@ class fleet_vehicle(osv.Model): 'location' : fields.char('Location',size=32, help='Location of the vehicle (garage, ...)'), 'doors' : fields.integer('Number of doors', help='Number of doors of the vehicle'), - 'next_repair_km' : fields.integer('Next Repair Km'), - 'transmission' : fields.selection([('manual', 'Manual'),('automatic','Automatic')], 'Transmission', help='Transmission Used by the vehicle',required=False), 'fuel_type' : fields.selection([('gasoline', 'Gasoline'),('diesel','Diesel'),('electric','Electric'),('hybrid','Hybrid')], 'Fuel Type', help='Fuel Used by the vehicle',required=False), 'horsepower' : fields.integer('Horsepower',required=False), @@ -179,17 +178,33 @@ class fleet_vehicle_log_insurance(osv.Model): 'description' : fields.text('Description'), } +class service_type(osv.Model): + _name = 'fleet.service.type' + _columns = { + 'name': fields.char('Name', required=True, translate=True), + } + class fleet_vehicle_log_services(osv.Model): + def _compute_complete_service(self, cr, uid, ids, field, arg, context=None): + return dict( + (record.id, " ".join(service.name for service in record.service_ids)) + for record in self.browse(cr, uid, ids, context=context) + ) _inherit = 'fleet.vehicle.log' _name = 'fleet.vehicle.log.services' _columns = { - 'description' : fields.text('Description'), + 'vehicle_id' :fields.many2one('fleet.vehicle', 'Vehicle', required=True), + 'vendor_id' :fields.many2one('res.partner', 'Vendor', domain="[('supplier','=',True)]"), + 'amount' :fields.float('Amount', help="Total cost of the service"), + 'reference' :fields.char('Reference',size=128), + 'service_ids' :fields.many2many('fleet.service.type','vehicle_service_type_rel','vehicle_service_type_id','service_id','Services completed'), + 'complete_service': fields.function(_compute_complete_service, type="char", string='Services completed'), } class hr_employee(osv.Model): _inherit = 'hr.employee' _columns = { - 'vehicle_id' : fields.many2one('fleet.vehicle', 'Vehicle', required=True), + 'vehicle_id' : fields.one2many('fleet.vehicle','driver', 'Vehicle',type="char"), 'log_ids' : fields.one2many('fleet.vehicle.log', 'employee_id', 'Logs'), } \ No newline at end of file diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index f9b63fc4fbe..330c4b61d62 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -89,8 +89,31 @@ - - + + + + + + + + + + + +
+ + + + + + + + + + + +
+
@@ -169,6 +192,7 @@ + @@ -236,7 +260,7 @@ - + From a9d4bf30bb55acf889538ab715dba1c682d2d38a Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Mon, 24 Sep 2012 15:03:35 +0200 Subject: [PATCH 062/841] [MERGE]removed some conflicts in view bzr revid: csn@openerp.com-20120924130335-vvkhdz9jexcnsqrq --- addons/fleet/fleet_view.xml | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 330c4b61d62..f758ce680b6 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -228,17 +228,21 @@ - fleet.vehicle.log.tree - fleet.vehicle.log - - - - - - - - - + + fleet.vehicle.log.tree + fleet.vehicle.log + + + + + + + + + + + + From 0efec5d0047773bbdf3be92cf5ef63a4f2ae50c3 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Mon, 24 Sep 2012 15:08:43 +0200 Subject: [PATCH 063/841] [REM]Complete services fields bzr revid: dle@openerp.com-20120924130843-tpnhes50q7rryg5l --- addons/fleet/fleet.py | 6 ------ addons/fleet/fleet_view.xml | 4 +--- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index da3ecec63a7..425c1d4db00 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -185,11 +185,6 @@ class service_type(osv.Model): } class fleet_vehicle_log_services(osv.Model): - def _compute_complete_service(self, cr, uid, ids, field, arg, context=None): - return dict( - (record.id, " ".join(service.name for service in record.service_ids)) - for record in self.browse(cr, uid, ids, context=context) - ) _inherit = 'fleet.vehicle.log' _name = 'fleet.vehicle.log.services' _columns = { @@ -198,7 +193,6 @@ class fleet_vehicle_log_services(osv.Model): 'amount' :fields.float('Amount', help="Total cost of the service"), 'reference' :fields.char('Reference',size=128), 'service_ids' :fields.many2many('fleet.service.type','vehicle_service_type_rel','vehicle_service_type_id','service_id','Services completed'), - 'complete_service': fields.function(_compute_complete_service, type="char", string='Services completed'), } class hr_employee(osv.Model): diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index f758ce680b6..c82e326587d 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -97,8 +97,7 @@ - - +
@@ -109,7 +108,6 @@ -
From c36fa305777ba408a0fb03a60ccd4ef8a858c939 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Mon, 24 Sep 2012 15:11:23 +0200 Subject: [PATCH 064/841] [FIX]services widget at wrong place bzr revid: dle@openerp.com-20120924131123-sfs73lkgb5ef7a3f --- addons/fleet/fleet_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index c82e326587d..fc63fd75f95 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -97,7 +97,7 @@ - +
@@ -107,7 +107,7 @@ - +
From 63f67de14ed658272aa366ea9f85afa36d5fcc97 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Mon, 24 Sep 2012 16:49:27 +0200 Subject: [PATCH 065/841] [ADD]demo file, + openchatter fixes bzr revid: dle@openerp.com-20120924144927-ukw5wbvpazj4a4ea --- addons/fleet/__openerp__.py | 1 + addons/fleet/demo.xml | 67 +++++++++++++++++++++++++++++++++++++ addons/fleet/fleet.py | 18 +++++++--- 3 files changed, 82 insertions(+), 4 deletions(-) create mode 100644 addons/fleet/demo.xml diff --git a/addons/fleet/__openerp__.py b/addons/fleet/__openerp__.py index 34cc89514a9..36294c4086b 100644 --- a/addons/fleet/__openerp__.py +++ b/addons/fleet/__openerp__.py @@ -6,6 +6,7 @@ 'base', 'hr', ], + 'demo': ['demo.xml'], 'author' : 'OpenERP S.A.', 'description' : """ I'm a good module and I will handle the cars of your company ! diff --git a/addons/fleet/demo.xml b/addons/fleet/demo.xml new file mode 100644 index 00000000000..e2cb94a18aa --- /dev/null +++ b/addons/fleet/demo.xml @@ -0,0 +1,67 @@ + + + + + + Opel + + + + BMW + + + + Audi + + + + Mercedes + + + + Corsa + + + + + Astra + + + + + 1-ACK-205 + 5454541 + + Black + Grand-Rosiere + 5 + + + + + + 1-SYN-404 + 1337 + + Red + Grand-Rosiere + 5 + + + + + + Oil change + + + + + + + Services + 500.0 + + + + + diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 425c1d4db00..c3dffa41f0a 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -48,6 +48,12 @@ class fleet_vehicle(osv.Model): _inherit = 'mail.thread' + def create_send_note(self, cr, uid, ids, context=None): + for id in ids: + message = _("%s has been created.")% (self.case_get_note_msg_prefix(cr, uid, id, context=context)) + self.message_post(cr, uid, [id], body=message, context=context) + return True + def name_get(self, cr, uid, ids, context=None): if context is None: context = {} @@ -137,7 +143,9 @@ class fleet_vehicle_log(osv.Model): class fleet_vehicle_log_fuel(osv.Model): - _inherit = 'fleet.vehicle.log' + + _inherit = ['fleet.vehicle.log','mail.thread'] + def _get_price(self, cr, uid, ids, fields, args, context=None): result = {} @@ -185,15 +193,16 @@ class service_type(osv.Model): } class fleet_vehicle_log_services(osv.Model): - _inherit = 'fleet.vehicle.log' + _inherit = ['fleet.vehicle.log'] + _name = 'fleet.vehicle.log.services' _columns = { - 'vehicle_id' :fields.many2one('fleet.vehicle', 'Vehicle', required=True), 'vendor_id' :fields.many2one('res.partner', 'Vendor', domain="[('supplier','=',True)]"), 'amount' :fields.float('Amount', help="Total cost of the service"), 'reference' :fields.char('Reference',size=128), 'service_ids' :fields.many2many('fleet.service.type','vehicle_service_type_rel','vehicle_service_type_id','service_id','Services completed'), } + _defaults = {'type': 'Services'} class hr_employee(osv.Model): _inherit = 'hr.employee' @@ -201,4 +210,5 @@ class hr_employee(osv.Model): _columns = { 'vehicle_id' : fields.one2many('fleet.vehicle','driver', 'Vehicle',type="char"), 'log_ids' : fields.one2many('fleet.vehicle.log', 'employee_id', 'Logs'), - } \ No newline at end of file + } + From 4fe5d8c18da7f5047730a619e84885cbaa4d7a24 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Mon, 24 Sep 2012 17:29:37 +0200 Subject: [PATCH 066/841] [ADD]view for repair log and services log bzr revid: csn@openerp.com-20120924152937-xt6axiw64d47eky1 --- addons/fleet/fleet.py | 5 +- addons/fleet/fleet_view.xml | 91 ++++++++++++++++++++++++++++++++++++- 2 files changed, 92 insertions(+), 4 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index c3dffa41f0a..f30728c0043 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -170,10 +170,9 @@ class fleet_vehicle_log_fuel(osv.Model): _name = 'fleet.vehicle.log.fuel' _columns = { - 'description' : fields.text('Description'), 'liter' : fields.integer('Liter'), 'price_per_liter' : fields.float('Price per liter'), - 'amount': fields.function(_get_price, type='float', multi='fuel', string='Fuel Amount'), + 'amount': fields.function(_get_price, type='float', multi='fuel', string='Total Price'), 'type' : fields.char('Type', size=32), 'inv_ref' : fields.char('Invoice Ref.', size=32), } @@ -198,7 +197,7 @@ class fleet_vehicle_log_services(osv.Model): _name = 'fleet.vehicle.log.services' _columns = { 'vendor_id' :fields.many2one('res.partner', 'Vendor', domain="[('supplier','=',True)]"), - 'amount' :fields.float('Amount', help="Total cost of the service"), + 'amount' :fields.float('Cost', help="Total cost of the service"), 'reference' :fields.char('Reference',size=128), 'service_ids' :fields.many2many('fleet.service.type','vehicle_service_type_rel','vehicle_service_type_id','service_id','Services completed'), } diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index fc63fd75f95..d741a57e093 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -240,7 +240,6 @@
-
@@ -252,6 +251,96 @@ + + fleet.vehicle.log.fuel.form + fleet.vehicle.log.fuel + +
+ + + + + + + + + + + +
+
+
+ + + + fleet.vehicle.log.fuel.tree + fleet.vehicle.log.fuel + + + + + + + + + + + + + + + Vehicle Fuel Logs + fleet.vehicle.log.fuel + form + tree,form + + + + + + fleet.vehicle.log.services.form + fleet.vehicle.log.services + +
+ + + + + + + + + + + +
+
+
+ + + + fleet.vehicle.log.services.tree + fleet.vehicle.log.services + + + + + + + + + + + + + + Vehicle Services Logs + fleet.vehicle.log.services + form + tree,form + + + fleet.hr.employee.form From abc69034311024a38e565e84dd577f381b943067 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Mon, 24 Sep 2012 17:38:26 +0200 Subject: [PATCH 067/841] [ADD] Vehicle insurances fields bzr revid: dle@openerp.com-20120924153826-9wuc7f7e16e5q722 --- addons/fleet/fleet.py | 13 +++++++++++++ addons/fleet/fleet_view.xml | 31 ++++++++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index f30728c0043..9b31120ebc6 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -85,6 +85,7 @@ class fleet_vehicle(osv.Model): 'log_ids' : fields.one2many('fleet.vehicle.log', 'vehicle_id', 'Logs'), 'log_fuel' : fields.one2many('fleet.vehicle.log.fuel','vehicle_id', 'Fuel Logs'), 'log_services' : fields.one2many('fleet.vehicle.log.services','vehicle_id', 'Services Logs'), + 'log_insurances' : fields.one2many('fleet.vehicle.log.insurance','vehicle_id', 'Insurances'), 'acquisition_date' : fields.date('Acquisition date', required=False, help='Date when the vehicle has been bought'), 'acquisition_price' : fields.integer('Price', help='Price of the bought vehicle'), 'color' : fields.char('Color',size=32, help='Color of the vehicle'), @@ -178,12 +179,24 @@ class fleet_vehicle_log_fuel(osv.Model): } _defaults = {'type': 'Refueling',} +class fleet_insurance_type(osv.Model): + _name = 'fleet.insurance.type' + _columns = { + 'name': fields.char('Name', required=True, translate=True), + } + class fleet_vehicle_log_insurance(osv.Model): _inherit = 'fleet.vehicle.log' _name = 'fleet.vehicle.log.insurance' _columns = { + 'insurance_type' : fields.many2one('fleet.insurance.type', 'Type', required=False, help='Type of the insurance'), + 'start_date' : fields.date('Start date', required=False, help='Date when the coverage of the insurance begins'), + 'expiration_date' : fields.date('Expiration date', required=False, help='Date when the coverage of the insurance expirates'), + 'price' : fields.float('Price', help="Cost of the insurance for the specified period"), + 'insurer_id' :fields.many2one('res.partner', 'Insurer', domain="[('supplier','=',True)]"), 'description' : fields.text('Description'), } + _defaults = {'type': 'Insurance',} class service_type(osv.Model): _name = 'fleet.service.type' diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index d741a57e093..f5e94e519ce 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -89,6 +89,35 @@ + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+
+
@@ -99,7 +128,7 @@ -
+ From a4d644cd33fb3747064bcbaee5b780e13fb80be8 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Mon, 24 Sep 2012 17:58:24 +0200 Subject: [PATCH 068/841] [IMP]Logs views improvement, various logs concatened in one view. Add demo data for fuel logs bzr revid: dle@openerp.com-20120924155824-v78fhhjfwm07oa27 --- addons/fleet/demo.xml | 9 +++ addons/fleet/fleet.py | 5 +- addons/fleet/fleet_view.xml | 137 ++++++++++++++++++------------------ 3 files changed, 80 insertions(+), 71 deletions(-) diff --git a/addons/fleet/demo.xml b/addons/fleet/demo.xml index e2cb94a18aa..2e8f3f02b48 100644 --- a/addons/fleet/demo.xml +++ b/addons/fleet/demo.xml @@ -63,5 +63,14 @@ + + + + + Fuel + 40.0 + 1.45 + + diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 9b31120ebc6..c17fc0a1fcd 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -82,7 +82,7 @@ class fleet_vehicle(osv.Model): 'vin_sn' : fields.char('Chassis Number', size=32, required=False, help='Unique number written on the vehicle motor (VIN/SN number)'), 'driver' : fields.many2one('hr.employee', 'Driver',required=False, help='Driver of the vehicle'), 'model_id' : fields.many2one('fleet.vehicle.model', 'Model', required=True, help='Model of the vehicle'), - 'log_ids' : fields.one2many('fleet.vehicle.log', 'vehicle_id', 'Logs'), + 'log_ids' : fields.one2many('fleet.vehicle.log', 'vehicle_id', 'Other Logs'), 'log_fuel' : fields.one2many('fleet.vehicle.log.fuel','vehicle_id', 'Fuel Logs'), 'log_services' : fields.one2many('fleet.vehicle.log.services','vehicle_id', 'Services Logs'), 'log_insurances' : fields.one2many('fleet.vehicle.log.insurance','vehicle_id', 'Insurances'), @@ -171,10 +171,9 @@ class fleet_vehicle_log_fuel(osv.Model): _name = 'fleet.vehicle.log.fuel' _columns = { - 'liter' : fields.integer('Liter'), + 'liter' : fields.float('Liter'), 'price_per_liter' : fields.float('Price per liter'), 'amount': fields.function(_get_price, type='float', multi='fuel', string='Total Price'), - 'type' : fields.char('Type', size=32), 'inv_ref' : fields.char('Invoice Ref.', size=32), } _defaults = {'type': 'Refueling',} diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index f5e94e519ce..9955e931112 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -118,75 +118,76 @@
- - - - - - - - - - -
- - - - - - - - - - -
-
-
- - - - - - - - - - - -
- - - - - - - - - - - -
-
-
- - - - - - - -
- - - - - - - - -
-
+ + + + + + + + + + +
+ + + + + + + + + + +
+
+
+ + + + + + + + + + +
+ + + + + + + + + + + +
+
+
+ + + + + + + + +
+ + + + + + + + +
+
+
From 33de7c58320735d0ee79428188fe5ccd61fb7373 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Tue, 25 Sep 2012 09:47:20 +0200 Subject: [PATCH 069/841] [FIX]bug getname when brand deleted bzr revid: dle@openerp.com-20120925074720-fosudvzez8lanhul --- addons/fleet/fleet.py | 8 +++++--- addons/fleet/fleet_view.xml | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index c17fc0a1fcd..d4c6607d2e1 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -18,7 +18,7 @@ class fleet_vehicle_model(osv.Model): res = [] for record in reads: name = record.modelname - if record.brand: + if record.brand.name: name = record.brand.name+' / '+name res.append((record.id, name)) return res @@ -64,8 +64,10 @@ class fleet_vehicle(osv.Model): for record in reads: if record.registration: name = record.registration - if record.model_id: - name = record.model_id.brand.name+' / '+record.model_id.modelname + ' / ' + name + if record.model_id.modelname: + name = record.model_id.modelname + ' / ' + name + if record.model_id.brand.name: + name = record.model_id.brand.name+' / '+ name res.append((record.id, name)) return res diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 9955e931112..0ee708ca38e 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -29,8 +29,8 @@ fleet.vehicle.model - + From 3fdd614cc8256c623f35ef57d5aaeaf270d68a43 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Tue, 25 Sep 2012 10:35:00 +0200 Subject: [PATCH 070/841] [UPDATE]changes create_date fields in log by creation_date to remove a warning - create_date is a reserved fields bzr revid: csn@openerp.com-20120925083500-lihupfbu5y9ycq7b --- addons/fleet/demo.xml | 4 ++-- addons/fleet/fleet.py | 17 +++++++++++++---- addons/fleet/fleet_view.xml | 26 +++++++++++++------------- 3 files changed, 28 insertions(+), 19 deletions(-) diff --git a/addons/fleet/demo.xml b/addons/fleet/demo.xml index 2e8f3f02b48..e7377705447 100644 --- a/addons/fleet/demo.xml +++ b/addons/fleet/demo.xml @@ -57,7 +57,7 @@ - + Services 500.0 @@ -66,7 +66,7 @@ - + Fuel 40.0 1.45 diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index d4c6607d2e1..9826b08e792 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -131,16 +131,18 @@ class fleet_vehicle_log(osv.Model): _name = 'fleet.vehicle.log' _columns = { + 'name' : fields.char('Log',size=32), 'employee_id' : fields.many2one('hr.employee', 'Employee', required=True), 'vehicle_id' : fields.many2one('fleet.vehicle', 'Vehicle', required=True), - 'create_date' : fields.date('Creation Date'), + 'date_creation' : fields.date('Creation Date'), 'description' : fields.text('Description'), 'type' : fields.char('Type',size=32), } _defaults = { + 'name' : 'Log', 'type' : 'Log', } @@ -178,7 +180,10 @@ class fleet_vehicle_log_fuel(osv.Model): 'amount': fields.function(_get_price, type='float', multi='fuel', string='Total Price'), 'inv_ref' : fields.char('Invoice Ref.', size=32), } - _defaults = {'type': 'Refueling',} + _defaults = { + 'name': 'Fuel log', + 'type': 'Refueling', + } class fleet_insurance_type(osv.Model): _name = 'fleet.insurance.type' @@ -197,7 +202,9 @@ class fleet_vehicle_log_insurance(osv.Model): 'insurer_id' :fields.many2one('res.partner', 'Insurer', domain="[('supplier','=',True)]"), 'description' : fields.text('Description'), } - _defaults = {'type': 'Insurance',} + _defaults = { + 'name': 'Insurance log', + 'type': 'Insurance',} class service_type(osv.Model): _name = 'fleet.service.type' @@ -215,7 +222,9 @@ class fleet_vehicle_log_services(osv.Model): 'reference' :fields.char('Reference',size=128), 'service_ids' :fields.many2many('fleet.service.type','vehicle_service_type_rel','vehicle_service_type_id','service_id','Services completed'), } - _defaults = {'type': 'Services'} + _defaults = { + 'name': 'Service log', + 'type': 'Services'} class hr_employee(osv.Model): _inherit = 'hr.employee' diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 0ee708ca38e..0ded1d69d71 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -109,7 +109,7 @@ - + @@ -127,12 +127,12 @@ - +
- + @@ -151,12 +151,12 @@ - + - + @@ -174,13 +174,13 @@ - + - + @@ -245,7 +245,7 @@ - + @@ -263,7 +263,7 @@ - + @@ -288,7 +288,7 @@ - + @@ -307,7 +307,7 @@ fleet.vehicle.log.fuel - + @@ -334,7 +334,7 @@ - + @@ -353,7 +353,7 @@ fleet.vehicle.log.services - + From 10cd8374b83b445124de5a70becf2a95d4c10a82 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Tue, 25 Sep 2012 10:40:05 +0200 Subject: [PATCH 071/841] [FIX]Fuel price computation bzr revid: dle@openerp.com-20120925084005-b037jpy4xg6d0ev6 --- addons/fleet/fleet.py | 50 +++++++++++++++++++++++++------------ addons/fleet/fleet_view.xml | 18 ++++++++----- 2 files changed, 46 insertions(+), 22 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 9826b08e792..3ed8c426581 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -151,33 +151,51 @@ class fleet_vehicle_log_fuel(osv.Model): _inherit = ['fleet.vehicle.log','mail.thread'] + def on_change_liter(self, cr, uid, ids, liter, price_per_liter, amount, context=None): - def _get_price(self, cr, uid, ids, fields, args, context=None): - result = {} - for record in self.browse(cr, uid, ids, context=None): - res = record.liter * record.price_per_liter - result[record.id] = { - 'amount' : res, - } - return result + print 'Debug :' + str(liter) + ' | ' + str(price_per_liter) + ' | ' + str(amount) - def on_change_fuel(self, cr, uid, ids, liter, price_per_liter, context=None): + if liter > 0 and price_per_liter > 0: + return {'value' : {'liter': liter,'price_per_liter': price_per_liter, 'amount' : liter * price_per_liter,}} + elif liter > 0 and amount > 0: + return {'value' : {'liter' : liter, 'amount' : amount, 'price_per_liter' : float(amount / liter),}} + elif price_per_liter > 0 and amount > 0: + return {'value' : {'price_per_liter' : price_per_liter, 'amount' : amount, 'liter' : float(amount / price_per_liter),}} + else : + return {} - print 'Amount : ' + str(liter * price_per_liter) + def on_change_price_per_liter(self, cr, uid, ids, liter, price_per_liter, amount, context=None): - return { - 'value' : { - 'amount' : liter * price_per_liter, - } - } + print 'Debug :' + str(liter) + ' | ' + str(price_per_liter) + ' | ' + str(amount) + if price_per_liter > 0 and liter > 0: + return {'value' : {'liter' : liter, 'price_per_liter' : price_per_liter, 'amount' : liter * price_per_liter,}} + elif price_per_liter > 0 and amount > 0: + return {'value' : {'price_per_liter' : price_per_liter, 'amount' : amount, 'liter' : float(amount / price_per_liter),}} + elif liter > 0 and amount > 0: + return {'value' : {'liter' : liter, 'amount' : amount, 'price_per_liter' : float(amount / liter),}} + else : + return {} + + def on_change_amount(self, cr, uid, ids, liter, price_per_liter, amount, context=None): + + print 'Debug :' + str(liter) + ' | ' + str(price_per_liter) + ' | ' + str(amount) + + if amount > 0 and liter > 0: + return {'value' : {'liter' : liter, 'amount' : amount, 'price_per_liter' : float(amount / liter),}} + elif amount > 0 and price_per_liter > 0: + return {'value' : {'price_per_liter' : price_per_liter, 'amount' : amount, 'liter' : float(amount / price_per_liter),}} + elif liter > 0 and price_per_liter > 0: + return {'value' : {'liter' : liter, 'price_per_liter' : price_per_liter, 'amount' : liter * price_per_liter,}} + else : + return {} _name = 'fleet.vehicle.log.fuel' _columns = { 'liter' : fields.float('Liter'), 'price_per_liter' : fields.float('Price per liter'), - 'amount': fields.function(_get_price, type='float', multi='fuel', string='Total Price'), + 'amount': fields.float('Total price'), 'inv_ref' : fields.char('Invoice Ref.', size=32), } _defaults = { diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 0ded1d69d71..0164037a6e0 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -155,14 +155,20 @@ + + + + + + + + + + + + - - - - - - From 9d2dfd6d2e75954d4e4ffe0c3ac2e8ae1bea3d61 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Tue, 25 Sep 2012 11:20:22 +0200 Subject: [PATCH 072/841] [FIX]Fuel price computation bugs, missing float casts bzr revid: dle@openerp.com-20120925092022-vpwh5likl1ul37qm --- addons/fleet/fleet.py | 28 +++++++++++++--------------- addons/fleet/fleet_view.xml | 2 ++ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 3ed8c426581..087efc67002 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -153,40 +153,37 @@ class fleet_vehicle_log_fuel(osv.Model): def on_change_liter(self, cr, uid, ids, liter, price_per_liter, amount, context=None): - print 'Debug :' + str(liter) + ' | ' + str(price_per_liter) + ' | ' + str(amount) - if liter > 0 and price_per_liter > 0: - return {'value' : {'liter': liter,'price_per_liter': price_per_liter, 'amount' : liter * price_per_liter,}} + return {'value' : {'amount' : float(liter) * float(price_per_liter),}} elif liter > 0 and amount > 0: - return {'value' : {'liter' : liter, 'amount' : amount, 'price_per_liter' : float(amount / liter),}} + return {'value' : {'price_per_liter' : float(amount) / float(liter),}} elif price_per_liter > 0 and amount > 0: - return {'value' : {'price_per_liter' : price_per_liter, 'amount' : amount, 'liter' : float(amount / price_per_liter),}} + return {'value' : {'liter' : float(amount) / float(price_per_liter),}} else : return {} def on_change_price_per_liter(self, cr, uid, ids, liter, price_per_liter, amount, context=None): - print 'Debug :' + str(liter) + ' | ' + str(price_per_liter) + ' | ' + str(amount) - + liter = float(liter); + price_per_liter = float(price_per_liter); if price_per_liter > 0 and liter > 0: - return {'value' : {'liter' : liter, 'price_per_liter' : price_per_liter, 'amount' : liter * price_per_liter,}} + print 'Debug :' + str(liter) + ' | ' + str(price_per_liter) + ' | ' + str(amount) + return {'value' : {'amount' : float(liter) * float(price_per_liter),}} elif price_per_liter > 0 and amount > 0: - return {'value' : {'price_per_liter' : price_per_liter, 'amount' : amount, 'liter' : float(amount / price_per_liter),}} + return {'value' : {'liter' : float(amount) / float(price_per_liter),}} elif liter > 0 and amount > 0: - return {'value' : {'liter' : liter, 'amount' : amount, 'price_per_liter' : float(amount / liter),}} + return {'value' : {'price_per_liter' : float(amount) / float(liter),}} else : return {} def on_change_amount(self, cr, uid, ids, liter, price_per_liter, amount, context=None): - print 'Debug :' + str(liter) + ' | ' + str(price_per_liter) + ' | ' + str(amount) - if amount > 0 and liter > 0: - return {'value' : {'liter' : liter, 'amount' : amount, 'price_per_liter' : float(amount / liter),}} + return {'value' : {'price_per_liter' : float(amount) / float(liter),}} elif amount > 0 and price_per_liter > 0: - return {'value' : {'price_per_liter' : price_per_liter, 'amount' : amount, 'liter' : float(amount / price_per_liter),}} + return {'value' : {'liter' : float(amount) / float(price_per_liter),}} elif liter > 0 and price_per_liter > 0: - return {'value' : {'liter' : liter, 'price_per_liter' : price_per_liter, 'amount' : liter * price_per_liter,}} + return {'value' : {'amount' : float(liter) * float(price_per_liter),}} else : return {} @@ -197,6 +194,7 @@ class fleet_vehicle_log_fuel(osv.Model): 'price_per_liter' : fields.float('Price per liter'), 'amount': fields.float('Total price'), 'inv_ref' : fields.char('Invoice Ref.', size=32), + 'vendor_id' :fields.many2one('res.partner', 'Vendor', domain="[('supplier','=',True)]"), } _defaults = { 'name': 'Fuel log', diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 0164037a6e0..7d0c6f737f7 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -150,6 +150,7 @@ + @@ -165,6 +166,7 @@ + From 81f5b7c64b45d020d82a04d38d571d35e5f97eff Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Tue, 25 Sep 2012 12:40:57 +0200 Subject: [PATCH 073/841] [FIX]Odometer logs bzr revid: dle@openerp.com-20120925104057-ztuns0n60pycg64z --- addons/fleet/fleet.py | 29 +++++++++++++++++++- addons/fleet/fleet_view.xml | 53 +++++++++++++++++++++++++++---------- 2 files changed, 67 insertions(+), 15 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 087efc67002..6bc74d40191 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -88,6 +88,7 @@ class fleet_vehicle(osv.Model): 'log_fuel' : fields.one2many('fleet.vehicle.log.fuel','vehicle_id', 'Fuel Logs'), 'log_services' : fields.one2many('fleet.vehicle.log.services','vehicle_id', 'Services Logs'), 'log_insurances' : fields.one2many('fleet.vehicle.log.insurance','vehicle_id', 'Insurances'), + 'log_odometer' : fields.one2many('fleet.vehicle.log.odometer','vehicle_id', 'Odometer'), 'acquisition_date' : fields.date('Acquisition date', required=False, help='Date when the vehicle has been bought'), 'acquisition_price' : fields.integer('Price', help='Price of the bought vehicle'), 'color' : fields.char('Color',size=32, help='Color of the vehicle'), @@ -195,6 +196,7 @@ class fleet_vehicle_log_fuel(osv.Model): 'amount': fields.float('Total price'), 'inv_ref' : fields.char('Invoice Ref.', size=32), 'vendor_id' :fields.many2one('res.partner', 'Vendor', domain="[('supplier','=',True)]"), + 'log_odometer_id' :fields.many2one('fleet.vehicle.log.odometer', 'Odometer Log'), } _defaults = { 'name': 'Fuel log', @@ -222,7 +224,7 @@ class fleet_vehicle_log_insurance(osv.Model): 'name': 'Insurance log', 'type': 'Insurance',} -class service_type(osv.Model): +class fleet_service_type(osv.Model): _name = 'fleet.service.type' _columns = { 'name': fields.char('Name', required=True, translate=True), @@ -242,6 +244,31 @@ class fleet_vehicle_log_services(osv.Model): 'name': 'Service log', 'type': 'Services'} +class fleet_vehicle_log_services(osv.Model): + _inherit = ['fleet.vehicle.log'] + + _name = 'fleet.vehicle.log.services' + _columns = { + 'vendor_id' :fields.many2one('res.partner', 'Vendor', domain="[('supplier','=',True)]"), + 'amount' :fields.float('Cost', help="Total cost of the service"), + 'reference' :fields.char('Reference',size=128), + 'service_ids' :fields.many2many('fleet.service.type','vehicle_service_type_rel','vehicle_service_type_id','service_id','Services completed'), + } + _defaults = { + 'name': 'Service log', + 'type': 'Services'} + +class fleet_vehicle_log_odometer(osv.Model): + _inherit = ['fleet.vehicle.log'] + + _name = 'fleet.vehicle.log.odometer' + _columns = { + 'value' : fields.float('Value', required=True, help="Meter reading at service, fuel up and others"), + } + _defaults = { + 'name': 'Odometer Log', + 'type': 'Odometer'} + class hr_employee(osv.Model): _inherit = 'hr.employee' diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 7d0c6f737f7..9ea77645379 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -119,6 +119,30 @@
+ + + + + + + + +
+ + + + + + + + + + + + +
+
+
@@ -153,6 +177,7 @@ +
@@ -161,6 +186,7 @@ + @@ -315,13 +341,12 @@ fleet.vehicle.log.fuel - - - - - - - + + + + + + @@ -342,13 +367,13 @@ - - - - - - - + + + + + + + From b7a600f5de1b4b6346e25b6d48d0a46e98179671 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Tue, 25 Sep 2012 13:47:14 +0200 Subject: [PATCH 074/841] [ADD]Openchatter posts bzr revid: dle@openerp.com-20120925114714-z9yghyym20xcmhah --- addons/fleet/fleet.py | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 6bc74d40191..e6dd18cbd29 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -48,12 +48,6 @@ class fleet_vehicle(osv.Model): _inherit = 'mail.thread' - def create_send_note(self, cr, uid, ids, context=None): - for id in ids: - message = _("%s has been created.")% (self.case_get_note_msg_prefix(cr, uid, id, context=context)) - self.message_post(cr, uid, [id], body=message, context=context) - return True - def name_get(self, cr, uid, ids, context=None): if context is None: context = {} @@ -127,6 +121,14 @@ class fleet_vehicle(osv.Model): 'message' : "You have selected this %s model" % (model.name,), } } + def create(self, cr, uid, data, context=None): + vehicle_id = super(fleet_vehicle, self).create(cr, uid, data, context=context) + try: + vehicle = self.browse(cr, uid, vehicle_id, context=context) + self.message_post(cr, uid, [vehicle_id], body='Vehicle %s has been added to the fleet!' % (vehicle.name), context=context) + except: + pass # group deleted: do not push a message + return vehicle_id class fleet_vehicle_log(osv.Model): _name = 'fleet.vehicle.log' @@ -244,20 +246,6 @@ class fleet_vehicle_log_services(osv.Model): 'name': 'Service log', 'type': 'Services'} -class fleet_vehicle_log_services(osv.Model): - _inherit = ['fleet.vehicle.log'] - - _name = 'fleet.vehicle.log.services' - _columns = { - 'vendor_id' :fields.many2one('res.partner', 'Vendor', domain="[('supplier','=',True)]"), - 'amount' :fields.float('Cost', help="Total cost of the service"), - 'reference' :fields.char('Reference',size=128), - 'service_ids' :fields.many2many('fleet.service.type','vehicle_service_type_rel','vehicle_service_type_id','service_id','Services completed'), - } - _defaults = { - 'name': 'Service log', - 'type': 'Services'} - class fleet_vehicle_log_odometer(osv.Model): _inherit = ['fleet.vehicle.log'] From 7df4da3c4a0d2279a9f04f6ab236dcfa47c72d8a Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Tue, 25 Sep 2012 14:09:42 +0200 Subject: [PATCH 075/841] [ADD]security access rules for each object bzr revid: csn@openerp.com-20120925120942-rdaiucpwmt4jl8v3 --- addons/fleet/__openerp__.py | 3 ++- addons/fleet/security/ir.model.access.csv | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 addons/fleet/security/ir.model.access.csv diff --git a/addons/fleet/__openerp__.py b/addons/fleet/__openerp__.py index 36294c4086b..bcf63662081 100644 --- a/addons/fleet/__openerp__.py +++ b/addons/fleet/__openerp__.py @@ -15,5 +15,6 @@ 'application' : True, 'data' : [ 'fleet_view.xml', - ] + ], + 'update_xml' : ['security/ir.model.access.csv'], } \ No newline at end of file diff --git a/addons/fleet/security/ir.model.access.csv b/addons/fleet/security/ir.model.access.csv new file mode 100644 index 00000000000..3a1b3808642 --- /dev/null +++ b/addons/fleet/security/ir.model.access.csv @@ -0,0 +1,12 @@ +id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink +fleet_vehicle_model_access_right,fleet_vehicle_model_access_right,model_fleet_vehicle_model,,1,1,1,1 +fleet_vehicle_type_access_right,fleet_vehicle_type_access_right,model_fleet_vehicle_type,,1,1,1,1 +fleet_vehicle_model_brand_access_right,fleet_vehicle_model_brand_access_right,model_fleet_vehicle_model_brand,,1,1,1,1 +fleet_vehicle_access_right,fleet_vehicle_access_right,model_fleet_vehicle,,1,1,1,1 +fleet_vehicle_log_access_right,fleet_vehicle_log_access_right,model_fleet_vehicle_log,,1,1,1,1 +fleet_vehicle_log_fuel_access_right,fleet_vehicle_log_fuel_access_right,model_fleet_vehicle_log_fuel,,1,1,1,1 +fleet_vehicle_log_services_access_right,fleet_vehicle_log_services_access_right,model_fleet_vehicle_log_services,,1,1,1,1 +fleet_vehicle_log_insurance_access_right,fleet_vehicle_log_insurance_access_right,model_fleet_vehicle_log_insurance,,1,1,1,1 +fleet_vehicle_log_odometer_access_right,fleet_vehicle_log_odometer_access_right,model_fleet_vehicle_log_odometer,,1,1,1,1 +fleet_insurance_type_access_right,fleet_insurance_type_access_right,model_fleet_insurance_type,,1,1,1,1 +fleet_service_type_access_right,fleet_service_type_access_right,model_fleet_service_type,,1,1,1,1 \ No newline at end of file From b0cd93db7584f22cd8041d89f74af3e57ecc0611 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Tue, 25 Sep 2012 15:48:39 +0200 Subject: [PATCH 076/841] [ADD]button to show log in vehicle view and change field registration to be required=true bzr revid: csn@openerp.com-20120925134839-gpfbt3betm0f65u3 --- addons/fleet/fleet.py | 19 ++++++++++++++++++- addons/fleet/fleet_view.xml | 3 +++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index e6dd18cbd29..7debd38d25c 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -69,12 +69,29 @@ class fleet_vehicle(osv.Model): res = self.name_get(cr, uid, ids, context=context) return dict(res) + + def action_showLog(self, cr, uid, ids, context=None): + """ This opens log view to view and add new log for this vehicle + @return: + """ + print 'HELLO YOU--------------------------------------------' + res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid ,'fleet','fleet_vehicle_log_act', context) + return res + #res['context'] = { + # 'default_partner_ids': applicant.partner_id and [applicant.partner_id.id] or False, + # 'default_user_id': uid, + # 'default_state': 'open', + # 'default_name': applicant.name, + # 'default_categ_ids': category and [category.id] or False, + #} + #return res + _name = 'fleet.vehicle' _description = 'Fleet Vehicle' _columns = { 'name' : fields.function(_vehicle_name_get_fnc, type="char", string='Name', store=True), - 'registration' : fields.char('Registration', size=32, required=False, help='Registration number of the vehicle (ie: plate number for a car)'), + 'registration' : fields.char('Registration', size=32, required=True, help='Registration number of the vehicle (ie: plate number for a car)'), 'vin_sn' : fields.char('Chassis Number', size=32, required=False, help='Unique number written on the vehicle motor (VIN/SN number)'), 'driver' : fields.many2one('hr.employee', 'Driver',required=False, help='Driver of the vehicle'), 'model_id' : fields.many2one('fleet.vehicle.model', 'Model', required=True, help='Model of the vehicle'), diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 9ea77645379..02910111571 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -72,6 +72,9 @@
+
+
From 87a949c8ba92964f8d3913daf5d8c32231ee3b4a Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Tue, 25 Sep 2012 15:49:41 +0200 Subject: [PATCH 077/841] [ADD]Odometer views + change message_post args + rename log_odometer of fuel log bzr revid: dle@openerp.com-20120925134941-utrgip0vprhgtoxz --- addons/fleet/fleet.py | 12 +++- addons/fleet/fleet_view.xml | 109 +++++++++++++++++++++++++++--------- 2 files changed, 91 insertions(+), 30 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 7debd38d25c..999eeb72a6e 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -142,11 +142,19 @@ class fleet_vehicle(osv.Model): vehicle_id = super(fleet_vehicle, self).create(cr, uid, data, context=context) try: vehicle = self.browse(cr, uid, vehicle_id, context=context) - self.message_post(cr, uid, [vehicle_id], body='Vehicle %s has been added to the fleet!' % (vehicle.name), context=context) + self.message_post(cr, uid, [vehicle_id], body='Vehicle %s has been added to the fleet!' % (vehicle.registration), context=context) except: pass # group deleted: do not push a message return vehicle_id + def write(self, cr, uid, ids, vals, context=None): + vehicle_id = super(fleet_vehicle,self).write(cr, uid, ids, vals, context) + try: + self.message_post(cr, uid, [vehicle_id], body='Vehicle edited', context=context) + except: + pass + return vehicle_id + class fleet_vehicle_log(osv.Model): _name = 'fleet.vehicle.log' @@ -215,7 +223,7 @@ class fleet_vehicle_log_fuel(osv.Model): 'amount': fields.float('Total price'), 'inv_ref' : fields.char('Invoice Ref.', size=32), 'vendor_id' :fields.many2one('res.partner', 'Vendor', domain="[('supplier','=',True)]"), - 'log_odometer_id' :fields.many2one('fleet.vehicle.log.odometer', 'Odometer Log'), + 'log_odometer' :fields.many2one('fleet.vehicle.log.odometer', 'Odometer Log'), } _defaults = { 'name': 'Fuel log', diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 02910111571..3da7fa629ac 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -180,7 +180,7 @@ - + @@ -189,7 +189,7 @@ - + @@ -298,13 +298,11 @@ fleet.vehicle.log - - - - - - - + + + + + @@ -324,13 +322,22 @@ + + + + + + + + + + + + + + + - - - - - - @@ -339,19 +346,18 @@ - - fleet.vehicle.log.fuel.tree - fleet.vehicle.log.fuel - - - - - - - - - - + fleet.vehicle.log.fuel.tree + fleet.vehicle.log.fuel + + + + + + + + + + @@ -363,6 +369,53 @@ + + fleet.vehicle.log.odometer.form + fleet.vehicle.log.odometer + + + + + + + + + + + + + + + + + + + + + + + fleet.vehicle.log.odometer.tree + fleet.vehicle.log.odometer + + + + + + + + + + + + + Vehicle Odometer Logs + fleet.vehicle.log.odometer + form + tree,form + + + + fleet.vehicle.log.services.form fleet.vehicle.log.services From 5cfb4d3a0c4d911846742fc7ddb5363b7a255c0c Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Tue, 25 Sep 2012 16:39:30 +0200 Subject: [PATCH 078/841] [REM]Odometer field for fuel log bzr revid: dle@openerp.com-20120925143930-ezhre39jw27zj7ji --- addons/fleet/fleet.py | 2 +- addons/fleet/fleet_view.xml | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 999eeb72a6e..4224d7ad2c1 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -223,7 +223,7 @@ class fleet_vehicle_log_fuel(osv.Model): 'amount': fields.float('Total price'), 'inv_ref' : fields.char('Invoice Ref.', size=32), 'vendor_id' :fields.many2one('res.partner', 'Vendor', domain="[('supplier','=',True)]"), - 'log_odometer' :fields.many2one('fleet.vehicle.log.odometer', 'Odometer Log'), + } _defaults = { 'name': 'Fuel log', diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 3da7fa629ac..480560735b6 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -180,7 +180,6 @@ -
@@ -189,7 +188,6 @@ - @@ -328,7 +326,6 @@ - @@ -350,11 +347,12 @@ fleet.vehicle.log.fuel - - + + + From be9558576924f572452584cc463efa42912f348a Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Tue, 25 Sep 2012 16:53:39 +0200 Subject: [PATCH 079/841] [ADD]demo example for odometer log bzr revid: dle@openerp.com-20120925145339-ibwkf9kr0ec60ada --- addons/fleet/demo.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/addons/fleet/demo.xml b/addons/fleet/demo.xml index e7377705447..b83d0a49160 100644 --- a/addons/fleet/demo.xml +++ b/addons/fleet/demo.xml @@ -71,6 +71,15 @@ 40.0 1.45 + + + + + + Odometer + 1579.5 + Odometer value when vehicle retrieved from partner + From ab1044c0ff823b792cc9fb764afee41129fa745e Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Tue, 25 Sep 2012 17:14:50 +0200 Subject: [PATCH 080/841] [FIX]fix button in vehicle edition to point to log bzr revid: csn@openerp.com-20120925151450-y898trkc4bkb7b00 --- addons/fleet/fleet.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 999eeb72a6e..8bdb8df4290 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -74,17 +74,22 @@ class fleet_vehicle(osv.Model): """ This opens log view to view and add new log for this vehicle @return: """ - print 'HELLO YOU--------------------------------------------' + #print 'HELLO YOU--------------------------------------------' + #print ids[0] + + #vehicle = self.browse(cr, uid, ids[0], context) + #logids = self.browse(cr,uid,log_ids,context) + #print vehicle + #print vehicle.name + #print vehicle.registration + #print logids + #print logids.type res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid ,'fleet','fleet_vehicle_log_act', context) - return res - #res['context'] = { - # 'default_partner_ids': applicant.partner_id and [applicant.partner_id.id] or False, - # 'default_user_id': uid, - # 'default_state': 'open', - # 'default_name': applicant.name, - # 'default_categ_ids': category and [category.id] or False, - #} #return res + #res['context'] = { + # 'default_type': 'log', + #} + return res _name = 'fleet.vehicle' _description = 'Fleet Vehicle' From b766b84e1fc9c5b0a8565211234b21c08732a0d7 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Wed, 26 Sep 2012 09:49:15 +0200 Subject: [PATCH 081/841] [ADD]Odometer logs in fuel and services log bzr revid: dle@openerp.com-20120926074915-v0y98pr167p3hew1 --- addons/fleet/fleet.py | 7 +++++-- addons/fleet/fleet_view.xml | 6 ++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 4224d7ad2c1..02ff58b06f3 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -222,8 +222,8 @@ class fleet_vehicle_log_fuel(osv.Model): 'price_per_liter' : fields.float('Price per liter'), 'amount': fields.float('Total price'), 'inv_ref' : fields.char('Invoice Ref.', size=32), - 'vendor_id' :fields.many2one('res.partner', 'Vendor', domain="[('supplier','=',True)]"), - + 'vendor_id' : fields.many2one('res.partner', 'Vendor', domain="[('supplier','=',True)]"), + 'odometer_log' : fields.one2many('fleet.vehicle.log.odometer','fuel_log', 'Odometer',type="char"), } _defaults = { 'name': 'Fuel log', @@ -266,6 +266,7 @@ class fleet_vehicle_log_services(osv.Model): 'amount' :fields.float('Cost', help="Total cost of the service"), 'reference' :fields.char('Reference',size=128), 'service_ids' :fields.many2many('fleet.service.type','vehicle_service_type_rel','vehicle_service_type_id','service_id','Services completed'), + 'odometer_log' : fields.one2many('fleet.vehicle.log.odometer','fuel_log', 'Odometer',type="char"), } _defaults = { 'name': 'Service log', @@ -277,6 +278,8 @@ class fleet_vehicle_log_odometer(osv.Model): _name = 'fleet.vehicle.log.odometer' _columns = { 'value' : fields.float('Value', required=True, help="Meter reading at service, fuel up and others"), + 'fuel_log' :fields.many2one('fleet.vehicle.log.fuel', 'Fuel log'), + 'service_log' :fields.many2one('fleet.vehicle.log.services', 'Services log'), } _defaults = { 'name': 'Odometer Log', diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 480560735b6..e8cd4532020 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -165,6 +165,7 @@ +
@@ -198,6 +199,7 @@
+
@@ -336,6 +338,7 @@
+
@@ -354,6 +357,7 @@ +
@@ -428,6 +432,7 @@ + @@ -446,6 +451,7 @@ +
From 91c4c5cee35a25d89476c4bf3c0227b7e930ed80 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Wed, 26 Sep 2012 10:07:10 +0200 Subject: [PATCH 082/841] [FIX]Fuel log demo amount value missing & odometer_log view fields remove widget bzr revid: dle@openerp.com-20120926080710-zx5815d0dhwodtwz --- addons/fleet/demo.xml | 1 + addons/fleet/fleet_view.xml | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/addons/fleet/demo.xml b/addons/fleet/demo.xml index b83d0a49160..123b85f847a 100644 --- a/addons/fleet/demo.xml +++ b/addons/fleet/demo.xml @@ -70,6 +70,7 @@ Fuel 40.0 1.45 + 58 diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index e8cd4532020..13e8e112fc4 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -165,7 +165,7 @@ - + @@ -199,7 +199,7 @@ - + @@ -338,7 +338,7 @@ - + @@ -357,7 +357,7 @@ - + @@ -432,7 +432,7 @@ - + @@ -451,7 +451,7 @@ - + From 25690457a54206f6ab0aeeda184794808fa87bff Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Wed, 26 Sep 2012 10:36:49 +0200 Subject: [PATCH 083/841] [ADD]odometer log views in fields of fuel log, service log, and vehicle views bzr revid: dle@openerp.com-20120926083649-1yd3wmxp5eop1vy4 --- addons/fleet/fleet_view.xml | 94 ++++++++++++++++++++++++++++++++----- 1 file changed, 83 insertions(+), 11 deletions(-) diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 13e8e112fc4..bba87629940 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -165,7 +165,25 @@ - + + + + + + +
+ + + + + + + + + + +
+
@@ -199,7 +217,25 @@ - + + + + + + +
+ + + + + + + + + + +
+
@@ -338,7 +374,25 @@ - + + + + + + +
+ + + + + + + + + + +
+
@@ -432,7 +486,25 @@ - + + + + + + +
+ + + + + + + + + + +
+
@@ -445,13 +517,13 @@ fleet.vehicle.log.services - - - - - - - + + + + + + + From fa2c2af8b48c7722d8c861c8a1d3888ba0cbeca7 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Wed, 26 Sep 2012 11:28:58 +0200 Subject: [PATCH 084/841] [ADD]Message post when registration or driver changed for a vehicle bzr revid: dle@openerp.com-20120926092858-k10gxe8kqfekku5s --- addons/fleet/fleet.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 32bd7d56573..fbdcad60f7f 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -1,3 +1,4 @@ +from itertools import chain from osv import osv, fields class fleet_vehicle_model_type(osv.Model): @@ -155,8 +156,15 @@ class fleet_vehicle(osv.Model): def write(self, cr, uid, ids, vals, context=None): vehicle_id = super(fleet_vehicle,self).write(cr, uid, ids, vals, context) try: - self.message_post(cr, uid, [vehicle_id], body='Vehicle edited', context=context) - except: + changes = {} + for key,value in vals.items(): + if key == 'registration' or key == 'driver': + changes[key] = value + if len(changes) > 0: + self.message_post(cr, uid, [vehicle_id], body='Vehicle edited. Changes : '+ str(changes), context=context) + #self.message_post(cr, uid, [vehicle_id], body='Vehicle edited. Changes : '+ ','.join(chain(*str(changes.items()))), context=context) + except Exception as e: + print e pass return vehicle_id From 6002e6abd0ed0ce7940e5397261a54bf81d4fb37 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Wed, 26 Sep 2012 11:34:38 +0200 Subject: [PATCH 085/841] [ADD]add function to compute name of different logs bzr revid: csn@openerp.com-20120926093438-u4n824s5ckfaqxdp --- addons/fleet/fleet.py | 31 +++++++++++++++++++++++++------ addons/fleet/fleet_view.xml | 2 +- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index fbdcad60f7f..bfc67be7beb 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -171,8 +171,27 @@ class fleet_vehicle(osv.Model): class fleet_vehicle_log(osv.Model): _name = 'fleet.vehicle.log' + def _name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None): + if context is None: + context = {} + if not ids: + return {} + reads = self.browse(cr, uid, ids, context=context) + res = [] + for record in reads: + name = record.type + if record.employee_id.name: + name = name+ ' / '+ record.employee_id.name + if record.vehicle_id.name: + name = name+ ' / '+ record.vehicle_id.name + if record.date_creation: + name = name+ ' / '+record.date_creation + res.append((record.id, name)) + + return dict(res) + _columns = { - 'name' : fields.char('Log',size=32), + 'name' : fields.function(_name_get_fnc, type="text", string='Log', store=True), 'employee_id' : fields.many2one('hr.employee', 'Employee', required=True), 'vehicle_id' : fields.many2one('fleet.vehicle', 'Vehicle', required=True), @@ -183,7 +202,7 @@ class fleet_vehicle_log(osv.Model): } _defaults = { - 'name' : 'Log', + #'name' : 'Log', 'type' : 'Log', } @@ -239,7 +258,7 @@ class fleet_vehicle_log_fuel(osv.Model): 'odometer_log' : fields.one2many('fleet.vehicle.log.odometer','fuel_log', 'Odometer',type="char"), } _defaults = { - 'name': 'Fuel log', + # 'name': 'Fuel log', 'type': 'Refueling', } @@ -261,7 +280,7 @@ class fleet_vehicle_log_insurance(osv.Model): 'description' : fields.text('Description'), } _defaults = { - 'name': 'Insurance log', + #'name': 'Insurance log', 'type': 'Insurance',} class fleet_service_type(osv.Model): @@ -282,7 +301,7 @@ class fleet_vehicle_log_services(osv.Model): 'odometer_log' : fields.one2many('fleet.vehicle.log.odometer','fuel_log', 'Odometer',type="char"), } _defaults = { - 'name': 'Service log', + # 'name': 'Service log', 'type': 'Services'} class fleet_vehicle_log_odometer(osv.Model): @@ -295,7 +314,7 @@ class fleet_vehicle_log_odometer(osv.Model): 'service_log' :fields.many2one('fleet.vehicle.log.services', 'Services log'), } _defaults = { - 'name': 'Odometer Log', + # 'name': 'Odometer Log', 'type': 'Odometer'} class hr_employee(osv.Model): diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index bba87629940..41eaa22254f 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -73,7 +73,7 @@
-
From 18833a0397e13dfabd92ac0cd43972aa8422656a Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Wed, 26 Sep 2012 14:35:12 +0200 Subject: [PATCH 086/841] [ADD]description and other fields in the manifest __openerp__.py, need to change picture with one of a car bzr revid: csn@openerp.com-20120926123512-9rwkpr0zo8qwb83g --- addons/fleet/__openerp__.py | 26 +++++++++++++++++++------- addons/fleet/fleet.py | 4 ++-- addons/fleet/static/src/img/icon.png | Bin 0 -> 20448 bytes 3 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 addons/fleet/static/src/img/icon.png diff --git a/addons/fleet/__openerp__.py b/addons/fleet/__openerp__.py index bcf63662081..ff903419efc 100644 --- a/addons/fleet/__openerp__.py +++ b/addons/fleet/__openerp__.py @@ -2,19 +2,31 @@ { 'name' : 'Fleet Management', 'version' : '0.1', + 'author' : 'OpenERP S.A.', + 'category': 'Fleet Management', + 'website' : 'http://www.openerp.com', + 'summary' : 'Manage your fleet of vehicle', + 'description' : """ +Easy way to manage your fleet +=============================== + +With this easy to use module, you can in a few clicks manage your entire vehicle fleet. + +Managing a single vehicle or thousands of them has never been easier. + +Encode your vehicle, group them with tags, view the ones that interest you with the search function. + +Add insurance and services reminder that will help you by sending you a mail when you need to renew the insurance of a vehicle or do the next maintenance. +""", 'depends' : [ 'base', 'hr', ], - 'demo': ['demo.xml'], - 'author' : 'OpenERP S.A.', - 'description' : """ - I'm a good module and I will handle the cars of your company ! - """, - 'installable' : True, - 'application' : True, 'data' : [ 'fleet_view.xml', ], 'update_xml' : ['security/ir.model.access.csv'], + 'demo': ['demo.xml'], + 'installable' : True, + 'application' : True, } \ No newline at end of file diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index bfc67be7beb..6da7e6d68ae 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -34,7 +34,7 @@ class fleet_vehicle_model(osv.Model): _columns = { 'name' : fields.function(_model_name_get_fnc, type="char", string='Name', store=True), 'modelname' : fields.char('Model name', size=32, required=True), - 'brand' : fields.many2one('fleet.vehicle.model.brand', 'Model brand', required=False, help='Brand of the vehicle'), + 'brand' : fields.many2one('fleet.vehicle.model.brand', 'Model brand', required=True, help='Brand of the vehicle'), 'vendors': fields.many2many('res.partner','fleet_vehicle_model_vendors','model_id', 'partner_id',string='Vendors',required=False), } @@ -192,7 +192,7 @@ class fleet_vehicle_log(osv.Model): _columns = { 'name' : fields.function(_name_get_fnc, type="text", string='Log', store=True), - 'employee_id' : fields.many2one('hr.employee', 'Employee', required=True), + 'employee_id' : fields.many2one('hr.employee', 'Employee'), 'vehicle_id' : fields.many2one('fleet.vehicle', 'Vehicle', required=True), 'date_creation' : fields.date('Creation Date'), diff --git a/addons/fleet/static/src/img/icon.png b/addons/fleet/static/src/img/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..8600d565da54d27a7e01690aca37113b6203d2a1 GIT binary patch literal 20448 zcmV)5K*_&}P)4Tx0C)j~RNrgUP!#^!Wu36$i#lf!2|j3%Ze&w*L!7p2SGvtw>Nd9_NSmf@ zT$;ut?S8Na*^6&F#dq-sKKTa>*@JI;k`2ZbVfd_wB24xov!0tYO(#d#()tZ$I5%3%!zLYh@BH>w}XODA7?mkV}ap}jU$$3 zG&Mk)3Bm`(LOM&hKscCb;PVaG&Vdx+MpZJHTQ(R_;DA31$+jOGBoLXk_De?ey1m!ik&_4G zH9n^))_*|$z4!HUisgBd@awc5jn(v9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?TcTag36O$k}-I1K~pfXe}YXe>7ZGHTilG?IMW?2eLg2<@u`+ z?lOv-r b^}7ET(hk%2fpqe100000NkvXXu0mjfr$i~8 literal 0 HcmV?d00001 From f7372cc5eab3161b36dfcd2a4002578b6ad648f1 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Wed, 26 Sep 2012 15:09:01 +0200 Subject: [PATCH 087/841] [ADD]Logo of brand bzr revid: dle@openerp.com-20120926130901-xri7y3dsl76n9o7n --- addons/fleet/demo.xml | 1 + addons/fleet/fleet.py | 4 ++++ addons/fleet/fleet_view.xml | 9 +++++++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/addons/fleet/demo.xml b/addons/fleet/demo.xml index 123b85f847a..50604d76624 100644 --- a/addons/fleet/demo.xml +++ b/addons/fleet/demo.xml @@ -4,6 +4,7 @@ Opel + diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 6da7e6d68ae..17abf800cbd 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -36,6 +36,7 @@ class fleet_vehicle_model(osv.Model): 'modelname' : fields.char('Model name', size=32, required=True), 'brand' : fields.many2one('fleet.vehicle.model.brand', 'Model brand', required=True, help='Brand of the vehicle'), 'vendors': fields.many2many('res.partner','fleet_vehicle_model_vendors','model_id', 'partner_id',string='Vendors',required=False), + 'image': fields.related('brand','image',type="binary",string="Logo",store=False) } class fleet_vehicle_model_brand(osv.Model): @@ -43,6 +44,7 @@ class fleet_vehicle_model_brand(osv.Model): _description = 'Brand model of the vehicle' _columns = { 'name' : fields.char('Brand Name',size=32, required=True), + 'image': fields.binary("Logo",help="This field holds the image used as logo for the brand, limited to 128x128px."), } class fleet_vehicle(osv.Model): @@ -119,6 +121,8 @@ class fleet_vehicle(osv.Model): 'horsepower_tax': fields.float('Horsepower Taxation'), 'power' : fields.integer('Power (kW)',required=False,help='Power in kW of the vehicle'), 'co2' : fields.float('CO2 Emissions',required=False,help='CO2 emissions of the vehicle'), + + 'image': fields.related('model_id','image',type="binary",string="Logo",store=False) } def on_change_model(self, cr, uid, ids, model_id, context=None): diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 41eaa22254f..92d557ea69c 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -7,6 +7,7 @@ + @@ -49,6 +50,7 @@ + @@ -75,11 +77,14 @@
+ + + + + - - From 971f1a66ce4305b95829b50b3946088cde1037a1 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Wed, 26 Sep 2012 16:13:52 +0200 Subject: [PATCH 088/841] [IMP]Deleting generic logs and inherits from odometer part 1 bzr revid: dle@openerp.com-20120926141352-nfsrwmibms0xg0dg --- addons/fleet/demo.xml | 19 +------- addons/fleet/fleet.py | 31 ++++++++++--- addons/fleet/fleet_view.xml | 87 ++++++++++++++----------------------- 3 files changed, 58 insertions(+), 79 deletions(-) diff --git a/addons/fleet/demo.xml b/addons/fleet/demo.xml index 50604d76624..fa81e8f26c1 100644 --- a/addons/fleet/demo.xml +++ b/addons/fleet/demo.xml @@ -64,24 +64,9 @@ - - - - - Fuel - 40.0 - 1.45 - 58 - + + - - - - - Odometer - 1579.5 - Odometer value when vehicle retrieved from partner - diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 17abf800cbd..192160e1c38 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -1,5 +1,7 @@ from itertools import chain from osv import osv, fields +import time + class fleet_vehicle_model_type(osv.Model): _name = 'fleet.vehicle.type' @@ -172,6 +174,23 @@ class fleet_vehicle(osv.Model): pass return vehicle_id +class fleet_vehicle_odometer(osv.Model): + _name='fleet.vehicle.odometer' + _description='Odometer log for a vehicle' + + _columns = { + 'name' : fields.char('Name',size=64), + + 'date' : fields.date('Date'), + 'value' : fields.float('Odometer Value'), + 'unit' : fields.selection([('kilometers', 'Kilometers'),('miles','Miles')], 'Odometer Unit', help='Unit of the measurement',required=False), + 'vehicle_id' : fields.many2one('fleet.vehicle', 'Vehicle', required=True), + 'notes' : fields.text('Notes'), + } + _defaults = { + 'date' : time.strftime('%Y-%m-%d') + } + class fleet_vehicle_log(osv.Model): _name = 'fleet.vehicle.log' @@ -212,8 +231,7 @@ class fleet_vehicle_log(osv.Model): class fleet_vehicle_log_fuel(osv.Model): - - _inherit = ['fleet.vehicle.log','mail.thread'] + _inherits = {'fleet.vehicle.odometer': 'request_id'} def on_change_liter(self, cr, uid, ids, liter, price_per_liter, amount, context=None): @@ -253,18 +271,17 @@ class fleet_vehicle_log_fuel(osv.Model): _name = 'fleet.vehicle.log.fuel' + _columns = { + 'name' : fields.char('Name',size=64), 'liter' : fields.float('Liter'), 'price_per_liter' : fields.float('Price per liter'), 'amount': fields.float('Total price'), + 'purchaser_id' : fields.many2one('res.partner', 'Purchaser'), 'inv_ref' : fields.char('Invoice Ref.', size=32), 'vendor_id' : fields.many2one('res.partner', 'Vendor', domain="[('supplier','=',True)]"), - 'odometer_log' : fields.one2many('fleet.vehicle.log.odometer','fuel_log', 'Odometer',type="char"), + #'odometer_id': fields.many2one('fleet.vehicle.odometer','Odometer', ondelete='cascade', required=False), } - _defaults = { - # 'name': 'Fuel log', - 'type': 'Refueling', - } class fleet_insurance_type(osv.Model): _name = 'fleet.insurance.type' diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 92d557ea69c..962d7309ee7 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -200,47 +200,34 @@ - + - + - - + + - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + @@ -363,41 +350,30 @@
- - + + + + - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - +
@@ -413,10 +389,11 @@ - - + + + + - From 49bae040aa8899e06b14547a668055756f051559 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Wed, 26 Sep 2012 16:56:03 +0200 Subject: [PATCH 089/841] [IMP]Deleting generic logs and inherits from odometer part 2 + Fix demos values bzr revid: dle@openerp.com-20120926145603-m7dkh9mf320i31uj --- addons/fleet/demo.xml | 23 +++++++--- addons/fleet/fleet.py | 39 ++++++++-------- addons/fleet/fleet_view.xml | 91 ++++++++++++------------------------- 3 files changed, 65 insertions(+), 88 deletions(-) diff --git a/addons/fleet/demo.xml b/addons/fleet/demo.xml index fa81e8f26c1..33e2491890c 100644 --- a/addons/fleet/demo.xml +++ b/addons/fleet/demo.xml @@ -1,6 +1,6 @@ - + Opel @@ -56,17 +56,26 @@ - - - Services + + 5 + 500.0 + 4574.2321 - - - + + + + 6 + + 20 + 1.4 + 28 + + 67458 + diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 192160e1c38..3db8c38db30 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -231,7 +231,7 @@ class fleet_vehicle_log(osv.Model): class fleet_vehicle_log_fuel(osv.Model): - _inherits = {'fleet.vehicle.odometer': 'request_id'} + _inherits = {'fleet.vehicle.odometer': 'odometer_id'} def on_change_liter(self, cr, uid, ids, liter, price_per_liter, amount, context=None): @@ -249,7 +249,6 @@ class fleet_vehicle_log_fuel(osv.Model): liter = float(liter); price_per_liter = float(price_per_liter); if price_per_liter > 0 and liter > 0: - print 'Debug :' + str(liter) + ' | ' + str(price_per_liter) + ' | ' + str(amount) return {'value' : {'amount' : float(liter) * float(price_per_liter),}} elif price_per_liter > 0 and amount > 0: return {'value' : {'liter' : float(amount) / float(price_per_liter),}} @@ -274,13 +273,30 @@ class fleet_vehicle_log_fuel(osv.Model): _columns = { 'name' : fields.char('Name',size=64), + 'liter' : fields.float('Liter'), 'price_per_liter' : fields.float('Price per liter'), 'amount': fields.float('Total price'), 'purchaser_id' : fields.many2one('res.partner', 'Purchaser'), - 'inv_ref' : fields.char('Invoice Ref.', size=32), + 'inv_ref' : fields.char('Invoice Reference', size=64), 'vendor_id' : fields.many2one('res.partner', 'Vendor', domain="[('supplier','=',True)]"), - #'odometer_id': fields.many2one('fleet.vehicle.odometer','Odometer', ondelete='cascade', required=False), + } + +class fleet_vehicle_log_services(osv.Model): + + _inherits = {'fleet.vehicle.odometer': 'odometer_id'} + + _name = 'fleet.vehicle.log.services' + _columns = { + + 'name' : fields.char('Name',size=64), + + 'amount' :fields.float('Cost', help="Total cost of the service"), + + 'service_ids' :fields.many2many('fleet.service.type','vehicle_service_type_rel','vehicle_service_type_id','service_id','Services completed'), + 'purchaser_id' : fields.many2one('res.partner', 'Purchaser'), + 'inv_ref' : fields.char('Invoice Reference', size=64), + 'vendor_id' :fields.many2one('res.partner', 'Vendor', domain="[('supplier','=',True)]"), } class fleet_insurance_type(osv.Model): @@ -310,21 +326,6 @@ class fleet_service_type(osv.Model): 'name': fields.char('Name', required=True, translate=True), } -class fleet_vehicle_log_services(osv.Model): - _inherit = ['fleet.vehicle.log'] - - _name = 'fleet.vehicle.log.services' - _columns = { - 'vendor_id' :fields.many2one('res.partner', 'Vendor', domain="[('supplier','=',True)]"), - 'amount' :fields.float('Cost', help="Total cost of the service"), - 'reference' :fields.char('Reference',size=128), - 'service_ids' :fields.many2many('fleet.service.type','vehicle_service_type_rel','vehicle_service_type_id','service_id','Services completed'), - 'odometer_log' : fields.one2many('fleet.vehicle.log.odometer','fuel_log', 'Odometer',type="char"), - } - _defaults = { - # 'name': 'Service log', - 'type': 'Services'} - class fleet_vehicle_log_odometer(osv.Model): _inherit = ['fleet.vehicle.log'] diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 962d7309ee7..885c48a602f 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -154,41 +154,22 @@ - - + - - - + + + +
- - - - - - - - - - - - - - - - - - - - - - - - - + + + + + +
@@ -394,6 +375,7 @@ + @@ -460,33 +442,18 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + +
@@ -499,13 +466,13 @@ fleet.vehicle.log.services - - + - - - + + + + From 39ecef851c9df2e57a6b28eeeff5dcc239df9083 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Wed, 26 Sep 2012 17:11:50 +0200 Subject: [PATCH 090/841] [IMP]Deleting generic logs and inherits from odometer part 3. Final. bzr revid: dle@openerp.com-20120926151150-c8wp3yeduzte6omx --- addons/fleet/fleet.py | 63 ++------------ addons/fleet/fleet_view.xml | 159 ++++-------------------------------- 2 files changed, 23 insertions(+), 199 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 3db8c38db30..c10b7680901 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -191,44 +191,6 @@ class fleet_vehicle_odometer(osv.Model): 'date' : time.strftime('%Y-%m-%d') } -class fleet_vehicle_log(osv.Model): - _name = 'fleet.vehicle.log' - - def _name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None): - if context is None: - context = {} - if not ids: - return {} - reads = self.browse(cr, uid, ids, context=context) - res = [] - for record in reads: - name = record.type - if record.employee_id.name: - name = name+ ' / '+ record.employee_id.name - if record.vehicle_id.name: - name = name+ ' / '+ record.vehicle_id.name - if record.date_creation: - name = name+ ' / '+record.date_creation - res.append((record.id, name)) - - return dict(res) - - _columns = { - 'name' : fields.function(_name_get_fnc, type="text", string='Log', store=True), - 'employee_id' : fields.many2one('hr.employee', 'Employee'), - 'vehicle_id' : fields.many2one('fleet.vehicle', 'Vehicle', required=True), - - 'date_creation' : fields.date('Creation Date'), - - 'description' : fields.text('Description'), - 'type' : fields.char('Type',size=32), - } - - _defaults = { - #'name' : 'Log', - 'type' : 'Log', - } - class fleet_vehicle_log_fuel(osv.Model): _inherits = {'fleet.vehicle.odometer': 'odometer_id'} @@ -292,7 +254,6 @@ class fleet_vehicle_log_services(osv.Model): 'name' : fields.char('Name',size=64), 'amount' :fields.float('Cost', help="Total cost of the service"), - 'service_ids' :fields.many2many('fleet.service.type','vehicle_service_type_rel','vehicle_service_type_id','service_id','Services completed'), 'purchaser_id' : fields.many2one('res.partner', 'Purchaser'), 'inv_ref' : fields.char('Invoice Reference', size=64), @@ -306,19 +267,20 @@ class fleet_insurance_type(osv.Model): } class fleet_vehicle_log_insurance(osv.Model): - _inherit = 'fleet.vehicle.log' + _inherits = {'fleet.vehicle.odometer': 'odometer_id'} + _name = 'fleet.vehicle.log.insurance' _columns = { + + 'name' : fields.char('Name',size=64), + 'insurance_type' : fields.many2one('fleet.insurance.type', 'Type', required=False, help='Type of the insurance'), 'start_date' : fields.date('Start date', required=False, help='Date when the coverage of the insurance begins'), 'expiration_date' : fields.date('Expiration date', required=False, help='Date when the coverage of the insurance expirates'), 'price' : fields.float('Price', help="Cost of the insurance for the specified period"), 'insurer_id' :fields.many2one('res.partner', 'Insurer', domain="[('supplier','=',True)]"), - 'description' : fields.text('Description'), + 'ins_ref' : fields.char('Insurance Reference', size=64), } - _defaults = { - #'name': 'Insurance log', - 'type': 'Insurance',} class fleet_service_type(osv.Model): _name = 'fleet.service.type' @@ -326,19 +288,6 @@ class fleet_service_type(osv.Model): 'name': fields.char('Name', required=True, translate=True), } -class fleet_vehicle_log_odometer(osv.Model): - _inherit = ['fleet.vehicle.log'] - - _name = 'fleet.vehicle.log.odometer' - _columns = { - 'value' : fields.float('Value', required=True, help="Meter reading at service, fuel up and others"), - 'fuel_log' :fields.many2one('fleet.vehicle.log.fuel', 'Fuel log'), - 'service_log' :fields.many2one('fleet.vehicle.log.services', 'Services log'), - } - _defaults = { - # 'name': 'Odometer Log', - 'type': 'Odometer'} - class hr_employee(osv.Model): _inherit = 'hr.employee' diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 885c48a602f..50952f8c57e 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -100,26 +100,34 @@ - + - + +
- + - - - - - - + + + + + + + + + + + + + @@ -127,30 +135,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -214,26 +198,6 @@ - - - - - - - - -
- - - - - - - - -
-
-
@@ -283,48 +247,6 @@ - - fleet.vehicle.log.form - fleet.vehicle.log - -
- - - - - - - - - -
-
-
- - - - fleet.vehicle.log.tree - fleet.vehicle.log - - - - - - - - - - - - - Vehicle Logs - fleet.vehicle.log - form - tree,form - - - - fleet.vehicle.log.fuel.form fleet.vehicle.log.fuel @@ -389,53 +311,6 @@ - - fleet.vehicle.log.odometer.form - fleet.vehicle.log.odometer - -
- - - - - - - - - - - - - - - -
-
-
- - - fleet.vehicle.log.odometer.tree - fleet.vehicle.log.odometer - - - - - - - - - - - - - Vehicle Odometer Logs - fleet.vehicle.log.odometer - form - tree,form - - - - fleet.vehicle.log.services.form fleet.vehicle.log.services From b3a470b0bb81b377681937ae350bd8f9e433fe83 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Wed, 26 Sep 2012 17:18:49 +0200 Subject: [PATCH 091/841] [IMP]Deleting generic logs and inherits from odometer part 4. Removing Access Rights bzr revid: dle@openerp.com-20120926151849-5mjlb5qyxj6j8d5x --- addons/fleet/fleet_view.xml | 2 +- addons/fleet/security/ir.model.access.csv | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 50952f8c57e..30ab6d04b22 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -77,7 +77,7 @@
- + diff --git a/addons/fleet/security/ir.model.access.csv b/addons/fleet/security/ir.model.access.csv index 3a1b3808642..89932e92e15 100644 --- a/addons/fleet/security/ir.model.access.csv +++ b/addons/fleet/security/ir.model.access.csv @@ -3,10 +3,8 @@ fleet_vehicle_model_access_right,fleet_vehicle_model_access_right,model_fleet_ve fleet_vehicle_type_access_right,fleet_vehicle_type_access_right,model_fleet_vehicle_type,,1,1,1,1 fleet_vehicle_model_brand_access_right,fleet_vehicle_model_brand_access_right,model_fleet_vehicle_model_brand,,1,1,1,1 fleet_vehicle_access_right,fleet_vehicle_access_right,model_fleet_vehicle,,1,1,1,1 -fleet_vehicle_log_access_right,fleet_vehicle_log_access_right,model_fleet_vehicle_log,,1,1,1,1 fleet_vehicle_log_fuel_access_right,fleet_vehicle_log_fuel_access_right,model_fleet_vehicle_log_fuel,,1,1,1,1 fleet_vehicle_log_services_access_right,fleet_vehicle_log_services_access_right,model_fleet_vehicle_log_services,,1,1,1,1 fleet_vehicle_log_insurance_access_right,fleet_vehicle_log_insurance_access_right,model_fleet_vehicle_log_insurance,,1,1,1,1 -fleet_vehicle_log_odometer_access_right,fleet_vehicle_log_odometer_access_right,model_fleet_vehicle_log_odometer,,1,1,1,1 fleet_insurance_type_access_right,fleet_insurance_type_access_right,model_fleet_insurance_type,,1,1,1,1 fleet_service_type_access_right,fleet_service_type_access_right,model_fleet_service_type,,1,1,1,1 \ No newline at end of file From c88f379ea06ae2da595a03e593d319d03d584e2a Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Wed, 26 Sep 2012 17:35:21 +0200 Subject: [PATCH 092/841] [ADD]Brand Image value for demo bzr revid: dle@openerp.com-20120926153521-orkwag7fikyxua5u --- addons/fleet/demo.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/fleet/demo.xml b/addons/fleet/demo.xml index 33e2491890c..b4e819f558e 100644 --- a/addons/fleet/demo.xml +++ b/addons/fleet/demo.xml @@ -4,7 +4,7 @@ Opel - + /9j/4AAQSkZJRgABAQEAZABkAAD/4gv4SUNDX1BST0ZJTEUAAQEAAAvoAAAAAAIAAABtbnRyUkdCIFhZWiAH2QADABsAFQAkAB9hY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAA9tYAAQAAAADTLQAAAAAp+D3er/JVrnhC+uTKgzkNAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBkZXNjAAABRAAAAHliWFlaAAABwAAAABRiVFJDAAAB1AAACAxkbWRkAAAJ4AAAAIhnWFlaAAAKaAAAABRnVFJDAAAB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MUVD8E5kb4c6XGJYmaGJIXCSg7GRFUqfcYoryanxM9Wn8KPlK0l+x3c0M3mw733r/eRv8A4mtrzfOkSF4/9IV/mZPuuv8AeX/Zrn7lme0O9i22fjJzj7/+A/IVZ8OfNdw7ufk7/wC61eseVApSIln4s2fcSXzV/wC+1U/+hLXW6Lqc2lalDrdt9908i+i+6sqiuW8S/L4hh28fOvT/AHWrc0n/AFzr/Dvbjt92iYQOw1byr+B7/SpPv/eV/l6f3v8AaFY0fiHWbb5PM37P7/zf+PVn6MzKyKrEL5B4B44mdR+SgL9ABWncf8fb1A5zZNH4n1m5kRP3Sf7X+z+NcH8TPFV94jP/AAhXh64+XUX8rUr7/nuo5KJ/0zG3c3977v3auePpJE06ZUdlBTkA4BrnPBKquqaoyqAyae20gcr9PSnyomrVnDYfqX2e58QpbWf/AB5aXBFawf7vzb62p5dkaQ/wI7J/uLWFpKr/AGtN8o+bzc8df9KatOf/AFn/AANq1IgEc0Pl7/4Ef90tSWEv+nvN/AibV/H722qsf+r/AOB0R/8As8n/ALJQM6mzxPAssWzB/v8AX2/TFFY9uS0QLHJ96Kgs/9k= From 545e3c98c350a5d1cf43b16ebc0cf959d58abd6e Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Thu, 27 Sep 2012 09:48:17 +0200 Subject: [PATCH 093/841] [ADD]solved conflicts and add working buttons in vehicle view to show log bzr revid: csn@openerp.com-20120927074817-g1t6oxf0dt3d5o1l --- addons/fleet/fleet.py | 12 +++++++----- addons/fleet/fleet_view.xml | 17 +++++++++++++++-- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index c10b7680901..aa2a580eb56 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -75,7 +75,7 @@ class fleet_vehicle(osv.Model): return dict(res) - def action_showLog(self, cr, uid, ids, context=None): + def act_show_log(self, cr, uid, ids, context=None): """ This opens log view to view and add new log for this vehicle @return: """ @@ -89,11 +89,13 @@ class fleet_vehicle(osv.Model): #print vehicle.registration #print logids #print logids.type - res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid ,'fleet','fleet_vehicle_log_act', context) + category = self.pool.get('ir.model.data').get_object(cr, uid, 'fleet', 'fleet_vehicle_form', context) + res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid ,'fleet','act_show_log', context) #return res - #res['context'] = { - # 'default_type': 'log', - #} + res['context'] = { + 'default_vehicle_id': ids[0]#'Corsa',#category and category.id or False, + } + res['domain']=[('vehicle_id','=', ids[0])] return res _name = 'fleet.vehicle' diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 30ab6d04b22..3d7c16048fe 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -74,14 +74,17 @@
-
-
+ + @@ -237,6 +240,16 @@ + + + Vehicles fleet.vehicle From 92c99faf6efbf9c714ac786abc0776c0cef53d64 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Thu, 27 Sep 2012 09:57:26 +0200 Subject: [PATCH 094/841] [ADD]working buttons and removed log tab from vehicle view bzr revid: csn@openerp.com-20120927075726-kdimd6ru0g1fysph --- addons/fleet/fleet.py | 32 ++++++++++++++++---------------- addons/fleet/fleet_view.xml | 20 +++++++++++++++----- 2 files changed, 31 insertions(+), 21 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index aa2a580eb56..6c5f5ab27f8 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -75,29 +75,29 @@ class fleet_vehicle(osv.Model): return dict(res) - def act_show_log(self, cr, uid, ids, context=None): + def act_show_log_services(self, cr, uid, ids, context=None): """ This opens log view to view and add new log for this vehicle - @return: + @return: the service log view """ - #print 'HELLO YOU--------------------------------------------' - #print ids[0] - - #vehicle = self.browse(cr, uid, ids[0], context) - #logids = self.browse(cr,uid,log_ids,context) - #print vehicle - #print vehicle.name - #print vehicle.registration - #print logids - #print logids.type - category = self.pool.get('ir.model.data').get_object(cr, uid, 'fleet', 'fleet_vehicle_form', context) - res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid ,'fleet','act_show_log', context) - #return res + res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid ,'fleet','act_show_log_services', context) res['context'] = { - 'default_vehicle_id': ids[0]#'Corsa',#category and category.id or False, + 'default_vehicle_id': ids[0] } res['domain']=[('vehicle_id','=', ids[0])] return res + def act_show_log_fuel(self, cr, uid, ids, context=None): + """ This opens log view to view and add new log for this vehicle + @return: the service log view + """ + res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid ,'fleet','act_show_log_fuel', context) + res['context'] = { + 'default_vehicle_id': ids[0] + } + res['domain']=[('vehicle_id','=', ids[0])] + return res + + _name = 'fleet.vehicle' _description = 'Fleet Vehicle' diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 3d7c16048fe..893ceff493d 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -76,7 +76,8 @@
-
@@ -137,7 +138,7 @@
- + @@ -242,12 +243,21 @@ + + From 7fbe02004fc1088829a97b5b90a3b966ee5ce0a8 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Thu, 27 Sep 2012 10:00:59 +0200 Subject: [PATCH 095/841] [FIX]vehicle registration>license plate, doors > default : 5, company_id + groups bzr revid: dle@openerp.com-20120927080059-h4409j15qiiq8isi --- addons/fleet/demo.xml | 4 ++-- addons/fleet/fleet.py | 16 +++++++++------- addons/fleet/fleet_view.xml | 5 +++-- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/addons/fleet/demo.xml b/addons/fleet/demo.xml index b4e819f558e..d88cab40bd0 100644 --- a/addons/fleet/demo.xml +++ b/addons/fleet/demo.xml @@ -30,7 +30,7 @@ - 1-ACK-205 + 1-ACK-205 5454541 Black @@ -41,7 +41,7 @@ - 1-SYN-404 + 1-SYN-404 1337 Red diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 6c5f5ab27f8..bff36d6ac45 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -61,8 +61,8 @@ class fleet_vehicle(osv.Model): reads = self.browse(cr, uid, ids, context=context) res = [] for record in reads: - if record.registration: - name = record.registration + if record.license_plate: + name = record.license_plate if record.model_id.modelname: name = record.model_id.modelname + ' / ' + name if record.model_id.brand.name: @@ -74,7 +74,6 @@ class fleet_vehicle(osv.Model): res = self.name_get(cr, uid, ids, context=context) return dict(res) - def act_show_log_services(self, cr, uid, ids, context=None): """ This opens log view to view and add new log for this vehicle @return: the service log view @@ -97,13 +96,13 @@ class fleet_vehicle(osv.Model): res['domain']=[('vehicle_id','=', ids[0])] return res - _name = 'fleet.vehicle' _description = 'Fleet Vehicle' _columns = { 'name' : fields.function(_vehicle_name_get_fnc, type="char", string='Name', store=True), - 'registration' : fields.char('Registration', size=32, required=True, help='Registration number of the vehicle (ie: plate number for a car)'), + 'company_id': fields.many2one('res.company', 'Company'), + 'license_plate' : fields.char('License plate', size=32, required=True, help='License plate number of the vehicle (ie: plate number for a car)'), 'vin_sn' : fields.char('Chassis Number', size=32, required=False, help='Unique number written on the vehicle motor (VIN/SN number)'), 'driver' : fields.many2one('hr.employee', 'Driver',required=False, help='Driver of the vehicle'), 'model_id' : fields.many2one('fleet.vehicle.model', 'Model', required=True, help='Model of the vehicle'), @@ -128,6 +127,9 @@ class fleet_vehicle(osv.Model): 'image': fields.related('model_id','image',type="binary",string="Logo",store=False) } + _defaults = { + 'doors' : 5, + } def on_change_model(self, cr, uid, ids, model_id, context=None): # print "ids: %r" % (ids,) @@ -156,7 +158,7 @@ class fleet_vehicle(osv.Model): vehicle_id = super(fleet_vehicle, self).create(cr, uid, data, context=context) try: vehicle = self.browse(cr, uid, vehicle_id, context=context) - self.message_post(cr, uid, [vehicle_id], body='Vehicle %s has been added to the fleet!' % (vehicle.registration), context=context) + self.message_post(cr, uid, [vehicle_id], body='Vehicle %s has been added to the fleet!' % (vehicle.license_plate), context=context) except: pass # group deleted: do not push a message return vehicle_id @@ -166,7 +168,7 @@ class fleet_vehicle(osv.Model): try: changes = {} for key,value in vals.items(): - if key == 'registration' or key == 'driver': + if key == 'license_plate' or key == 'driver': changes[key] = value if len(changes) > 0: self.message_post(cr, uid, [vehicle_id], body='Vehicle edited. Changes : '+ str(changes), context=context) diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 893ceff493d..8b473dd9051 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -83,7 +83,8 @@ - + + @@ -232,7 +233,7 @@ fleet.vehicle - + From 5f9b6e5702773ed40078eceea1cb3c750791d898 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Thu, 27 Sep 2012 10:09:12 +0200 Subject: [PATCH 096/841] [ADD]Vehicle tags bzr revid: dle@openerp.com-20120927080912-3v0gaakcc9nle89w --- addons/fleet/fleet.py | 10 ++++++++-- addons/fleet/fleet_view.xml | 14 +++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index bff36d6ac45..92fb48067c4 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -9,7 +9,13 @@ class fleet_vehicle_model_type(osv.Model): _columns = { 'name' : fields.char('Name', size=32, required=True), } -#comment to delete#comment to delete + +class fleet_vehicle_tag(osv.Model): + _name = 'fleet.vehicle.tag' + _columns = { + 'name': fields.char('Name', required=True, translate=True), + } + class fleet_vehicle_model(osv.Model): def name_get(self, cr, uid, ids, context=None): @@ -110,13 +116,13 @@ class fleet_vehicle(osv.Model): 'log_fuel' : fields.one2many('fleet.vehicle.log.fuel','vehicle_id', 'Fuel Logs'), 'log_services' : fields.one2many('fleet.vehicle.log.services','vehicle_id', 'Services Logs'), 'log_insurances' : fields.one2many('fleet.vehicle.log.insurance','vehicle_id', 'Insurances'), - 'log_odometer' : fields.one2many('fleet.vehicle.log.odometer','vehicle_id', 'Odometer'), 'acquisition_date' : fields.date('Acquisition date', required=False, help='Date when the vehicle has been bought'), 'acquisition_price' : fields.integer('Price', help='Price of the bought vehicle'), 'color' : fields.char('Color',size=32, help='Color of the vehicle'), 'status' : fields.char('Status',size=32, help='Status of the vehicle (in repair, active, ...)'), 'location' : fields.char('Location',size=32, help='Location of the vehicle (garage, ...)'), 'doors' : fields.integer('Number of doors', help='Number of doors of the vehicle'), + 'tag_ids' :fields.many2many('fleet.vehicle.tag','vehicle_vehicle_tag_rel','vehicle_tag_id','tag_id','Tags'), 'transmission' : fields.selection([('manual', 'Manual'),('automatic','Automatic')], 'Transmission', help='Transmission Used by the vehicle',required=False), 'fuel_type' : fields.selection([('gasoline', 'Gasoline'),('diesel','Diesel'),('electric','Electric'),('hybrid','Hybrid')], 'Fuel Type', help='Fuel Used by the vehicle',required=False), diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 8b473dd9051..bc64161bdb3 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -79,12 +79,16 @@
- - - - - + + + + + + + + + From 3bf35c4651d1b74a58e19f21ca79a82626594ef3 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Thu, 27 Sep 2012 15:24:50 +0200 Subject: [PATCH 097/841] [ADD]States with statusbar. TOCHANGE : useless domain in vehicle view, cause of domain evaluation bug for widget statusbar bzr revid: dle@openerp.com-20120927132450-bmzt6hf3rsny0ewo --- addons/fleet/demo.xml | 27 +++++++++++++++++++++++++++ addons/fleet/fleet.py | 13 ++++++++++--- addons/fleet/fleet_view.xml | 25 +++++++++++++++++++++++-- addons/survey/survey_view.xml | 4 +--- 4 files changed, 61 insertions(+), 8 deletions(-) diff --git a/addons/fleet/demo.xml b/addons/fleet/demo.xml index d88cab40bd0..ddd21708af7 100644 --- a/addons/fleet/demo.xml +++ b/addons/fleet/demo.xml @@ -29,6 +29,31 @@
+ + In shop + 1 + + + + Inactive + 2 + + + + Active + 3 + + + + Out of order + 4 + + + + Sold + 5 + + 1-ACK-205 5454541 @@ -38,6 +63,7 @@ 5 + @@ -49,6 +75,7 @@ 5 + diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 92fb48067c4..0077b4f4634 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -2,7 +2,6 @@ from itertools import chain from osv import osv, fields import time - class fleet_vehicle_model_type(osv.Model): _name = 'fleet.vehicle.type' _description = 'Type of the vehicle' @@ -16,6 +15,14 @@ class fleet_vehicle_tag(osv.Model): 'name': fields.char('Name', required=True, translate=True), } +class fleet_vehicle_state(osv.Model): + _name = 'fleet.vehicle.state' + _columns = { + 'name': fields.char('Name', required=True), + 'sequence': fields.integer('Order',help="Used to order the note stages") + } + _order = 'sequence asc' + class fleet_vehicle_model(osv.Model): def name_get(self, cr, uid, ids, context=None): @@ -100,7 +107,7 @@ class fleet_vehicle(osv.Model): 'default_vehicle_id': ids[0] } res['domain']=[('vehicle_id','=', ids[0])] - return res + return res _name = 'fleet.vehicle' _description = 'Fleet Vehicle' @@ -119,7 +126,7 @@ class fleet_vehicle(osv.Model): 'acquisition_date' : fields.date('Acquisition date', required=False, help='Date when the vehicle has been bought'), 'acquisition_price' : fields.integer('Price', help='Price of the bought vehicle'), 'color' : fields.char('Color',size=32, help='Color of the vehicle'), - 'status' : fields.char('Status',size=32, help='Status of the vehicle (in repair, active, ...)'), + 'state': fields.many2one('fleet.vehicle.state', 'State', help='Current state of the vehicle', domain='[]'), 'location' : fields.char('Location',size=32, help='Location of the vehicle (garage, ...)'), 'doors' : fields.integer('Number of doors', help='Number of doors of the vehicle'), 'tag_ids' :fields.many2many('fleet.vehicle.tag','vehicle_vehicle_tag_rel','vehicle_tag_id','tag_id','Tags'), diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index bc64161bdb3..2d49c2cf659 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -62,19 +62,40 @@ tree,form + + fleet.vehicle.state.tree + fleet.vehicle.state + + + + + + + + + + States of Vehicle + fleet.vehicle.state + form + tree,form + + + fleet.vehicle.form fleet.vehicle
+
+ +
-
@@ -322,7 +324,7 @@
+ + + + @@ -383,8 +404,8 @@ - - + + - + @@ -406,11 +427,11 @@ - - - + + + - + - - @@ -454,6 +457,17 @@ + + + fleet.vehicle.log.contract.tree fleet.vehicle.log.contract @@ -467,7 +481,6 @@ - From 183646f3df0ab079686d91c77beff441cba7ef61 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Mon, 22 Oct 2012 17:27:19 +0200 Subject: [PATCH 207/841] [ADD]wizard for renewing contracts bzr revid: csn@openerp.com-20121022152719-jywhocuqj9sxnv5x --- addons/fleet/__init__.py | 3 ++- addons/fleet/__openerp__.py | 3 ++- addons/fleet/fleet.py | 42 ++++++++++++++++++++++++------------- 3 files changed, 32 insertions(+), 16 deletions(-) diff --git a/addons/fleet/__init__.py b/addons/fleet/__init__.py index a09fca549ce..369c7f372c6 100644 --- a/addons/fleet/__init__.py +++ b/addons/fleet/__init__.py @@ -1,2 +1,3 @@ # import the hr_car code -import fleet \ No newline at end of file +import fleet +import wizard \ No newline at end of file diff --git a/addons/fleet/__openerp__.py b/addons/fleet/__openerp__.py index 3689040bef4..74f1df2e336 100644 --- a/addons/fleet/__openerp__.py +++ b/addons/fleet/__openerp__.py @@ -20,7 +20,8 @@ Vehicle, leasing, insurances, cost 'data' : [ 'fleet_view.xml', 'data.xml', - 'board_fleet_view.xml' + 'board_fleet_view.xml', + 'wizard/renew_contract_view.xml', ], 'update_xml' : ['security/ir.model.access.csv'], diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 59af1d77d79..66e8cfcfe48 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -944,21 +944,35 @@ class fleet_vehicle_log_contract(osv.Model): def act_renew_contract(self,cr,uid,ids,context=None): contracts = self.browse(cr,uid,ids,context=context) - res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid ,'fleet','act_renew_contract', context) + res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid ,'fleet','act_renew_contract_wizard', context) for element in contracts: - print '--------------------------' - print element.vehicle_id.id - print element.cost_type.id - print element.amount - print element.odometer - print element.insurer_id - res['context'] = { - 'default_vehicle_id': element.vehicle_id.id, - 'default_cost_type': element.cost_type.id, - 'default_amount': element.amount, - 'default_odometer': element.odometer, - #'default_insurer_id': element.insurer_id, - } + temp = [] + temp.append(('default_vehicle_id',element.vehicle_id.id)) + temp.append(('default_cost_type',element.cost_type.id)) + temp.append(('default_amount',element.amount)) + temp.append(('default_odometer_id',element.odometer_id.id)) + temp.append(('default_odometer_unit',element.odometer_unit)) + temp.append(('default_insurer_id',element.insurer_id.id)) + cost_temp = [] + for costs in element.cost_ids: + cost_temp.append(costs.id) + temp.append(('default_cost_ids',cost_temp)) + temp.append(('default_date',time.strftime('%Y-%m-%d'))) + temp.append(('default_start_date',element.expiration_date)) + temp.append(('default_purchaser_id',element.purchaser_id.id)) + temp.append(('default_ins_ref',element.ins_ref)) + temp.append(('default_state','open')) + temp.append(('default_notes',element.notes)) + + res['context'] = dict(temp) + #res['context']['default_vehicle_id'] = element.vehicle_id.id + #res['context'] = { + # 'default_vehicle_id': element.vehicle_id.id, + # 'default_cost_type': element.cost_type.id, + # 'default_amount': element.amount, + # 'default_odometer': element.odometer, + # 'default_insurer_id': element.insurer_id.id, + #} #res['domain']=[('vehicle_id','=', ids[0])] return res #return None From a1da4c7fad24dfdc4faceb1f0dcc5d00a5e0d246 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Mon, 22 Oct 2012 17:27:36 +0200 Subject: [PATCH 208/841] [ADD]wizard for renewing contracts bzr revid: csn@openerp.com-20121022152736-fiqiyp2sh1pr3lbw --- addons/fleet/wizard/__init__.py | 1 + addons/fleet/wizard/renew_contract.py | 140 ++++++++++++++++++++ addons/fleet/wizard/renew_contract_view.xml | 70 ++++++++++ 3 files changed, 211 insertions(+) create mode 100644 addons/fleet/wizard/__init__.py create mode 100644 addons/fleet/wizard/renew_contract.py create mode 100644 addons/fleet/wizard/renew_contract_view.xml diff --git a/addons/fleet/wizard/__init__.py b/addons/fleet/wizard/__init__.py new file mode 100644 index 00000000000..bc7dae97d56 --- /dev/null +++ b/addons/fleet/wizard/__init__.py @@ -0,0 +1 @@ +import renew_contract \ No newline at end of file diff --git a/addons/fleet/wizard/renew_contract.py b/addons/fleet/wizard/renew_contract.py new file mode 100644 index 00000000000..04f21227eb3 --- /dev/null +++ b/addons/fleet/wizard/renew_contract.py @@ -0,0 +1,140 @@ +from osv import osv, fields +import datetime + +class renew_contract(osv.TransientModel): + _name = "fleet.vehicle.contract.renew" + _description = "wizard to renew a contract" + + def name_get(self, cr, uid, ids, context=None): + if context is None: + context = {} + if not ids: + return [] + reads = self.browse(cr, uid, ids, context=context) + res = [] + for record in reads: + if record.vehicle_id.name: + name = str(record.vehicle_id.name) + if record.cost_type.name: + name = name+ ' / '+ str(record.cost_type.name) + if record.date: + name = name+ ' / '+ record.date + res.append((record.id, name)) + return res + + def _vehicle_contract_name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None): + res = self.name_get(cr, uid, ids, context=context) + return dict(res) + + def _get_odometer(self, cr, uid, ids, odometer_id, arg, context): + res = dict.fromkeys(ids, False) + for record in self.browse(cr,uid,ids,context=context): + if record.odometer_id: + res[record.id] = record.odometer_id.value + return res + + def _set_odometer(self, cr, uid, id, name, value, args=None, context=None): + if value: + try: + value = float(value) + except ValueError: + #_logger.exception(value+' is not a correct odometer value. Please, fill a float for this field') + raise except_orm(_('Error!'), value+' is not a correct odometer value. Please, fill a float for this field') + + date = self.browse(cr, uid, id, context=context).date + if not(date): + date = time.strftime('%Y-%m-%d') + vehicle_id = self.browse(cr, uid, id, context=context).vehicle_id + data = {'value' : value,'date' : date,'vehicle_id' : vehicle_id.id} + odometer_id = self.pool.get('fleet.vehicle.odometer').create(cr, uid, data, context=context) + self.write(cr, uid, id, {'odometer_id': odometer_id}) + return value + self.write(cr, uid, id, {'odometer_id': ''}) + return False + + def on_change_vehicle(self, cr, uid, ids, vehicle_id, context=None): + + if not vehicle_id: + return {} + + odometer_unit = self.pool.get('fleet.vehicle').browse(cr, uid, vehicle_id, context=context).odometer_unit + + return { + 'value' : { + 'odometer_unit' : odometer_unit, + } + } + + def compute_next_year_date(self, strdate): + oneyear=datetime.timedelta(days=365) + curdate = self.str_to_date(strdate) + nextyear=curdate+oneyear#int(strdate[:4])+1 + return str(nextyear)#+strdate[4:] + + #def on_change_start_date(self, cr, uid, ids, strdate, context=None): + # if (strdate): + + # return {'value' : {'expiration_date' : self.compute_next_year_date(strdate),}} + # else: + # return {} + + def str_to_date(self,strdate): + return datetime.datetime(int(strdate[:4]),int(strdate[5:7]),int(strdate[8:])) + + def get_warning_date(self,cr,uid,ids,prop,unknow_none,context=None): + if context is None: + context={} + if not ids: + return dict([]) + reads = self.browse(cr,uid,ids,context=context) + res=[] + for record in reads: + #if (record.reminder==True): + if (record.expiration_date and record.state=='open'): + today=self.str_to_date(time.strftime('%Y-%m-%d')) + renew_date = self.str_to_date(record.expiration_date) + diff_time=int((renew_date-today).days) + if (diff_time<=0): + res.append((record.id,0)) + else: + res.append((record.id,diff_time)) + else: + res.append((record.id,-1)) + #else: + # res.append((record.id,-1)) + return dict(res) + + _columns = { + 'name' : fields.function(_vehicle_contract_name_get_fnc, type="text", string='Name', store=True), + 'vehicle_id': fields.many2one('fleet.vehicle', 'Vehicle', required=True, help='Vehicle concerned by this fuel log'), + 'cost_type': fields.many2one('fleet.service.type', 'Service type', required=False, help='Service type purchased with this cost'), + 'amount': fields.float('Total Price'), + + 'parent_id': fields.many2one('fleet.vehicle.cost', 'Parent', required=False, help='Parent cost to this current cost'), + 'cost_ids' : fields.one2many('fleet.vehicle.cost', 'parent_id', 'Included Services'), + + 'date' :fields.date('Date',help='Date when the cost has been executed'), + + 'start_date' : fields.date('Contract Start Date', required=False, help='Date when the coverage of the contract begins'), + 'expiration_date' : fields.date('Contract Expiration Date', required=False, help='Date when the coverage of the contract expirates (by default, one year after begin date)'), + 'warning_date' : fields.function(get_warning_date,type='integer',string='Warning Date',store=False), + + 'insurer_id' :fields.many2one('res.partner', 'Supplier', domain="[('supplier','=',True)]"), + 'purchaser_id' : fields.many2one('res.partner', 'Contractor',domain="['|',('customer','=',True),('employee','=',True)]",help='Person to which the contract is signed for'), + 'ins_ref' : fields.char('Contract Reference', size=64), + 'state' : fields.selection([('open', 'In Progress'), ('closed', 'Terminated')], 'Status', readonly=True, help='Choose wheter the contract is still valid or not'), + #'reminder' : fields.boolean('Renewal Reminder', help="Warn the user a few days before the expiration date of this contract"), + 'notes' : fields.text('Terms and Conditions', help='Write here all supplementary informations relative to this contract'), + 'odometer_id' : fields.many2one('fleet.vehicle.odometer', 'Odometer', required=False, help='Odometer measure of the vehicle at the moment of this log'), + 'odometer' : fields.function(_get_odometer,fnct_inv=_set_odometer,type='char',string='Odometer Value',store=False,help='Odometer measure of the vehicle at the moment of this log'), + 'odometer_unit': fields.related('vehicle_id','odometer_unit',type="char",string="Unit",store=False, readonly=True), + #'cost_amount': fields.related('cost_id','amount',type="float",string="Amount",store=True, readonly=True), + } + + + + def renew(self, cr, uid, ids, context=None): + print '-------------------------------' + print 'renew contract' + print '-------------------------------' + return {} \ No newline at end of file diff --git a/addons/fleet/wizard/renew_contract_view.xml b/addons/fleet/wizard/renew_contract_view.xml new file mode 100644 index 00000000000..9113ebb595e --- /dev/null +++ b/addons/fleet/wizard/renew_contract_view.xml @@ -0,0 +1,70 @@ + + + + + fleet.vehicle.contract.wizard.form + fleet.vehicle.contract.renew + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + + + +
+
\ No newline at end of file From ae95cab5332fe3730381329bf31d0baf668cd721 Mon Sep 17 00:00:00 2001 From: Vijaykumar Baladaniya Date: Tue, 23 Oct 2012 10:57:15 +0530 Subject: [PATCH 209/841] [FIX] point_of_sale: Add a context on launch_payment() method. bzr revid: vba@tinyerp.com-20121023052715-78d4sykmrrpzult0 --- addons/point_of_sale/wizard/pos_payment.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/point_of_sale/wizard/pos_payment.py b/addons/point_of_sale/wizard/pos_payment.py index ca9331012b7..6dd02179f30 100644 --- a/addons/point_of_sale/wizard/pos_payment.py +++ b/addons/point_of_sale/wizard/pos_payment.py @@ -85,6 +85,7 @@ class pos_make_payment(osv.osv_memory): 'target': 'new', 'views': False, 'type': 'ir.actions.act_window', + 'context': context, } def print_report(self, cr, uid, ids, context=None): From 507b632e41fff52f9097c3ed2592c5ec46b8b3c9 Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Tue, 23 Oct 2012 11:31:26 +0530 Subject: [PATCH 210/841] [IMP] Improved code the kanban image which cuts from upper side. bzr revid: psa@tinyerp.com-20121023060126-k6m0o0bfk9gnqf2s --- addons/hr/static/src/css/hr.css | 2 +- addons/mail/static/src/css/mail_group.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/hr/static/src/css/hr.css b/addons/hr/static/src/css/hr.css index e0eb8c198a5..f395f9939e5 100644 --- a/addons/hr/static/src/css/hr.css +++ b/addons/hr/static/src/css/hr.css @@ -22,7 +22,7 @@ -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); -o-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); - box-shadow: 0 1px 4px 1px rgba(0, 0, 0, 0.4); + box-shadow: 0 1px 4px 3px rgba(0, 0, 0, 0.4); } .oe_employee_picture { diff --git a/addons/mail/static/src/css/mail_group.css b/addons/mail/static/src/css/mail_group.css index 9ca0055c17f..78467245557 100644 --- a/addons/mail/static/src/css/mail_group.css +++ b/addons/mail/static/src/css/mail_group.css @@ -51,7 +51,7 @@ border-collapse: separate; -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); - box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); + box-shadow: 0 1px 4px 3px rgba(0, 0, 0, 0.4); -o-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); } From 23d286ef524c7993c8416bcea52a1a80b62e5616 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Tue, 23 Oct 2012 09:53:28 +0200 Subject: [PATCH 211/841] [ADD]Generated costs for contracts bzr revid: dle@openerp.com-20121023075328-63q25k9iqigc1izf --- addons/fleet/demo.xml | 5 +++++ addons/fleet/fleet.py | 9 +++++++++ addons/fleet/fleet_view.xml | 40 ++++++++++++++++++++++++++----------- 3 files changed, 42 insertions(+), 12 deletions(-) diff --git a/addons/fleet/demo.xml b/addons/fleet/demo.xml index 7c6e1c5ab0a..1603c2ee654 100644 --- a/addons/fleet/demo.xml +++ b/addons/fleet/demo.xml @@ -732,6 +732,7 @@ 450 + monthly 2012-01-01 @@ -768,6 +769,7 @@ 400 + monthly 2012-01-01 @@ -804,6 +806,7 @@ 400 + monthly 2012-01-01 @@ -840,6 +843,7 @@ 400 + monthly 2012-01-01 @@ -876,6 +880,7 @@ 400 + monthly 2012-01-01 diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 66e8cfcfe48..7fed70f6752 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -48,6 +48,8 @@ class fleet_vehicle_cost(osv.Model): 'cost_ids' : fields.one2many('fleet.vehicle.cost', 'parent_id', 'Included Services'), 'date' :fields.date('Date',help='Date when the cost has been executed'), + + 'contract_id' : fields.many2one('fleet.vehicle.log.contract', 'Contract', required=False, help='Contract attached to this cost'), } _default ={ @@ -60,6 +62,11 @@ class fleet_vehicle_cost(osv.Model): if 'parent_id' in data and data['parent_id']: data['vehicle_id'] = self.browse(cr, uid, data['parent_id'], context=context).vehicle_id.id data['date'] = self.browse(cr, uid, data['parent_id'], context=context).date + if 'contract_id' in data and data['contract_id']: + print str(data) + data['vehicle_id'] = self.pool.get('fleet.vehicle.log.contract').browse(cr, uid, data['contract_id'], context=context).vehicle_id.id + data['cost_type'] = self.pool.get('fleet.vehicle.log.contract').browse(cr, uid, data['contract_id'], context=context).cost_type.id + print 'Contract : '+ str(data['contract_id']) + ' Add generated cost for vehicle ' + str(data['vehicle_id']) + ' with cost type : ' + str(data['cost_type']) cost_id = super(fleet_vehicle_cost, self).create(cr, uid, data, context=context) return cost_id @@ -999,6 +1006,8 @@ class fleet_vehicle_log_contract(osv.Model): 'odometer' : fields.function(_get_odometer,fnct_inv=_set_odometer,type='char',string='Odometer Value',store=False,help='Odometer measure of the vehicle at the moment of this log'), 'odometer_unit': fields.related('vehicle_id','odometer_unit',type="char",string="Unit",store=False, readonly=True), 'cost_amount': fields.related('cost_id','amount',type="float",string="Amount",store=True, readonly=True), + 'cost_frequency': fields.selection([('daily', 'Daily'),('weekly','Weekly'),('monthly','Monthly'),('yearly','Yearly')], 'Cost Frequency', help='Frequency of the costs',required=True), + 'generated_cost_ids' : fields.one2many('fleet.vehicle.cost', 'contract_id', 'Generated Costs',ondelete='cascade'), } _defaults = { 'purchaser_id': lambda self, cr, uid, ctx: uid, diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index e58ed5bb5d5..9b172e9904c 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -419,7 +419,11 @@ - + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -481,6 +499,7 @@ + @@ -719,11 +738,8 @@ - - - From 603a3030591988a6825bb263759756b15d99d5cd Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Tue, 23 Oct 2012 14:54:57 +0530 Subject: [PATCH 212/841] [IMP]bom_lines=False added in duplicating BOM bzr revid: kbh@tinyerp.com-20121023092457-o6d2ubyb7mzslwtp --- addons/mrp/mrp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index 3ae27bf2c41..fb3ad899c88 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -371,7 +371,7 @@ class mrp_bom(osv.osv): if default is None: default = {} bom_data = self.read(cr, uid, id, [], context=context) - default.update(name=_("%s (copy)") % (bom_data['name']), bom_id=False) + default.update(name=_("%s (copy)") % (bom_data['name']), bom_id=False, bom_lines=False) return super(mrp_bom, self).copy_data(cr, uid, id, default, context=context) def create(self, cr, uid, vals, context=None): From c8f0bfc68cdf4b0c6d1d3036e373c6de0b496474 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Tue, 23 Oct 2012 15:57:34 +0530 Subject: [PATCH 213/841] [REM]remove suffix copy from duplicating BOM bzr revid: kbh@tinyerp.com-20121023102734-1d0upye19ps64be1 --- addons/mrp/mrp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index fb3ad899c88..f760087d872 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -371,7 +371,7 @@ class mrp_bom(osv.osv): if default is None: default = {} bom_data = self.read(cr, uid, id, [], context=context) - default.update(name=_("%s (copy)") % (bom_data['name']), bom_id=False, bom_lines=False) + default.update(name=_("%s") % (bom_data['name']), bom_id=False) return super(mrp_bom, self).copy_data(cr, uid, id, default, context=context) def create(self, cr, uid, vals, context=None): From 3bde64f49c3c5d04b92cdf3cb0d0b67da9655149 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Tue, 23 Oct 2012 17:44:07 +0530 Subject: [PATCH 214/841] [IMP]hr_expense:fields are readonly when expense is apporved bzr revid: kbh@tinyerp.com-20121023121407-6qarpm3ppdmgm8cu --- addons/hr_expense/hr_expense.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py index 487e4f58782..ee79e03fa77 100644 --- a/addons/hr_expense/hr_expense.py +++ b/addons/hr_expense/hr_expense.py @@ -64,22 +64,22 @@ class hr_expense_expense(osv.osv): _description = "Expense" _order = "id desc" _columns = { - 'name': fields.char('Description', size=128, required=True), + 'name': fields.char('Description', size=128, required=True, readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}), 'id': fields.integer('Sheet ID', readonly=True), - 'date': fields.date('Date', select=True), + 'date': fields.date('Date', select=True, readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}), 'journal_id': fields.many2one('account.journal', 'Force Journal', help = "The journal used when the expense is done."), - 'employee_id': fields.many2one('hr.employee', "Employee", required=True), + 'employee_id': fields.many2one('hr.employee', "Employee", required=True, readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}), 'user_id': fields.many2one('res.users', 'User', required=True), 'date_confirm': fields.date('Confirmation Date', select=True, help = "Date of the confirmation of the sheet expense. It's filled when the button Confirm is pressed."), 'date_valid': fields.date('Validation Date', select=True, help = "Date of the acceptation of the sheet expense. It's filled when the button Accept is pressed."), - 'user_valid': fields.many2one('res.users', 'Validation User'), + 'user_valid': fields.many2one('res.users', 'Validation User', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}), 'account_move_id': fields.many2one('account.move', 'Ledger Posting'), 'line_ids': fields.one2many('hr.expense.line', 'expense_id', 'Expense Lines', readonly=True, states={'draft':[('readonly',False)]} ), 'note': fields.text('Note'), 'amount': fields.function(_amount, string='Total Amount', digits_compute= dp.get_precision('Account')), 'voucher_id': fields.many2one('account.voucher', "Employee's Receipt"), - 'currency_id': fields.many2one('res.currency', 'Currency', required=True), - 'department_id':fields.many2one('hr.department','Department'), + 'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}), + 'department_id':fields.many2one('hr.department','Department', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}), 'company_id': fields.many2one('res.company', 'Company', required=True), 'state': fields.selection([ ('draft', 'New'), From d4f970ff9ccb21d6e31982e70f8d41f9075b6cbd Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Tue, 23 Oct 2012 18:09:10 +0530 Subject: [PATCH 215/841] [IMP]hr_expense:delete only those expense which are in draft states bzr revid: kbh@tinyerp.com-20121023123910-v1sd0wtgis9cn0w6 --- addons/hr_expense/hr_expense.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py index ee79e03fa77..06852e08e96 100644 --- a/addons/hr_expense/hr_expense.py +++ b/addons/hr_expense/hr_expense.py @@ -100,6 +100,12 @@ class hr_expense_expense(osv.osv): 'currency_id': _get_currency, } + def unlink(self, cr, uid, ids, context=None): + for rec in self.browse(cr, uid, ids, context=context): + if rec.state != 'draft': + raise osv.except_osv(_('Warning!'),_('You cannot delete an expense which is in %s state!')%(rec.state)) + return super(hr_expense_expense, self).unlink(cr, uid, ids, context) + def onchange_currency_id(self, cr, uid, ids, currency_id=False, company_id=False, context=None): res = {'value': {'journal_id': False}} journal_ids = self.pool.get('account.journal').search(cr, uid, [('type','=','purchase'), ('currency','=',currency_id), ('company_id', '=', company_id)], context=context) From 24635aae19b3a1faab455dbbfa8b8cc547013876 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Tue, 23 Oct 2012 15:01:52 +0200 Subject: [PATCH 216/841] [ADD]add renew contract bzr revid: csn@openerp.com-20121023130152-51hd311rn0prj3oq --- addons/fleet/fleet.py | 35 +++++++++++++++++++++-------------- addons/fleet/fleet_view.xml | 8 ++++---- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 7fed70f6752..3cc7d5f6284 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -916,7 +916,8 @@ class fleet_vehicle_log_contract(osv.Model): nextyear=curdate+oneyear#int(strdate[:4])+1 return str(nextyear)#+strdate[4:] - def on_change_start_date(self, cr, uid, ids, strdate, context=None): + def on_change_start_date(self, cr, uid, ids, strdate, enddate, context=None): + if (strdate): return {'value' : {'expiration_date' : self.compute_next_year_date(strdate),}} @@ -951,7 +952,7 @@ class fleet_vehicle_log_contract(osv.Model): def act_renew_contract(self,cr,uid,ids,context=None): contracts = self.browse(cr,uid,ids,context=context) - res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid ,'fleet','act_renew_contract_wizard', context) + res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid ,'fleet','act_renew_contract', context) for element in contracts: temp = [] temp.append(('default_vehicle_id',element.vehicle_id.id)) @@ -965,24 +966,29 @@ class fleet_vehicle_log_contract(osv.Model): cost_temp.append(costs.id) temp.append(('default_cost_ids',cost_temp)) temp.append(('default_date',time.strftime('%Y-%m-%d'))) - temp.append(('default_start_date',element.expiration_date)) + temp.append(('default_start_date',str(self.str_to_date(element.expiration_date)+datetime.timedelta(days=1)))) temp.append(('default_purchaser_id',element.purchaser_id.id)) temp.append(('default_ins_ref',element.ins_ref)) temp.append(('default_state','open')) temp.append(('default_notes',element.notes)) + temp.append(('default_cost_frequency',element.cost_frequency)) + generated_cost = [] + for gen_cost in element.generated_cost_ids: + generated_cost.append(gen_cost.id) + temp.append(('default_generated_cost_ids',generated_cost)) + + #compute end date + startdate = self.str_to_date(element.start_date) + enddate = self.str_to_date(element.expiration_date) + diffdate = (enddate-startdate) + newenddate = enddate+diffdate + temp.append(('default_expiration_date',str(newenddate))) res['context'] = dict(temp) - #res['context']['default_vehicle_id'] = element.vehicle_id.id - #res['context'] = { - # 'default_vehicle_id': element.vehicle_id.id, - # 'default_cost_type': element.cost_type.id, - # 'default_amount': element.amount, - # 'default_odometer': element.odometer, - # 'default_insurer_id': element.insurer_id.id, - #} - #res['domain']=[('vehicle_id','=', ids[0])] + return res - #return None + + _name = 'fleet.vehicle.log.contract' _order='state,expiration_date' @@ -1014,13 +1020,14 @@ class fleet_vehicle_log_contract(osv.Model): 'date' : time.strftime('%Y-%m-%d'), 'start_date' : time.strftime('%Y-%m-%d'), 'state':'open', - #'expiration_date' : self.compute_next_year_date(time.strftime('%Y-%m-%d')), + 'expiration_date' : lambda self,cr,uid,ctx: self.compute_next_year_date(time.strftime('%Y-%m-%d')), } def copy(self, cr, uid, id, default=None, context=None): default = default or {} current_object = self.browse(cr,uid,id,context) + default['date'] = time.strftime('%Y-%m-%d') default['start_date'] = time.strftime('%Y-%m-%d') default['expiration_date'] = self.compute_next_year_date(time.strftime('%Y-%m-%d')) #default['name'] = current_object.name diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 9b172e9904c..6ca53514e1f 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -45,8 +45,8 @@

Click to create a new model.

- Here you can add the different model for a - particular brand of vehicle. Like Audi A3, + Specify the different model for a particular + brand of vehicle. For example Audi A3, Audi A4, ...

@@ -147,7 +147,6 @@

Click to create a new state.

- Here you can create and organize the state for a vehicle. A state can help you knowing in what condition your vehicle is. In reparation, Sold, Active, ...

@@ -258,6 +257,7 @@ +
@@ -436,7 +436,7 @@ - + From ceec3ec123c5303cef2e1b6182eea8d182e8359b Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Tue, 23 Oct 2012 15:46:54 +0200 Subject: [PATCH 217/841] [ADD]Cron for generated costs bzr revid: dle@openerp.com-20121023134654-xbvm5egnc44ro8k8 --- addons/fleet/data.xml | 15 ++++++++++++++- addons/fleet/demo.xml | 6 +++--- addons/fleet/fleet.py | 38 +++++++++++++++++++++++++++++++++++--- 3 files changed, 52 insertions(+), 7 deletions(-) diff --git a/addons/fleet/data.xml b/addons/fleet/data.xml index 07cf8062cde..f6da343abf0 100644 --- a/addons/fleet/data.xml +++ b/addons/fleet/data.xml @@ -2,7 +2,7 @@ - Creation ofVehicle services and Services renewals reminders + Creation of Vehicle services and Services renewals reminders 1 @@ -14,6 +14,19 @@ + + Generation of contracts costs based on the costs frequency + + + 1 + minutes + -1 + + + + + + Calculation Benefit In Kind service diff --git a/addons/fleet/demo.xml b/addons/fleet/demo.xml index 1603c2ee654..f58bc5a9159 100644 --- a/addons/fleet/demo.xml +++ b/addons/fleet/demo.xml @@ -769,7 +769,7 @@ 400 - monthly + weekly 2012-01-01 @@ -806,7 +806,7 @@ 400 - monthly + daily 2012-01-01 @@ -843,7 +843,7 @@ 400 - monthly + yearly 2012-01-01 diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 3cc7d5f6284..7feda666814 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -1,8 +1,9 @@ +# -*- coding: utf-8 -*- from itertools import chain from osv import osv, fields import time -import tools import datetime +import tools from osv.orm import except_orm from tools.translate import _ ############################ @@ -63,10 +64,8 @@ class fleet_vehicle_cost(osv.Model): data['vehicle_id'] = self.browse(cr, uid, data['parent_id'], context=context).vehicle_id.id data['date'] = self.browse(cr, uid, data['parent_id'], context=context).date if 'contract_id' in data and data['contract_id']: - print str(data) data['vehicle_id'] = self.pool.get('fleet.vehicle.log.contract').browse(cr, uid, data['contract_id'], context=context).vehicle_id.id data['cost_type'] = self.pool.get('fleet.vehicle.log.contract').browse(cr, uid, data['contract_id'], context=context).cost_type.id - print 'Contract : '+ str(data['contract_id']) + ' Add generated cost for vehicle ' + str(data['vehicle_id']) + ' with cost type : ' + str(data['cost_type']) cost_id = super(fleet_vehicle_cost, self).create(cr, uid, data, context=context) return cost_id @@ -849,6 +848,39 @@ class fleet_service_type(osv.Model): class fleet_vehicle_log_contract(osv.Model): _inherits = {'fleet.vehicle.cost': 'cost_id'} + + def run_scheduler(self,cr,uid,context=None): + + d = datetime.datetime.now() + #d = datetime.date(2001, 01, 01) + + frequencies = [] + if d.day == 1 and d.month == 1: + frequencies.append(('cost_frequency','=','yearly')) + if d.day == 1: + frequencies.append(('cost_frequency','=','monthly')) + if d.isoweekday() == 1: + frequencies.append(('cost_frequency','=','weekly')) + frequencies.append(('cost_frequency','=','daily')) + + frequencies_size = len(frequencies) + for i in range(frequencies_size-1): + frequencies.insert(0,'|') + + condition = ['&','&','&',('state','=','open',),('start_date','<=',d),('expiration_date','>=',d)] + condition.extend(frequencies) + + print str(condition) + contract_ids = self.pool.get('fleet.vehicle.log.contract').search(cr, uid, condition, offset=0, limit=None, order=None,context=None, count=False) + for contract_id in contract_ids: + + nbr = self.pool.get('fleet.vehicle.cost').search(cr,uid,['&',('contract_id','=',contract_id),('date','=',d)],context=context,count=True) + + if not nbr: + contract = self.pool.get('fleet.vehicle.log.contract').browse(cr,uid,contract_id,context=context) + data = {'amount' : contract.amount,'date' : d,'vehicle_id' : contract.vehicle_id.id,'cost_type' : contract.cost_type.id,'contract_id' : contract_id} + cost_id = self.pool.get('fleet.vehicle.cost').create(cr, uid, data, context=context) + return True def name_get(self, cr, uid, ids, context=None): if context is None: From 5a929ccd14c12970f401e74e79dbb729d488e8e2 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Tue, 23 Oct 2012 15:59:01 +0200 Subject: [PATCH 218/841] [ADD]Distinction in contracts for generated costs and activation costs bzr revid: dle@openerp.com-20121023135901-cpsrbry9uwl84bg2 --- addons/fleet/demo.xml | 15 ++++++++++----- addons/fleet/fleet.py | 6 ++---- addons/fleet/fleet_view.xml | 5 +++-- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/addons/fleet/demo.xml b/addons/fleet/demo.xml index f58bc5a9159..5db21ef9298 100644 --- a/addons/fleet/demo.xml +++ b/addons/fleet/demo.xml @@ -731,7 +731,8 @@ - 450 + 0 + 450 monthly 2012-01-01 @@ -768,7 +769,8 @@ - 400 + 0 + 400 weekly 2012-01-01 @@ -805,7 +807,8 @@ - 400 + 0 + 400 daily 2012-01-01 @@ -842,7 +845,8 @@ - 400 + 0 + 400 yearly 2012-01-01 @@ -879,7 +883,8 @@ - 400 + 0 + 400 monthly 2012-01-01 diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 7feda666814..d2d59adef1e 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -878,7 +878,7 @@ class fleet_vehicle_log_contract(osv.Model): if not nbr: contract = self.pool.get('fleet.vehicle.log.contract').browse(cr,uid,contract_id,context=context) - data = {'amount' : contract.amount,'date' : d,'vehicle_id' : contract.vehicle_id.id,'cost_type' : contract.cost_type.id,'contract_id' : contract_id} + data = {'amount' : contract.cost_generated,'date' : d,'vehicle_id' : contract.vehicle_id.id,'cost_type' : contract.cost_type.id,'contract_id' : contract_id} cost_id = self.pool.get('fleet.vehicle.cost').create(cr, uid, data, context=context) return True @@ -1026,9 +1026,6 @@ class fleet_vehicle_log_contract(osv.Model): _order='state,expiration_date' _columns = { 'name' : fields.function(_vehicle_contract_name_get_fnc, type="text", string='Name', store=True), - #'name' : fields.char('Name',size=64), - - #'cost_type': fields.many2one('fleet.service.type', 'Service type', required=False, help='Service type purchased with this cost', domain="[('category','=','contract')]"), 'start_date' : fields.date('Contract Start Date', required=False, help='Date when the coverage of the contract begins'), 'expiration_date' : fields.date('Contract Expiration Date', required=False, help='Date when the coverage of the contract expirates (by default, one year after begin date)'), @@ -1044,6 +1041,7 @@ class fleet_vehicle_log_contract(osv.Model): 'odometer' : fields.function(_get_odometer,fnct_inv=_set_odometer,type='char',string='Odometer Value',store=False,help='Odometer measure of the vehicle at the moment of this log'), 'odometer_unit': fields.related('vehicle_id','odometer_unit',type="char",string="Unit",store=False, readonly=True), 'cost_amount': fields.related('cost_id','amount',type="float",string="Amount",store=True, readonly=True), + 'cost_generated': fields.float('Generated costs amount'), 'cost_frequency': fields.selection([('daily', 'Daily'),('weekly','Weekly'),('monthly','Monthly'),('yearly','Yearly')], 'Cost Frequency', help='Frequency of the costs',required=True), 'generated_cost_ids' : fields.one2many('fleet.vehicle.cost', 'contract_id', 'Generated Costs',ondelete='cascade'), } diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 6ca53514e1f..11dcf3a6420 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -419,9 +419,10 @@ - From 5663bd8335aa576f4c9a4e11268d5efc6299d96c Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Tue, 23 Oct 2012 16:06:14 +0200 Subject: [PATCH 219/841] [ADD]Different vehicle tree view for dashboard bzr revid: dle@openerp.com-20121023140614-pl4153el0xej3i43 --- addons/fleet/board_fleet_view.xml | 18 +++++++++++++++++- addons/fleet/fleet_view.xml | 1 + 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/addons/fleet/board_fleet_view.xml b/addons/fleet/board_fleet_view.xml index 1f38985c29e..09a670b5d13 100644 --- a/addons/fleet/board_fleet_view.xml +++ b/addons/fleet/board_fleet_view.xml @@ -1,6 +1,22 @@ + + fleet.vehicle.tree.board + fleet.vehicle + + + + + + + + + + + + + Fuel Costs by Month fleet.vehicle.log.fuel @@ -39,7 +55,7 @@ Vehicles which need contracts renewal fleet.vehicle - + form tree ['|',('contract_renewal_due_soon','>',0),('contract_renewal_overdue','>',0)] diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 11dcf3a6420..2f96e34cfd0 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -231,6 +231,7 @@ fleet.vehicle.tree fleet.vehicle + 1 From ba1adaef65362ab45e38be1adc6ff746438fcca6 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Tue, 23 Oct 2012 16:31:08 +0200 Subject: [PATCH 220/841] [ADD]Demo values and optimize date comparaison for generation of contracts costs bzr revid: dle@openerp.com-20121023143108-3gq57w6l0fzmdv01 --- addons/fleet/board_fleet_view.xml | 4 +-- addons/fleet/demo.xml | 50 +++++++++++++++++++++++++++++-- addons/fleet/fleet.py | 6 ++-- 3 files changed, 51 insertions(+), 9 deletions(-) diff --git a/addons/fleet/board_fleet_view.xml b/addons/fleet/board_fleet_view.xml index 09a670b5d13..3ef597733bb 100644 --- a/addons/fleet/board_fleet_view.xml +++ b/addons/fleet/board_fleet_view.xml @@ -28,9 +28,7 @@ Services Costs by Month fleet.vehicle.log.services - - - + form tree diff --git a/addons/fleet/demo.xml b/addons/fleet/demo.xml index 5db21ef9298..359ad8a3b48 100644 --- a/addons/fleet/demo.xml +++ b/addons/fleet/demo.xml @@ -729,6 +729,50 @@ + + + 513 + + 2012-10-15 + + 124 + + Maintenance + + + + + 412 + + 2012-10-08 + + 20984 + + Maintenance + + + + + 275 + + 2012-09-25 + + 241 + + Maintenance + + + + + 302 + + 2012-09-15 + + 22513 + + Maintenance + + 0 @@ -771,7 +815,7 @@ 0 400 - weekly + monthly 2012-01-01 @@ -809,7 +853,7 @@ 0 400 - daily + monthly 2012-01-01 @@ -847,7 +891,7 @@ 0 400 - yearly + monthly 2012-01-01 diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index d2d59adef1e..a85b1dd8ad8 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -851,8 +851,8 @@ class fleet_vehicle_log_contract(osv.Model): def run_scheduler(self,cr,uid,context=None): - d = datetime.datetime.now() - #d = datetime.date(2001, 01, 01) + #d = datetime.datetime.now() + d = datetime.date(2012, 8, 01) frequencies = [] if d.day == 1 and d.month == 1: @@ -867,7 +867,7 @@ class fleet_vehicle_log_contract(osv.Model): for i in range(frequencies_size-1): frequencies.insert(0,'|') - condition = ['&','&','&',('state','=','open',),('start_date','<=',d),('expiration_date','>=',d)] + condition = ['&','&','&',('state','=','open',),('start_date','<=',d.strftime('%Y-%m-%d')),('expiration_date','>=',d.strftime('%Y-%m-%d'))] condition.extend(frequencies) print str(condition) From 6ea4181244579279fde119a79ac214531922870d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 23 Oct 2012 17:56:31 +0200 Subject: [PATCH 221/841] [FIX] mail: incoming emails are not correctly set with email type. bzr revid: tde@openerp.com-20121023155631-h7gbhrmgpg3mwj0f --- addons/mail/mail_thread.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index 04da686b49d..273e0edaa36 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -554,7 +554,7 @@ class mail_thread(osv.AbstractModel): ('file2', 'bytes')} } """ - msg_dict = {} + msg_dict = {'type': 'email'} if not isinstance(message, Message): if isinstance(message, unicode): # Warning: message_from_string doesn't always work correctly on unicode, From a8da0fbef74cf71d934140c3b9a27b2846b1ebc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 23 Oct 2012 17:57:10 +0200 Subject: [PATCH 222/841] [IMP] mail: res_partner override: incoming emails are set as private, by setting thread_id to False. In message_post, this will set model and res_id of the message to False, leading to a private message. bzr revid: tde@openerp.com-20121023155710-j6ugemc60khdqk74 --- addons/mail/res_partner.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/addons/mail/res_partner.py b/addons/mail/res_partner.py index 6b13fe6ad20..46b250328f8 100644 --- a/addons/mail/res_partner.py +++ b/addons/mail/res_partner.py @@ -42,4 +42,21 @@ class res_partner_mail(osv.Model): 'notification_email_send': lambda *args: 'comment' } + def message_post(self, cr, uid, thread_id, body='', subject=None, type='notification', + subtype=None, parent_id=False, attachments=None, context=None, **kwargs): + """ Override related to res.partner. In case of email message, set it as + private: + - add the target partner in the message partner_ids + - set thread_id as None, because this will trigger the 'private' + aspect of the message (model=False, res_is=False) + """ + if isinstance(thread_id, (list, tuple)): + thread_id = thread_id[0] + if type == 'email': + partner_ids = kwargs.get('partner_ids', []) + partner_ids.append(thread_id) + kwargs['partner_ids'] = partner_ids + return super(res_partner_mail, self).message_post(cr, uid, False, body=body, subject=subject, + type=type, subtype=subtype, parent_id=parent_id, attachments=attachments, context=context, **kwargs) + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From 2bf0904440bf4a38eacc4454627b42c05a22a1ae Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Tue, 23 Oct 2012 19:25:36 +0200 Subject: [PATCH 223/841] [FIX]Cron not though correctly bzr revid: dle@openerp.com-20121023172536-y843yfdjb2tar188 --- addons/fleet/fleet.py | 75 +++++++++++++++++++++++++++---------------- 1 file changed, 47 insertions(+), 28 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index a85b1dd8ad8..5ee2509b531 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -6,6 +6,7 @@ import datetime import tools from osv.orm import except_orm from tools.translate import _ +from dateutil.relativedelta import relativedelta ############################ ############################ #Vehicle.cost class @@ -51,10 +52,12 @@ class fleet_vehicle_cost(osv.Model): 'date' :fields.date('Date',help='Date when the cost has been executed'), 'contract_id' : fields.many2one('fleet.vehicle.log.contract', 'Contract', required=False, help='Contract attached to this cost'), + 'auto_generated' : fields.boolean('automatically generated',readonly=True,required=True) } _default ={ 'parent_id':None, + 'auto_generated' : False, } @@ -851,40 +854,56 @@ class fleet_vehicle_log_contract(osv.Model): def run_scheduler(self,cr,uid,context=None): - #d = datetime.datetime.now() - d = datetime.date(2012, 8, 01) + d = datetime.datetime.now() + #d = datetime.datetime(2012, 12, 01) - frequencies = [] - if d.day == 1 and d.month == 1: - frequencies.append(('cost_frequency','=','yearly')) - if d.day == 1: - frequencies.append(('cost_frequency','=','monthly')) - if d.isoweekday() == 1: - frequencies.append(('cost_frequency','=','weekly')) - frequencies.append(('cost_frequency','=','daily')) + contract_ids = self.pool.get('fleet.vehicle.log.contract').search(cr, uid, [('state','=','open')], offset=0, limit=None, order=None,context=None, count=False) + for contract in self.pool.get('fleet.vehicle.log.contract').browse(cr,uid,contract_ids,context=context): + if contract.generated_cost_ids != []: + last_cost_id = self.pool.get('fleet.vehicle.cost').search(cr, uid, ['&',('contract_id','=',contract.id),('auto_generated','=',True)], offset=0, limit=1, order='date desc',context=None, count=False) + last_cost_date = self.pool.get('fleet.vehicle.cost').browse(cr,uid,last_cost_id[0],context=None).date + else : + last_cost_date = False - frequencies_size = len(frequencies) - for i in range(frequencies_size-1): - frequencies.insert(0,'|') - - condition = ['&','&','&',('state','=','open',),('start_date','<=',d.strftime('%Y-%m-%d')),('expiration_date','>=',d.strftime('%Y-%m-%d'))] - condition.extend(frequencies) - - print str(condition) - contract_ids = self.pool.get('fleet.vehicle.log.contract').search(cr, uid, condition, offset=0, limit=None, order=None,context=None, count=False) - for contract_id in contract_ids: - - nbr = self.pool.get('fleet.vehicle.cost').search(cr,uid,['&',('contract_id','=',contract_id),('date','=',d)],context=context,count=True) - - if not nbr: - contract = self.pool.get('fleet.vehicle.log.contract').browse(cr,uid,contract_id,context=context) - data = {'amount' : contract.cost_generated,'date' : d,'vehicle_id' : contract.vehicle_id.id,'cost_type' : contract.cost_type.id,'contract_id' : contract_id} - cost_id = self.pool.get('fleet.vehicle.cost').create(cr, uid, data, context=context) + if contract.cost_frequency == 'yearly': + delta = relativedelta(years=+1) + if last_cost_date: + startdate = datetime.datetime(int(last_cost_date[:4]),1,1) + relativedelta(years=+1) + else: + startdate = datetime.datetime(int(contract.start_date[:4]),1,1) + enddate = datetime.datetime(d.year,1,1) + if contract.cost_frequency == 'monthly': + delta = relativedelta(months=+1) + if last_cost_date: + startdate = datetime.datetime(int(last_cost_date[:4]),int(last_cost_date[5:7]),1) + relativedelta(months=+1) + else: + startdate = datetime.datetime(int(contract.start_date[:4]),int(contract.start_date[5:7]),1) + enddate = datetime.datetime(d.year,d.month,1) + if contract.cost_frequency == 'weekly': + delta = relativedelta(weeks=+1) + if last_cost_date: + startdate = datetime.datetime.strptime(last_cost_date[:4]+'-'+last_cost_date[5:7]+'-'+str(self.str_to_date(last_cost_date).weekday()),'%Y-%m-%w') + relativedelta(weeks=+1) + else: + startdate = datetime.datetime.strptime(contract.start_date[:4]+'-'+contract.start_date[5:7]+'-'+str(self.str_to_date(contract.start_date).weekday()),'%Y-%m-%w') + enddate = datetime.datetime.strptime(d.year+'-'+d.month+'-'+d.weekday(),'%Y-%m-%w') + if contract.cost_frequency == 'daily': + delta = relativedelta(days=+1) + if last_cost_date: + startdate = datetime.datetime.strptime(last_cost_date,'%Y-%m-%d') + relativedelta(days=+1) + else: + startdate = datetime.datetime.strptime(contract.start_date,'%Y-%m-%d') + enddate = d + print 'Start : '+str(startdate)+', End : '+str(enddate) + while startdate <= enddate: + data = {'amount' : contract.cost_generated,'date' : startdate,'vehicle_id' : contract.vehicle_id.id,'cost_type' : contract.cost_type.id,'contract_id' : contract.id,'auto_generated' : True} + print data + cost_id = self.pool.get('fleet.vehicle.cost').create(cr, uid, data, context=context) + startdate += delta return True def name_get(self, cr, uid, ids, context=None): if context is None: - context = {} + context = {} if not ids: return [] reads = self.browse(cr, uid, ids, context=context) From 0ddd32f68f11c5dd0875c1697f4098293070d3bd Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Tue, 23 Oct 2012 19:44:47 +0200 Subject: [PATCH 224/841] [FIX]Contracts cost cron weekly fixed bzr revid: dle@openerp.com-20121023174447-imj5zsc3we4jlasb --- addons/fleet/fleet.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 5ee2509b531..ff08d360fea 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -872,21 +872,21 @@ class fleet_vehicle_log_contract(osv.Model): else: startdate = datetime.datetime(int(contract.start_date[:4]),1,1) enddate = datetime.datetime(d.year,1,1) - if contract.cost_frequency == 'monthly': + elif contract.cost_frequency == 'monthly': delta = relativedelta(months=+1) if last_cost_date: startdate = datetime.datetime(int(last_cost_date[:4]),int(last_cost_date[5:7]),1) + relativedelta(months=+1) else: startdate = datetime.datetime(int(contract.start_date[:4]),int(contract.start_date[5:7]),1) enddate = datetime.datetime(d.year,d.month,1) - if contract.cost_frequency == 'weekly': + elif contract.cost_frequency == 'weekly': delta = relativedelta(weeks=+1) if last_cost_date: startdate = datetime.datetime.strptime(last_cost_date[:4]+'-'+last_cost_date[5:7]+'-'+str(self.str_to_date(last_cost_date).weekday()),'%Y-%m-%w') + relativedelta(weeks=+1) else: startdate = datetime.datetime.strptime(contract.start_date[:4]+'-'+contract.start_date[5:7]+'-'+str(self.str_to_date(contract.start_date).weekday()),'%Y-%m-%w') - enddate = datetime.datetime.strptime(d.year+'-'+d.month+'-'+d.weekday(),'%Y-%m-%w') - if contract.cost_frequency == 'daily': + enddate = datetime.datetime.strptime(str(d.year)+'-'+d.strftime('%W')+'-'+d.strftime('%w'),'%Y-%W-%w') + elif contract.cost_frequency == 'daily': delta = relativedelta(days=+1) if last_cost_date: startdate = datetime.datetime.strptime(last_cost_date,'%Y-%m-%d') + relativedelta(days=+1) From c144f3e183935b148d09f116e3d609b26a34ff18 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Wed, 24 Oct 2012 10:24:28 +0200 Subject: [PATCH 225/841] [IMP]Cron dates bzr revid: dle@openerp.com-20121024082428-230yvc0prch4d7wf --- addons/fleet/fleet.py | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index ff08d360fea..ec3d9ccae96 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -854,7 +854,7 @@ class fleet_vehicle_log_contract(osv.Model): def run_scheduler(self,cr,uid,context=None): - d = datetime.datetime.now() + d = datetime.date.today() #d = datetime.datetime(2012, 12, 01) contract_ids = self.pool.get('fleet.vehicle.log.contract').search(cr, uid, [('state','=','open')], offset=0, limit=None, order=None,context=None, count=False) @@ -864,38 +864,37 @@ class fleet_vehicle_log_contract(osv.Model): last_cost_date = self.pool.get('fleet.vehicle.cost').browse(cr,uid,last_cost_id[0],context=None).date else : last_cost_date = False - if contract.cost_frequency == 'yearly': delta = relativedelta(years=+1) if last_cost_date: - startdate = datetime.datetime(int(last_cost_date[:4]),1,1) + relativedelta(years=+1) + startdate = datetime.date(int(last_cost_date[:4]),1,1) + relativedelta(years=+1) else: - startdate = datetime.datetime(int(contract.start_date[:4]),1,1) - enddate = datetime.datetime(d.year,1,1) + startdate = datetime.date(int(contract.start_date[:4]),1,1) + enddate = datetime.date(d.year,1,1) elif contract.cost_frequency == 'monthly': delta = relativedelta(months=+1) if last_cost_date: - startdate = datetime.datetime(int(last_cost_date[:4]),int(last_cost_date[5:7]),1) + relativedelta(months=+1) + startdate = datetime.date(int(last_cost_date[:4]),int(last_cost_date[5:7]),1) + relativedelta(months=+1) else: - startdate = datetime.datetime(int(contract.start_date[:4]),int(contract.start_date[5:7]),1) - enddate = datetime.datetime(d.year,d.month,1) + startdate = datetime.date(int(contract.start_date[:4]),int(contract.start_date[5:7]),1) + enddate = datetime.date(d.year,d.month,1) elif contract.cost_frequency == 'weekly': delta = relativedelta(weeks=+1) if last_cost_date: - startdate = datetime.datetime.strptime(last_cost_date[:4]+'-'+last_cost_date[5:7]+'-'+str(self.str_to_date(last_cost_date).weekday()),'%Y-%m-%w') + relativedelta(weeks=+1) + startdate = datetime.datetime.strptime(last_cost_date[:4]+'-'+self.str_to_date(last_cost_date[5:7]).strftime('%W')+'-'+str(self.str_to_date(last_cost_date).weekday()),'%Y-%W-%w').date() + relativedelta(weeks=+1) else: - startdate = datetime.datetime.strptime(contract.start_date[:4]+'-'+contract.start_date[5:7]+'-'+str(self.str_to_date(contract.start_date).weekday()),'%Y-%m-%w') - enddate = datetime.datetime.strptime(str(d.year)+'-'+d.strftime('%W')+'-'+d.strftime('%w'),'%Y-%W-%w') + startdate = datetime.date.strptime(contract.start_date[:4]+'-'+self.str_to_date(contract.start_date[5:7]).strftime('%W')+'-'+str(self.str_to_date(contract.start_date).weekday()).date(),'%Y-%W-%w') + enddate = datetime.date.strptime(str(d.year)+'-'+d.strftime('%W')+'-'+d.strftime('%w'),'%Y-%W-%w') elif contract.cost_frequency == 'daily': delta = relativedelta(days=+1) if last_cost_date: - startdate = datetime.datetime.strptime(last_cost_date,'%Y-%m-%d') + relativedelta(days=+1) + startdate = datetime.datetime.strptime(last_cost_date,'%Y-%m-%d').date() + relativedelta(days=+1) else: - startdate = datetime.datetime.strptime(contract.start_date,'%Y-%m-%d') + startdate = datetime.datetime.strptime(contract.start_date,'%Y-%m-%d').date() enddate = d print 'Start : '+str(startdate)+', End : '+str(enddate) while startdate <= enddate: - data = {'amount' : contract.cost_generated,'date' : startdate,'vehicle_id' : contract.vehicle_id.id,'cost_type' : contract.cost_type.id,'contract_id' : contract.id,'auto_generated' : True} + data = {'amount' : contract.cost_generated,'date' : startdate.strftime('%Y-%m-%d'),'vehicle_id' : contract.vehicle_id.id,'cost_type' : contract.cost_type.id,'contract_id' : contract.id,'auto_generated' : True} print data cost_id = self.pool.get('fleet.vehicle.cost').create(cr, uid, data, context=context) startdate += delta From 22b8f785466c89078c230b2d7601d3a85a71a54c Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Wed, 24 Oct 2012 11:11:31 +0200 Subject: [PATCH 226/841] [ADD]Unique frequency for contracts costs frequency + [FIX]Week interval bugs + replace title and help messages bzr revid: dle@openerp.com-20121024091131-j1o5kf2klt0827be --- addons/fleet/demo.xml | 40 ++++++++++++++++++------------------- addons/fleet/fleet.py | 19 +++++++++++++----- addons/fleet/fleet_view.xml | 3 ++- 3 files changed, 36 insertions(+), 26 deletions(-) diff --git a/addons/fleet/demo.xml b/addons/fleet/demo.xml index 359ad8a3b48..8b4275dd4bf 100644 --- a/addons/fleet/demo.xml +++ b/addons/fleet/demo.xml @@ -776,15 +776,15 @@ 0 - 450 - monthly + 20 + daily - 2012-01-01 + - Usual leasing contract + Daily leasing contract @@ -814,15 +814,15 @@ 0 - 400 - monthly + 150 + weekly - 2012-01-01 + - Usual leasing contract + Weekly leasing contract @@ -855,12 +855,12 @@ 400 monthly - 2012-01-01 + - Usual leasing contract + Monthly leasing contract @@ -890,15 +890,15 @@ 0 - 400 - monthly + 4000 + yearly - 2012-01-01 + - Usual leasing contract + Yearly leasing contract @@ -928,15 +928,15 @@ 0 - 400 - monthly + 17000 + unique - 2012-01-01 - - + + + - Usual leasing contract + Unique leasing contract diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index ec3d9ccae96..eaebbf9398a 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -859,6 +859,8 @@ class fleet_vehicle_log_contract(osv.Model): contract_ids = self.pool.get('fleet.vehicle.log.contract').search(cr, uid, [('state','=','open')], offset=0, limit=None, order=None,context=None, count=False) for contract in self.pool.get('fleet.vehicle.log.contract').browse(cr,uid,contract_ids,context=context): + if not contract.start_date: + break; if contract.generated_cost_ids != []: last_cost_id = self.pool.get('fleet.vehicle.cost').search(cr, uid, ['&',('contract_id','=',contract.id),('auto_generated','=',True)], offset=0, limit=1, order='date desc',context=None, count=False) last_cost_date = self.pool.get('fleet.vehicle.cost').browse(cr,uid,last_cost_id[0],context=None).date @@ -881,10 +883,10 @@ class fleet_vehicle_log_contract(osv.Model): elif contract.cost_frequency == 'weekly': delta = relativedelta(weeks=+1) if last_cost_date: - startdate = datetime.datetime.strptime(last_cost_date[:4]+'-'+self.str_to_date(last_cost_date[5:7]).strftime('%W')+'-'+str(self.str_to_date(last_cost_date).weekday()),'%Y-%W-%w').date() + relativedelta(weeks=+1) + startdate = datetime.datetime.strptime(last_cost_date[:4]+'-'+self.str_to_date(last_cost_date).strftime('%W')+'-'+str(self.str_to_date(last_cost_date).weekday()),'%Y-%W-%w').date() + relativedelta(weeks=+1) else: - startdate = datetime.date.strptime(contract.start_date[:4]+'-'+self.str_to_date(contract.start_date[5:7]).strftime('%W')+'-'+str(self.str_to_date(contract.start_date).weekday()).date(),'%Y-%W-%w') - enddate = datetime.date.strptime(str(d.year)+'-'+d.strftime('%W')+'-'+d.strftime('%w'),'%Y-%W-%w') + startdate = datetime.datetime.strptime(contract.start_date[:4]+'-'+self.str_to_date(contract.start_date).strftime('%W')+'-'+str(self.str_to_date(contract.start_date).weekday()),'%Y-%W-%w').date() + enddate = datetime.datetime.strptime(str(d.year)+'-'+d.strftime('%W')+'-'+d.strftime('%w'),'%Y-%W-%w').date() elif contract.cost_frequency == 'daily': delta = relativedelta(days=+1) if last_cost_date: @@ -892,6 +894,13 @@ class fleet_vehicle_log_contract(osv.Model): else: startdate = datetime.datetime.strptime(contract.start_date,'%Y-%m-%d').date() enddate = d + elif contract.cost_frequency == 'unique': + delta = relativedelta(days=+1) + if not last_cost_date: + enddate = startdate = datetime.datetime.strptime(contract.start_date,'%Y-%m-%d').date() + else: + startdate = 1 + enddate = 0 print 'Start : '+str(startdate)+', End : '+str(enddate) while startdate <= enddate: data = {'amount' : contract.cost_generated,'date' : startdate.strftime('%Y-%m-%d'),'vehicle_id' : contract.vehicle_id.id,'cost_type' : contract.cost_type.id,'contract_id' : contract.id,'auto_generated' : True} @@ -1059,8 +1068,8 @@ class fleet_vehicle_log_contract(osv.Model): 'odometer' : fields.function(_get_odometer,fnct_inv=_set_odometer,type='char',string='Odometer Value',store=False,help='Odometer measure of the vehicle at the moment of this log'), 'odometer_unit': fields.related('vehicle_id','odometer_unit',type="char",string="Unit",store=False, readonly=True), 'cost_amount': fields.related('cost_id','amount',type="float",string="Amount",store=True, readonly=True), - 'cost_generated': fields.float('Generated costs amount'), - 'cost_frequency': fields.selection([('daily', 'Daily'),('weekly','Weekly'),('monthly','Monthly'),('yearly','Yearly')], 'Cost Frequency', help='Frequency of the costs',required=True), + 'cost_generated': fields.float('Recuring Costs Amount',help="Costs paid at regular intervals, depending on the cost frequency. If the cost frequency is set to unique, the cost will be logged at the start date"), + 'cost_frequency': fields.selection([('unique','Unique'),('daily', 'Daily'),('weekly','Weekly'),('monthly','Monthly'),('yearly','Yearly')], 'Cost Frequency', help='Frequency of the costs',required=True), 'generated_cost_ids' : fields.one2many('fleet.vehicle.cost', 'contract_id', 'Generated Costs',ondelete='cascade'), } _defaults = { diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 2f96e34cfd0..07ea7eec78d 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -500,7 +500,8 @@ - + + From 92528bd5101d95a0fd69f0a83ac96644f5b75fd0 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Wed, 24 Oct 2012 11:55:10 +0200 Subject: [PATCH 227/841] [IMP]Vehicles list in dashboard now in kanban view bzr revid: dle@openerp.com-20121024095510-hzmfg1gjcfr5sazs --- addons/fleet/board_fleet_view.xml | 22 +++------------------- addons/fleet/fleet_view.xml | 2 +- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/addons/fleet/board_fleet_view.xml b/addons/fleet/board_fleet_view.xml index 3ef597733bb..f0ada104dbb 100644 --- a/addons/fleet/board_fleet_view.xml +++ b/addons/fleet/board_fleet_view.xml @@ -1,22 +1,6 @@ - - fleet.vehicle.tree.board - fleet.vehicle - - - - - - - - - - - - - Fuel Costs by Month fleet.vehicle.log.fuel @@ -50,10 +34,10 @@ [('parent_id','=',False)] - + Vehicles which need contracts renewal fleet.vehicle - + form tree ['|',('contract_renewal_due_soon','>',0),('contract_renewal_overdue','>',0)] @@ -71,7 +55,7 @@
- + diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 07ea7eec78d..9a450c0c2d7 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -500,7 +500,7 @@ - + From f579cc927f2a392e9db3772f1fbc3f0f81cf9a23 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 24 Oct 2012 12:54:54 +0200 Subject: [PATCH 228/841] [FIX] files filtering when loading... stuff. also, cleanup module file (remove extra imports, extra default key in manifest) bzr revid: xmo@openerp.com-20121024105454-nqw9taxladjofz2v --- openerp/modules/loading.py | 5 ++++- openerp/modules/module.py | 10 ---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/openerp/modules/loading.py b/openerp/modules/loading.py index 57fb92a6ee0..ceb87afc67f 100644 --- a/openerp/modules/loading.py +++ b/openerp/modules/loading.py @@ -113,6 +113,7 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, skip_modules= if kind in ('demo', 'demo_xml'): noupdate = True try: + ext = ext.lower() if ext == '.csv': if kind in ('init', 'init_xml'): noupdate = True @@ -121,8 +122,10 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, skip_modules= process_sql_file(cr, fp) elif ext == '.yml': tools.convert_yaml_import(cr, module_name, fp, kind, idref, mode, noupdate, report) - else: + elif ext == '.xml': tools.convert_xml_import(cr, module_name, fp, idref, mode, noupdate, report) + else: + _logger.debug("Ignoring %s due to unknown type", filename) finally: fp.close() diff --git a/openerp/modules/module.py b/openerp/modules/module.py index 6ec9e86340c..39c9817a878 100644 --- a/openerp/modules/module.py +++ b/openerp/modules/module.py @@ -28,15 +28,9 @@ import sys import types import zipimport -import openerp - -import openerp.osv as osv import openerp.tools as tools import openerp.tools.osutil as osutil from openerp.tools.safe_eval import safe_eval as eval -from openerp.tools.translate import _ - -import openerp.netsvc as netsvc import zipfile import openerp.release as release @@ -48,9 +42,6 @@ from cStringIO import StringIO import logging -import openerp.modules.db -import openerp.modules.graph - _logger = logging.getLogger(__name__) _ad = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'addons') # default addons path (base) @@ -335,7 +326,6 @@ def load_information_from_description_file(module): 'description': '', 'icon': get_module_icon(module), 'installable': True, - 'auto_install': False, 'license': 'AGPL-3', 'name': False, 'post_load': None, From 124480d095c0c8559eab7f7ea134b0bc106d590a Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 24 Oct 2012 12:55:31 +0200 Subject: [PATCH 229/841] [FIX] reference to invalid and non-existant js file bzr revid: xmo@openerp.com-20121024105531-c0uou49k828wc01t --- addons/base_setup/__openerp__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/base_setup/__openerp__.py b/addons/base_setup/__openerp__.py index de2d8236ece..e74238ba59c 100644 --- a/addons/base_setup/__openerp__.py +++ b/addons/base_setup/__openerp__.py @@ -44,7 +44,6 @@ Shows you a list of applications features to install from. 'installable': True, 'auto_install': False, 'images': ['images/base_setup1.jpeg','images/base_setup2.jpeg','images/base_setup3.jpeg','images/base_setup4.jpeg',], - 'js': ['static/src/js/base_setup.js'], 'css': ['static/src/css/base_setup.css'], } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From 403d2ec6d1952a5b846ed8e4c9422893ec0574fd Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 24 Oct 2012 12:55:48 +0200 Subject: [PATCH 230/841] [FIX] process: dependencies bzr revid: xmo@openerp.com-20121024105548-tmcpidjteuf2uwei --- addons/process/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/process/__openerp__.py b/addons/process/__openerp__.py index fcae18c5490..c998288a614 100644 --- a/addons/process/__openerp__.py +++ b/addons/process/__openerp__.py @@ -35,7 +35,7 @@ This module shows the basic processes involved in the selected modules and in th """, 'author': 'OpenERP SA', 'website': 'http://www.openerp.com', - 'depends': ['base'], + 'depends': ['web'], 'data': [ 'security/ir.model.access.csv', 'process_view.xml' From b2e32b21faf1362a718d9e07106394c5eef77b40 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 24 Oct 2012 12:56:12 +0200 Subject: [PATCH 231/841] [FIX] base_import: dummy test file bzr revid: xmo@openerp.com-20121024105612-84fb2gav0jpp2hkc --- addons/base_import/__openerp__.py | 3 ++- addons/base_import/static/test/states.js | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 addons/base_import/static/test/states.js diff --git a/addons/base_import/__openerp__.py b/addons/base_import/__openerp__.py index f5a707650d8..559031f4b4f 100644 --- a/addons/base_import/__openerp__.py +++ b/addons/base_import/__openerp__.py @@ -24,7 +24,7 @@ Re-implement openerp's file import system: 'category': 'Uncategorized', 'website': 'http://www.openerp.com', 'author': 'OpenERP SA', - 'depends': ['base'], + 'depends': ['web'], 'installable': True, 'auto_install': True, 'css': [ @@ -37,4 +37,5 @@ Re-implement openerp's file import system: 'static/src/js/import.js', ], 'qweb': ['static/src/xml/import.xml'], + 'test': ['static/test/states.js'], } diff --git a/addons/base_import/static/test/states.js b/addons/base_import/static/test/states.js new file mode 100644 index 00000000000..3e349907a6f --- /dev/null +++ b/addons/base_import/static/test/states.js @@ -0,0 +1,6 @@ +$(document).ready(function () { + module('foo'); + test('dummy', function () { + ok(42); + }); +}); From 1cf9b2a60da502de27aa67e8318f41ad6692e5a9 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 24 Oct 2012 13:01:46 +0200 Subject: [PATCH 232/841] [REM] test_support controller bzr revid: xmo@openerp.com-20121024110146-bzuf19sfptew0dn0 --- addons/web/test_support/__init__.py | 37 ----------------------- addons/web/test_support/controllers.py | 42 -------------------------- 2 files changed, 79 deletions(-) delete mode 100644 addons/web/test_support/__init__.py delete mode 100644 addons/web/test_support/controllers.py diff --git a/addons/web/test_support/__init__.py b/addons/web/test_support/__init__.py deleted file mode 100644 index 59f6cc67ca2..00000000000 --- a/addons/web/test_support/__init__.py +++ /dev/null @@ -1,37 +0,0 @@ -# -*- coding: utf-8 -*- -import xmlrpclib -from ..common.openerplib.main import Connector - -execute_map = {} - -class TestConnector(Connector): - def db_list_lang(self): - return [('en_US', u'Test Language')] - - def common_authenticate(self, db, login, password, environment): - return 87539319 - - def common_login(self, db, login, password): - return self.common_authenticate(db, login, password, {}) - - def object_execute_kw(self, db, uid, password, model, method, args, kwargs): - if model in execute_map and hasattr(execute_map[model], method): - return getattr(execute_map[model], method)(*args, **kwargs) - - raise xmlrpclib.Fault({ - 'model': model, - 'method': method, - 'args': args, - 'kwargs': kwargs - }, '') - - def send(self, service_name, method, *args): - method_name = '%s_%s' % (service_name, method) - if hasattr(self, method_name): - return getattr(self, method_name)(*args) - - raise xmlrpclib.Fault({ - 'service': service_name, - 'method': method, - 'args': args - }, '') diff --git a/addons/web/test_support/controllers.py b/addons/web/test_support/controllers.py deleted file mode 100644 index f1013fbaaf8..00000000000 --- a/addons/web/test_support/controllers.py +++ /dev/null @@ -1,42 +0,0 @@ -# -*- coding: utf-8 -*- - -from ..common import http, nonliterals -from ..controllers.main import Session - -UID = 87539319 -DB = 'test_db' -LOGIN = 'test_login' -PASSWORD = 'test_password' -CONTEXT = {'lang': 'en_US', 'tz': 'UTC', 'uid': UID} - -def bind(session): - session.bind(DB, UID, LOGIN, PASSWORD) - session.context = CONTEXT - session.build_connection().set_login_info(DB, LOGIN, PASSWORD, UID) - -class TestController(http.Controller): - _cp_path = '/tests' - - @http.jsonrequest - def add_nonliterals(self, req, domains, contexts): - return { - 'domains': [nonliterals.Domain(req.session, domain) - for domain in domains], - 'contexts': [nonliterals.Context(req.session, context) - for context in contexts] - } - -class TestSession(Session): - _cp_path = '/web/session' - - def session_info(self, req): - if not req.session._uid: - bind(req.session) - - return { - "session_id": req.session_id, - "uid": req.session._uid, - "context": CONTEXT, - "db": req.session._db, - "login": req.session._login, - } From 97654d6767c697ca5303a3eb76c19cd9a85d5d1a Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Wed, 24 Oct 2012 13:58:49 +0200 Subject: [PATCH 233/841] [ADD]help messages and correct a bug on vehicle kanban view when the car had no contract bzr revid: csn@openerp.com-20121024115849-orxkd2pyctl1f2fz --- addons/fleet/fleet.py | 10 ++- addons/fleet/fleet_view.xml | 171 ++++++++++++++++++++++++------------ 2 files changed, 120 insertions(+), 61 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index eaebbf9398a..a8d0370408e 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -406,11 +406,13 @@ class fleet_vehicle(osv.Model): return dict([]) reads = self.browse(cr,uid,ids,context=context) res=[] - for record in reads: - ids = self.pool.get('fleet.vehicle.log.contract').search(cr,uid,[('vehicle_id','=',record.id),('state','=','open')],limit=1,order='expiration_date asc') - if len(ids) > 0: - res.append((record.id,self.pool.get('fleet.vehicle.log.contract').browse(cr,uid,ids[0],context=context).cost_type.name)) + if (record.log_contracts): + ids = self.pool.get('fleet.vehicle.log.contract').search(cr,uid,[('vehicle_id','=',record.id),('state','=','open')],limit=1,order='expiration_date asc') + if len(ids) > 0: + res.append((record.id,self.pool.get('fleet.vehicle.log.contract').browse(cr,uid,ids[0],context=context).cost_type.name)) + else: + res.append((record.id,'')) return dict(res) def get_total_contract_reminder(self,cr,uid,ids,prop,unknow_none,context=None): diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 9a450c0c2d7..462c201c7ff 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -335,51 +335,95 @@ - - + + Services Logs + fleet.vehicle.log.services + fleet.vehicle + form + tree,form + +

+ Click to create a new service entry. +

+ OpenERP helps you keeping track of all the services done + on your vehicle. Services can be of many type, occasional + repair, fixed maintenance, etc. +

+
+
- + + Fuel Logs + fleet.vehicle.log.fuel + fleet.vehicle + form + tree,form,graph + +

+ Click to create a new fuel log. +

+ Here you can add refuelling entries for all vehicles. + You can also show the log for a particular vehicle using + the search field. +

+
+
- + + Contract + fleet.vehicle.log.contract + fleet.vehicle + form + tree,form + +

+ Click to create a new contract. +

+ OpenERP helps you managing all the contracts for your + vehicle, leasing, insurance, or any other type of contract. +

+ The contract form includes all sort of details, like the + activation cost, recurrent cost, the services included in + the contract, beginning and possibly ending date, etc. +

+
+
- + + Costs + fleet.vehicle.cost + fleet.vehicle + form + tree,form,graph + {"search_default_parent_false" : True} + +

+ Click to create a new cost. +

+ OpenERP helps you managing the costs for your different vehicles + Costs are generally created from services and contract and appears here. +

+ Thanks to the different filters, OpenERP can only print the effective + costs, sort them by type and by vehicle. +

+
+
+ + + Odometer + fleet.vehicle.odometer + fleet.vehicle + form + tree,form,graph + +

+ Here you can add various odometer entries for all vehicles. + You can also show odometer value for a particular vehicle using + the search field. +

+
+
@@ -391,10 +435,12 @@

Click to create a new vehicle.

- Here you can create and add new vehicles to your fleet. - You can associate a driver, add tags, contracts, services - and other informations to a vehicle. You can also sort - them by brand, plate number, driver, location, tags, status. + OpenERP will help you manage your fleet by keeping + track of the contracts, services, costs, fuel logs associated + to a particular vehicle. +

+ When a contract arrives near expiration date, a visual warning + will show you that you need to renew that particular contract.

@@ -530,10 +576,12 @@

Click to create a new contract.

- Here you can create new contracts and show all existing - contracts. Contracts can be of various type, from insurance - contracts to leasing contracts. Each contract is associated - to an existing vehicle and can also be associated to a user. + OpenERP helps you managing all the contracts for your + vehicle, leasing, insurance, or any other type of contract. +

+ The contract form includes all sort of details, like the + activation cost, recurrent cost, the services included in + the contract, beginning and possibly ending date, etc.

@@ -787,12 +835,11 @@ tree,form,graph

- Click to create a new service log entry. + Click to create a new service entry.

- Here you can create new services entries and show all past and - future services. A service can be an occasional repair on a - vehicle or a fixed maintenance. A service is associated to - an existing vehicle. + OpenERP helps you keeping track of all the services done + on your vehicle. Services can be of many type, occasional + repair, fixed maintenance, etc.

@@ -819,10 +866,9 @@

Click to create a new type of service.

- Here you can add new services, each service - belong to a category.
+ Each service belongs to a category.
- contract if this service is used in a contract (ie: leasing, ...).
- - service if it is used as a service (ie: repair, ...).
+ - service if it is used as a service (ie: repair, change tire...).
- both if it is used in both case.

@@ -901,6 +947,17 @@ form tree,form,graph {"search_default_parent_false" : True} + +

+ Click to create a new cost. +

+ OpenERP helps you managing the costs for your different vehicles + Costs are generally created from services and contract and appears here. +

+ Thanks to the different filters, OpenERP can only print the effective + costs, sort them by type and by vehicle. +

+
From 757328b2fee078edf9c99e78f9ab083195e44c0a Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Wed, 24 Oct 2012 14:17:19 +0200 Subject: [PATCH 234/841] [FIX]removed useless code in view as well as wizard class bzr revid: csn@openerp.com-20121024121719-jp3wfyz2v7oaaxgr --- addons/fleet/__init__.py | 3 +- addons/fleet/__openerp__.py | 1 - addons/fleet/fleet.py | 13 +- addons/fleet/fleet_view.xml | 90 ------------- addons/fleet/wizard/__init__.py | 1 - addons/fleet/wizard/renew_contract.py | 140 -------------------- addons/fleet/wizard/renew_contract_view.xml | 70 ---------- 7 files changed, 8 insertions(+), 310 deletions(-) delete mode 100644 addons/fleet/wizard/__init__.py delete mode 100644 addons/fleet/wizard/renew_contract.py delete mode 100644 addons/fleet/wizard/renew_contract_view.xml diff --git a/addons/fleet/__init__.py b/addons/fleet/__init__.py index 369c7f372c6..a09fca549ce 100644 --- a/addons/fleet/__init__.py +++ b/addons/fleet/__init__.py @@ -1,3 +1,2 @@ # import the hr_car code -import fleet -import wizard \ No newline at end of file +import fleet \ No newline at end of file diff --git a/addons/fleet/__openerp__.py b/addons/fleet/__openerp__.py index 74f1df2e336..953b63ae82f 100644 --- a/addons/fleet/__openerp__.py +++ b/addons/fleet/__openerp__.py @@ -21,7 +21,6 @@ Vehicle, leasing, insurances, cost 'fleet_view.xml', 'data.xml', 'board_fleet_view.xml', - 'wizard/renew_contract_view.xml', ], 'update_xml' : ['security/ir.model.access.csv'], diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index a8d0370408e..e912066c669 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -232,7 +232,7 @@ class fleet_vehicle(osv.Model): """ This opens log view to view and add new log for this vehicle @return: the service log view """ - res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid ,'fleet','act_show_log_services', context) + res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid ,'fleet','fleet_vehicle_log_services_act', context) res['context'] = { 'default_vehicle_id': ids[0] } @@ -243,7 +243,7 @@ class fleet_vehicle(osv.Model): """ This opens log view to view and add new log for this vehicle @return: the contract log view """ - res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid ,'fleet','act_show_log_contract', context) + res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid ,'fleet','fleet_vehicle_log_contract_act', context) res['context'] = { 'default_vehicle_id': ids[0] } @@ -254,7 +254,7 @@ class fleet_vehicle(osv.Model): """ This opens log view to view and add new log for this vehicle @return: the fuel log view """ - res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid ,'fleet','act_show_log_fuel', context) + res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid ,'fleet','fleet_vehicle_log_fuel_act', context) res['context'] = { 'default_vehicle_id': ids[0] } @@ -265,9 +265,10 @@ class fleet_vehicle(osv.Model): """ This opens log view to view and add new log for this vehicle @return: the costs log view """ - res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid ,'fleet','act_show_log_cost', context) + res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid ,'fleet','fleet_vehicle_costs_act', context) res['context'] = { - 'default_vehicle_id': ids[0] + 'default_vehicle_id': ids[0], + 'search_default_parent_false' : True } res['domain']=[('vehicle_id','=', ids[0])] return res @@ -276,7 +277,7 @@ class fleet_vehicle(osv.Model): """ This opens log view to view and add new log for this vehicle @return: the odometer log view """ - res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid ,'fleet','act_show_log_odometer', context) + res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid ,'fleet','fleet_vehicle_odometer_act', context) res['context'] = { 'default_vehicle_id': ids[0] } diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 462c201c7ff..b978a3f7f8a 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -334,96 +334,6 @@
- - - - Services Logs - fleet.vehicle.log.services - fleet.vehicle - form - tree,form - -

- Click to create a new service entry. -

- OpenERP helps you keeping track of all the services done - on your vehicle. Services can be of many type, occasional - repair, fixed maintenance, etc. -

-
-
- - - Fuel Logs - fleet.vehicle.log.fuel - fleet.vehicle - form - tree,form,graph - -

- Click to create a new fuel log. -

- Here you can add refuelling entries for all vehicles. - You can also show the log for a particular vehicle using - the search field. -

-
-
- - - Contract - fleet.vehicle.log.contract - fleet.vehicle - form - tree,form - -

- Click to create a new contract. -

- OpenERP helps you managing all the contracts for your - vehicle, leasing, insurance, or any other type of contract. -

- The contract form includes all sort of details, like the - activation cost, recurrent cost, the services included in - the contract, beginning and possibly ending date, etc. -

-
-
- - - Costs - fleet.vehicle.cost - fleet.vehicle - form - tree,form,graph - {"search_default_parent_false" : True} - -

- Click to create a new cost. -

- OpenERP helps you managing the costs for your different vehicles - Costs are generally created from services and contract and appears here. -

- Thanks to the different filters, OpenERP can only print the effective - costs, sort them by type and by vehicle. -

-
-
- - - Odometer - fleet.vehicle.odometer - fleet.vehicle - form - tree,form,graph - -

- Here you can add various odometer entries for all vehicles. - You can also show odometer value for a particular vehicle using - the search field. -

-
-
diff --git a/addons/fleet/wizard/__init__.py b/addons/fleet/wizard/__init__.py deleted file mode 100644 index bc7dae97d56..00000000000 --- a/addons/fleet/wizard/__init__.py +++ /dev/null @@ -1 +0,0 @@ -import renew_contract \ No newline at end of file diff --git a/addons/fleet/wizard/renew_contract.py b/addons/fleet/wizard/renew_contract.py deleted file mode 100644 index 04f21227eb3..00000000000 --- a/addons/fleet/wizard/renew_contract.py +++ /dev/null @@ -1,140 +0,0 @@ -from osv import osv, fields -import datetime - -class renew_contract(osv.TransientModel): - _name = "fleet.vehicle.contract.renew" - _description = "wizard to renew a contract" - - def name_get(self, cr, uid, ids, context=None): - if context is None: - context = {} - if not ids: - return [] - reads = self.browse(cr, uid, ids, context=context) - res = [] - for record in reads: - if record.vehicle_id.name: - name = str(record.vehicle_id.name) - if record.cost_type.name: - name = name+ ' / '+ str(record.cost_type.name) - if record.date: - name = name+ ' / '+ record.date - res.append((record.id, name)) - return res - - def _vehicle_contract_name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None): - res = self.name_get(cr, uid, ids, context=context) - return dict(res) - - def _get_odometer(self, cr, uid, ids, odometer_id, arg, context): - res = dict.fromkeys(ids, False) - for record in self.browse(cr,uid,ids,context=context): - if record.odometer_id: - res[record.id] = record.odometer_id.value - return res - - def _set_odometer(self, cr, uid, id, name, value, args=None, context=None): - if value: - try: - value = float(value) - except ValueError: - #_logger.exception(value+' is not a correct odometer value. Please, fill a float for this field') - raise except_orm(_('Error!'), value+' is not a correct odometer value. Please, fill a float for this field') - - date = self.browse(cr, uid, id, context=context).date - if not(date): - date = time.strftime('%Y-%m-%d') - vehicle_id = self.browse(cr, uid, id, context=context).vehicle_id - data = {'value' : value,'date' : date,'vehicle_id' : vehicle_id.id} - odometer_id = self.pool.get('fleet.vehicle.odometer').create(cr, uid, data, context=context) - self.write(cr, uid, id, {'odometer_id': odometer_id}) - return value - self.write(cr, uid, id, {'odometer_id': ''}) - return False - - def on_change_vehicle(self, cr, uid, ids, vehicle_id, context=None): - - if not vehicle_id: - return {} - - odometer_unit = self.pool.get('fleet.vehicle').browse(cr, uid, vehicle_id, context=context).odometer_unit - - return { - 'value' : { - 'odometer_unit' : odometer_unit, - } - } - - def compute_next_year_date(self, strdate): - oneyear=datetime.timedelta(days=365) - curdate = self.str_to_date(strdate) - nextyear=curdate+oneyear#int(strdate[:4])+1 - return str(nextyear)#+strdate[4:] - - #def on_change_start_date(self, cr, uid, ids, strdate, context=None): - # if (strdate): - - # return {'value' : {'expiration_date' : self.compute_next_year_date(strdate),}} - # else: - # return {} - - def str_to_date(self,strdate): - return datetime.datetime(int(strdate[:4]),int(strdate[5:7]),int(strdate[8:])) - - def get_warning_date(self,cr,uid,ids,prop,unknow_none,context=None): - if context is None: - context={} - if not ids: - return dict([]) - reads = self.browse(cr,uid,ids,context=context) - res=[] - for record in reads: - #if (record.reminder==True): - if (record.expiration_date and record.state=='open'): - today=self.str_to_date(time.strftime('%Y-%m-%d')) - renew_date = self.str_to_date(record.expiration_date) - diff_time=int((renew_date-today).days) - if (diff_time<=0): - res.append((record.id,0)) - else: - res.append((record.id,diff_time)) - else: - res.append((record.id,-1)) - #else: - # res.append((record.id,-1)) - return dict(res) - - _columns = { - 'name' : fields.function(_vehicle_contract_name_get_fnc, type="text", string='Name', store=True), - 'vehicle_id': fields.many2one('fleet.vehicle', 'Vehicle', required=True, help='Vehicle concerned by this fuel log'), - 'cost_type': fields.many2one('fleet.service.type', 'Service type', required=False, help='Service type purchased with this cost'), - 'amount': fields.float('Total Price'), - - 'parent_id': fields.many2one('fleet.vehicle.cost', 'Parent', required=False, help='Parent cost to this current cost'), - 'cost_ids' : fields.one2many('fleet.vehicle.cost', 'parent_id', 'Included Services'), - - 'date' :fields.date('Date',help='Date when the cost has been executed'), - - 'start_date' : fields.date('Contract Start Date', required=False, help='Date when the coverage of the contract begins'), - 'expiration_date' : fields.date('Contract Expiration Date', required=False, help='Date when the coverage of the contract expirates (by default, one year after begin date)'), - 'warning_date' : fields.function(get_warning_date,type='integer',string='Warning Date',store=False), - - 'insurer_id' :fields.many2one('res.partner', 'Supplier', domain="[('supplier','=',True)]"), - 'purchaser_id' : fields.many2one('res.partner', 'Contractor',domain="['|',('customer','=',True),('employee','=',True)]",help='Person to which the contract is signed for'), - 'ins_ref' : fields.char('Contract Reference', size=64), - 'state' : fields.selection([('open', 'In Progress'), ('closed', 'Terminated')], 'Status', readonly=True, help='Choose wheter the contract is still valid or not'), - #'reminder' : fields.boolean('Renewal Reminder', help="Warn the user a few days before the expiration date of this contract"), - 'notes' : fields.text('Terms and Conditions', help='Write here all supplementary informations relative to this contract'), - 'odometer_id' : fields.many2one('fleet.vehicle.odometer', 'Odometer', required=False, help='Odometer measure of the vehicle at the moment of this log'), - 'odometer' : fields.function(_get_odometer,fnct_inv=_set_odometer,type='char',string='Odometer Value',store=False,help='Odometer measure of the vehicle at the moment of this log'), - 'odometer_unit': fields.related('vehicle_id','odometer_unit',type="char",string="Unit",store=False, readonly=True), - #'cost_amount': fields.related('cost_id','amount',type="float",string="Amount",store=True, readonly=True), - } - - - - def renew(self, cr, uid, ids, context=None): - print '-------------------------------' - print 'renew contract' - print '-------------------------------' - return {} \ No newline at end of file diff --git a/addons/fleet/wizard/renew_contract_view.xml b/addons/fleet/wizard/renew_contract_view.xml deleted file mode 100644 index 9113ebb595e..00000000000 --- a/addons/fleet/wizard/renew_contract_view.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - fleet.vehicle.contract.wizard.form - fleet.vehicle.contract.renew - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
- - - - -
-
\ No newline at end of file From 70a7d80de0709c2d3553b0425a724ce7fdf57cd3 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Wed, 24 Oct 2012 17:33:11 +0200 Subject: [PATCH 235/841] [FIX]Cron + Techincal features + begin of hide cost generated when cost frequency = no bzr revid: dle@openerp.com-20121024153311-0vcjcp12zfz2um5m --- addons/fleet/demo.xml | 6 ++--- addons/fleet/fleet.py | 48 +++++++++++++------------------------ addons/fleet/fleet_view.xml | 11 +++++---- 3 files changed, 26 insertions(+), 39 deletions(-) diff --git a/addons/fleet/demo.xml b/addons/fleet/demo.xml index 8b4275dd4bf..f0d250e41fe 100644 --- a/addons/fleet/demo.xml +++ b/addons/fleet/demo.xml @@ -927,9 +927,9 @@ - 0 - 17000 - unique + 17000 + 0 + no diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index e912066c669..4396f21181c 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -867,45 +867,24 @@ class fleet_vehicle_log_contract(osv.Model): if contract.generated_cost_ids != []: last_cost_id = self.pool.get('fleet.vehicle.cost').search(cr, uid, ['&',('contract_id','=',contract.id),('auto_generated','=',True)], offset=0, limit=1, order='date desc',context=None, count=False) last_cost_date = self.pool.get('fleet.vehicle.cost').browse(cr,uid,last_cost_id[0],context=None).date + found = True else : - last_cost_date = False + found = False + last_cost_date = contract.start_date + startdate = datetime.datetime.strptime(last_cost_date,'%Y-%m-%d').date() if contract.cost_frequency == 'yearly': delta = relativedelta(years=+1) - if last_cost_date: - startdate = datetime.date(int(last_cost_date[:4]),1,1) + relativedelta(years=+1) - else: - startdate = datetime.date(int(contract.start_date[:4]),1,1) - enddate = datetime.date(d.year,1,1) elif contract.cost_frequency == 'monthly': delta = relativedelta(months=+1) - if last_cost_date: - startdate = datetime.date(int(last_cost_date[:4]),int(last_cost_date[5:7]),1) + relativedelta(months=+1) - else: - startdate = datetime.date(int(contract.start_date[:4]),int(contract.start_date[5:7]),1) - enddate = datetime.date(d.year,d.month,1) elif contract.cost_frequency == 'weekly': delta = relativedelta(weeks=+1) - if last_cost_date: - startdate = datetime.datetime.strptime(last_cost_date[:4]+'-'+self.str_to_date(last_cost_date).strftime('%W')+'-'+str(self.str_to_date(last_cost_date).weekday()),'%Y-%W-%w').date() + relativedelta(weeks=+1) - else: - startdate = datetime.datetime.strptime(contract.start_date[:4]+'-'+self.str_to_date(contract.start_date).strftime('%W')+'-'+str(self.str_to_date(contract.start_date).weekday()),'%Y-%W-%w').date() - enddate = datetime.datetime.strptime(str(d.year)+'-'+d.strftime('%W')+'-'+d.strftime('%w'),'%Y-%W-%w').date() elif contract.cost_frequency == 'daily': delta = relativedelta(days=+1) - if last_cost_date: - startdate = datetime.datetime.strptime(last_cost_date,'%Y-%m-%d').date() + relativedelta(days=+1) - else: - startdate = datetime.datetime.strptime(contract.start_date,'%Y-%m-%d').date() - enddate = d - elif contract.cost_frequency == 'unique': - delta = relativedelta(days=+1) - if not last_cost_date: - enddate = startdate = datetime.datetime.strptime(contract.start_date,'%Y-%m-%d').date() - else: - startdate = 1 - enddate = 0 - print 'Start : '+str(startdate)+', End : '+str(enddate) - while startdate <= enddate: + elif contract.cost_frequency == 'no': + break; + if found: + startdate += delta + while startdate < d: data = {'amount' : contract.cost_generated,'date' : startdate.strftime('%Y-%m-%d'),'vehicle_id' : contract.vehicle_id.id,'cost_type' : contract.cost_type.id,'contract_id' : contract.id,'auto_generated' : True} print data cost_id = self.pool.get('fleet.vehicle.cost').create(cr, uid, data, context=context) @@ -972,6 +951,12 @@ class fleet_vehicle_log_contract(osv.Model): } } + def _hide_generated_cost(self, cursor, user, ids, name, arg, context=None): + res = {} + for contract in self.browse(cursor, user, ids, context=context): + res[contract.id] = (contract.cost_frequency == 'no') + return res + def compute_next_year_date(self, strdate): oneyear=datetime.timedelta(days=365) curdate = self.str_to_date(strdate) @@ -1072,8 +1057,9 @@ class fleet_vehicle_log_contract(osv.Model): 'odometer_unit': fields.related('vehicle_id','odometer_unit',type="char",string="Unit",store=False, readonly=True), 'cost_amount': fields.related('cost_id','amount',type="float",string="Amount",store=True, readonly=True), 'cost_generated': fields.float('Recuring Costs Amount',help="Costs paid at regular intervals, depending on the cost frequency. If the cost frequency is set to unique, the cost will be logged at the start date"), - 'cost_frequency': fields.selection([('unique','Unique'),('daily', 'Daily'),('weekly','Weekly'),('monthly','Monthly'),('yearly','Yearly')], 'Cost Frequency', help='Frequency of the costs',required=True), + 'cost_frequency': fields.selection([('no','No'),('daily', 'Daily'),('weekly','Weekly'),('monthly','Monthly'),('yearly','Yearly')], 'Cost Frequency', help='Frequency of the costs',required=True), 'generated_cost_ids' : fields.one2many('fleet.vehicle.cost', 'contract_id', 'Generated Costs',ondelete='cascade'), + 'hide_generated_cost': fields.function(_hide_generated_cost, string='Frequency', type='boolean', help='This field is for internal purpose. It is used to decide if the field generated_cost lot has to be shown on the moves or not.'), } _defaults = { 'purchaser_id': lambda self, cr, uid, ctx: uid, diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index b978a3f7f8a..76f7b8e0713 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -155,8 +155,8 @@ - - + + @@ -379,8 +379,9 @@
@@ -784,7 +785,7 @@
- + From 3c503cb0632090ea181518cc65a6371625b7dfd7 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Wed, 24 Oct 2012 17:56:02 +0200 Subject: [PATCH 236/841] [ADD]Cost category in vehicle cost, which contains contract, services, fuel or other bzr revid: dle@openerp.com-20121024155602-lwtp0aic6osw9sq6 --- addons/fleet/board_fleet_view.xml | 15 +++++++++------ addons/fleet/fleet.py | 29 ++++++++++++++++++++++++----- 2 files changed, 33 insertions(+), 11 deletions(-) diff --git a/addons/fleet/board_fleet_view.xml b/addons/fleet/board_fleet_view.xml index f0ada104dbb..51e0b2d1ac9 100644 --- a/addons/fleet/board_fleet_view.xml +++ b/addons/fleet/board_fleet_view.xml @@ -3,26 +3,29 @@ Fuel Costs by Month - fleet.vehicle.log.fuel - + fleet.vehicle.cost + form tree + ['&',('parent_id','=',False),('cost_category','=','fuel')] Services Costs by Month - fleet.vehicle.log.services - + fleet.vehicle.cost + form tree + ['&',('parent_id','=',False),('cost_category','=','services')] Contracts Costs by Month - fleet.vehicle.log.contract - + fleet.vehicle.cost + form tree + ['&',('parent_id','=',False),('cost_category','=','contract')] diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index 4396f21181c..fa5624314b5 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -45,7 +45,7 @@ class fleet_vehicle_cost(osv.Model): 'vehicle_id': fields.many2one('fleet.vehicle', 'Vehicle', required=True, help='Vehicle concerned by this fuel log'), 'cost_type': fields.many2one('fleet.service.type', 'Service type', required=False, help='Service type purchased with this cost'), 'amount': fields.float('Total Price'), - + 'cost_category' : fields.selection([('contract', 'Contract'),('services','Services'),('fuel','Fuel'),('other','Other')], 'Category of the cost', help='For internal purpose only',required=True), 'parent_id': fields.many2one('fleet.vehicle.cost', 'Parent', required=False, help='Parent cost to this current cost'), 'cost_ids' : fields.one2many('fleet.vehicle.cost', 'parent_id', 'Included Services'), @@ -58,17 +58,24 @@ class fleet_vehicle_cost(osv.Model): _default ={ 'parent_id':None, 'auto_generated' : False, + 'cost_category' : 'other', } def create(self, cr, uid, data, context=None): if 'parent_id' in data and data['parent_id']: - data['vehicle_id'] = self.browse(cr, uid, data['parent_id'], context=context).vehicle_id.id - data['date'] = self.browse(cr, uid, data['parent_id'], context=context).date + parent = self.browse(cr, uid, data['parent_id'], context=context) + data['vehicle_id'] = parent.vehicle_id.id + data['date'] = parent.date + data['cost_category'] = parent.cost_category if 'contract_id' in data and data['contract_id']: - data['vehicle_id'] = self.pool.get('fleet.vehicle.log.contract').browse(cr, uid, data['contract_id'], context=context).vehicle_id.id - data['cost_type'] = self.pool.get('fleet.vehicle.log.contract').browse(cr, uid, data['contract_id'], context=context).cost_type.id + contract = self.pool.get('fleet.vehicle.log.contract').browse(cr, uid, data['contract_id'], context=context) + data['vehicle_id'] = contract.vehicle_id.id + data['cost_type'] = contract.cost_type.id + data['cost_category'] = contract.cost_category + if not('cost_category' in data and data['cost_category']): + data['cost_category'] = 'other' cost_id = super(fleet_vehicle_cost, self).create(cr, uid, data, context=context) return cost_id @@ -758,6 +765,10 @@ class fleet_vehicle_log_fuel(osv.Model): 'date' : time.strftime('%Y-%m-%d'), 'cost_type': _get_default_service_type, } + def create(self, cr, uid, data, context=None): + data['cost_category'] = 'fuel' + cost_id = super(fleet_vehicle_log_fuel, self).create(cr, uid, data, context=context) + return cost_id ############################ ############################ @@ -828,6 +839,10 @@ class fleet_vehicle_log_services(osv.Model): 'purchaser_id': lambda self, cr, uid, ctx: uid, 'date' : time.strftime('%Y-%m-%d'), } + def create(self, cr, uid, data, context=None): + data['cost_category'] = 'services' + cost_id = super(fleet_vehicle_log_services, self).create(cr, uid, data, context=context) + return cost_id ############################ ############################ @@ -1093,6 +1108,10 @@ class fleet_vehicle_log_contract(osv.Model): def contract_open(self, cr, uid, ids, *args): self.write(cr, uid, ids, {'state': 'open'}) return True + def create(self, cr, uid, data, context=None): + data['cost_category'] = 'contract' + cost_id = super(fleet_vehicle_log_contract, self).create(cr, uid, data, context=context) + return cost_id ############################ From a356d849b09316c8b4719283da8e16a389112d39 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Wed, 24 Oct 2012 18:20:18 +0200 Subject: [PATCH 237/841] [FIX]Dashboard in reporting, added group groupby for filters bzr revid: dle@openerp.com-20121024162018-uj7moreco8kvwlyy --- addons/fleet/board_fleet_view.xml | 8 +++----- addons/fleet/fleet.py | 7 ------- addons/fleet/fleet_view.xml | 9 +++++---- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/addons/fleet/board_fleet_view.xml b/addons/fleet/board_fleet_view.xml index 51e0b2d1ac9..6ef00075e3a 100644 --- a/addons/fleet/board_fleet_view.xml +++ b/addons/fleet/board_fleet_view.xml @@ -55,7 +55,7 @@ board.fleet.form board.board -
+ @@ -72,7 +72,7 @@ - Dashboard + Fleet board.board form form @@ -93,11 +93,9 @@ - - diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index fa5624314b5..110ec7597bb 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -966,12 +966,6 @@ class fleet_vehicle_log_contract(osv.Model): } } - def _hide_generated_cost(self, cursor, user, ids, name, arg, context=None): - res = {} - for contract in self.browse(cursor, user, ids, context=context): - res[contract.id] = (contract.cost_frequency == 'no') - return res - def compute_next_year_date(self, strdate): oneyear=datetime.timedelta(days=365) curdate = self.str_to_date(strdate) @@ -1074,7 +1068,6 @@ class fleet_vehicle_log_contract(osv.Model): 'cost_generated': fields.float('Recuring Costs Amount',help="Costs paid at regular intervals, depending on the cost frequency. If the cost frequency is set to unique, the cost will be logged at the start date"), 'cost_frequency': fields.selection([('no','No'),('daily', 'Daily'),('weekly','Weekly'),('monthly','Monthly'),('yearly','Yearly')], 'Cost Frequency', help='Frequency of the costs',required=True), 'generated_cost_ids' : fields.one2many('fleet.vehicle.cost', 'contract_id', 'Generated Costs',ondelete='cascade'), - 'hide_generated_cost': fields.function(_hide_generated_cost, string='Frequency', type='boolean', help='This field is for internal purpose. It is used to decide if the field generated_cost lot has to be shown on the moves or not.'), } _defaults = { 'purchaser_id': lambda self, cr, uid, ctx: uid, diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 76f7b8e0713..0d23c04caac 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -379,8 +379,7 @@
- Leasing + Employee Car @@ -435,4 +435,4 @@ Break
- \ No newline at end of file + diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 49ecb81bd21..cbc41d4f973 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -45,9 +45,7 @@

Click to create a new model.

- Specify the different model for a particular - brand of vehicle. For example Audi A3, - Audi A4, ... + You can define several models (e.g. A3, A4) for each brand (Audi).

@@ -120,8 +118,6 @@

Click to create a new brand. -

- Here you can add vehicle's brands (BMW, Opel, ...)

@@ -145,10 +141,10 @@ tree,form

- Click to create a new state. + Click to create a vehicule status.

- A state can help you knowing in what condition your - vehicle is. In reparation, Sold, Active, ... + You can customize available status to track the evolution of + each vehicule. Example: Active, Being Repaired, Sold.

@@ -347,12 +343,12 @@

Click to create a new vehicle.

- OpenERP will help you manage your fleet by keeping - track of the contracts, services, costs, fuel logs associated - to a particular vehicle. + You will be able to manage your fleet by keeping track of the + contracts, services, fixed and recurring costs, odometers and + fuel logs associated to each vehicle.

- When a contract arrives near expiration date, a visual warning - will show you that you need to renew that particular contract. + OpenERP will warn you when services or contract have to be + renewed.

@@ -487,12 +483,12 @@

Click to create a new contract.

- OpenERP helps you managing all the contracts for your - vehicle, leasing, insurance, or any other type of contract. -

- The contract form includes all sort of details, like the - activation cost, recurrent cost, the services included in - the contract, beginning and possibly ending date, etc. + Manage all your contracts (leasing, insurances, etc.) with + their related services, costs. OpenERP will automatically warn + you when some contracts have to be renewed. +

+ Each contract (e.g.: leasing) may include several services + (reparation, insurances, periodic maintenance).

@@ -656,9 +652,9 @@

Click to create a new fuel log.

- Here you can add refuelling entries for all vehicles. - You can also show the log for a particular vehicle using - the search field. + Here you can add refuelling entries for all vehicles. You can + also filter logs of a particular vehicle using the search + field.

@@ -749,7 +745,7 @@ Click to create a new service entry.

OpenERP helps you keeping track of all the services done - on your vehicle. Services can be of many type, occasional + on your vehicle. Services can be of many type: occasional repair, fixed maintenance, etc.

@@ -777,10 +773,7 @@

Click to create a new type of service.

- Each service belongs to a category.
- - contract if this service is used in a contract (ie: leasing, ...).
- - service if it is used as a service (ie: repair, change tire...).
- - both if it is used in both case. + Each service can used in contracts, as a standalone service or both.

@@ -869,11 +862,9 @@

Click to create a new cost.

- OpenERP helps you managing the costs for your different vehicles - Costs are generally created from services and contract and appears here. -

- Thanks to the different filters, OpenERP can only print the effective - costs, sort them by type and by vehicle. + OpenERP helps you managing the costs for your different + vehicles. Costs are created automatically from services, + contracts (fixed or recurring) and fuel logs.

From f992b688bb268a03957e2b4f936715cc145c2864 Mon Sep 17 00:00:00 2001 From: "Jalpesh Patel (OpenERP)" Date: Mon, 29 Oct 2012 15:48:50 +0530 Subject: [PATCH 266/841] [IMP]solve problem don't save or confirm or confirm & receive manually creating incoming shipments bzr revid: pja@tinyerp.com-20121029101850-78iq489ut29q7w62 --- addons/stock/stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index eb667b53c09..e7b3cf1e041 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -618,7 +618,7 @@ class stock_picking(osv.osv): def create(self, cr, user, vals, context=None): if ('name' not in vals) or (vals.get('name')=='/'): - seq_obj_name = 'stock.picking.' + vals.get('type','in') + seq_obj_name = 'stock.picking.' + context.get('default_type','internal') vals['name'] = self.pool.get('ir.sequence').get(cr, user, seq_obj_name) new_id = super(stock_picking, self).create(cr, user, vals, context) if new_id: From bf4a26d3e8613c24b3a360013525cfef28458176 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 29 Oct 2012 12:01:54 +0100 Subject: [PATCH 267/841] [ADD] actual-RPC tests, with UI. Bump QUnit timeout to 10s so RPC can run at all bzr revid: xmo@openerp.com-20121029110154-5927gaix8k0ijl0c --- addons/web/controllers/testing.py | 2 +- addons/web/doc/images/db-query.png | Bin 0 -> 7142 bytes addons/web/doc/images/tests2.png | Bin 37769 -> 20114 bytes addons/web/doc/images/tests3.png | Bin 37827 -> 20382 bytes addons/web/doc/testing.rst | 86 +++++++++- addons/web/static/src/js/testing.js | 182 ++++++++++++++++------ addons/web_tests_demo/__init__.py | 14 ++ addons/web_tests_demo/static/test/demo.js | 15 ++ 8 files changed, 242 insertions(+), 57 deletions(-) create mode 100644 addons/web/doc/images/db-query.png diff --git a/addons/web/controllers/testing.py b/addons/web/controllers/testing.py index 0cfc633a492..9947f1e1ed5 100644 --- a/addons/web/controllers/testing.py +++ b/addons/web/controllers/testing.py @@ -53,7 +53,7 @@ TESTING = Template(u""" diff --git a/addons/web/doc/images/db-query.png b/addons/web/doc/images/db-query.png new file mode 100644 index 0000000000000000000000000000000000000000..e063b724001871f3846ead587810069347a8eab6 GIT binary patch literal 7142 zcmaJ^byU>Ny9WdWlw1_)bm>@0NhuLox;vH>7o;SlyE~R#kp=U=QC$QloVueama8`P*8AX-$|*Upr8gL#|SJmWN*zpJA{Hl zUMwpmuI4iRCp9y%NSHX_TB`ApV)K))zqQy(h)9Bd-Q=?nW2*bL7!kYxqoV-`f9qmF zwQ7nQC|TAA#I9AH=SCdtCm9-O9r5l7CA!2gBSHuyAawrG=Mh^HShNc`|Naw@0cia@ zq_AjtfD%{_bCzI#S%-Y}EabOkhx)(ay-cCa@LcO||w3 zw-17Un{V85uDrtaE@GxRv(tsX?+EthnEFW$W2+>4a7L*!EHNdEq9#-DFdVd0COSdj z(7$!<89jpGm+%-PrcuBeocNkk=X7lS5dDWl%v^`5vcCHd0pmkA^{zd=bP4BVA!(TQGpC;T(@|%Ds=~e*YvUZ7-rEljGYl;GTnMKK#n-M6 zxEd3?MP543?p)@Uy0(A@{rA~oR!E86n;5;C<;W*7pKfuuF75Z+Z82w0eE2z4~&)-uvVdqe9I)(j)xcj7{jNLsrSXmBjr5t@eyoq|Ep7> zyr^(l4H<6I9N{nP&l4UgD3`N`2|Jo!#x*j9Evu#Vb2pD-apxV?lLuxNO{hk#IMr`* z=rMZg#j9(Zc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{C|kdI=qwqqj%VU!j_`XJiS4 zd?;bC0Q`pYe*>@nuW$Auq7t^ELR+Gku3cPt)j%|yYtO@t;a8mBXHtaN&EON599HJ* zc%iK@V+7{ts5MW@R3nwSG$UW^XZaV2wLmatB!ZxLhm0PRkWbx zurZ~xIZ3o(6-G*jU5;w}n_WjejMC7BVM^UiKCaG9L{_Qt?fs?Xq`VW`hrpp*l6!j# z=b8TCafX<9Hh|^fa2%qS*Dj2buMCaqz0XxA&QQz1U;Y2d@y7U-Qp5ftc;%>n{)^Q8 i-_8DQ^61~$CMvxfN=PbeEjY%khi<56s#~S)_~;*;tJ>56 diff --git a/addons/web/doc/images/tests3.png b/addons/web/doc/images/tests3.png index 10b45eddedcbaf300d54245b85134efb2736c3cb..247f70716af614d48ed6255832cb2d71dce5d9f2 100644 GIT binary patch literal 20382 zcmaI7V|Zp!(=Hg>w#_HDZQHilvC~1vX2-T|chIqI+nDtGp800xnsc2$wQ5(@QZ3cq zd)*O=@)GbcI50p!K=4wMqRK!(AV}Z*Jru|{6{GrT0tBRBCM7DQ>bZKJEo5`LiZOD9 zdHn7RED$&+QS7xPnq7+OMzpg#@f&PV0$KXEq!5C#JS+wYm0cN<65yEJ7+`2s=ZX9p zaoMyIF)`2D!NqSmebe&{FF(2JWFfUE;9b+@;`fFN5!`23i--jV`j0_^!-9hd76KRo zzSF*dzVGyZqu7HU&b=G*|9sx+`OM~y{6qi(+Kz)pfjcO7alHoqZh!AHy`im>>-AsY zZyq!HL3aLcp9JK0zYGA1E#JvCaUUo5^UOCFVEBI~f`D)Rf5IL zI~@*jv|Yy-&TAcOk5`MFt_^YpSF8JyDP}vo`V5xLcxmTa|44xQdZQt2$3Q5+Vp~r< zPiMby%k1yl8UuRg4kA`%Wr9e%C83?SmI-HW6Mr;$OjmSs|L&EqFkDCfad_YOW4lEsHxO|EYR7)Zd8NJ6t&%u@W9beBcR_= zYW2H#$}qXAi1F4t^Or1=(GkuOAIVQjS(izn;ZlP0b?)xRf6a#L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Y6KyslflMWSn$9_;k!@S08>B=nwW;Q@0>^wdh3`io1?U9wr~Ykm!y+}5hj*ZPNv zx8eitkABps1zgB4ZLrOXL-!+_KBK)CaR2M}y^!Kx-!{hLW1+Eqv^3|1IUjR`0FpTzumS);!~P$c8AIIQ9X4{cKUTh3(8cJB}>zof%7>l z6j6(V`S`I(q3*ez52Tegis96#G`3kt+wX1$d8C<<+$Uja6i}vdiw`)k5+}S!Jo`Z> z8>t6Q(k%lb|I@n!6fPMEIw0maW`}o|FdT!k8S(#A&c67m|8>`)9e)fQrw()$O~rXI z^n!}xfY6)ErIGBH1n%s&y=P2@p>R2d75L8ZAwT0xoSKgcX21$_AxH0&w*IpBardGu zXXV8DLN!CBGbMi!D-jN*9Ecq^Zd8}kKIN2pgVi`4fDkzz&WWi-DUWac;GeIL5iB7c ztaHlbFppX+cKq?&%{{VV&(gouy+QZn2J83C-A)Xx=QoBVaP+$T=}7nsd!8(-f0t|g oM{49c7sJl~uNeNXsMZmny(1w`O>%GaxRSb=iRF!IW2cw@0yHQo3;+NC diff --git a/addons/web/doc/testing.rst b/addons/web/doc/testing.rst index 582960846e4..61077072ad2 100644 --- a/addons/web/doc/testing.rst +++ b/addons/web/doc/testing.rst @@ -297,8 +297,8 @@ test architecture was not warned about asynchronous operations. .. note:: - asynchronous test cases also have a 2 seconds timeout: if the test - does not finish within 2 seconds, it will be considered + asynchronous test cases also have a 10 seconds timeout: if the + test does not finish within 10 seconds, it will be considered failed. This pretty much always means the test will not resolve. .. note:: @@ -328,8 +328,8 @@ a test case (or its containing test suite) through Mock RPC ++++++++ -The preferred (and most fastest from a setup and execution time point -of view) way to do RPC during tests is to mock the RPC calls: while +The preferred (and fastest from a setup and execution time point of +view) way to do RPC during tests is to mock the RPC calls: while setting up the test case, provide what the RPC responses "should" be, and only test the code between the "user" (the test itself) and the RPC call, before the call is effectively done. @@ -412,7 +412,83 @@ To do this, set the :js:attr:`rpc option <~TestOptions.rpc>` to Actual RPC ++++++++++ -.. TODO:: rpc to database (implement & document) +A more realistic (but significantly slower and more expensive) way to +perform RPC calls is to perform actual calls to an actually running +OpenERP server. To do this, set the :js:attr:`rpc option +<~TestOptions.rpc>` to ``rpc``, it will not provide any new parameter +but will enable actual RPC, and the automatic creation and destruction +of databases (from a specified source) around tests. + +First, create a basic model we can test stuff with: + +.. code-block:: javascript + + from openerp.osv import orm, fields + + class TestObject(orm.Model): + _name = 'web_tests_demo.model' + + _columns = { + 'name': fields.char("Name", required=True), + 'thing': fields.char("Thing"), + 'other': fields.char("Other", required=True) + } + _defaults = { + 'other': "bob" + } + +then the actual test:: + + test('actual RPC', {rpc: 'rpc', asserts: 4}, function (instance) { + var Model = new instance.web.Model('web_tests_demo.model'); + return Model.call('create', [{name: "Bob"}]) + .pipe(function (id) { + return Model.call('read', [[id]]); + }).pipe(function (records) { + strictEqual(records.length, 1); + var record = records[0]; + strictEqual(record.name, "Bob"); + strictEqual(record.thing, false); + // default value + strictEqual(record.other, 'bob'); + }); + }); + +This test looks like a "mock" RPC test but for the lack of mock +response (and the different ``rpc`` type), however it has further +ranging consequences in that it will copy an existing database to a +new one, run the test in full on that temporary database and destroy +the database, to simulate an isolated and transactional context and +avoid affecting other tests. One of the consequences is that it takes +a *long* time to run (5~10s, most of that time being spent waiting for +a database duplication). + +Furthermore, as the test needs to clone a database, it also has to ask +which database to clone, the database/super-admin password and the +password of the ``admin`` user (in order to authenticate as said +user). As a result, the first time the test runner encounters an +``rpc: "rpc"`` test configuration it will produce the following +prompt: + +.. image:: ./images/db-query.png + :align: center + +and stop the testing process until the necessary information has been +provided. + +The prompt will only appear once per test run, all tests will use the +same "source" database. + +.. note:: + + The handling of that information is currently rather brittle and + unchecked, incorrect values will likely crash the runner. + +.. note:: + + The runner does not currently store this information (for any + longer than a test run that is), the prompt will have to be filled + every time. Testing API ----------- diff --git a/addons/web/static/src/js/testing.js b/addons/web/static/src/js/testing.js index 45728902e7f..744bd9fa2cd 100644 --- a/addons/web/static/src/js/testing.js +++ b/addons/web/static/src/js/testing.js @@ -85,6 +85,7 @@ openerp.testing = {}; }; }; + var db = window['oe_db_info'] || undefined; testing.section = function (name, options, body) { if (_.isFunction(options)) { body = options; @@ -115,32 +116,69 @@ openerp.testing = {}; // returns -1 -> index becomes 0 -> replace with ``undefined`` so // Array#slice returns a full copy 0, module_index + 1 || undefined); + + // Serialize options for this precise test case + // WARNING: typo is from jquery, do not fix! + var env = QUnit.config.currentModuleTestEnviroment; + var opts = _.defaults({ + // section setup + // case setup + // test + // case teardown + // section teardown + setup: function () { + var args = [].slice.call(arguments); + return $.when(env._oe.setup.apply(null, args)) + .pipe(function () { + return options.setup.apply(null, args); + }); + }, + teardown: function () { + var args = [].slice.call(arguments); + return $.when(options.teardown.apply(null, args)) + .pipe(function () { + return env._oe.teardown.apply(null, args); + }); + } + }, options, env._oe); + // FIXME: if this test is ignored, will still query + if (opts.rpc === 'rpc' && !db) { + QUnit.config.autostart = false; + db = { + source: null, + supadmin: null, + password: null + }; + var $msg = $('

') + .append('

A test needs to clone a database

') + .append('

Please provide the source clone information

') + .append(' Source DB: ').append('').append('
') + .append(' DB Password: ').append('').append('
') + .append('Admin Password: ').append('').append('
') + .append('') + .submit(function (e) { + e.preventDefault(); + e.stopPropagation(); + db.source = $msg.find('input[name=source]').val(); + db.supadmin = $msg.find('input[name=supadmin]').val(); + db.password = $msg.find('input[name=password]').val(); + QUnit.start(); + $.unblockUI(); + }); + $.blockUI({ + message: $msg, + css: { + fontFamily: 'monospace', + textAlign: 'left', + whiteSpace: 'pre-wrap', + cursor: 'default' + } + }); + } + QUnit.test(name, function () { // module testing environment var self = this; - var opts = _.defaults({ - // section setup - // case setup - // test - // case teardown - // section teardown - setup: function () { - if (self._oe.setup.apply(null, arguments)) { - throw new Error("Asynchronous setup not implemented"); - } - if (options.setup.apply(null, arguments)) { - throw new Error("Asynchronous setup not implemented"); - } - }, - teardown: function () { - if (options.teardown.apply(null, arguments)) { - throw new Error("Asynchronous teardown not implemented"); - } - if (self._oe.teardown(null, arguments)) { - throw new Error("Asynchronous teardown not implemented"); - } - } - }, options, this._oe); var instance; if (!opts.dependencies) { @@ -202,38 +240,80 @@ openerp.testing = {}; break; case 'rpc': async = true; + (function (setup, teardown) { + // Bunch of random base36 characters + var dbname = 'test_' + Math.random().toString(36).slice(2); + opts.setup = function (instance, $s) { + // FIXME hack: don't want the session to go through shitty loading process of everything + instance.session.session_init = testing.noop; + instance.session.load_modules = testing.noop; + instance.session.session_bind(); + return instance.session.rpc('/web/database/duplicate', { + fields: [ + {name: 'super_admin_pwd', value: db.supadmin}, + {name: 'db_original_name', value: db.source}, + {name: 'db_name', value: dbname} + ] + }).pipe(function (result) { + if (result.error) { + return $.Deferred().reject(result.error).promise(); + } + return instance.session.session_authenticate( + dbname, 'admin', db.password, true); + }).pipe(function () { + return setup(instance, $s); + }); + }; + opts.teardown = function (instance, $s) { + return $.when(teardown(instance, $s)).pipe(function () { + return instance.session.session_logout() + }).pipe(function () { + return instance.session.rpc('/web/database/drop', { + fields: [ + {name: 'drop_pwd', value: db.supadmin}, + {name: 'drop_db', value: db.dbname} + ] + }); + }).pipe(function (result) { + if (result.error) { + return $.Deferred().reject(result.error).promise(); + } + return result; + }); + }; + })(opts.setup, opts.teardown); } - // TODO: async setup/teardown - opts.setup(instance, $fixture, mock); - - var result = callback(instance, $fixture, mock); - - // TODO: cleanup which works on errors - if (!(result && _.isFunction(result.then))) { - if (async) { - ok(false, "asynchronous test cases must return a promise"); - } - opts.teardown(instance, $fixture, mock); - return; - } - + // Always execute tests asynchronously stop(); - if (!_.isNumber(opts.asserts)) { - ok(false, "asynchronous test cases must specify the " - + "number of assertions they expect"); - } - result.always(function () { - start(); - opts.teardown(instance, $fixture, mock); - }).fail(function (error) { - if (options.fail_on_rejection === false) { - return; + $.when(opts.setup(instance, $fixture, mock)) + .pipe(function () { + var result = callback(instance, $fixture, mock); + if (!(result && _.isFunction(result.then))) { + if (async) { + ok(false, "asynchronous test cases must return a promise"); + } + } else { + if (!_.isNumber(opts.asserts)) { + ok(false, "asynchronous test cases must specify the " + + "number of assertions they expect"); + } } - ok(false, typeof error === 'object' && error.message - ? error.message - : JSON.stringify([].slice.call(arguments))); - }) + return $.when(result).fail(function (error) { + if (options.fail_on_rejection === false) { + return; + } + ok(false, typeof error === 'object' && error.message + ? error.message + : JSON.stringify([].slice.call(arguments))); + }) + }).pipe(function () { + return opts.teardown(instance, $fixture, mock); + }, function () { + return opts.teardown(instance, $fixture, mock); + }).always(function () { + start(); + }); }); }; })(openerp.testing); diff --git a/addons/web_tests_demo/__init__.py b/addons/web_tests_demo/__init__.py index e69de29bb2d..137d472ec74 100644 --- a/addons/web_tests_demo/__init__.py +++ b/addons/web_tests_demo/__init__.py @@ -0,0 +1,14 @@ +from openerp.osv import orm, fields + +class TestObject(orm.Model): + _name = 'web_tests_demo.model' + + _columns = { + 'name': fields.char("Name", required=True), + 'thing': fields.char("Thing"), + 'other': fields.char("Other", required=True) + } + _defaults = { + 'other': "bob" + } + diff --git a/addons/web_tests_demo/static/test/demo.js b/addons/web_tests_demo/static/test/demo.js index 0bf5a1a58b6..62cecf6f088 100644 --- a/addons/web_tests_demo/static/test/demo.js +++ b/addons/web_tests_demo/static/test/demo.js @@ -84,4 +84,19 @@ openerp.testing.section('basic section', function (test) { deepEqual(dbm.db_list, ['foo', 'bar', 'baz']); }); }); + + test('actual RPC', {rpc: 'rpc', asserts: 4}, function (instance) { + var Model = new instance.web.Model('web_tests_demo.model'); + return Model.call('create', [{name: "Bob"}]) + .pipe(function (id) { + return Model.call('read', [[id]]); + }).pipe(function (records) { + strictEqual(records.length, 1); + var record = records[0]; + strictEqual(record.name, "Bob"); + strictEqual(record.thing, false); + // default value + strictEqual(record.other, 'bob'); + }); + }); }); From 21e776a56b9fedb25c48b1ea362227ed76de6321 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 29 Oct 2012 12:09:02 +0100 Subject: [PATCH 268/841] [IMP] document test runner global conf keys bzr revid: xmo@openerp.com-20121029110902-ob21050di74vcyqc --- addons/web/doc/testing.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/addons/web/doc/testing.rst b/addons/web/doc/testing.rst index 61077072ad2..4760f0780eb 100644 --- a/addons/web/doc/testing.rst +++ b/addons/web/doc/testing.rst @@ -409,6 +409,8 @@ To do this, set the :js:attr:`rpc option <~TestOptions.rpc>` to handler containing assertions, it multiplies the effective number of assertions) +.. _testing-rpc-rpc: + Actual RPC ++++++++++ @@ -568,6 +570,19 @@ Testing API should be loaded into QWeb before starting the test. A boolean, ``false`` by default. +The test runner can also use two global configuration values set +directly on the ``window`` object: + +* ``oe_all_dependencies`` is an ``Array`` of all modules with a web + component, ordered by dependency (for a module ``A`` with + dependencies ``A'``, any module of ``A'`` must come before ``A`` in + the array) + +* ``oe_db_info`` is an object with 3 keys ``source``, ``supadmin`` and + ``password``. It is used to pre-configure :ref:`actual RPC + ` tests, to avoid a prompt being displayed + (especially for headless situations). + Running through Python ---------------------- From 90d58d13752946b57fbb22c04dadfbc7eb8a3ac9 Mon Sep 17 00:00:00 2001 From: "Nimesh (Open ERP)" Date: Mon, 29 Oct 2012 16:58:05 +0530 Subject: [PATCH 269/841] [IMP] change button attr. bzr revid: nco@tinyerp.com-20121029112805-xppvo5fgswhq0ete --- addons/purchase/stock_view.xml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/purchase/stock_view.xml b/addons/purchase/stock_view.xml index 0651cf5db90..c78439e98f6 100644 --- a/addons/purchase/stock_view.xml +++ b/addons/purchase/stock_view.xml @@ -59,9 +59,8 @@
From 97208c971b9155cffa57f403109bc92104af9938 Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Mon, 29 Oct 2012 18:37:14 +0100 Subject: [PATCH 289/841] [IMP] avoid tabs (4 spaces) in the middle of help text bzr revid: abo@openerp.com-20121029173714-qpr4rrhll576jxmm --- addons/crm/crm_lead.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index da0a3f7d756..0366045b90f 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -224,11 +224,7 @@ class crm_lead(base_stage, format_address, osv.osv): multi='day_close', type="float", store=True), 'state': fields.related('stage_id', 'state', type="selection", store=True, selection=crm.AVAILABLE_STATES, string="Status", readonly=True, - help='The Status is set to \'Draft\', when a case is created.\ - If the case is in progress the Status is set to \'Open\'.\ - When the case is over, the Status is set to \'Done\'.\ - If the case needs to be reviewed then the Status is \ - set to \'Pending\'.'), + help='The Status is set to \'Draft\', when a case is created. If the case is in progress the Status is set to \'Open\'. When the case is over, the Status is set to \'Done\'. If the case needs to be reviewed then the Status is set to \'Pending\'.'), # Only used for type opportunity 'probability': fields.float('Success Rate (%)',group_operator="avg"), From 7a8d6753021ea86f72ab2a7aca374e70620aa03c Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Mon, 29 Oct 2012 19:11:56 +0100 Subject: [PATCH 290/841] [IMP] code style remove mutable default remove useless whitespaces bzr revid: abo@openerp.com-20121029181156-ao52q3uun3ilp2qk --- addons/crm/crm_lead.py | 4 ++- addons/crm/crm_lead_view.xml | 66 ++++++++++++++++++------------------ 2 files changed, 36 insertions(+), 34 deletions(-) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 0366045b90f..4074856ad81 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -324,7 +324,7 @@ class crm_lead(base_stage, format_address, osv.osv): cases = self.browse(cr, uid, ids2, context=context) return self._action(cr, uid, cases, False, context=context) - def stage_find(self, cr, uid, cases, section_id, domain=[], order='sequence', context=None): + def stage_find(self, cr, uid, cases, section_id, domain=None, order='sequence', context=None): """ Override of the base.stage method Parameter of the stage search taken from the lead: - type: stage type must be the same or 'both' @@ -332,6 +332,8 @@ class crm_lead(base_stage, format_address, osv.osv): be a default stage; if not set, stages must be default stages """ + if domain == None: + domain = [] if isinstance(cases, (int, long)): cases = self.browse(cr, uid, cases, context=context) # collect all section_ids diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index b6890a7de07..a05af900bb9 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -14,9 +14,9 @@ action_crm_lead_unread - + action - + crm.lead client_action_multi @@ -32,9 +32,9 @@ action_crm_lead_read - + action - + crm.lead client_action_multi @@ -143,7 +143,7 @@
- @@ -253,12 +253,12 @@ - + - + @@ -276,8 +276,8 @@ - - + + @@ -354,14 +354,14 @@ - + - + - - + + @@ -415,7 +415,7 @@ name="action_makeMeeting" type="object" context="{'search_default_attendee_id': active_id, 'default_attendee_id' : active_id}" - /> + />