Commit Graph

83235 Commits

Author SHA1 Message Date
Goffin Simon d79a1622bb [FIX] base: ir_filters: filters not in the language of the user
the context of the user must be used in get_filters to take into account
the language of the user.

opw:630057
2015-03-26 13:18:19 +01:00
Nicolas Lempereur aaf9badbce [FIX] account: context/domain in move line tree
On a line write in a account.move.line tree view, the on_write return all the
sibling move lines of the written move line. The lines are then displayed even
if they do not match the current search domain.

This fix adds the context on the given on_write callback request, and in
on_create_write use a on_write_domain in this context to filter the returned ids.

fixes #3161, closes #5727

opw-630093
2015-03-26 08:59:23 +01:00
Christophe Simonis 6b70b80a0e [MERGE] forward port of branch 7.0 up to 881c10b 2015-03-25 17:41:53 +01:00
Loïc BELLIER 881c10b8ec [FIX] mrp: group attribute position
group_mrp_properties is intended for the property_ids field only, not the other
parts in the "Properties" page (probably wrongly named)
2015-03-25 15:25:22 +01:00
Denis Ledoux a93ef48a70 [FIX] base: access to preferences menu for portal users
Since revs 53582c2ea6 & f65c913027,
this was no more possible for portal users to read groups
on purpose, for privacy reasons.

fields_get of res.users model is overriden, for
the access rights form view features
(The groups selections and checkboxes).
At each call to fields_get, which happens at each call
to fields_view_get on the res.users model, operations are
done on the model res.groups (basically, to
build the selection groups and checkboxes). So,
each time a view of model res.users is displayed,
whatever the view, operations on res.group model were performed.

The thing is, these operations on res.groups
are actually needed only for the user access rights
view, or at least only for users having the group
Administration > Access rights. These group operations
aren't needed for the preferences view, nor for portal users.

We therefore avoid to do these if the user is not part of the
Administration > Access rights group, which lead to
performances improvment, and solves the fact
portal users couldn't access their user preferences view.

opw-627391
2015-03-24 18:25:13 +01:00
Goffin Simon a36396b192 [FIX] sale: based amount to compute advanced invoices
The based amount to compute advanced invoices must be the amount_untaxed.

opw:630975
2015-03-24 10:00:45 +01:00
Denis Ledoux 132afa981b [FIX] mail: is_read is the column name in 8.0.
The column 'read' has been renamed 'is_read' in Odoo 8.0.
2015-03-23 15:46:32 +01:00
Denis Ledoux 3235eda781 [FIX] mail: notify parent message on message auto subscribe.
When auto subscribing to a message
(For instance, change the ```user_id``` field on a record,
like an invoice)
The new user is notified of the last message of the thread.
He must be notified of the parent message as well,
to have access to the first message of the thread,
to prevent access rights issues to the thread.

This mechanism is applied in the _notify method
of model ```mail.message``` as well, for the same reasons.

opw-630286
2015-03-23 15:26:41 +01:00
Denis Ledoux 0c16c20c68 [FIX] hr_timesheet: timezone of anayltic sheets in sheet summary
The timezone of hr_analytic_sheet should be the timezone
of the employee as well, so sheet analytic lines and attendances
lines are grouped within the same timezone, the timezone
of the employees, so the time difference between the analytic
lines and the attendances lines can be properly computed.

Fixes #5809
Fixes #5379
Related to rev. 3bf1615ad4
2015-03-23 15:26:41 +01:00
Nicolas Martinelli aac5c47980 [FIX] l10n_be_invoice_bba: only check BBA when modified
The BBA communication is now only checked when provided as input
(created or modified).
Avoids useless check for uniqueness when it's not modified, and
prevent errors when several invoices are modified in batch.

opw: 629649

Closes #5700
2015-03-23 11:06:14 +01:00
Nicolas Martinelli 1b2c400fc1 [FIX] account_voucher: consistency between exchange rate account and company
In the accounting settings, we prevent having gain and loss accounts that are linked to a
different company than the one selected for the chart of account.

opw: 630494
2015-03-20 15:01:48 +01:00
Nicolas Martinelli 52649934e3 [FIX] mrp: constraints capacity_per_cycle to be strictly positive
A capacity per cycle only makes sense if it is strictly positive. This also prevents to
divide by zero in _bom_explode.
2015-03-19 11:33:04 +01:00
Nicolas Lempereur b97578f689 [FIX] view_form: sequence at item creation
The sequence for new items in some models is simply set to a constant 10.
Hence if 3 items had after reordering sequences 10, 11 and 12. If a new item is
added, it would get after saving at the second position.

This fix set the sequence of a new item to the maximum+1 or minimum-1 sequence
of current items sequences (max if tree has editable="bottom", min if tree has
editable="top").

opw-627830
2015-03-19 09:56:12 +01:00
Christophe Simonis b79f64f1f8 [MERGE] forward port of branch 7.0 up to e1daaff 2015-03-18 12:52:33 +01:00
Nicolas Lempereur e1daaff8e0 [FIX] kanban: propagate context of many2many field
Propagate the context in kanban view when displaying a many2many field.

fixes #5623, closes #5681

opw-629698
2015-03-18 12:32:24 +01:00
Goffin Simon e2ccc5709b [FIX] account_asset: wrong currency to compute the residual amount of an asset
The result of the residual amount of an asset is : asset.purchase_value - amount - asset.salvage_value
where purchase_value and asset.salvage_value are in the currency of the asset. Amount is the difference
between debit and credit of an account move line expressed in the currency of the company.
This is why the amount must be convert in the currency of the asset.
2015-03-17 08:51:43 +01:00
David Monjoie 373b560511 [FIX] account: added check if country has a code
It is possible, if the user created a new country by himself, to have a country without a code, we then need to check that.

Fixes opw 629891, where the customer wrote "Belgie" trying to find "België", didn't find it and created a new "Belgie" country without code.
2015-03-16 10:35:01 +01:00
Goffin Simon 2606e37b18 [FIX] account_asset: currency problem with depreciation in asset management
The amount used to create an account asset depreciation line must be in
the currency of the asset.
opw: 628663
2015-03-16 09:28:24 +01:00
Goffin Simon 4530faae8b [FIX] account_payment: compute amount to pay
compute the amount_to_pay with  function field amount_residual on
account.move.line

opw:628903, 628428
2015-03-13 14:09:46 +01:00
Nicolas Martinelli 2275af4b77 [FIX] base: ir sequence number is now reset to the requested value when calling the write method
opw: 626974
2015-03-11 11:35:25 +01:00
Olivier Dony edcbf067d6 [FIX] workflow.workitem: deleting a subflow should never cascade to workitems
It's always dangerous because (cascade-)deleting workitems
has a great chance of killing the workflow instances they
belong to, putting the records in the workflow limbo
permanently. (They will appear stuck as they don't have
enough workitems anymore)

In addition, in some rare cases a subflow activity is
converted into a regular activity during an update, and
nullifying the `subflow_id` column is all there is to
fixing the corresponding workitems. It will simply take
them out of their subflow, and back into the main flow.

This is the case for the modification of the purchase.order
workflow in Odoo 8 (saas-5), for the picking subflow.
2015-03-10 19:35:23 +01:00
Christophe Simonis f8a94057e5 [MERGE] forward port of branch 7.0 up to a5e3269 2015-03-10 17:51:16 +01:00
Nicolas Lempereur a5e32690b0 [FIX] tests: UTC used in test when it should not
The test for account followup use UTC time, but the default `date_maturity`
and `date_due` of an account invoice come from fields.Date.context_today`.

One failing test for project_timesheet also used `today` instead of
`context_today`.

So depending on the test user timezone, an error of one day (if UTC time
and user time are on different day) occured which failed the tests.

For example:

* user has GMT+1 timezone, test fails 0:00am–1:00am (11:00pm-0:00am in UTC)
* user has GMT+3 timezone, test fails 0:00am–3:00am (9:00pm-0:00am in UTC)

This fix removes UTC use in the tests.
2015-03-10 17:33:43 +01:00
David Monjoie 6758b4cfc5 [FIX][REF] purchase: prevent confirming order if no stockable item
After discussing with jco, we decided to keep it simple and have a coherent behavior between different versions, we then changed the behavior from the one of jbefficient PR at 92adf673f7.
2015-03-10 14:22:32 +01:00
Nicolas Martinelli 2cc09e86af [FIX] web: on_change event on one2many fields was not fired if an attribute is mandatory (courtesy of Christophe Matthieu)
opw: 626974
2015-03-09 16:20:36 +01:00
Christophe Simonis 4a3c4713e9 [MERGE] forward port of branch 7.0 up to 209ce6f 2015-03-09 11:24:32 +01:00
odoo-tac 209ce6f48c [FIX] Fixed a typo in project.py exception message 2015-03-06 17:11:57 +01:00
xmo-odoo d9c9ac72da [FIX] export: decode Field strings before comparisons
Allows exporting fields whose string is a non-ascii *byte*string (rather than unicode).

backport of 7286f4e424 fixing #773 to branch 7.0 by request of @flotho
2015-03-06 13:12:50 +01:00
Goffin Simon 6c9afff057 [FIX] account_payment: amount in payment order is not correct.
Amount in payment order is not correct if the account move
line has already been paid by another way. The right amount is
in the residual field related with move_id to the account invoice.

opw:628903, 628428
2015-03-05 15:37:20 +01:00
Denis Ledoux c9a72b79e4 [FIX] web: size of text fields textarea when invisible by default
Text fields, or char fields having widget="text",
were not sized correctly when the field was not
visible by default, ans was set visible thanks
to attrs and other fields values.

opw-629394
2015-03-04 17:56:05 +01:00
Goffin Simon ab9f02cdee [FIX] account_followup: overdue payments must exclude payments not yet due.
Before this revision, the overdue payments report contained all payments due,
including the ones in the future, that are not actually due yet.

opw-628874
2015-03-04 17:12:23 +01:00
Laetitia Gangloff f18304c0cd [IMP] account: Add auto_join on account move line
As the number of journal entries can grow quickly, domains such as
[('move_id.state', 'in', ['draft'])] will degrade very quickly.
Fixes #5573
2015-03-04 14:55:17 +01:00
jbeficent a81a7513b2 [FIX] purchase: prevent user to confirm a purchase order when there is a service product in it and invoicing is based on incoming shipments
Fix for issue 3492 and opw 628377
2015-03-04 11:37:54 +01:00
Stefan Rijnhart 4781deb5b6 [FIX] base: Replace unreliable reference count through ORM by SQL
When the ORM is cleaning up related attachments upon record deletion, the
search() method hides the attachment of the record that is being deleted.
If the same file is used exactly once in another attachment, the reference
count will be 1 and the file will be deleted.
2015-03-04 11:23:44 +01:00
Romain Deheele 56f3f01491 [FIX] crm: retrieve title and function of partner in leads
When setting a partner on the lead,
the on_change_partner method retrieves
the various partner field values.

title & function fields were omitted, without obvious reasons

opw-629374
Closes #5388
2015-03-03 17:59:46 +01:00
Denis Ledoux 1628050030 [FIX] board: board creation of users other than admin.
It wasn't possible to create a new dashboard,
as a user other than SUPERUSER_ID,
using the "Create board" menu specifically
Reporting > Configuration > Create Board
(Technical Features & Administration > Settings groups required)
Because it creates a new menu for this dashboard,
which lead to the automatic creation of an "ir.values" record
which is prevented for other users than SUPERUSER_ID

opw-629367
2015-03-03 17:10:04 +01:00
Olivier LAURENT 31194a59fb [FIX] analytic: parent of contract form view
unhide the parent_id field in the form view of analytic accounts of type
"contract or project"
Fixes #5513, lp:1237512, opw 598926
2015-03-03 11:50:54 +01:00
Laetitia Gangloff eda2736e4c [FIX] account: journal_id should be readonly when there is already invoice internal number
Closes #5162, #5167
2015-03-01 03:23:01 +01:00
Holger Brunn 323233dd02 [FIX] ir_filters: return _auto_init's result
Closes #5204
2015-03-01 03:06:03 +01:00
Denis Ledoux 3bf1615ad4 [FIX] hr_timesheet: worked hours summary when sign in without sign out
In a timesheet, when a sign in is added, and a sign out
is not following, the current time is took as sign out value.

Rev. dbb2a669f4 corrected an issue
regarding the worked hours summary not taking into account
the employee timezone.
This timezone has to be applied on the current_time also.

e.g: For an employee being in timezone UTC + 1
If the current_time is presently 12:00 (UTC+1)
If the employee set his sign in to 10:00
and do not entered a sign out
The hours summary table displayed 1:00 of worked hours,
based on computation (11:00 - 10:00)
11:00 being 12:00 but in timezone UTC

Besides, another issue was present when entering
a sign in at midnight exactly without a sign out:
If the employee set his sign in to 00:00:00
and do not set a sign out, worked hours displayed 0 worked hours
whatever the current time.

Fixes #5379
Closes #5378
Closes #5503
2015-02-27 12:04:49 +01:00
Martin Trigaux e2fa66b05d [FIX] web: avoid incoherent actual_mode after refresh
When accessing an existing record in form mode directly (enter the url or refresh a page), the daterecord has not been initialized yet. This means that the value of actual_mode will be set to 'edit' before loading the current record (method _actualize_mode() called from do_show()).
This was problematic for one2many fields that we loaded in edit mode, showing add/delete icons/buttons in readonly views. (opw 607910)

Backport of 7ec7f1ba40 for 7.0 and saas<6. (opw 627885)
2015-02-26 13:55:48 +01:00
Aaron Bohy e73a3c6898 [FIX] Web: view_list.js: pager next and previous actions
When the number of records n and the limit l were such that n%l = 0
(e.g. 16 records total, 8 displayed per page), clicking on the
previous button on the first page, or on the next button on the
last page produced a bug because the total number of pages
computed for this edge case was incorrect.
2015-02-25 14:35:19 +01:00
Lionel Sausin (Numérigraphe) 5be3ac1fd0 [FIX] sale_stock: use current product's UoM to check availability
When selecting a product in a sale.order, the asked quantity is verified against
the available quantity.
If the user changes the UoM or the onchange from super call changes it,
the context should be updated accordingly.
Fixes #2559
2015-02-25 18:32:26 +05:30
Frédéric van der Essen 717e4106ad [FIX] product: backport of 0059d7b, avoid rounding 0 for kg
The precision 'Product Unit of Measure' was defined after the declaration of kg.
Since fc85a7ee, the precision of kg is set in data to 0.001.
As the Product Unit of Measure was not defined yet, the rounding was stripped to
(16,2) precision, so getting a rounding of 0.0 for the kg unit of measure.

[FIX] product: the declaration of decimal precision was done after
the declaration of uom precision, preventing uom precision from going above
the default decimal precision. + made the Kg unit precise up to grams by default.
2015-02-23 16:46:46 +05:30
Denis Ledoux 56c73bf6f3 [MERGE] forward port of branch 7.0 up to 0bbd835 2015-02-23 11:47:25 +01:00
Denis Ledoux 0bbd8351f1 [FIX] web: on_item_action_clicked, self.dataset is not always defined.
27a48f8026 introduced the use of self.dataset
It appears it is not always defined.
Few lines above, self.getParent().dataset is used,
and looks to be always defined.
We therefore now use this dataset in order to get the context,
to correctly pass the current session language.

Closes #5416
2015-02-23 11:44:48 +01:00
Christophe Simonis 4433825dbb [MERGE] forward port of branch 7.0 up to 4305aad
Yes, this commit is empty. This is not an error.
2015-02-20 17:06:37 +01:00
Nicolas Martinelli 4305aad02f [IMP] Packaging: version number in docker image name 2015-02-20 16:40:37 +01:00
Denis Ledoux aae75f1e29 [FIX] hr_expense: deprecated use of LocalService()
Introduced in a test, during the forward port 7613d5d499
2015-02-20 16:19:44 +01:00
Denis Ledoux 7613d5d499 [MERGE] forward port of branch 7.0 up to 27a48f8 2015-02-20 15:57:51 +01:00