Commit Graph
106050 Commits
Author SHA1 Message Date
Jeremy Kersten e05dba357e [FIX] web: one2many displayed even if no data.
Before this commit, the one2many widget was not displayed if no data.
That make some form (notebook) empty while the user don't click en edit to see the widget appear.

Eg: stock picking 'Initial Demand' tab

Courtesy of @ged-odoo
2016-10-17 17:32:42 +02:00
Jeremy Kersten a88a2f51b4 [FIX] delivery: form styling - add margin between weight and unit 2016-10-17 17:32:42 +02:00
Jeremy Kersten 74e1d6940d [FIX] website_blog: fix depends for post_date
Before this commit, create a blog post since the backend raise
an error because the post_date is False.

It should never arrive, since it is a compute field that is the
publish date or fallback on the create_date.

But because set post_date, change the published_date, the depend from
publish date cannot be triggered again since it change the post_date.

So _set_post_date don't trigger _compute_post_date. And call it manually
will make 'max recursion depth python'.

The 'hack' to update publish date, without retrigger the _compute_post_date
and set post_date manually, is to use the _write method that don't trigger
all depends fields.

Courtesy of @rco-odoo

This commit closes #13829
2016-10-17 17:32:42 +02:00
Jeremy Kersten 5da0ae9b04 [FIX] web: add min-height on notebook
Moved from enterprise
2016-10-17 17:32:42 +02:00
Christophe Simonis 96d84f1b6f [MOV] test_new_api: move file in the right directory 2016-10-17 16:10:59 +02:00
Christophe Simonis 53d8f76a40 [MERGE] forward port branch saas-12 up to e8e4145 2016-10-17 16:00:39 +02:00
Christophe Simonis e8e4145c99 [MERGE] forward port branch saas-11 up to ba6ca78 2016-10-17 15:17:48 +02:00
Christophe Simonis ba6ca788fd [FIX] fields: correct detection of new records on relational fields 2016-10-17 14:51:37 +02:00
Christophe Simonis ceb1ba6dbd [MERGE] forward port branch 9.0 up to b14c8b3 2016-10-17 13:46:24 +02:00
Christophe Simonis b14c8b361c [MERGE] forward port branch saas-6 up to fa50349 2016-10-17 13:14:22 +02:00
Christophe Simonis fa50349d7e [MERGE] forward port branch 8.0 up to 001610e 2016-10-17 13:01:20 +02:00
qdp-odoo 4cfc0f7232 [FIX] hr_expense: create the account.payment objects when an expense is paid by the company.
This is required in order to have those bank journal items appearing afterwards in the bank statement reconciliation widget (blue line) for reconciliation.
2016-10-17 10:11:59 +02:00
qdp-odoo 001610ece9 [FIX] anglo_saxon_dropshipping: fix accounting entries creating on anglo_saxon + real_time + dropship.
This revert the fix made on 7bdd4de and replace it with a proper one that do create an account entry from stock_input to stock_output on a dropship move. That way, we avoid the manual change of account on supplier invoice. See the whole discussion on odoo#12687
2016-10-17 09:39:53 +02:00
Odoo Translation Bot a9abce09c0 [I18N] Update translation terms from Transifex 2016-10-16 03:22:38 +02:00
Odoo Translation Bot d1c81f136c [I18N] Update translation terms from Transifex 2016-10-16 02:57:56 +02:00
Odoo Translation Bot 2ce7679032 [I18N] Update translation terms from Transifex 2016-10-16 00:34:35 +02:00
Martin Geubelle 0d5bdaa5a0 [FIX] anonymization: remove unstored field
In 8.0, the field `base` was a stored Float (see https://github.com/odoo/odoo/blob/8.0/addons/account/account_invoice.py#L1516 )
In 9.0, the field `base` is a Monetary computed non-stored (see https://github.com/odoo/odoo/blob/9.0/addons/account/models/account_invoice.py#L1307 )

As it is not stored, there is no point of anonymise it, so it can be removed from the CSV file.
2016-10-14 18:18:31 +02:00
Martin Geubelle cbd3e8fcbd [FIX] anonymization: add monetary field 2016-10-14 18:14:24 +02:00
Jeremy Kersten 33978d7a7a [FIX] stock: adjustement inventory, check options activated in res config
Before this commit, the inventory by lot/pack/serial/... was only visible
if you switch quickly between res_config and adjustment inventory... once
the vaccumn clean the osv memory, the options was ignored.

Same issue with the _get_string_qty_information function.
2016-10-14 18:07:21 +02:00
Simon Lejeune e018fd8b2b [REF] config: 'ODOO_RC' environment variable
Look for an environment variable named 'ODOO_RC' to locate an rc file,
similar to the 'OPENERP_SERVER' one.
2016-10-14 18:02:30 +02:00
qdp-odoo 81ec36a709 [FIX] hr_expense: fix accounting entries created from hr.expense
Force the name to the default value '/', to avoid an eventual 'default_name' in the context to set it to '' which cause no number to be given to the account.move when posted (which is totally wrong).
2016-10-14 16:23:28 +02:00
Sébastien BEAU f72c7c3adf [REF] models: rename __export_rows to _export_rows to make it inheritable
Closes #10270.
2016-10-14 15:00:37 +02:00
Jairo Llopis 448521df64 [FIX] fields: setting a one2many field deletes all its lines (#13082)
Setting the value of a one2many field (`rec.line_ids = ...`) converts the new
recordset to a list of commands, and passes it to `write`.

Currently the list of commands is like: `[(5,), (0, 0, vals), (1, id, vals), (4, id), ...]`.
Notice that the command `(5,)` is inappropriate here: it deletes all the
existing lines of the record. Reintroducing the same lines with `(4, id)`
commands crashes, because the corresponding `id` is no longer in database.

The fix serializes the recordset as a list of commands like
`[(6, 0, ids), (0, 0, vals), (1, id, vals), ...]`.
Only the lines that are not kept will be deleted in this case.
2016-10-14 14:54:02 +02:00
Nicolas Martinelli 5e9a93e051 [FIX] account_asset: deferred revenue generation
- Create a deferred revenue type > 3 depreciations, one every month
- Create a deferred revenue with this revenue type
- Odoo generates a depreciation board with 3 entries > one should be
  done in October, one November, one in december
- Generate your deferred revenues entries UNTIL 31st of december

Odoo create the 3 depreciations but they all have the 31ST of december
as accounting date > the dates of these accounting entries should be the
date defined on the depreciation board.

opw-690970
2016-10-14 14:44:47 +02:00
Holger Brunn 14ac3a975f [FIX] base: don't delete the xmlid of an undeletable record
When deinstalling a module, the server deletes its records when possible.
There is an issue when deleting a record is not possible: deleting its xmlid
will introduce duplicate records when the module is installed again.  Therefore
one should not delete its xmlid.
2016-10-14 14:32:24 +02:00
qsm-odoo a2ae219d4e [FIX] web_editor, website: fix customize_template_get
Commit e11f23b701 split the website
customize_template_get into web_editor and website ones. This split
was not perfect and commit 20861b482a
tried to make it work... but did not made it totally and added an
indirect dependency to website module in web_editor...

As the final result is wrong and inconsistent and that the previous
9.0 implementation was already ugly, this was not possible to make
a consistent full-stable fix.

This commit tries to make a fix as stable as possible (the main method
name did not change, the arguments did not change, their purpose is
the same, ...) which makes the code work and be less ugly. However,
the function returns are now slightly different (and JS depends on it).
It returns only valid view information (not header stuff which is not
related to anything and the inherit_id value is now a combination of
the inherit view id and name). Also, a new private method has been
created.

Also, the method contained code which was deprecated since saas-6 but
was never removed (and never broke anything "by chance").

In master these methods will be refactored to make more sense.
2016-10-14 13:16:49 +02:00
Jeremy Kersten 7a7723eacf [FIX] base_import: allow to specify datetime format, fix encoding, add test date, fix translation
After this commit,
 - chinese custom date are supported
 - Possibility to specify the custom datetime format and not only dateformat.
   Withtout it, impossible to import a date column and datetime column at
   sametime with custom format.
 - Add test to check import date with custom format
 - Fix translation where error messages was in the source.

This commit fixes #13783 and closes #13803

Courtesy of @odony for the review ;)
2016-10-14 12:36:04 +02:00
Jeremy Kersten 8153e60653 [FIX] website_sale: fix cross browser compatibility.
Firefox don't support to submit a form not in the dom.

This commit closes #13805
2016-10-14 12:35:54 +02:00
Thibault Delavallée 323dab7653 [REF] mail: remove compatibility for support of model-res_id message-id in mail gateway
Old versions of Odoo did not correctly manage message_id of mail messages.
Thread formation was based on information present in References and/or in
In-Reply-To of replies to emails. Message-Ids could contain model and
res_id of a record. Thread formation was done using this information.

However commit 8253453d64 fixed that behavior
by correctly checking in existing mail_messages to find matching message-ids.
Message found was set as parent and thread formation was correctly done without
collision or possible issues with badly formatted Message-Ids.

A compatibility mode was introduced at the same time to handle previous versions
of Odoo.  This commit removes this compatibility as it was done long enough
to ensure compatibility is not required anymore.

[TESTS] mail: tests updated, compat mode should raise in all cases now
2016-10-14 12:22:46 +02:00
Pierre Masereel 852e2c557e [FIX] barcodes: set_quantity traceback on mobile
When we are trying to set the quantity on a mobile device, we get
a traceback saying that we cannot call the 'find' function on the
elements returned by '_get_records'.

This '_get_records' function returns a 'Collection' when called on a tree
view and an 'Array' when called on a kanban view. When we are working
on a mobile device, most of the one2many are displayed as kanban.
The thing is when we work with the object returned by '_get_records' we
call a 'find' method on it, which is implemented by Odoo's Collection class.

So when we call 'find' on an 'Array' we actually call 'Array.prototype.find' which
is implemented on most desktop browser and on some mobile browser [1]. This is what
caused the traceback on Chrome in Android.

To fix this issue, we enforce '_get_records' to always return an 'Array' and we ensure
that, when working on this 'Array', we use '_.find'.

[1] https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/find
2016-10-14 12:22:22 +02:00
Yenthe V.G 5421beafb1 [Fix] stock_account: detect if there is no price change
The warning tells the user that there is no difference between the standard
price and new price, while the if condition does the exact opposite.

Closes #13797
Fixes #13785
2016-10-14 11:56:18 +02:00
Olivier Dony 2054337199 [FIX] base_import: spellchecking in import dialog options
Excel uses "Text Qualifier" while LibreOffice uses
"Text Delimiter". The latter seems more intuitive.
2016-10-14 11:53:45 +02:00
Denis Ledoux 4a0a279472 [FIX] website_quote: correct company for the quote validation
In the frontend customer quote validation,
the company used in the sentence
```
I agree that by signing this proposal,
I accept it on the behalf of
```

was the quotation company, which is the company
which is selling, not the company/customer which is buying,
and this does not make any sense.

Instead, it should use the company of the customer
accepting the sales order, or simply the customer
if he does not have a company set.

The only case which make it a little weird is when
it's the customer himself, without parent company,
who is accepting the quote
"on the behalf of himself", but:
 - This isn't possible to correct this without
   breaking the translations, because the
   sentence "I accept it on the behalf on"
   is within the same sentence than
   "I agree that by signing this proposal"
 - This makes sense if another person than the
   customer himself is validating the order
   (the customer sent the quote link with the token
    to another person).

opw-690837
2016-10-14 11:38:36 +02:00
Thibault Delavallée 6b143e6089 [FIX] website_blog: handle replies to Blog Post Published as notes
As the Blog Post Published message is posted on a channel every reply
to this message is also posted on the blog. However blogs may holds
lot of followers not necessarily interested in being spammed by answers
to that message. We consider now that those replies are notes to avoid
spam. Blog managers can follow the note subtype to be warned about
those messages.
2016-10-14 11:03:57 +02:00
Thibault Delavallée f83e706786 [FIX] website_slides: handle replies to Presentation Published as notes
As the Presentation Published message is posted on a channel every reply
to this message is also posted on the channel. However channels may holds
lot of followers not necessarily interested in being spammed by answers
to that message. We consider now that those replies are notes to avoid
spam. Channel managers can follow the note subtype to be warned about
those messages.
2016-10-14 11:02:15 +02:00
qdp-odoo 9aebcb80d2 [FIX] account: add field include_initial_balance in the account.account.type form view 2016-10-14 09:39:23 +02:00
Nicolas Martinelli c426133fb9 [FIX] account: cash with multiple COA
- Set multi company
- Create 2 new companies
- Set a chart of account for company 1 (ex Belgium)
- Set another chart of account for company 2 (ex UK)

This is because the generation of accounts from templates doesn't
restrict the accounts to the current one.

opw-690796
2016-10-14 08:27:57 +02:00
Thomas Binsfeld (ACSONE) a4143dae1d [FIX] Inheritance of purchase_order_change by preparing data dictionary
Data dictionary filled inside the function purchase_order_change had no possibility of inheritance.

opw:690733
2016-10-13 22:33:28 +02:00
Thomas Binsfeld d0bfcfd41d [FIX] Inheritance of purchase_order_change by preparing data dictionary
Data dictionary filled inside the function purchase_order_change had no possibility
of inheritance.

opw:690733
2016-10-13 22:30:40 +02:00
stefanorigano 39d74a7136 [FIX] web_editor: improve web_editor UI style preservation
* add and use preservation mixins to prevent undesired customizations
made by themes
* remove some style preservation code (and use the mixins instead)
* add UI states' colour variables
2016-10-13 17:01:04 +02:00
stefanorigano 63fdde638b [FIX] website: fix usability/design issues in o_select_media_dialog 2016-10-13 17:01:03 +02:00
Jairo Llopis a2f0dda366 [FIX] website_portal: redirect to login for '/my' controller
Current issue without this patch:
On a bare database, install `website_portal` and go to `/my/home` logged out.
You get to an empty page where you can see Public User's details.

Expected behavior with this patch:
User should be redirected to the login page.

Additional notes:
- Other submodules (`website_portal_sale` and `website_project_issue`) were
  actually implementing this, so that is removed BTW and relies in base
  module's now sensible behavior.

This commit closes #12775
2016-10-13 16:30:03 +02:00
Simon Lejeune 4450495e9e [REF] web_kanban: allow a custom limit defined in the arch
With this commit, it's now possible to set an arbitrary limit on any
kanban view by adding a limit attribut to the root kanban tag in a
kanban definition.

Do not forward-port.

Backport of rev 8a87c382ba
2016-10-13 16:20:30 +02:00
Nicolas Martinelli 1f0a778742 [FIX] stock: reverse picking in several steps
- Activate the receipt in two steps on the warehouse
- Create a PO for a stockable product
- Receive the product in Input zone
- Receive the product in Stock
- Reverse the move to Stock > products are back in Input
- Reverse the move to Input

You can't reserve quantities for this last move (from Input to Vendor).

This is because a picking has been automatically created from the Input
to Stock.

Original move which is reversed: Input -> Stock
When we reverse it, we don't want to send it back to Stock, so we need
to check the destination location of the original move, not its
location.

opw-689206
2016-10-13 16:12:05 +02:00
Devendra Kavthekar c63c225274 [FIX] web: is_false() for reference field widget. (#9335)
In the widget, the value of reference field is a pair `[val1, val2]`.
When the field is blank, its value is `[false,false]`, thus checking `[false,false] === false`
never succeeds, and this breaks the check for required fields.
2016-10-13 16:01:21 +02:00
Simon Lejeune 8a87c382ba [REF] web_kanban: allow a custom limit defined in the arch
With this commit, it's now possible to set an arbitrary limit on any
kanban view by adding a limit attribut to the root kanban tag in a
kanban definition.
2016-10-13 15:59:20 +02:00
Simon Lejeune 5abe76c2d2 [FIX] web: clear_uncommitted_changes on browser's back button
This is done by guarding the `on_hashchange` evant handler with the
`clear_uncommitted_changes` function.

Note that the url has already changed when we are in this handler, so we
make sure to restore the old url when the user chose to continue its
edition.
2016-10-13 15:51:09 +02:00
Jérome Maes 740be5842c [FIX] rating_*: domain on m2o for rating mail template
Rating is implemented for project.issue, but it is
impossible to set a template on the stage since the
domain force the mail.template to be declared on
project.task.

We use the same mecanism as `mail_template_id`
declared on project.stage.task in project
module. The list of available template on the stage
form view will be the ones for issue and task like
mail_template_id.
2016-10-13 14:50:06 +02:00
Simon Lejeune a7b976c704 [FIX] web: browser's back button while in the same action
When you browse through the views of an action and then hit the back button,
the view does not change. For example, go to the customers kanban, click
on a customer, hit back, you're still in the customer form view.

related rev: 46857d267b

`do_load_state` is called when you hit f5 or press the back button on
your browser. The related rev took care of fixing the ugly part that
make the webclient goes trough the multi record view then the mono
record view when you hit f5 on a mono record view.

In this context, it removed the code in view manager's `do_load_state` that
switched the mode of the action if it isn't the same the one the web client
is trying to restore from the state (because now the correct mode is loaded).

However, if you hit the back button while the previous view is in the same
action, it obviously doesn't switch the mode anymore and you're facing
the same view.

The issue is fixed by restoring the switch_mode in the view manager's
`do_load_state` (without its oudated comment).
2016-10-13 14:38:33 +02:00
Yenthe V.G cfe0dc6d34 [FIX] website_sale: remove duplicated method
Added twice during a forward port

Closes #13796
Fixes ##13795
2016-10-13 14:31:18 +02:00