Commit Graph

93407 Commits

Author SHA1 Message Date
Nicolas Lempereur bbeca2ddb3 [FIX] web: encoding css on multi page
In the small cases where utf-8 is not escaped in the CSS of a module*, an error
could happen when breaking minified CSS on multiple page (for IE9).

For the issue #5050

*currenlty for 8.0 : https://gist.github.com/nle-odoo/e353b22f89031ced21a5
2015-04-07 11:15:40 +02:00
Nicolas Lempereur b8b8329044 Revert "[FIX] web: set_cache want unicode when caching css"
This reverts commit e75e2ce2e5.
2015-04-07 10:55:24 +02:00
Nicolas Lempereur e75e2ce2e5 [FIX] web: set_cache want unicode when caching css 2015-04-07 10:29:33 +02:00
moylop260 820d6aa760 [FIX] purchase: avoid duplicated product codes in demo/test data
Closes #5414
2015-04-07 10:17:16 +02:00
Developer Team f7a8511e7b [ADD] CubicERP CLA
Closes #6110
2015-04-07 10:10:33 +02:00
Olivier Dony 6377699c44 [FIX] website_forum: check karma access on direct message edit/unlink too
Access rights on messages are derived from the
access rights on the documents they are attached
to. Due to the karma-based nature of the forum
access rights, these do not automatically reflect
on messages, because they are not implemented as
access rules.
The check_mail_message_access() needs to be
overriden to achieve the same effect.

+ allow calling super().check_mail_message_access()
from new API (useful in forward-port)
2015-04-07 10:10:20 +02:00
Nicolas Lempereur 37959d45f3 [FIX] qweb: css minified in multiple page for IE
On internet explorer 6, 7, 8 and 9, the limit of CSS rules in a stylesheet is
4095 (http://blogs.msdn.com/b/ieinternals/archive/2011/05/14/10164546.aspx).

This commit breaks down a CSS bundle in several pages for these IE versions.

To do this, the CSS tag added is of the kind : /web/css.0/{xmlid}/{version} in
which there is:

- the whole CSS if there is no more than one page,
- a list of @import pointing to the multiple pages.

note: if a modification lowers the number of page, an old page may stay in
ir_attachment (e.g: go from 4 to 3 pages, the old 4th page of another version
will not be deleted untill the number goes again up to 4).

Note: the method css(self) previously returned an unicode variable (the first
time) or an str variable (the following times, if already cached), the fix
also correct this so an str variable is always returned.

fixes #5050

opw-627116
2015-04-07 09:56:44 +02:00
Goffin Simon b1dd5d6045 [FIX] gamification: Start Date and End Date format
In the function start_end_date_for_period, in the "else" clause, the case considered for the period
is "once". In this case, start_date and end_date are either False or in string format.

opw: 631941
2015-04-07 08:55:05 +02:00
Denis Ledoux 8121f29848 [FIX] web: float seen as changed with digits set to 0
Do not check float_is_zero for float fields with
digits specifically set to 0, it means
the rounding precision is infintie for those ones,
and tmp === val is enough.
2015-04-03 16:37:28 +02:00
Christophe Simonis 3171fd472e [FIX] core: correct LRU cleaning
Do not change dictionary size since during iteration
2015-04-03 16:33:18 +02:00
Christophe Simonis 14fd77c132 [FIX] core: ormcache is now per regisry.
A cross-registry cache was introduced by e2ea691ce.
The initial idea was praiseworthy but sub-optimal for servers with a
lot of registries.
When there is lot of registry loaded, the cache size was huge and
clearing some entries took a lot of CPU time, increasing the chances
of timeout.

Also, the cache was not cleaned when a registry is removed from
registry LRU (this operation would also consume time).
2015-04-03 16:11:57 +02:00
Denis Ledoux 69890cf33e [FIX] account: general ledger, currency displayed twice
When printing the general ledger with "With Currency"
checked, two currencies were displayed in the colum
"Currency" when an amount was set, one time the company
currency, one time the move line currency. Only
the move line currency should be displayed.

Besides, the total of currencies amount
for each account should not display the currency symbol
at all, as the total may be composed of multiple currencies.

opw-632086
2015-04-03 13:31:56 +02:00
Christophe Combelles 3d11e6fae3 [FIX] ir_mail_server: _get_default_bounce_address
fails due to ir.config_parameter permission

At rev. 80017b04c2
ir.config_parameter model has been restricted to employees

Getting parameter from this model should therefore
be done as SUPERUSER_ID where the uid could
be a user which is not an employee.

Closes #5280
2015-04-03 12:54:25 +02:00
Denis Ledoux eaad70daac [FIX] ir_attachment: upload of attachment for non-employees
This rev. is related to eb9113c04d

if a model or a resource id is not defined on an attachment
restrict access to employees only if the creator
of this attachment is not the current user.

So non-employees can access their attachments without
models/resource id, which includes attachment of
discussions threads.

Fixes #4309
Closes #4310
2015-04-03 12:44:44 +02:00
Denis Ledoux 83e8c54637 [FIX] product: import product.template fields using default_code
This rev. is related to 489a96c257

It wasn't possible anymore to perform an import of
a product.template field in a model
(e.g. mrp.bom), while it should be the case.

In the context of an import,
the operator of the name_search is '='.
Therefore, in this super call, the operator was '='
and the name was '' (empty).
In such a case, ('name', '=', '') is added
to the search domain by the base name_search method
(in models.py),
leading to the domain
[('id', 'in', template_ids), ('name', '=', '')]
which will lead to no results.

Forcing 'ilike' as domain is correct, as the actual
name_search, with the correct operator,
has already been performed in the lines above, the
point of this second name_search is to get
the right order along with the right name_get.

opw-632089
2015-04-03 11:06:49 +02:00
fka-odoo c06a969612 [FIX] stock: force recomputing transfer information on picking
When clicking on the Transfer button on a picking the packoperations should
always be recomputed.
If the pack operations are only computed the first time, the picking could be
modified (e.g. notice wrong quantity) and still display previous operations when
reloard the transfer button. opw 620636
2015-04-02 18:09:53 +02:00
Martin Trigaux cbd396d3da [FIX] purchase: use order date to set the picking date
When creating a pickign from a purchase order, do not use the schedule date
('date_planned') to specify the creation date ('date') of a picking.
There is already field called Scheduled Date ('min_date') and Max Expected Date
('max_date') that can display this information, this is redundand.

Fixes #4352
2015-04-02 17:48:35 +02:00
fka-odoo 506c229cd3 [FIX] project: allow to save custom filters on Task Analysis
Measures added to the Task Analysis report were not kept when saving the filter.
This is due to the lack of 'col' type field in the view definition (the parser
in 8.0 needs at least one).

This does not need to be forward ported (no bug in next version) but it's anyway
a good idea to filter by user by default.
Fixes #2835, opw 621468
2015-04-02 17:06:45 +02:00
Raphael Collet 9a365e83e7 [FIX] models: do not prefetch fields while the model schema is created
The following case has shown the issue: extend the model `res.company` by
adding at least two fields F and G, where F has a default value defined as:

    lambda self: self.env.user.company_id.name

If the column F is created before G in the database, the existing records will
be filled with the default value of F.  When the default value is computed, the
field `name` from a `res.company` is read, and other fields are prefetched,
including G.  This operation fails, because G does not exist in database yet!
2015-04-02 16:54:39 +02:00
Goffin Simon 3bd29a3483 [FIX] mail: display messages in chatter of inactive records
The method search inside _find_allowed_model_wise must consider records with active field=True.

opw:630295
2015-04-02 16:39:11 +02:00
Martin Trigaux 49e7e67a27 [FIX] mrp: allow same product on different bom line
Relax the constraint on BoM to allow to have two different lines with the same
product. As the error message says, the purpose of the constraint was to forbid
having the manufactured product as one of the components but had this side
effect.
Such scenario of the same product twice makes sense when using the date
attributes on the lines (e.g. changing quantities)
opw 621468
2015-04-02 16:06:14 +02:00
Christophe Simonis ad55981b4b [IMP] base: url redirection through attachments
Special case for binary attachments with an url, when there is no data
to serve. If the attachment name is an url, redirect to this url,
otherwise return a 204 HTTP error.
2015-04-02 16:00:34 +02:00
Nicolas Martinelli 64ab5638fc [FIX] website_sale: currency of the coupon taken into account to display the amount
1) Activate pricelist + multi currency - Main currency is EUR
2) Create a pricelist in USD (named "test"), no specific rule is applied.
3) Go to website < shop < select a product < buy it.
4) On the page /shop/cart go to customize and make sure "coupon code" is ticked
5) Enter "test" in the coupon code field

--> The prices are changed according to the exchange rate of the currency of the pricelist.

This is not correct: the coupon should only affect the amount according to the discount,
not convert the amount in the currency of the pricelist. In the specific example, the price
displayed should not be affected.

opw: 630670
2015-04-02 15:13:29 +02:00
Nicolas Martinelli 6bac6ba62c [FIX] google_calendar: update tutorial
Update the tutorial to know how to get the 'Client ID' and 'Client Secret': updated
procedure and screenshots.
opw: 631876
2015-04-02 14:51:10 +02:00
Denis Ledoux 0200bffb6c [FIX] calendar: timezone for day and month in invitations
The time zone was not applied for
the day name, day number and month name in
event invitation emails.

So, if the starting time of the event
was close to the previous/next day
(e.g starting date at 04/09/2015 00:30 in UTC+1)
The day number/name was set to the previous day
(e.g. Wednesday 8th instead of Thursday 9th).

opw-630165
2015-04-02 13:40:01 +02:00
Samus CTO 27d1199e90 [FIX] db manager: do not use registry to backup a database
Do not load registry to backup a database. This is
allows backing up databases whose registry cannot
be instantiated at the moment (wrong version, missing
modules, etc.)

Closes #5775
2015-04-02 10:10:04 +02:00
Christophe Simonis 8ad11055bb [MERGE] forward port of branch saas-3 up to 12f600c 2015-04-01 19:13:25 +02:00
Christophe Simonis 12f600cec9 [MERGE] forward port of branch 7.0 up to 35077af 2015-04-01 19:07:59 +02:00
Rucha Dave cb3034bdb0 [FIX] stock: prevent deleting lot linked to existing quant
Fixes #4458
2015-04-01 18:01:07 +02:00
Martin 46ad2ac70f [IMP] point_of_sale : display change amount after print if not 0 2015-04-01 16:55:23 +02:00
Nicolas Lempereur 35077af57d [FIX] opportunity: salesperson not in followers
Previously, when updating subscribers of a mail.thread, the default_{key}
arguments could override a {key} in the values.

e.g: for an new opportunity, the salesperson was overrided by the default user_id

This fix gives the priority to the values over the default_ in context.

opw-631741
2015-04-01 16:37:01 +02:00
Rucha Dave 2596f39eef [FIX] crm: meeting time in user timezone
With UTC in <time> element in bonus.
opw 621772
2015-04-01 15:53:09 +02:00
Denis Ledoux 433feb5a38 [FIX] account: partner ledger with currency.
In the partner ledger wizard, you can check
a boolean to display the amount within the
currency the amount has been invoiced.

This feature was simply no more working
in Odoo 8.0.

opw-630268
2015-04-01 15:36:40 +02:00
Nicolas Lempereur 32bc9fcb3a [FIX] customer: sale order number with child
The number of sale order on a partner form view only counted the given customer
and not the ones of eventuals child_ids. Hence when clicking on the widget, the
result sale order tree view (which take account of child_ids sale order) is
inconsistent.

This fix adds the sale order of a child company to the sale_order_count.

opw-630249
2015-04-01 15:29:21 +02:00
Christophe Simonis f18b46fcde [FIX] base_import: ignore stripped empty lines
Better fix for commit dab37df04d
2015-04-01 13:22:11 +02:00
Denis Ledoux fe31451899 [FIX] hr_timesheet_sheet: timesheet report totals
This rev. is related to rev. 89093a2

If several account analytic lines where defined for a same date
within a same sheet, the report totals were multiplied by
the number of occurences of lines of the same day.

Before the above rev., only `Diff`, `Total`, `Timesheet`, were wrong
After, other totals were wrong as well.

The point of the above rev. was to gain a real performance improvment
when there was a lot of timesheets / analytic lines entered
in database. This rev. keeps this performance improvment.

opw-629857
2015-04-01 11:07:44 +02:00
Cedric Snauwaert 80d3adc1f3 [FIX] web: when converting a node back to xml, correctly escape node content 2015-04-01 11:02:31 +02:00
Denis Ledoux 90f998da0b [FIX] *: alias help message
When going to logged calls through opportunities,
and no logged calls were listed,
the mail alias of opportunities was displayed
within the placeholder help message,
wrongly, as we were in the logged calls list.

This was due to a context propagation, due
to have defined empty_list_help_* keys within
window actions. It was the case in several
modules.

Besides, we do not find the usefulness of the
custom_context passed to the get_empty_list_help
method: indeed, none of the methods get_empty_list_help
overriden in modules need any other keys than
'default_type', which do not require an evaluated
context.

We therefore remove the whole code regarding this
custom_context, and we therefore get rid of this
useless context evaluation thing within one of
the most accessed method of the web client.

opw-630673
2015-04-01 10:52:37 +02:00
Jeremy Kersten dab37df04d [FIX] base_import: strip line while importing
Empty line was already deleted but if you had a line with just a tab (\t)
the line was imported with an exception "list index out of range"
2015-04-01 10:13:02 +02:00
Rifakat Haradwala 7da3854597 [FIX] mrp: reload form when start work orders
Actions button on the work order lines can change the state of the manufacturing
order. As for the product lines, reload the form after actions.
opw 625424
2015-04-01 09:57:19 +02:00
Goffin Simon bd86392f1a [FIX] sale_layout: sale order lines not grouped by section
The sale order lines must be grouped by section when they are added
in a sale order.

opw:630557
2015-04-01 09:41:04 +02:00
Goffin Simon 79ac324ca1 [FIX] stock_account: Invoicing on incoming shipment
When an extra line is added on an incoming shipment, the resulting
invoice must consider the tax of the product.

opw:630758, 630778
2015-04-01 09:28:48 +02:00
Goffin Simon a1da6c2132 [FIX] stock: `product_qty` field is not recomputed at record creation.
In the new API, 'product_qty' is correctely recomputed at record creation.

opw:629650
2015-04-01 09:20:06 +02:00
Nicolas Lempereur bff042d652 [FIX] mail: two arrows in empty list help
When an mail alias for catchall domain was assigned, some checks were not done
and a empty list help was wrongly displayed. Thus two arrays and some inconsistent
messages were displayed.

This commit correct this behavior so only one arrow is displayed.

Another part of the issue, was an erroneous propagation of context which should
be solved by a futur commit.

opw-630673
2015-04-01 09:11:21 +02:00
Goffin Simon 680e6889b1 [FIX] account: Partner Ledger wizard didn't consider all filters and type of entries:
The report generated by this wizard considered all the partners without taking into account
the filters and target entries set.
To show the right partner the function _set_context
must consider the "self.query" which sets the period, the dates, the states, the accounts and
the journals of the sql query used to give the demanded partner.

opw:631649
2015-04-01 08:53:55 +02:00
Jérome Maes b9977ef5d3 [ADD] doc : odoo official coding guidelines. This is the first version of the guidelines. Discussions and conventions are not frozen. 2015-03-31 17:49:41 +02:00
Martin Trigaux 1219b56bcc [FIX] project: change view according to project uom
The working time unit can either be hours or days. In case of days, should
replace the references to hours in the view to days. In case of days, use float
field instead of float_time.

Using the string 'Hours' as a way to determine the unit is too weak as:
1. it does not work in other language than english
2. if the unit is renamed (*cough* 1626eca *cough*), it will fail as well

Using the object with context to compare strings in the user language.
lp:1080191, opw 595397
2015-03-31 16:01:14 +02:00
David Monjoie 27594146b5 [IMP] web: added readonly checkmarks fix in saas file
I forgot to put the new rule of cc9f2919be in the saas file.
opw 630611
2015-03-31 14:28:52 +02:00
Martin Trigaux f7234f3cea [FIX] project: correctly set progress of task
When setting a task as done, the state is done and the progress written to 100%.
If this task is reopened, the progress was not resetted as the stage is changed
but not the state (still done).
Partially backport behaviour of 8.0 (8fbfc997) by using the fold attribute
instead of the state to reset the progress.
opw 597688
2015-03-31 14:12:14 +02:00
Levent Karakas 58e38aeb17 [IMP] base_vat: Turkish VAT/TIN validation
Closes #6025
2015-03-31 13:23:07 +02:00