Commit Graph
3175 Commits
Author SHA1 Message Date
Richard Mathot d6fc6b416a [FIX] base: keep a complete address for demo company
Orelse making a demo of a shipper become very tiresome as
you have first to set an address for your company.

(partial revert of dccfdb0ddb)
2017-06-01 16:42:48 +02:00
Jairo Llopis a567cd796e [IMP] service: Display a warning when launching tests in multi-workers mode
Indeed, running the testsuite is not supported in multi-process (worker/pre-fork) mode, for multiple reasons: no multiple/concurrent execution of tests, necessity for in-memory cross-request statefulness (test cursor), etc.

We have no plan to work around these issues, as there seems to be no strong use case.
Our testsuite is mainly focused on the business/framework aspects, and not scalability/deployment aspects - which would require a much more complicated test infrastructure.
2017-06-01 11:51:24 +02:00
Olivier Dony 5d2869cbc8 [MERGE] Forward-port saas-16 up to ba15df47cb 2017-06-01 01:46:13 +02:00
Olivier Dony ba15df47cb [MERGE] Forward-port saas-15 up to 17b847c0f6 2017-06-01 01:10:29 +02:00
Olivier Dony 5dd2cc8e63 [MERGE] Forward-port saas-14 up to b9e2207267 2017-06-01 00:37:30 +02:00
Olivier Dony b9e2207267 [MERGE] Forward-port 10.0 up to 7e44444878 2017-06-01 00:15:27 +02:00
Olivier Dony 7e44444878 [MERGE] Forward-port saas-11 up to 156e9d0016 2017-05-31 20:09:51 +02:00
Yannick Tivisse fba234741b [IMP] base: Move default address format into a method for inheritence
This diff is a small refactoring of a method to allow override.
2017-05-30 17:59:31 +02:00
Yenthe V.G 746a13df91 [IMP] base: Add missing names on filters to allow inheritence
Closes #17306
Closes #17303
Closes #17302
Closes #17301
Closes #17300
Closes #17298
Closes #17296
Closes #17295
2017-05-30 16:18:15 +02:00
Yannick Tivisse 22755463bb [FIX] base: Use correct name for Araba/Álava spanish state
Partly revert #17251 to stick with #15166
2017-05-30 11:04:00 +02:00
Yenthe V.G c8d132f751 [IMP] base: remove length of pass and user fields of ir.mail_server
Indeed in some cases those could be longer than 64 characters. As
there is no real constraint let us drop the limit to simplify it.

Closes #17269 .
2017-05-29 16:34:43 +02:00
Laurent Smet e06b039642 [FIX] account: fix traceback when resetting invoice to draft (#17262)
Due to a bad refactoring of this method during the remove of the
'report' module, a traceback occurs when resetting an invoice to draft.
This is due to the retrieve_attachment method that is used as an api.model
instead of api.multi.
2017-05-29 16:05:49 +02:00
Josean 366c1e307f [FIX] base: Correct typos for 2 spanish states
Closes https://github.com/odoo/odoo/pull/17251
2017-05-29 11:13:46 +02:00
Odoo Translation Bot 20c724479f [I18N] Update translation terms from Transifex 2017-05-28 07:06:53 +02:00
Odoo Translation Bot bcf302cf48 [I18N] Update translation terms from Transifex 2017-05-28 04:29:29 +02:00
Yannick Tivisse 7e008469e4 [IMP] base: Always load menuitem xmlids on templates
PURPOSE
=======

Currently we can choose to load the xmlid of a menuitem if web_tour is installed by setting the attribute `load_xmlid=True` on the view.

This is strange for 2 reasons:
- Searching all the ir.model.data on menuitems with load_xmlid=True to compute its xmlid, searching the related subtree on the returned structure of the method load_menus is quite complicated for the perfomance gain (if there is any perfomance gain to do it)
- This is not working in community in frontend, as only the root menuitems are loaded, thus it is the `load_menus_root` instead of the `load_menus` that is called. This issue prevent a tour step to be displayed correctly on community and enterprise on a menuitem.

SPECIFICATION
=============

Remove all the `load_xmlid` attributes and the related mechanism and move it into base to always load the xmlids for all the menuitems. It won't bee to heavy as the result is cached.

It's better the keep the current mechanism (Load the xmlids from ir.model.data and insert them into the tree) as we only make 1 search to the ir.model.data
2017-05-26 13:13:12 +02:00
Raphael Collet f69c659b1a [FIX] translate: avoid body/div wrappers when translating text inside HTML (#17160) 2017-05-23 16:45:19 +02:00
Martin Trigaux fc2daaeaec [FIX] base: include installed module in inheriting views retrival
In a scenario with the following views:

Mod A, view 1*
|-- Mod B, view 2
\-- Mod B, view 3*

view 3 can not rely on the elements added by view 2 in xpath
If view 3 is a primary view, view 1 must be fully resolved first (apply view 2)
before resolving view 3.

Next commit describes a real use-case with product.

Linked to #16541 and #16428
2017-05-23 16:42:49 +02:00
Xavier Morel b897dcde15 [FIX] P3: import pattern which doesn't seem to work right
``import odoo.addons.foo as bar`` doesn't seem to properly trigger the
import hook in Python 3 (it blows up on decimal_precision and
base). Thus convert *all* examples of that pattern to the more
sensible ``from odoo.addons import foo as bar``.
2017-05-22 13:30:50 +02:00
Xavier Morel e5ef1c5917 [FIX] P3: don't resize the value False
Yields really strange errors in P3.
2017-05-22 13:30:50 +02:00
Yannick Tivisse 9a572f8eec [IMP] base: Add a new model 'Sector of Activity' used on partners
purpose
=======

We need to store and produce reports about customer activity sectors to improve references mechanism.

Specification
=============

- add a new model res.partner.industry "Sector of Activity"
    - fields:
        - name (translatable)
        - full_name (translatable)
        - active
    - add minimalist form and list views (à la Contact Tags)
    - menu: Sales/Settings/Contacts/Contact Industries  (Technical Settings only)
    - ACL: R for group_user, CRUD for group_system
- add a default XML data file to preload res.partner.industry with the ISIC 2008 aka NACE rev.2 level 1: https://docs.google.com/a/odoo.com/spreadsheets/d/1IrGbHIaaDDkBAS2uGABeNRPndtYbyVBVoYYpQNXnhnY/edit?usp=sharing
    - Note: we leave it as an option for end-users to import their own industries, because there are many competing standards: ISIC, NACE, NAICS, OKVED, etc.
    - Each standard also has different hierarchical levels, and we only use the top level one by default.
- add a m2o industry_id ("Sector of Activity") on res.partner towards res.partner.industry
    - add industry_id in partner form view, in Sales & Purchase > Misc, only visible when contact type is Company
    - No quick create for this field
2017-05-22 11:30:11 +02:00
Laurent Smet 915aa9e4db [IMP] account: improve usability on journals.
This commit add computed fields that allow to easily change the next number that will be given by the journal's sequence.
Was PR #15163
2017-05-22 09:29:17 +02:00
Odoo Translation Bot c0d9ddb4d4 [I18N] Update translation terms from Transifex 2017-05-21 07:11:01 +02:00
Odoo Translation Bot 7eda91ce58 [I18N] Update translation terms from Transifex 2017-05-21 04:33:07 +02:00
Xavier Morel ee894b1384 [FIX] provide items method on lru so shim works 2017-05-19 16:46:42 +02:00
xmo-odoo 05abc1faed [FIX] test_pylint: pylint error output to failure
Sometimes PyLint itself blows up which fails the test but does not
provide any indication as to why, which is inconvenient.
2017-05-19 16:46:42 +02:00
Raphael Collet afef71d6b9 [FIX] Always round monetary values in database (#17010)
Let `create` and `write` round monetary field values before sending them to the
database. Pass the values to be written to `field.convert_to_column`, so that
the currency can be retrieved from the values, and the value be rounded.
2017-05-18 14:15:07 +02:00
qdp-odoo 6db235385a [IMP] account: replace bank_acc_number by bank_account_id on bank journal form view.
Was PR#16105
2017-05-17 15:35:06 +02:00
Olivier Dony 5f4db9df66 [MERGE] Forward-port saas-16 up to 5afe894f44 2017-05-16 18:23:15 +02:00
Olivier Dony 5afe894f44 [MERGE] Forward-port saas-15 up to 878fbc75ff 2017-05-16 17:09:45 +02:00
Laurent Smet 259c5d9145 [IMP] report: pass pdfreport_path to postprocess_pdf_report method
Restore a feature lost due to refactoring in https://github.com/odoo/odoo/commit/e80238042c9d93d492ea8b06b0041aced0d81dcd
that pass the path to the report instead of the attachment content in order to perform changes to be part of the final result.

see https://github.com/odoo/odoo/pull/16936#issuecomment-300827614
2017-05-16 15:37:23 +02:00
Laurent Smet d5fa3232fe [FIX] base, report: fix some issues due to removed 'report' module.
fix related to task: https://www.odoo.com/web#id=31625&view_type=form&model=project.task&action=333&active_id=967&menu_id=4720

The 'report' module no longer exists but a dependency was still there in l10n_ca.

- fix dependency in l10n_ca
- fix broken company layout
- move layout templates from base to web
2017-05-16 15:37:15 +02:00
Olivier Dony 61c2b8efd5 [MERGE] Forward-port of saas-14 up to 9b3ca1af23 2017-05-16 12:47:44 +02:00
Olivier Dony 9b3ca1af23 [MERGE] Forward-port 10.0 up to 1545995b39 2017-05-16 12:12:30 +02:00
Olivier Dony ab8c81a96f [MERGE] Forward-port saas-11 up to 0570033ae7 2017-05-16 10:30:23 +02:00
xmo-odoo 59bcb5d611 [FIX] P3: iteritems 2017-05-15 17:32:12 +02:00
xmo-odoo 7cffacb434 [FIX] missing import
Call would crash when you crash.
2017-05-15 16:09:45 +02:00
Xavier Morel 4550f45f47 [FIX] P3: document stdlib changes
Also lint away verboten stdlib modules.
2017-05-15 12:26:32 +02:00
Xavier Morel e2f1af78c4 [FIX] P3: remove cgi.escape uses
cgi.escape is unsafe (quote=False by default) and deprecated in Python
3. We already have an openerp.tools.misc.html_escape version which
forwards to the (modern and safe) werkzeug.utils.escape, just use that
everywhere, and convert extant uses of werkzeug.utils.escape to
utils.html_escape as well so that we do the same thing everywhere.
2017-05-15 12:26:31 +02:00
Xavier Morel 5617d4614b [FIX] P3: itertools.iziplongest renamed 2017-05-15 12:26:31 +02:00
Xavier Morel 67c17cb37f [REM] P3: outdated html2text vendoring
The vendored html2text is *really* old and absolutely not
P3-compatible.

There is a maintained version on Pypy which is, so use that and stop
vendoring html2text.
2017-05-15 12:26:30 +02:00
Xavier Morel b5983a485d [FIX] P3: remove cPickle use
In Python 3 the native acceleration module was merged into pickle
directly.

For cross-version simplicity, just use the base module in Python 2 as
well, we can reintroduce the accelerator somehow if it turns out too
much of a performance hit.
2017-05-15 12:26:30 +02:00
Xavier Morel 01e3514147 [FIX] P3: urllib, urllib2 and urlparse
In Python 3, all of these were "consolidated" under urllib(.request,
.parse, .errors) which is inconvenient.

Since we already have hard dependencies on requests and
werkzeug(.urls, which is a backport of Python 3's unicode-aware
urllib.parse) migrate *everything* to that.

A sticking point is urllib2.URLError, those were (mostly) replaced by
the slightly more general IOError which URLError extends.
2017-05-15 12:26:30 +02:00
Xavier Morel 54df4b36d7 [FIX] P3: types.NoneType removed 2017-05-15 12:26:29 +02:00
Xavier Morel 3833c8997d [FIX] P3: removed commands module 2017-05-15 12:26:16 +02:00
Xavier Morel b9c3365d21 [FIX] P3: cross-version smtplib/email changes
* SMTPLib[P3] uses a debug method on ``SMTP`` rather than a global
  ``stderr``
* email.Encoders is a deprecated & outdated (since 2006) alias for
  email.encoders
2017-05-15 12:24:04 +02:00
Odoo Translation Bot 40eca1e3e7 [I18N] Update translation terms from Transifex 2017-05-15 12:23:37 +02:00
xmo-odoo 54ae611131 [FIX] testfile: can import during iteration
Hence modifying sys.modules blowing up the iterator.
2017-05-15 10:08:38 +02:00
Odoo Translation Bot d052f2d330 [I18N] Update translation terms from Transifex 2017-05-14 07:08:31 +02:00
Odoo Translation Bot edb8221cbb [I18N] Update translation terms from Transifex 2017-05-14 04:31:11 +02:00