Commit Graph

82984 Commits

Author SHA1 Message Date
Christophe Simonis c339fcc603 [MERGE] forward port of branch 7.0 up to d5c7234 2015-01-22 18:42:26 +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
Denis Ledoux c5775e56d3 [MERGE] forward port of branch 7.0 up to 25f5329 2015-01-22 14:43:06 +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
Martin Trigaux 9f8731ca27 [FIX] base: backport of 152c5c2 to 7.0
[IMP] base: safer locking at user login

When a users connects, a lock is taken on the res_user table to modify the last login date. If another running transaction uses a foreign key to res.users (e.g. write_uid column), postgres may detect the update as a concurrent update and rollback the transaction.
In pg 9.3, the lock_strength parameter 'NO KEY' allows a weaker lock which is less likely to break another transaction.
Fixes #552
2015-01-22 13:34:19 +01:00
Goffin Simon d970cc40f8 [FIX] point_of_sale: exclude share users from sale details wizard
opw-621749
2015-01-21 15:39:31 +01:00
Denis Ledoux 44b3faa428 [MERGE] forward port of branch 7.0 up to d7ddd0a 2015-01-21 12:02:45 +01:00
Denis Ledoux d7ddd0a093 [FIX] l10n_be_coda: match counterparty account number with iban format 2015-01-21 12:00:29 +01:00
Aaron Bohy a911265c12 [FIX] Packaging: RedHat: prompt overriden in docker
RPM packages did not pass the tests because the centos prompt changed
and thus did not match the regexp anymore. We now explicitely specify
the prompt in our Dockerfiles to prevent such issues.
2015-01-20 17:35:34 +01:00
Denis Ledoux dd72d1537f [MERGE] forward port of branch 7.0 up to fb4c822 2015-01-20 12:21:52 +01:00
Denis Ledoux fb4c822000 [FIX] account_asset: using attrs to hide method_* fields
In order to hide fields method_number and method_period to hide them according to the asset, fields_view_get method was overriden.
An issue was present: if a search view on model account.asset.asset was added, and did not contain these method_* fields, this overriden fields_view_get was applied, and tried to hide method_* fields, while they were not present in the search view, which leaded to a crash.

I could have solved this the easy way, to not apply the invisbility if the fields were not present in the view, or if the view was something else than form, but I prefered to solve this the cleanest way.
2015-01-20 12:17:45 +01:00
Christophe Simonis cdb48d39ba [MERGE] forward port of branch 7.0 up to 6c55a4b 2015-01-19 12:09:48 +01:00
Sandy Carter 6c55a4bfed Allow EDI fields to be propagated if they have _fnct_inv 2015-01-16 17:49:58 +01:00
Denis Ledoux 5959c41631 [IMP] res_lang: constraint for grouping field
As entering a wrong value in the grouping field of res.lang,
for instance '[,]', leads to an unavailability of the web interface,
We add a constraint to prevent entering wrong values.
2015-01-16 17:47:33 +01:00
Martin Trigaux 2f5a7b63d3 [FIX] base: keep first multiline translation in po file
The first term of a po file is a comment for translator e.g.:
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
...

This comment is ignored if there is no source and it is the first term of the po
file. The first flage was disabled too late and if the following terms also
started with an empty source (for too long terms), they were skipped as well.

Disable the flag as soon as the condition is evaluated to make sure no
additional terms are ignored. opw 619786
2015-01-16 13:05:46 +01:00
Denis Ledoux 84b5bf94bd [IMP] mail: prevent leaving when composing a message 2015-01-15 19:04:05 +01:00
Denis Ledoux 65de6e7f27 [FIX] crm: convert to opp, link to an existing cstomer
When converting a lead to an opportunity, and choosing the option "link to an existing customer", the resulting opp wasn't actually linked to the ccustomer.
2015-01-15 16:09:46 +01:00
Aaron Bohy 67959566ed [FIX] Packaging: Debian Dockerfile for nightly tests
Remove installation of v8 requirements in package.dfdebian as this
is unnecessary for v7. This fixes a bug occuring during the installation
of openerp (precisely when installing reportlab dependencies), because
reportlab now requires a more recent version of pillow than 2.5.1.
Also use pip instead of /usr/local/bin/pip in test_tgz (package.py)
as pip script isn't installed there anymore.
2015-01-15 15:22:02 +01:00
Denis Ledoux 8c150c609e [MERGE] forward port of branch 7.0 up to 7530d28 2015-01-15 13:37:30 +01:00
Ravi Gohil 7530d28183 [FIX] mrp: production traceability
Upstream traceability on produced goods (serial number on finished product) was
broken due to wrong values in cache for production.move_lines2 after production.
Refresh the value of production after each action_consume to make such the state
of the cache is correct. opw 609450

Similar fix for manufactruing order not going in done state in some specific
configrations (e.g. some components being phantom BOM).
Again due to wrong cache state after consumption. opw 610515
Fixes #1296
2015-01-15 12:04:23 +01:00
Sandy Carter 894143cb4c [FIX] res.groups: when generating initial group view, use admin context and language
This means group category names can be translated in the
default/installation database language.

Closes #3921
2015-01-15 11:54:22 +01:00
Denis Ledoux a692c6e934 [MERGE] forward port of branch 7.0 up to f406847 2015-01-15 11:49:28 +01:00
Martin Trigaux f406847613 [FIX] delivery: reset delivery info on duplicate/backorder
The tracking reference and other delivery references are not relevant to
duplicated pickings. Overwrite copy to remove carrier_tracking_ref, volume and
number_of_packages.

Add fallback on stock.picking.in and out to use copy method of stock.picking.

For partial delivery, the duplicated picking is the delivered order and
the existing picking is the backorder of the delivery (why so much hate?).
This means we have to switch the delivery info between the backorder and
the delivered picking.
Combo opw 615593 and 618802
2015-01-14 17:44:37 +01:00
Denis Ledoux 30a7bea024 [FIX] mrp: prevent creating production lines when testing if production is of product type
The method test_if_product, used in the workflow to test that the mrp production is for a product (!= service), used to call the method _action_compute_lines in order to compute the production lines and determine from them the production type.

The thing is, the method _action_compute_lines, despite the fact it returns the lines of the production, actually creates the lines. So, just to test if the production was of product type, the productin lines were created, in database.

This rev. introduces a _prepare_lines method, which returns the computed production lines, without actually creating them in database, so the test_if_product method can test if the production is of product type without creating the production lines.

Therefore, production lines are now computed and created during the action_compute method, instead of computing them when the production was tested to get the production type.

Computing the lines before the action_compute has as side effect to not set the scheduled date of the work orders in module mrp_operations, at MO confirmation (as, on confirmation, the action_compute method is called only for productions for which the lines are not yet computed, and mrp_operations overide action_compute to set the scheduled date)

opw-620189
2015-01-14 15:37:27 +01:00
Akash Balar 70a51cd761 [FIX] mrp : skip lines not within date range specified on BOM
As date_start and date_stop are date field and not datetime, should use
DEFAULT_SERVER_DATE_FORMAT for search. opw 619592
2015-01-14 12:10:46 +01:00
Denis Ledoux e261c44a10 [FIX] point_of_sale: ACLs for pos users
POS users should not be able to create nor modify payment methods (account.journal)
POS users should not be able to create nor modify point of sales (pos.config)

At first opened session, if no payment methods was set, this is possible that the pos user should temporary have accesses granted to mark a payment method as pos payment method. This is done by the openerp.SUPERUSER_ID added by this rev.

opw-625489
2015-01-13 18:15:30 +01:00
Denis Ledoux 275367581b [FIX] web: view is not always defined when a many2one is rendered
This rev. is associated with rev. 38aa984f31

closes #4660
2015-01-13 12:45:47 +01:00
Xavier Morel d89af0dad3 [FIX] over-eager merge b270e4f
Extract dropping of connection from exp_drop (as in 8.0), call it from
relevant database-alteration functions (drop, rename, duplicate)
2015-01-12 16:45:27 +01:00
xmo-odoo b270e4f77f Merge pull request #4427 from savoirfairelinux/7.0-fix-issue-4424-duplicate-db
[FIX] Issue #4424
2015-01-12 16:37:11 +01:00
Sandy 3b7e00d718 [FIX] orm: prevent pgerrors from raising `UnicodeDecodeError`
Use `tools.ustr` for error conversion to prevent `UnicodeDecodeError` when
converting errors which can be unicode in depending on data.

Example:
```python
from openerp.osv.orm import convert_pgerror_23505
from psycopg2 import IntegrityError

e = IntegrityError(
    'duplicate key value violates unique constraint '
    '"hr_job_name_company_uniq"\nDETAIL:  '
    'Key (name, company_id)=(Directrice comptabilit\xc3\xa9, 1) '
    'already exists.\n'
)

convert_pgerror_23505(None, [], None, e)

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 129: ordinal not in range(128)
```
2015-01-12 15:35:23 +01:00
Denis Ledoux 38aa984f31 [FIX] web: avoid rendering fields on one2many list validation
This rev. reverts 91911159f5

The above rev. was a good idea, except that internal_set_value expects the raw value, while the records attributes can be tuples(for instance, many2one are tuple(id, name) or list of command(one2many, many2many).

set_value must be use here, as all fields (js) override set_value in order to handle their value repr (for instance, many2one fields handle the tuple (id,name).

Besides, avoiding the re-render provides a huge performance improvment, as rerendering fields can lead to xmlrpc calls (for instance, re-rendering a many2one field implies calling the name_get method)

opw-620111
opw-622108
2015-01-09 18:10:38 +01:00
Wolfgang Taferner 1e5c68f7a6 [FIX] warning: domain was lost in onchange result
Closes #3127
2015-01-08 17:48:01 +01:00
Martin Trigaux e6df0a21e9 [FIX] purchase_requisition: restrict selection to purchasable products
Fixes #4582
2015-01-08 11:43:28 +01:00
Olivier Dony d0cd92bb9f [I18N] Sync updated 7.0 translations from Launchpad 2015-01-07 17:57:28 +01:00
Olivier Dony 005e24fada [FIX] mail.thread: correct matching when finding author + test
The previous matching rules were too fuzzy and allowed random
prefix-match or tail-match of other user's emails.
For example when looking up a partner matching 'foo@bar.com'
the system would sometimes find 'dom.foo@bar.com' instead,
or 'foo@bar.com.tw'.

Fixed by only allowing direct case-insensitive email match
of an addr-spec, or substring match of the addr-spec enclosed
in angle brackets, within a name-addr pair.
See also RFC5322, section 3.4

Also adapted related message_find_partner_from_emails() method
to factor out the partner email resolution mechanism to avoid
the same problem.

Adds corresponding regression test.
2015-01-07 17:50:42 +01:00
Denis Ledoux 32246d963d [MERGE] forward port of branch 7.0 up to 69bfc5e 2015-01-07 14:52:49 +01:00
Denis Ledoux 69bfc5e108 [FIX] sale_crm: typo introduced during rev. 1a10a11018 2015-01-07 14:48:04 +01:00
Denis Ledoux 1a10a11018 [FIX] sale, sale_crm: propagate sales team for advance & on lines invoices
A _prepare method had to be introduced in the wizard for the lines invoicing method
2015-01-07 14:44:29 +01:00
Denis Ledoux b2be001257 [MERGE] forward port of branch 7.0 up to dbb2a66 2015-01-07 12:48:39 +01:00
Denis Ledoux dbb2a669f4 [FIX] hr_timesheet_sheet: display timesheet by day summary in employee tz
If an employee in UTC + 1 (Europe/Brussels) entered an attendance from January 2 00:00 to Januay 2 23:59, the summary by day table displayed two different lines, for two different days:
 - 1 hour on January 1 from 23:00 to 23:59
 - 22:59 hours on January 2 from 00:00 to 22:59

 Which is obviously wrong, the employee, in its own time zone, worked on January 2 only.
2015-01-07 12:26:41 +01:00
Denis Ledoux 879fca0856 [MERGE] forward port of branch 7.0 up to 9191115 2015-01-06 18:56:10 +01:00
Denis Ledoux 91911159f5 [FIX] web: editable list, no re-rendering on field validation
When adding several lines in an editable list (adding 7 lines to an invoice for instance), then clicking on the first row direcly after having filled the last line, the value of the cell sometimes had the value of the last line. Just a display bug, but still.

Using internal_set_value avoid the re-rendering of the cell, and solve the above issue

opw-620111
2015-01-06 18:53:33 +01:00
Martin Trigaux ae34a1e93e [IMP] config: remove deprecated comment
It was intended to be replaced by log-handler at first but log-level is still
a very convenient way to manage the level of debug.
2015-01-06 18:03:58 +01:00
Martin Trigaux 96d1520a5e [FIX] base: no line feed in translations
Revert "[FIX] ir_translation: remove control characters from translations"
This reverts commit 6d4e1cc73e.

This was intended to clean malformed translations but it introduced the side
effect of removing all '\n' in translations.

Fixes #4092, opw 619175
2015-01-06 10:43:54 +01:00
Denis Ledoux 643bbcb00b [MERGE] forward port of branch 7.0 up to 27d8cb8 2015-01-05 13:48:01 +01:00
Denis Ledoux 27d8cb843b [FIX] fields: apply user timezone in display name for models using a datetime as name
For models using a datetime field as name (hr.attendance for instance), the user timezone wasn't applied in the display name.
Therefore, in the breadcrumb, the datetime was different than in the form if the user had another timezone than UTC.
2015-01-05 12:48:38 +01:00
Martin Trigaux 6d41af4432 Forward port of branch 7.0 up to d80c0ff 2015-01-05 12:41:05 +01:00
fka-odoo d80c0ff647 [FIX] product: Product Label report did not display product
The name of the product was stripped from the product label report
Fixes #3138 (only blank entries)
2015-01-05 12:36:36 +01:00
Yannick Vaucher 5906f10436 [FIX] hr_holidays: Add missing context check
Backport of ead3f03
Fixes #4341
2015-01-05 11:37:15 +01:00
Jérome Maes 1adb3de371 [FIX] mail : close #2250. If trying to send empty message in chatter, no other messages can be send wihtout refreshing page. Moving the flag_post allow sending a new message only when the previous one is sucessufully sent. If case of empty message, nothing will happen, and the chatter will not be blocked. 2014-12-30 11:24:55 +01:00