Commit Graph
102235 Commits
Author SHA1 Message Date
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
Christophe Simonis ef1386a7d2 [FIX] core: correctly load sql file when updating modules
Do not dumbly parse sql queries by splitting on `;`. PostgreSQL will do
a better job than us...
2016-08-19 15:48:36 +02:00
Aristobulo Meneses 5e7d23f1be [FIX] website_slides: Set file size limit to 25MB to match web module limits
This commit closes #13223
This commit closes #13225
2016-08-19 15:34:58 +02:00
Jeremy Kersten 0d491775c5 [FIX] web: don't duplicate alert while backup
When you backup 3 dbs with the database manager, you had 3 times the warning.

Underscore is not loaded, so _.once not available.
This commit closes #13173
2016-08-19 15:34:58 +02:00
Martin Trigaux 0122c05eff [FIX] web: avoid report with invalid sheet name
This commit does not fix any bug in odoo/odoo but helps fixing #12788
Needed for odoo/enterprise#433
2016-08-19 15:28:27 +02:00
Christophe Simonis f571ba373a [MERGE] forward port branch saas-6 up to 826472d 2016-08-19 12:56:08 +02:00
Christophe Simonis 826472dc48 [FIX] account_asset: correct typo in function name 2016-08-19 12:45:11 +02:00
Christophe Simonis e5371329f7 [MERGE] forward port branch 8.0 up to 08ed48e 2016-08-19 12:07:14 +02:00
Goffin Simon acc7449df1 [FIX] stock: action_done with moves with pack operation
When action_done is called with moves without pack operation, the pickings
linked to the computed moves must be in state done and the date_done must
be set on each picking.

opw:685145
2016-08-18 15:10:42 +02:00
Damien Bouvy 08ed48e24c [FIX] stock,purchase: stop shortening picking type names
In purchase, a special key is set in the context to simplify the name
of the picking type: instead of the normal name, only the name of the
warehouse is used. This is problematic if more than one incoming picking
type exists for a given warehouse, as it prevents you from being able to
differentiate them. Asking users to modify the view to remove the
context key seem a bit too much to ask for something that should be
simple.

It is my understanding that this was implemented only for cosmetic
reasons, but I am willing to assume that having to select
"YourCompany: Delivery Orders" instead of simply
"YourCompany" for people who only have one picking type should not
be too disruptive or obscure.

opw-685751
2016-08-18 13:59:42 +02:00
Goffin Simon c0bb312a26 [FIX] warning: Products with Blocking Warnings can still be added to Sales Orders
Like in 8.0 when adding a product with a blocking message in a SO line, a warning
message must be raised and the product is not added.

opw:685928
2016-08-18 13:22:34 +02:00
Goffin Simon c844534f8a [FIX] account_asset: asset depreciation with refund
When an asset is created from a refund invoice, the negative amount
must be taken into account to create the depreciation moves.

opw:685630
2016-08-18 11:11:49 +02:00
Nicolas Martinelli 354017b805 [FIX] mrp: duplicate product code
The BOM Structure report shows the product code twice.

opw-684520
2016-08-17 16:16:29 +02:00
Raphael Collet d32871570a [FIX] base: extrapolate table name on uninstall for ir_model_constraints
When uninstalling a module, the model *may* be removed from the registry
before the removal of the model constraints; to prevent crashing in
those cases, a simple replace('.','_') on the model name should allow to
obtain the table name in these cases.
2016-08-17 15:21:26 +02:00
Nicolas Martinelli 19e556b34f [FIX] website_form: traceback when sending an attachment
The form builder offers the possibility to add a "Custom File Upload"
field. When the user clicks on "Send", an error occurs ("An error has
occured, the form has not been sent.").

This is because we try to send a mail linked to "mail.mail", which
doesn't make sense.

The case was actually taken into account in the code, there was just an
oversight in the code.

opw-684040
2016-08-17 14:52:10 +02:00
Cédric Snauwaert 5b4404f628 [FIX] account: optimize the bank reconciliation widget + add of a button to auto-reconcile instead of auto-reconciling directly when opening the widget.
* This new button is a behavior change, but this is needed for big databases with a lot of statement lines to process. Indeed, in that case we prefer to load the widget as soon as possible and thus let the user process the lines manually or click on that button (but at that time he knows why it takes time).
* Opimization of various method in order to speed reconciliation and view opening : added indexes, direct use of sql queries...and also removed the code that was looping on open debit/credit to propose a sum of entries to match the statement line's amount, because it was a little greedy and wouldn't give accurate results most of the time.
2016-08-17 14:23:08 +02:00
Denis Ledoux 8787476b50 [FIX] web: fix DataSetSearch to avoid race conditions
This is a following of revision
ab8a93c852

This revision solves a new case:
when quickly performing a second search
after one which has not been resolved yet in a kanban view, and the second
search is resolved before the first, it was not possible to load the form
by clicking the card of the kanban, it leaded to a
`Could not find id in dataset` web client error

This was because the ids of the dataset were altered with
the ids of the first search (the one that lasted longer), while
the records displayed were the ones of the second search
(the one that finished first)

opw-682362
2016-08-17 12:26:16 +02:00
Martin Geubelle 5fce7847e1 [FIX] purchase: fiscal position in multi-company environments
Properties depends on with which companies the records
are browsed.

When retrieving the fiscal position as sudo (from a cron), we should force
the company from the context.

After https://github.com/odoo/odoo/commit/4162b8f as the context is force in get_fiscal_position,
we should call this method with a company (and not pass the company in the context).
This has been forgot in https://github.com/odoo/odoo/commit/fe92dea

opw-684802
2016-08-17 11:51:50 +02:00
Nicolas Martinelli 717ca3390f [FIX] base_import: error message
During the import of a file, if the connection is closed (timeout,
server shutdown...), a traceback appears.

This is because `error.data.arguments` is not defined in this case.

opw-682104
2016-08-17 11:43:17 +02:00
Martin Trigaux 907f9554d4 [FIX] account: update outdated account.pot file
Fixes #13149
2016-08-17 10:31:25 +02:00
Martin Trigaux 48366920d3 [FIX] hr_expense: update the outdated .pot file
Fixes #13149
2016-08-17 09:56:46 +02:00
Goffin Simon 3846d35d02 [FIX] account_voucher: unreconcile with deleted journal items
Inspired from e2d16ea

When cancelling a voucher from a customer payment receipt,
the voucher lines linked to the deleted account move lines
have to be updated by clicking on button "unreconcile".

opw:683258
2016-08-17 09:25:01 +02:00
Nicolas Martinelli 13f164049a [FIX] procurement_jit: reassign if waiting
Use case:
- Have a stockable product A, with enough quantity on hand
- Have a stockable product B, without enough quantity on hand but
  configured on "Make To Order"
- Create a SO, confirm.

The picking is in status "Waiting Availability", althought one product
is available. The picking should be in "Partially Available", which is
actually the case if we simply "Reserve" it manually.

opw-683974
2016-08-16 16:05:08 +02:00
Damien Bouvy 6cb84a1048 [FIX] analytic: add missing context propagation
Courtesy of @adrienpeiffer
2016-08-16 15:11:31 +02:00
Nicolas Martinelli c2fe9fe0e6 [FIX] web: prevent double-click on statusbar
When double-clicking on the statusbar widget, two calls to write are
performed. This can cause unwanted behavior, and when the `write` method
takes a lot of time to process, it's not possible to prevent it
server-side.

Courtesy of @gurneyalex and @aab-odoo

Closes #13134
opw-686025

FORWARD-PORT UP TO SAAS-6!
2016-08-16 13:09:49 +02:00
Nicolas Martinelli 0350ab81b8 [FIX] web: prevent double-click on statusbar
When double-clicking on the statusbar widget, two calls to write are
performed. This can cause unwanted behavior, and when the `write` method
takes a lot of time to process, it's not possible to prevent it
server-side.

Courtesy of @gurneyalex and @aab-odoo

Closes #13135
opw-686025
2016-08-16 13:06:03 +02:00
Odoo Translation Bot 71594f5958 [I18N] Update translation terms from Transifex 2016-08-14 03:04:34 +02:00
Odoo Translation Bot 842bf793f5 [I18N] Update translation terms from Transifex 2016-08-14 00:38:20 +02:00
Damien Bouvy 332adff573 [FIX] base: set current company as default for currency rates
When manually creating/importing a currency rate, there is no default
on the company_id field.

This is quite unfortunate, as rates are filtered by company then by
date, which means that a rate without company will never be taken
into account despite being newer. This filter makes sense for multi
company setups, but for mono-company setups this is quite annoying.

This commit adds a default on the company_id and adds a view for
the base_currency_rate model to only display the company field in
multi company settings.
2016-08-12 14:27:31 +02:00
Christophe Simonis d7b7b07f9e [FIX] mail: avoid errors in /longpolling/poll requests
When a request fail due to a database concurrency error, the request is
replayed. However, the `mail` overwrite of /longpolling/poll requests
modified its arguments inplace, which lead to a sanity check to failed
in case of retry.

Fixes #13121
2016-08-12 10:45:43 +02:00
Stefano Rigano d1663f06e7 [IMP] doc: define a layout for 'category index' pages
These pages were indexed by google but did not have any layout defined.
2016-08-11 16:26:49 +02:00
Martin Trigaux 8b9f1600d0 [IMP] doc: add a warning about POS & HTTPS
The POSBox do not work over HTTPS, the pos must be in HTTP.
See #3156 for details
2016-08-11 12:20:59 +02:00
Nicolas Martinelli 69e772570b [FIX] purchase: copy PO procurement group
When duplicating a PO, we should not copy the procurement group,
otherwise the stock moves will be linked to the first picking.

opw-685812
2016-08-10 16:20:30 +02:00
Nicolas Martinelli 19116cc878 [FIX] stock: unreserve move only if reserved quants
An issue occurs in the following use case:
- Enable "Bring goods to output location before shipping (Pick + Ship)"
- Create a SO with 2 lines. 2 Deliveries are created, Pack and Ship.
- Go to "Procurement Exceptions", and cancel one of the 2 lines
- Go to the OUTgoing shipping, "Force Availability", and "Validate"

An error occurs: "Cannot unreserve a done move". The system tries to
unreserve a move which is actually cancelled.

Actually, it should not be necessary to unreserve this move, since no
quants were actually reserved in a first place. The fix ensures that, in
this situation, we don't try to unreserve a move with no quant reserved.
This should be safe to do it in all cases, but better be safe by adding
the condition `if 'no_state_change' in context` to impact only this
specific use case.

opw-685650
2016-08-10 16:09:57 +02:00
Goffin Simon 43e25b336d [FIX] account_voucher: unreconcile with deleted journal items
Inspired from e2d16ea04a

When cancelling a voucher from a customer payment receipt,
the voucher lines linked to the deleted account move lines
have to be updated by clicking on button "unreconcile".

opw:683258
2016-08-10 15:04:30 +02:00
qdp-odoo 123ee27e40 [FIX] account: allow to force the 'tax_line_id' and 'tax_ids' fields of account.move.line by a write.
This restriction in the code has no reason and is already enforced by a readonly=1 attribute on those fields in the account.move.line.form view
2016-08-10 14:44:56 +02:00
Nicolas Martinelli b2fb497a4c [FIX] account: overdue balance
The overdue balance on the partner form takes into account the invoices
which are due today. It shouldn't be the case.

opw-685777
2016-08-10 12:15:06 +02:00
Goffin Simon 414ad99a92 [FIX] web: unchecked radio button
Before rendering the radio button, the radio button must be unchecked
to ensure to take the last value checked.

Step to reproduce:

-From main menu, click on 'Contacts'
-Click on 'Create'
-Select 'Company' value on company_type field
-Save or not the contact
-Return in the main contact view (click on breadcrumbs)
-Click on 'Create'

Bug:

The default value on company_type field is 'Company'
but the fields that should be hidden are visible (example : parent_id field)

After the fix:

The value of company_type field is 'individual'

opw:684847
2016-08-10 11:37:52 +02:00
Kim Huysmans b868ae51b6 [CLA] corporate signature for BeOpen
Closes #13072
2016-08-10 11:25:24 +02:00
Nicolas Martinelli c819b88063 [FIX] web: FieldCharDomain value
An issue occurs in the following use case:
- Create an automated action
- Choose a Related Document Model
- Select records to filter (click on "Select Records")
- Do not save, but cancel instead
- Create an automated action once again

The filter domain keeps the same value than previously, forcing the user
to refresh the page to get rid of it.

opw-683214
2016-08-10 08:31:01 +02:00
Aristobulo Meneses bfdf5a6e12 [FIX] cli/server: handle comma-separated db_name config properly
The db_name parameter passed in command-line (-d) or in configuration file,
supports a list of database names separated by commas, in order to
preload them. The WorkerCron processes will also respect this list and only
connect to the specified database(s).

As of Odoo 9 the server also automatically initializes a new database
if the one passed via `db_name` does not exist or is not initialized.
This code did not properly handle multiple comma-separated value,
and created an unitialized database named `a,b` when db_name was set
to `a,b`.

Fixes #13079
Closes #13094
2016-08-09 20:12:33 +02:00
qsm-odoo e86fb5ee37 [FIX] website_blog: do not show current blog post as next post
At the bottom of each blog post there is a link to the next blog post
of the blog. If the current blog post is the last, the next blog post
which appears is the first one, which is ok. However, if there is only
one blog post in the blog, when viewing it, the next blog post which
was proposed was the current one (now nothing is proposed as next blog
post anymore).
2016-08-09 17:16:21 +02:00
Goffin Simon bb72dea98d [FIX] account: return of product with unit price = 0 and fixed tax
Use copysign to take into account the sign of the base amount which includes the sign
of the quantity and the sign of the price_unit
Amount is the fixed price for the tax, it can be negative
Base amount included the sign of the quantity and the sign of the unit price and when
a product is returned, it can be done either by changing the sign of quantity or by changing the
sign of the price unit.
When the price unit is equal to 0, the sign of the quantity is absorbed in base_amount then
a "else" case is needed.

opw:684459
2016-08-09 15:06:58 +02:00
Simon Lejeune c79ba8f785 [FIX] web_editor: test ui should be in post install
This test is ran in the backend and, if we do not mark it as post
install, the dependencies of the web module are not installed.
The webclient will then errors like "View type 'kanban' is not present
in the view registry".
2016-08-09 14:39:20 +02:00
Thibault Delavallée c1b2d74bc3 [FIX] account, purchase: fix leftover select fields parameters 2016-08-09 11:14:57 +02:00
Thibault Delavallée 90a5079d01 [FIX] various: fix fields index parameter in new API still called select 2016-08-09 10:26:53 +02:00