Commit Graph

92391 Commits

Author SHA1 Message Date
Antoine Lorence c772b3db9a [FIX] doc: install.rst typo
closes #4937
2015-01-27 14:29:48 +01:00
Xavier Morel 426bcf427c [FIX] incorrect serialisation of log_handler
Saving log_handler to the config file is not currently special-cased,
the value is thus dumped as the repr() of the list, but not deserialized
with literal_eval. This means -s breaks log_handler and the
configuration file example is incorrect (it looks like a list).

Repeated -s further break the log_handler by interpreting the original
value as a string, putting it into a list, then reserialising that with
repr(), injecting a bunch of escaping backslash. The config file is soon
filled with backslashes and doubles in size with each new -s.

Furthermore for some reason the whole thing breaks --log-handler (and
aliases) entirely, once the wrong log_handler has been saved none of
them works anymore.

Fixes #4552
Closes #4157
2015-01-27 13:58:12 +01:00
Xavier Morel e9f0d79f85 [IMP] config: deduplicate loggers in log_handler
Saving multiple levels for the same logger should work with few issues,
but over time pathological (basket) cases (e.g. using ``-s`` all the
time) may build pointlessly huge lists in their config file.

Only keep the last level for each logger when saving to a config file.
2015-01-27 12:35:53 +01:00
Xavier Morel 8641826ca4 [IMP] config: make log_handler and --log-handler additive
For log_handler (list of logger configuration specs), having the
configuration file and the CLI configuration be exclusive (one
overwriting the other) is detrimental: it precludes keeping the
configuration file as a convenient baseline and only altering the subset
of loggers of interest at any given time. Combine specs from both
sources instead of overwriting one with the other.

* remove log_handler and its special case from the first options loop
* remove seeding of option with DEFAULT_LOG_HANDLER
* my_default is the baseline "configuration file" value, it's None if
  not provided which is not convenient. Use DEFAULT_LOG_HANDLER for it
  as baseline configuration file. DEFAULT_LOG_HANDLER isn't a list
  anymore, it's a CSV of logger specs (same as file-serialized)
* could actually use a DEFAULT_LOG_HANDLER of ``:`` (the default logger
  is root, the default level is info), but that might be a tad too
  cryptic
* things are weird between my_default and the file-sourced value,
  _parse_config is first run with my_defaults then with the file, but if
  there's no file it's re-run with already-parsed my_defaults. So when
  the file and the command-line values are of different type,
  _parse_config must be ready to handle both
2015-01-27 12:35:52 +01:00
Xavier Morel 9f4dea0891 [FIX] config: correctly serialize log_handler to CSV 2015-01-27 12:35:52 +01:00
Xavier Morel 23ad48a91b [FIX] config: a list is always equal to itself
add_option(action=append*) always modifies the ``default`` list
in-place. When using DEFAULT_LOG_HANDLER directly, that means
log_handler is always equal to DEFAULT_LOG_HANDLER since they're the
same list object. Thus the --log-handler command-line would never
overwrite the log_handler value from the configuration file, which is
unexpected

Fix that by copying DEFAULT_LOG_HANDLER before passing it as the
option's default value.
2015-01-27 12:35:51 +01:00
Damien Bouvy ec6fa5d3d9 [IMP] doc: documentation for qweb reports
closes #4876
2015-01-27 11:49:02 +01:00
Yenthe666 51ea2a3dde [FIX] point_of_sale: missing translation for invoice button
Fixes #4863
2015-01-27 11:44:44 +01:00
Denis Ledoux cc2a406b4f [FIX] product: uom category name 2015-01-27 11:37:30 +01:00
Frédéric van der Essen 932257150b [FIX] point_of_sale: scale debug was not working with an unplugged scale 2015-01-27 10:58:58 +01:00
Denis Ledoux 0b18a5afec [FIX] purchase: purchases button on product variants
This rev. is related to 8381d47543

The action action_purchase_line_product_tree is used in both
product templates and product variants forms.
Therefore, the default_product_id: active_id in the context
cannot be used,
As sometimes it will active_id will be a product template,
sometimes it will be a product variant.

I believe two different window actions should be used,
instead of sharing a common one and making hacks.
Nevertheless, as we avoid taking risks in stable releases
This should be done in master.
2015-01-27 10:37:49 +01:00
Denis Ledoux 8381d47543 [FIX] purchase: purchases button on product templates
The purchases button on product templates open the purchase orders
that have at least one of the variants of the templates

Set in the context of the action button action_purchase_line_product_tree
'search_default_product_id': active_id, 'default_product_id': active_id
as no point, as default_product_id expects a variant id (product.product)
while active_id is a template id (product.template).

opw-626521
2015-01-27 10:21:25 +01:00
Denis Ledoux f9b1161ea7 [FIX] sales_team: ensure encoding using ustr for bar values
On Windows, when having special characters in the month name (For instance, 'décembre'),
the windows odoo server sent non utf8 encoded, which could not be decoded by json dumps

opw-622189
2015-01-26 18:55:22 +01:00
Denis Ledoux ae9341fa22 [FIX] hr_evaluation: force empty domain for evaluation tree
Domain on the action_hr_evaluation_interview_tree has been removed
during rev.fbbe8631c9edb2dacedcb99c1cd7c6bea6f42b33

We force an empty domain in order to remove the domain from the window action
for migrated database, coming from 7.0.
2015-01-26 17:21:30 +01:00
Olivier Dony 8e03852fd4 [I18N] Update translations from Launchpad 8.0 branches 2015-01-26 16:36:51 +01:00
Xavier Morel 4e62515819 [IMP] doc: old/new API clarifications 2015-01-26 15:33:44 +01:00
Aaron Bohy 1db27f417d [FIX] Packaging: Windows: _prepare_build_dir
Catch shutil.Error thrown when addons have already been moved to
openerp/addons. Fixes the bug introduced by commit 91026647d4.
2015-01-26 14:24:44 +01:00
Olivier Dony 6ebdcbd2cd [FIX] account: misleading labels/tooltips on new fiscal position fields 2015-01-26 11:27:01 +01:00
Josse Colpaert 9b749d4d79 [FIX] Propagate of propagate_from on quants should be done with superuser (courtesy of Jos De Graeve) 2015-01-26 10:12:21 +01:00
Olivier Dony 25b1df2eb3 [FIX] product: better expose default_code on product.template
For companies not working with variants,
it is important to be able to search in the
Products menu (product.template)  using
product codes.
It is useful as well to see the codes
in the default kanban view too, even if
it is only the code of the first variant.
2015-01-24 04:25:51 +01:00
Olivier Dony 740bf28907 [FIX] ir.model.data: verify record exists in _update_dummy
When a stale XML ID exists in the database, `_update_dummy()`
must consider it as missing entirely, and the next call
to `_update()` will take care of cleaning up the old XML ID.

Failing to do so for `noupdate` records means the `_update`
will never happen, and as soon as another record is created
or updated with a relationship to that stale XML ID, it will
plainly crash the installation/update.
2015-01-24 00:15:26 +01:00
Olivier Dony a3c369f53f [FIX] product: force empty domain for variants action
Takes care of resetting it from older versions
e.g. rev d97e7a6a4e
and c0076916f3, as
the old `variants` field that was used does not
exist anymore, crashing at opening.
2015-01-23 23:23:27 +01:00
Arthur Maniet eed09ba410 [FIX] account: reconciliation widget was not assigning an amount on writeoffs lines when a tax with amount == 0 was applied. This undefined amount was interpreted as 0, resulting in tragically unbalanced journal entries.
Fixes #4871
2015-01-23 22:46:46 +01:00
Xavier Morel fca83b45f8 [IMP] on non-rpc debug, only break on non-HTTPException
Completes/improves fd6dde7ca

Because Werkzeug uses/provides flow-control exceptions via
HTTPException (which can be used as straight responses) they are used in
a few places of the web client, when triggering some redirections for
instance.

Breaking into the debugger for such mundane situations is surprising and
inconvenient for developers trying to debug actual issues in the system,
even though HTTPExceptions are by and large not error per-se, and
shouldn't warrant triggering post-mortem debugging.

So in the non-RPC dispatcher, don't post-mortem on HTTPException either.
2015-01-23 15:34:53 +01:00
Denis Ledoux 0ec3c75c2d [FIX] account: default value for report_vat report
If the report was printed from the tax codes list
Accounting > Configuration > Taxes > Tax codes
There is no information concerning what should be displayed (periods, details, etc.)
as the user did not printed the report from the wizard
(from Accounting > Reporting > Generic Reporting > Taxes > Taxes report)
We therefore set default values, in order the report to not crash

Nevertheless, the user has obviously to go through the wizard
if he wants to set a configuration different than the default one
2015-01-23 14:13:13 +01:00
Denis Ledoux dab5ff7e76 [MERGE] forward port of branch saas-3 up to b3f3daf 2015-01-23 13:28:17 +01:00
Denis Ledoux b3f3dafcb9 [MERGE] forward port of branch 7.0 up to c62a75a 2015-01-23 13:27:13 +01:00
Christophe Simonis 6d37ff1091 [FIX] base: remove duplicated XOF res.currency (and rate) 2015-01-23 13:02:30 +01:00
Christophe Simonis ce1096c447 [FIX] base: correct currency rate wrongly changed during 9902424 2015-01-23 12:57:04 +01:00
Denis Ledoux c62a75a5f3 [FIX] report: line splitting compatible with reportlab > 3.0
While keeping the compatibility for reportlab 2.5.

Splitting the text node on line breaks '\n' leaded to orphans ending tags,
like '</font>', which is regarded by reportlab 3.0 as a paragraph,
and reportlab therefore surrounded these tags by <para> tags,
which leaded to not syntax correct html like
<para></font></para>

To test this patch:
 - While having reportlab > 3.0
 - Create a rml report containing (at least) '<font>\n</font>'
 - Then print the report. It must not crash (obviously)
2015-01-23 12:54:30 +01:00
Christophe Simonis a3bcadd5f1 Merge pull request #4860 from odoo-dev/8.0-deb-packaging-aab
8.0 - Various fixes for Debian Packaging
2015-01-23 11:53:36 +01:00
Aaron Bohy 3cae676619 [FIX] Use local copies of png instead of fetching them from websites
Debian does not allow fetching data from external website at runtime.
This fixes the privacy-breach-generic lintian warnings for Debian packaging.
The removed youtube url was a dead link...
2015-01-23 11:23:04 +01:00
Aaron Bohy 2a39214d2e [FIX] File permission: remove unnecessary executable perm on files
Some .xml,.csv,.po,.woff,.ttf,.png,.eot,.svg had perm 755, provocating
'executable-not-elf-or-script' lintian warning for Debian packaging.
Set permission to 644 for those files.
Also remove unnecessary executable permissions on some .py:
	-addons/l10n_fr_hr_payroll/report/fiche_paye.py
	-addons/l10n_ro/res_partner.py
	-addons/l10n_ro/__openerp__.py
	-addons/l10n_ro/__init__.py
	-addons/l10n_do/__openerp__.py
	-addons/l10n_do/__init__.py
2015-01-23 11:11:27 +01:00
Aaron Bohy 59a7615d3c [FIX] Packaging: exclude *.hg* in MANIFEST.in
This fixes the lintian warning package-contains-vcs-control-file
for Debian packaging.
2015-01-23 11:11:27 +01:00
Aaron Bohy 629572cb76 [FIX] Web: qweb-test.js.html: use local copy of jquery and qunit
Use the local copy of those libraries instead of fetching them at runtime.
This fix was required for Debian packaging. It fixes the
privacy-breach-may-use-debian-package lintian error.
2015-01-23 11:11:27 +01:00
Aaron Bohy ef986fe9de [FIX] Account, portal_sale, sale, website_quote: local paypal gif
Add local copies of the paypal gif to the archive. This fix was required
for Debian packaging. It fixes the privacy-breach-donation lintian error.
2015-01-23 11:11:26 +01:00
Aaron Bohy 91026647d4 [FIX] Packaging: Debian: do not include setup/win32 in sources
This prevents to put postgresql-9.3.5-1-windows.exe, node.exe and
wkhtmltopdf.exe in the tar.gz produced with debhelper, saving
approx. 60MB.
2015-01-23 11:11:26 +01:00
Aaron Bohy 95402dee81 [FIX] Packaging: do not publish add-on web_analytics
This fixes the privacy-breach-google-adsense lintian error for Debian
packaging.
2015-01-23 11:11:26 +01:00
Aaron Bohy b3aca1d825 [FIX] Packaging: Debian: lintian errors and warnings
- control:
	- duplicated Section entry removed
	- X-Python-Version added
	- Uploaders added
- init:
	- set odoo.py as deamon instead of openerp-server
	- source /lib/lsb/init-functions to fix Debian lintian warning
	  init.d-script-does-not-source-init-functions
- copyright: machine-readable (dep5) copyright
2015-01-23 11:07:50 +01:00
Christophe Simonis 373539425e [MERGE] forward port of branch saas-3 up to c339fcc 2015-01-22 18:43:06 +01:00
Christophe Simonis c339fcc603 [MERGE] forward port of branch 7.0 up to d5c7234 2015-01-22 18:42:26 +01:00
Christophe Simonis 99024240f5 [IMP] base: avoid useless call to time.strftime()
This will also ease next forward-port 8.0 -> master
2015-01-22 18:27:08 +01:00
Christophe Simonis c75b61d3e7 [FIX] account_voucher: now that currency rates created at installation does not use current year (be33101), tests must create their own rates instead of trying to change default one 2015-01-22 17:19:56 +01:00
Christophe Simonis be33101903 [FIX] base: correct currency rates.
- Do not force creation of rates.
- Using rates of 2010 and storing them as beeing from 2015 is not a good idea.
2015-01-22 16:23:42 +01:00
Denis Ledoux d5c7234474 [FIX] point_of_sale: share is not a dependence of point_of_sale
This reverts commit d970cc40f8.

point_of_sale does not depends on share. This domain can therefore not be applied.
It works for new databases as the module share is auto installed.
But as soon as the module share is uninstalled, this domain will lead to a crash
There is no way to "solve" this issue, other than by a view customization
if the issue is critical for the customer.

I did not pay enough attention when I reviewed the PR.
2015-01-22 15:32:29 +01:00
Raphael Collet 8cd2cc8910 [FIX] models: recompute fields with user admin to prevent access rights issues 2015-01-22 15:32:18 +01:00
Denis Ledoux e9d1d7aac0 [MERGE] forward port of branch saas-3 up to c5775e5 2015-01-22 14:45:16 +01:00
Denis Ledoux c5775e56d3 [MERGE] forward port of branch 7.0 up to 25f5329 2015-01-22 14:43:06 +01:00
Martin Trigaux 8598231763 [FIX] purchase: maximum recursion when write on minimum_planned_date
Do not write on the function field when you are writing on the function field.

- Now you do know what orders is right?
- I think I know...
- Orders is orders.
- I guess no one ever taught you not to use the word you're defining in the definition.
   ~~Lucky Number Slevin
2015-01-22 14:37:53 +01:00
Denis Ledoux 25f5329deb [FIX] report: break lines and splitted words with reportlab > 3.0
From reportlab 3.0, empty plaintext paragraphs do not lead to a break line anymore.
Before release 3.0, paragraphs having tags but no plaintext leaded to a break line.
This patch aims to recover the behavior of reportlab releases < 3.0, as
<para><font color="white"> </font></para> is used in allmost all rml reports
The current patch is not considered as clean, but we did not find any better solution.
If someone find a parameter to pass to reportlab in order to bring back the old behavior of reportlab
he is welcome to provide the better patch.

Besides, in reportlab 3.0, splitlongwords has been introduced as parameter,
to allow to break long words. The default value is True.
This parameter seems to break the columns headers
(it splits the text within the column header)
We therefore take the choice to not activate it, as it was not present anyway in reportlab < 3.0

To test the good behavior of this patch:
While having reportlab < 3.0 (2.5 for instance), print a draft invoice
Then, upgrade to reportlab > 3.0 (3.1.8 for instance), print the same draft invoice.
The generated pdf must be (allmost) identical, in particular concerning spaces.
Specifically, the space between the partner address and his phone.
2015-01-22 14:23:38 +01:00