Commit Graph
102285 Commits
Author SHA1 Message Date
Simon Lejeune 402ac6b91c [FIX] project_issue: issue: correctly set stage_id during onchange project_id
If you create an issue when `default_project_id` is set, the stage_id
is initialized at the lowest sequence of the stages of the project,
which is normal. However, when you change the project of the task,
the stage_id was not correctly reset. If you save at this time, you
add the selected stage in the project.

Also, the stage_id was not correctly cleared if you remove the project.
2016-08-30 18:15:34 +02:00
Simon Lejeune 48f370c6ce [FIX] project_issue: default stage on issue
If you create an issue directly, the key `default_project_id` is not set
in the context. This key is used to compute the default stage of the
created issue. It is done by creating a domain. Unfortunately, the
domain is always filled with `[('fold', '=', False)]` and thus it
always returns a result that makes no sense when `default_project_id`
is not set. Worse, if you actually create the issue, the found stage
that was not in your project is now a part of it.

The fix is to return no result if the `default_project_id` is not set
in the context.
2016-08-30 18:15:34 +02:00
Simon Lejeune 3041efb655 [FIX] project: task: correctly set stage_id during onchange project_id
If you create a task when `default_project_id` is set, the stage_id
is initialized at the lowest sequence of the stages of the project,
which is normal. However, when you change the project of the task,
the stage_id was not correctly reset. If you save at this time, you
add the selected stage in the project.

Also, the stage_id was not correctly cleared if you remove the project.
2016-08-30 18:15:33 +02:00
Simon Lejeune 7d3f9ac9b9 [FIX] project: default stage on task
If you create a task directly, the key `default_project_id` is not set
in the context. This key is used to compute the default stage of the
created task. It is done by creating a domain. Unfortunately, the
domain is always filled with `[('fold', '=', False)]` and thus it
always returns a result that makes no sense when `default_project_id`
is not set. Worse, if you actually create the task, the found stage
that was not in your project is now a part of it.

The fix is to return no result if the `default_project_id` is not set
in the context.
2016-08-30 15:45:15 +02:00
Nicolas Martinelli 5100aa8113 [FIX] website_sale: strikethrough price
It might happen that a price is strike through in the shopping cart
although it has the same value than the discounted price. This can be
due to differences in decimals smaller than 0.01.

The fix is to apply the same logic than in other places: strike through
if the difference is larger than 0.1.

opw-685109
2016-08-30 09:53:10 +02:00
Nicolas Seinlet a437811146 [FIX] stock: action_assign(reserve) should have a check to see if the move id is in the keys of the main_domain as was done in the previous loop
This is needed to avoid the scheduler to stop suddenly as the scheduler
takes a bunch of moves to reserve without looking if all moves of
a picking are taken.  That way, it is possible that a certain key
is not there in this dictionary and the solution is to simply
filter them out.

Closes #13286
2016-08-30 09:39:43 +02:00
Odoo Translation Bot e9bd2aad98 [I18N] Update translation terms from Transifex 2016-08-29 11:14:01 +02:00
Nicolas Martinelli 6e05eee828 [FIX] sale_service: create only one task
If a SO is confirmed, cancelled, set to draft then confrimed again, 2
tasks are created for the same SO line.

opw-686613
2016-08-29 09:26:21 +02:00
Nicolas Martinelli 2fda62ebd8 [FIX] website, website_{*}: Google Maps API Key
Partial backport of c82b65c855

opw-686510
2016-08-29 08:48:09 +02:00
Christophe Matthieu 755e1f4533 [FIX] web_tips: fix a memory leak
Before this commit, the web_client slows down because callbacks are added
many times without ever being removed.
2016-08-26 17:02:29 +02:00
Simon Lejeune 4733c8727e [FIX] base: ir.ui.view: traceback during create from the backend
If you create an ir.ui.view from the backend, it'll everytime
show a traceback (Keyerror arch).

The field we write to in the form view is `arch_base`. Writing in
`arch_base` will indirectly write on `arch`.

The issue is that the `create` function or ir.ui.view is overriden
in order to compute the `type` column. For this to be done, we parse
the `arch` content and the type is the string of the root tag.

The issue is that we parsed the `arch` field instead of `arch_base`.
However, during the creation of the db, convert.py will write to
the `arch` field when inserting the views in database.

Another thing is that we'll get a traceback if the parse fail for
any reasons (an invalid xml string for example). To workaround
that, we chose to catch the issue and do nothing with it as the
constraint on `ir.ui.view` will detects this issue among others and
will raise a proper ValidationError.

Lastly, the actual code only clears the `arch_fs` field if we write
on `arch`. This patch also clears it when writing on `arch_base`.
2016-08-26 14:51:46 +02:00
Richard deMeester 1b15aa590b [FIX] account_budget: reset correctly result variable
If a budget line has no analytic account id, the code is intentional
about returning a value of 0 for it.  It is possible, that in some
cases, depending on the order of lines processed, the routine returns
the previous value, as it does not initialise an important
variable on each iteration of the loop.

Closes #13303
2016-08-26 14:19:57 +02:00
Cedric Snauwaert a86143276b [FIX] account: fix exchange rate entries
When a reconciliation creating an exchange rate entry was done, the newly account_move_line corresponding to the exchange entry was not given a full_reconcile_id.

Also when doing a full reconciliation in different currency, full_reconcile_id was not set on account_partial_reconcile object resulting in problem when trying to unreconcile entries.

This is a backward fix of commit: 9b5fed4976 and cda132bba5
2016-08-26 09:44:13 +02:00
Nicolas Martinelli 5f76928f9f [FIX] website, website_event: Google Maps image
Google made the use of an API key mandatory to use the "Google Static
Maps API". The API key field will be created for the upcoming version.

opw-686510
2016-08-25 18:25:33 +02:00
Christophe Simonis c578fb792c [FIX] website_blog: read field from browserecord 2016-08-25 16:28:11 +02:00
xmo-odoo 0a02325cd7 [FIX] web_kanban: value not in selection states
Non-required selection fields and incorrectly updated fields (e.g.
changed options but didn't fix existing values) trips KanbanSelection
badly leading to the entire kanban view failing to appear: the rendering
phase does not find the state in its states list and blows up when
trying to access the state's class.

Fix by adding a fallback default state with an empty class.
2016-08-25 14:54:46 +02:00
Martin Trigaux cb0484d562 [FIX] Update Arabic translation terms from Transifex
To correct wrong %s translations.
Fixes #13281
2016-08-25 14:50:29 +02:00
Christophe Simonis 942f288273 [MERGE] forward port branch saas-6 up to f1cb517 2016-08-25 12:45:04 +02:00
Christophe Simonis f1cb5179fc [MERGE] forward port branch 8.0 up to c7d9695 2016-08-25 11:07:14 +02:00
Christophe Simonis c7d9695f52 [MERGE] forward port branch 7.0 up to b431e6c 2016-08-25 11:02:01 +02:00
Wolfgang Taferner a2fa7ec75f [FIX] Remove useless nested class as it breaks compilation 2016-08-25 10:46:48 +02:00
Martin Trigaux 4cb2dc6d71 [FIX] web_graph: no label for ungrouped pie chart
When a pie chart has no grouping selected, the label was "undefined" (the
javascript variable). Replace by the already translated string "Undefined".

Fixes #13288
2016-08-25 10:39:39 +02:00
Denis Ledoux e123d16e52 [FIX] sale: fix sales team Invoiced this month field
Exclude purchases invoices from the `invoiced` field
of `crm.team`, as this count is meant to sum
the invoiced - sales - order of a sales team.

opw-686732
2016-08-24 18:21:22 +02:00
Jeremy Kersten abf17354f8 [FIX] account: remove domain that depend of purchase when not installed
This commit avoid a traceback when you open the form account_invoice_line
for a supllier invoice without having installed purchase.

The fields_view_get method add domain with purchase_ok field, but this
field can be missing on the model product.template because purchase is not
a dependence of account.

Invalid field 'purchase_ok' in leaf "<osv.ExtendedLeaf:
('purchase_ok', '=', True) on product_product

In stable version, the best fix found, is to remove the domain.
But we need to fix it in master, moving this field from purchase module to
product module. (odoo/odoo##13271)

This commit closes #13268 and closes #315 for stable version.
Todo: merge odoo/odoo#13271 in master (@qdp-odoo agreement)
2016-08-24 12:21:48 +02:00
Nicolas Martinelli f30ec3022e [FIX] mail: link in livechat
When a user sends a link thanks to the livechat, the link is not
clickable is the recipient is on the frontend (e.g. visitor of the
website). On the other hand, a link sent from the frontend to the
backend works.

This is because the message is sent as "html" from the backend,
therefore no link conversion is done during the post-process of the
massege (method `message_post`).

Note that a link sent and received in the backend works because
additional formatting is done (convert emojis, add links...).

opw-686063
2016-08-24 11:25:34 +02:00
Goffin Simon ce5b802df6 [FIX] hr_holidays: undisplay refuse leaves on dashboard
The refuse leaves don't have display in the dashbord.

opw:685604
2016-08-24 09:36:40 +02:00
Nicolas Martinelli 9c67a0d1b7 [FIX] account_asset: partner must be a vendor
When creating an asset, there is no restriction on the partner. However,
there is a domain to explicitly restict the categories to the 'Purchase'
asset types. Therefre, the partner is always a vendor.

opw-686636
2016-08-24 08:51:33 +02:00
Nicolas Martinelli c4adc4a566 [FIX] website_event: ticket price
When a ticket is ordered, the price is always with format amount +
currency. However, it should match the standard format of the currency.

opw-682984
2016-08-24 08:49:54 +02:00
Nicolas Martinelli b81ed2fd01 [FIX] stock: package domain
When choosing a package for a pack operation, we should restrict the
packages to the ones which are actually available in the given
locations.

opw-684007
2016-08-24 08:48:23 +02:00
Jeremy Kersten 498b266f5c [ADD] base: add tests for mimetype detection 2016-08-23 22:30:18 +02:00
Jeremy Kersten 5a9e1af64a [FIX] base: improve last chance for detection of mimetype
Since we return nosniff header, we need to avoid the magic mimetype.

In case of picture in compute field (eg. image_small on product),there are
no mimetype saved in column, and impossible to detect it from name/extention
because url are like: /web/image/product.product/47/image_small.

So before to arbitrary return default_mimetype, we try to detect it from the
content itself.

This commit continue to fix odoo/odoo@13193
2016-08-23 21:09:20 +02:00
Jeremy Kersten 1b2dab3f50 [FIX] mail: preprocess tracking fields of type date/datetime only once
Before this commit, if a message thread was loaded 2 times, the first time
the date was well formatted, the second time that fail because momentjs cannot
parse the localized date from some locale.

Luckily, it was not bugged by default in english, because moment was able to
reparse a localized US date. But in some local as french, momentjs cannot parse
the localized date and return 'Invalid date'

Now, we move the code, to be processed only once by the chat manager, and not
in each process of the thread.

This commit closes issue #13258

Courtesy of @aab-odoo
2016-08-23 15:23:20 +02:00
Goffin Simon 6d4bb4f18c [FIX] website_portal: details of a contact
When changing the contact details of a partner which is a company contact,
all the fields related to the address must be set on the commercial partner.

The address displayed for a company contact is the address of the commercial
partner.

opw:686335
2016-08-23 14:49:57 +02:00
Goffin Simon 0b80da48b5 [FIX] hr_recruitment: Missing stage with department
When 'search_default_job_id' is in the context, the department set for
this job must be used to filter the right stages(_read_group_stage_ids).

opw:685896
2016-08-23 14:10:08 +02:00
Yannick Tivisse 2ab7d92c82 [FIX] website_quote: Set correct access right on 'Edit' and 'Update' buttons
The frontend buttons to edit and update an online quotation in backend should be accessible for sale officers, not website publishers.
2016-08-23 12:03:13 +02:00
Martin Trigaux fceba5df8c [FIX] account: remove duplicated term in .pot£ 2016-08-23 10:58:36 +02:00
Freeman Helmuth 6715df7b94 [CLA] corporate signature for Pine View Buildings
Closes #13144
2016-08-23 10:48:31 +02:00
Damien Bouvy dc975f3b0b [FIX] pos: group pos entries by tax
When posting POS entries with the "group entries" option set on that
pos config (which is the default), it is possible to have bad net
amounts in the tax report because taxes are not used as a grouping
parameter, allowing the system to potentially group pos order lines
which have different taxes together.

Also, take into account the fiscal position set on each order when
creating the move lines (the correct tax for a line is a compute field,
so this commit may actually cause some performance degradation for big
pos sessions).

Amends 150bf7d

opw-686168
2016-08-22 17:21:07 +02:00
Jeremy Kersten 97b702a7b0 [FIX] web: fix mimetype for content_image
Since the commit odoo/odoo@36e875e which disable the second-guess from browser,
IE cannot display picture from Odoo where mimetype is wrong.
Before this commit, IE and probably other browser which one respect the header
'nosniff' don't display picture not_found and resized picutre via controller if
the original was not of type 'png'.

Eg: when we return the placholder 'not_found' if you don't have permission,
or when your resize the picture, ... we need to force the mime-type with the
new one and not keep the original mimetype.

This commit closes #13193
2016-08-22 16:25:52 +02:00
Nicolas Martinelli 2ab68047c1 [FIX] payment_paypal: missing Paypal link
When an invoice is sent by email, the Paypal link is not included,
although it is in the template.

This is because the `paypal_url` field has gone missing after Accounting
refactoring.

opw-686216
2016-08-22 14:28:10 +02:00
Jairo Llopis 4faed0b792 [FIX] website_blog: fix pager when existing filters in url
Go to a URL such as `/blog/our-news-1?date_begin=2015-01-01`
Now click on page 2.

Without this patch you will go to `/blog/our-news-1?date_begin=2015-01-01/page/2`.
With this patch, you will go to `/blog/our-news-1/page/2?date_begin=2015-01-01`.

This commit closes #13206
2016-08-22 10:30:56 +02:00
Nicolas Martinelli b4b04c9eb7 [FIX] mrp: BoM Structure report
When printing a BoM Structure report, the quantitites are not multiplied
down the line. For example, the BoM for Products 0 and 1:

Product 0
   8 Units of Product 1

Product 1
   1 Unit of Product 2a
   2 Units of Product 2b

When printing the BoM Structure of Product 0, it shows:
Product 0
   8 Units of Product 1
       1 Unit of Product 2a
       2 Units of Product 2b

It should be:
Product 0
   8 Units of Product 1
       8 Unit of Product 2a
       16 Units of Product 2b

opw-686167
2016-08-22 10:13:22 +02:00
Nicolas Martinelli 2c0cae221a [FIX] stock_account: raise error when valuation is zero
Commit ddbe0e1 introduces an error when the user tries to move a product
with a cost of zero. In extreme case, this is incompatible with commit
262d98b. For example, if one buys 10000 units for 17.60, and consumes one
unit at a time. The latter commit will split the quants in:
- 9999 quants at cost zero
- 1 quant at cost 17.60
This is the only solution to get a correct accounting.

However, that creates quants with a cost of zero, which therefore cannot
be moved anymore (consumed in MRP or sold).

We restrict the warning to products configured with "Standard Price".
Indeed, in this configuration, it is very lokely that the user made a
mistake / forgot to define the price of the product.

opw-686301
2016-08-22 08:22:08 +02:00
Odoo Translation Bot 29f5719254 [I18N] Update translation terms from Transifex 2016-08-21 03:05:30 +02:00
Odoo Translation Bot 43aee6db75 [I18N] Update translation terms from Transifex 2016-08-21 00:40:51 +02:00
Jeremy Kersten 54e4f3f96b [FIX] web: allow to use content_disposable without registry
When a user connect to /web/database/manager directly without the
login page before, the request don't have registry.
When the user click to backup a db, a traceback was raised:
    return request.registry['ir.http'].content_disposition(filename)
    TypeError: 'NoneType' object has no attribute 'getitem'
Because it was impossible to call content_diposable from ir_http
without registry.

Now content disposable has been moved in http.py and is callable from
anywhere.

This commit closes #13192
This commit closes #11583
2016-08-19 18:31:01 +02:00
Damien Bouvy d7939282e9 [FIX] mass_mailing: avoid too long URIs by blacklisting fields in editor call
The call to the web_editor is made through an iframe with some get
parameters. While not really a problem in itself, this has the
disadvantage of generating long URIs. In some case, since all the
fields in the views are included as a GET parameter, URIs can be
generated that go up to several thousand characters. Most servers will
return a 414 for such URIs, preventing the edition of the mail
template in the view.

To avoid this problem, this commit extends the 'html_frame' widget and
blacklist 2 fields that can get too long once encoded.

Ideally, it would probably be better to stop sending all the fields and
simply add the *needed* fields one by one, but since it's difficult to
know exactly what fields might be needed and this is stable, I'm gonna
go with this 'workaround' but conservative fix.

opw-685646
2016-08-19 17:13:34 +02:00
Christophe Simonis 58cbcbae31 [MERGE] forward port branch saas-6 up to 787a32b 2016-08-19 16:35:22 +02:00
Christophe Simonis 787a32bdaf [MERGE] forward port branch 8.0 up to ee846fb 2016-08-19 16:27:06 +02:00
Christophe Simonis ee846fbff8 [FIX] core: exception are made to be raised 2016-08-19 15:59:10 +02:00