Commit Graph
109174 Commits
Author SHA1 Message Date
Alexandre Fayolle 7ca29909e8 [IMP] hr: split updating manager method
Extract setting the employee's parent when changing the department manager.
This allows customizing the way the managers are handled easily in extension
modules.

Closes #16490
2017-04-19 09:40:47 +02:00
Christophe Simonis 39ab200cd3 [MERGE] forward port branch saas-15 up to 780064ea89 2017-04-18 18:37:24 +02:00
Martin Trigaux 780064ea89 [I18N] export saas-15 source terms 2017-04-18 18:16:42 +02:00
Christophe Simonis 6c02d0de41 [MERGE] forward port branch saas-14 up to 2b3a5c8ec8 2017-04-18 18:16:13 +02:00
Christophe Simonis 2b3a5c8ec8 [MERGE] forward port branch 10.0 up to 72b7eb7e6e 2017-04-18 17:59:08 +02:00
Christophe Simonis 72b7eb7e6e [MERGE] forward port branch saas-11 up to 43bb85a501 2017-04-18 17:08:24 +02:00
Christophe Simonis 43bb85a501 [MERGE] forward port branch 9.0 up to 7591f59c5e 2017-04-18 17:02:13 +02:00
Christophe Simonis 2b68f4341f [FIX] point_of_sale: compute total with taxes in tests 2017-04-18 16:55:02 +02:00
Martin Trigaux 8fe0639d0a [IMP] point_of_sale: display failing orders
When closing a session is failing, explain which order fails and why.
Allow to quickly see payment or rounding issues.
2017-04-18 15:00:42 +02:00
Ankit Joshi 7591f59c5e [ADD] stock: add the field 'description_picking' in picking report
The field is defined but never user. It could be useful to indicate
to the delivery guy that the product is 'fragile' or whatever.

opw-728874
2017-04-18 14:36:32 +02:00
Nicolas Martinelli fe42206369 [FIX] purchase: seller in multicompany
- Create 2 companies (A & B)
- Create a product shared between companies
- Add a reordering rule in each company
- Add a supplier for each company
- Run the scheduler (from the cron)

The supplier selected is always the supplier with the smallest sequence,
since it is run in sudo mode.

opw-728346
2017-04-18 13:45:15 +02:00
Adrien Dieudonne 05a3305274 [FIX] web: BasicModel: active_id should always be defined
Before this fix, active_id wasn't defined on non existing record.
For example: when you tried to add a new contact on a new partner.

Now, active_id is false if there is no id on the current record.
So, you can use this value to evaluate the context
2017-04-18 13:19:50 +02:00
Nicolas Martinelli 1463c76c1a [FIX] stock: return location browse record
Return a browse record instead of an idea, to be consistent in the case
of not putaway found.

opw-727582
2017-04-18 13:17:13 +02:00
Pierre Masereel 2b22ceea6f [FIX] web: date_picker empty input field
When you try to empty a date or datetime field, you get a traceback
saying that 'clone' and 'isSame' are not functions.

This error occurs when you empty the field because the value is 'false'
and you cannot call 'clone' or 'isSame' on false.

To fix this, we ensure that value is not false before calling these
methods on it.

This bug has been introduced in rev: https://github.com/odoo/odoo/commit/c32724eae06c987e74a0600f1669696e499edc33
2017-04-18 13:14:50 +02:00
Nicolas Martinelli 96956f60ba [FIX] stock_account: useless group
Partial backport of 02a76becf7

opw-727611
2017-04-18 13:13:45 +02:00
Adrien Peiffer (ACSONE) f160bba4d1 [IMP] hr_holidays: improve inheritance
Improve inheritance on allocation creation by employee's tag.

opw-728620
Closes #16402
2017-04-18 12:52:46 +02:00
Nicolas Martinelli b4193cd35b [FIX] sale: set timesheet line to zero
- Create a SO with a product that is a service and will be invoiced
  based in delivery quantities and will be tracked on timesheets and
  contract.
- Confirm
- Use a simple user that only has for rights: "Employee"
- Create a timesheet as the employee for the contract created by the sale
- Log some time
- Save it
- Check the SO: ok the number of hours should be "to be invoiced"
- Edit the timesheet and set one day to 0 hours => Access Error

In case of a zero value, the timesheet widget sends an unlink command
for the corresponding entry. In this case, the `sudo` is not set at the
appropropriate moment since the context key `force_so_lines` will resue
lines which are not defined in the `sudo` environment.

opw-728453
2017-04-18 11:55:16 +02:00
Adrien Peiffer (ACSONE) a055d5f226 [IMP] hr_holidays : add possibility of inheritance for meeting preparation values
Closes #16438
Closes #16432
2017-04-18 11:31:19 +02:00
Christophe Matthieu e6897c71d5 [FIX] web: wrong display in mobile 2017-04-18 10:19:06 +02:00
Joren Van Onder 22ab5036d6 [FIX] point_of_sale: apply domain and fields for search_read
Before this all domains in the POS were ignored. Introduced by
e574027056.

When the specified method is search_read buildQuery rewrites args
using the domain and fields properties. This ensures that in that case
they are set.
2017-04-17 15:57:56 -07:00
Odoo Translation Bot 28db302a10 [I18N] Update translation terms from Transifex 2017-04-16 07:12:56 +02:00
Odoo Translation Bot c043db5e3b [I18N] Update translation terms from Transifex 2017-04-16 04:29:59 +02:00
Odoo Translation Bot 2c75ad396f [I18N] Update translation terms from Transifex 2017-04-16 00:30:18 +02:00
Géry Debongnie 0bdf51e1b2 [REF] web: remove forgotten debug: true statement
Someone with a trigram starting by M and ending by GE forgot to remove a
debug: true statement in a kanban test.
2017-04-15 15:00:12 +02:00
Aaron Bohy a21e2593ce [FIX] web: FieldX2Many: don't ignore mode attribute
The 'mode' attribute can be used for x2many fields to force the
view mode. Before this rev., it was ignored and if a tree view
existed in the view description, it was selected by default.

This was mainly a problem in mobile as in this case, kanban views
are prefered, and the data_manager forces the mode to be kanban,
so the data was fetched according to the kanban view fields, but
later on the list view was instantiated instead of kanban by the
x2many field, so it crashed if both views didn't share the exact
same fields.
2017-04-15 15:00:05 +02:00
Aaron Bohy f6c20c61d6 [FIX] web: BasicModel: correctly apply onchanges result
Onchange results weren't correctly applied for many2manys, and
for x2manys inside x2manys.

More precisely, if an onchange RPC returned a command 4 (link to)
for a many2many field, this command was ignored. If it returned
nested commands (commands 0, 1 or 4 inside commands 0 or 1), they
were ignored as well.

The function that applies the result of an onchange is now
recursive, and it handles commands 0, 1, 4 and 5.
2017-04-15 15:00:04 +02:00
Aaron Bohy bf29aab3ba [FIX] web: BasicModel: transmit fieldsInfo to children
The fieldsInfo attribute on the basic model's datapoints is used
by to determine which fields need to be loaded for a record/list
of records. This information wasn't correctly specified in some
cases. As a result, the display_name of many2many fields (e.g.
using widget many2many_tags) inside list views were fetched, and
thus empty tags were displayed.

No test is added by this commit, as it already makes a broken test
pass (this test didn't pass since the previous commit).
2017-04-14 22:36:55 +02:00
Aaron Bohy a6ce395f30 [FIX] web: field Many2ManyCheckboxes: add and remove values
There were several issues with this widget, and the way the model
handles its requests (mainly the removal of values).

It crashed for instance on the product form view when the user
updated the routes field (field route_ids in tab inventory).
2017-04-14 22:36:55 +02:00
Aaron Bohy 0494d61274 [FIX] web: readonly fields may be edited
The readonly attribute of a field in its description can be
overriden in the views (e.g. with modifiers). So readonly fields
may actually be edited from views in which there is a modifiers
on their node overriding the default value.

Before this rev., readonly fields couldn't be saved, even if they
could be edited from views (with such modifiers).

For instance, it wasn't possible to change the value of the
partner_id field in a draft sale_order.
2017-04-14 22:36:55 +02:00
Aaron Bohy 2eda2a7296 [FIX] hr_attendance: crash when opening the app
'session' is no longer an widget attribute, 'getSession()' should
be used instead.

Also remove a dead JS field widget (not used since
odoo/odoo@158f779b46)
2017-04-14 22:35:27 +02:00
David Arnold b9c76ddab5 [IMP] account_asset: extensibility
Before this commit, it was not easily possible to add the seamless closing
workflow while having 2 or more depreciation boards (eg. according to accounting
standard). With this commit, I can construct the move lines independently
inherit properly and pass all created move lines to the window action.

Closes #16073
2017-04-14 16:16:52 +02:00
Guewen Baconnier 2cf21519b9 [IMP] sale_timesheet: extract preparation of values for task creation
It allows to customize the values of the task created from a
procurement.

Closes #16387
2017-04-14 16:02:44 +02:00
Adrien Dieudonne 148f7b4597 [FIX] web: Form: *_view_ref in context not passed
For one2many and many2many fields, you have several ways for specifying
a view other than the default one:
- to write the arch of the view in the field tag
Example:
<field name="many2many">
    <tree>
        ...
    </tree>
</field>

- to write xmlid of the view in a specific key (*_view_ref)
in the context of the field.
Example:
<field name="many2many" context="{'tree_view_ref':'module.tree_view_ref'}">

Before this fix, the second case didn't work.
the default view was loaded instead of the one passed in the context.

In fact, this context is evaluated after the loading of the record but
we need some static keys to load the view (before fetching the record).
2017-04-14 14:49:09 +02:00
Christophe Simonis e92ae40d71 [MERGE] forward port branch saas-15 up to b0992d082d 2017-04-14 13:32:15 +02:00
Christophe Simonis ea2faefe0d [FIX] odoo-bin shell: force rollback on exit
Each REPL python shell behave differently depending on the exit method.
Force a rollback at the end to avoid inconsitent behavior.

Thanks to Harry Jollenbeck for the report: https://www.odoo.com/groups/59/26318707
2017-04-14 12:38:51 +02:00
Pierre Masereel ff2ce7524b [FIX] web: archive kanban column
When we try to archive a kanban column we get a traceback when the field
'active' exists on the model but not in the view.

This traceback is caused by an unecessary check of the active value of
the record.

To fix it, we apply the 'active' value on all records, and not only on
the ones where active value changed.
2017-04-14 10:50:35 +02:00
Nicolas Lempereur 57c33ae5e9 [FIX] stock: print picking report without partner
The field partner_id on stock.picking is not a required field so it
would possibly cause error when getting the name of the report since
partner_id was used in it since efdb5373c3.

opw-728549
2017-04-14 09:29:11 +02:00
Christophe Matthieu 2f67881d45 [FIX] calendar: Various fixes
Traceback when:
* click on first row of calendar
* move an event somewhere else with drag and drop
* click on the mini calendar
* filter from the control panel triggers a traceback
* add an attendee: traceback
* day/week/month: traceback
* cannot add a leave, the fromViewDialog does not open
* one day oo server-side when select all day
2017-04-13 16:55:11 +02:00
Christophe Matthieu c32724eae0 [FIX] web: calendar timezone with user configuration
The client must receive the tzOffset to apply this on all hours.
To use the date picker we must change the date to apply the change
in the user's tzOffset, without this change the result is wrong.
For datetime widget we must change like it to avoid max stack error.

The server send the tzOffset, if it's undefined, by default the client
use the browser time offset.

Every test are change to use tzOffset.

A test is added in calendar to use the click by position for the
fullcalendar lib. This test create and drag and drop an event to check
timezone error and error when we use default value in the context.

Use formating date like 2026-04-04T08:00:00Z instead of 2026-04-04 08:00:00
is important for phantomjs, because it's crash without information if the
formating is not the standard format.

For the parsing, when the client receive a server date the date is utc
formating but when it's parsed from the client is in the user's timezone
2017-04-13 16:55:00 +02:00
Nicolas Martinelli 31dc6b888e [FIX] payment, website_sale: SIPS adaptation
SIPS payment has two limitations:
- A payment reference can only be used once, even if the payment was not
  proceeded
- A payment reference can only contain alphanumerical characters

These limitations do not fit the payment process which:
- Reuses existing transactions
- Introduces a `-` character when creating a new transaction for the
  same order.

First issue is solved by an ugly hack since there is no link module
between `website_sale` and `payment_sips` in order to override the
behavior of `sale_get_transaction`.

Second issue is solved by modifying the character to `x`. In this case,
we could consider overriding the method `get_next_reference` in
`payment_sips`. However, this method is called before the creation of
the transaction, and we should do a crappy workaround using the context
to get the `acquier_id`.

opw-728209
2017-04-13 16:18:09 +02:00
Aaron Bohy 9c43ad85d4 [FIX] web: Form: apply style attribute on rendered nodes 2017-04-13 16:16:18 +02:00
Christophe Simonis b0992d082d [MERGE] forward port branch saas-14 up to 8f30e707e5 2017-04-13 15:31:27 +02:00
Christophe Simonis 8f30e707e5 [FIX] website_sale_options: correct template definition
Oversight of penultimate forward-port.
2017-04-13 14:34:20 +02:00
Aaron Bohy ec988d4121 [FIX] web(_editor): field widget html
The field widget html wasn't implemented yet in the new views. A
very basic implementation was done in addon web. It only handled
the readonly mode so that the field were displayed in studio.

This commit removes this basic implementation from web, and re-
introduced the old one, converted, in addon web_editor.
2017-04-13 14:31:24 +02:00
Aaron Bohy 6b936ba203 [FIX] web: correctly save many2manys inside one2manys
In a form view, if a one2many list view contained a many2many
field (e.g. widget many2many_tags), the commands for the embedded
many2many weren't generated for newly created one2many subrecords,
so this field couldn't be saved.
2017-04-13 14:31:24 +02:00
Aaron Bohy fce45c3361 [FIX] web: field_utils: correctly format many2manys 2017-04-13 14:31:24 +02:00
Aaron Bohy 15f26cc263 [FIX] web: Many2ManyTags: keep focus after being edited
When a tag is either added or removed, the focus should remain
on the input.
2017-04-13 14:31:24 +02:00
Pierre Masereel c913398dab [FIX] web_kanban: has_active_field not always in view
When you do a group by on field that is not present in the view,
this.fields contains all the model's fields, not only the ones present
in the view.

As we use the method 'has_active_field' to check if the field active is
available in the view, the value is not always correct.

To fix this we take the fields_view fields instead of fields.

This bug has been introduced in rev: https://github.com/odoo/odoo/commit/5b4f7c13f32f36d86805eb7865d8a077746181d8
2017-04-13 13:57:43 +02:00
Nicolas Lempereur 671bd703bf [FIX] mail: error notification safari iphone 7
On safari iphone 7 (and possibly other browsers) we could have an error
by referencing to an undeclared Notification variable.

opw-726084
2017-04-13 13:56:57 +02:00
Christophe Simonis 282b036db3 [MERGE] forward port branch 10.0 up to d59555abb5 2017-04-13 13:47:13 +02:00