Commit Graph

72360 Commits

Author SHA1 Message Date
Nicolas Lempereur 35077af57d [FIX] opportunity: salesperson not in followers
Previously, when updating subscribers of a mail.thread, the default_{key}
arguments could override a {key} in the values.

e.g: for an new opportunity, the salesperson was overrided by the default user_id

This fix gives the priority to the values over the default_ in context.

opw-631741
2015-04-01 16:37:01 +02:00
Cedric Snauwaert 80d3adc1f3 [FIX] web: when converting a node back to xml, correctly escape node content 2015-04-01 11:02:31 +02:00
Goffin Simon 680e6889b1 [FIX] account: Partner Ledger wizard didn't consider all filters and type of entries:
The report generated by this wizard considered all the partners without taking into account
the filters and target entries set.
To show the right partner the function _set_context
must consider the "self.query" which sets the period, the dates, the states, the accounts and
the journals of the sql query used to give the demanded partner.

opw:631649
2015-04-01 08:53:55 +02:00
Martin Trigaux 1219b56bcc [FIX] project: change view according to project uom
The working time unit can either be hours or days. In case of days, should
replace the references to hours in the view to days. In case of days, use float
field instead of float_time.

Using the string 'Hours' as a way to determine the unit is too weak as:
1. it does not work in other language than english
2. if the unit is renamed (*cough* 1626eca *cough*), it will fail as well

Using the object with context to compare strings in the user language.
lp:1080191, opw 595397
2015-03-31 16:01:14 +02:00
Martin Trigaux f7234f3cea [FIX] project: correctly set progress of task
When setting a task as done, the state is done and the progress written to 100%.
If this task is reopened, the progress was not resetted as the stage is changed
but not the state (still done).
Partially backport behaviour of 8.0 (8fbfc997) by using the fold attribute
instead of the state to reset the progress.
opw 597688
2015-03-31 14:12:14 +02:00
Martin Trigaux 23918ae97d [FIX] purchase: remove duplicated filter
Same name, same domain, different string...
opw 597964
2015-03-31 12:08:55 +02:00
Denis Ledoux 31e10ec0a0 [FIX] account: multi-company partner ledger.
If a customer changed of company while having
account.move.line records in the former company he was in
It wasn't possible for someone else than the admin
to print the partner ledger report including this partner.

opw-631800
2015-03-31 11:04:40 +02:00
Denis Ledoux e311a423cd [FIX] product: ratio help tooltip according to type in UOMs
In the form view of a unit of measure,
if the unit of measure was of type
"Bigger than the reference unit"
The help in the tooltip of the ratio field was wrong
Besides, this help message was contradictory
with the formula written just below the field.

opw-631672
2015-03-31 11:01:36 +02:00
han-odoo 0a1f52ccb5 [FIX] account: prevent removing closing entries for closed period
As the target period is closed, should not be able to delete closing entries.
opw 610428
2015-03-30 17:10:16 +02:00
Rifakathusen Haradwala 3cae2c5155 [FIX] account: wrong tax amount for manual tax line
On an invoice, tax lines are generated in tax_line field. When modifying
manually the tax amount, the recomputed tax_amount field was incorrect in
multicurrency environment, leading to an entry with different tax amount and
debit value.
opw 611474
2015-03-30 16:43:08 +02:00
Monica 2b7a6e2933 [FIX] purchase_requisition: avoid errors on service based requisitions
When the product type is Service, the procurement doesn't have stock move.
Confirming the purchase order linked to such procurement would fail.
2015-03-27 16:09:35 +01:00
Nicolas Lempereur 2a0c018043 [FIX] kanban: search more when DataSetStatic
When showing a kanban, there is differences between dataset of types:

* DataSetStatic: self.view.dataset===self.dataset, their ids attributes are the entire ids list,
* DataSet and DataSetSearch: self.view.dataset.ids are the already in the view ids, self.dataset.ids are the last gotten ids.

Hence with DataSetStatic dataset, when self.view.dataset.ids.splice(0) is done
self.dataset.ids is also emptied. And in the read_slice function, the slice is
done on that (now empty) array.

This fix removes the splicing of this ids array (which doesn't change a thing
since the array is overwritten latter), a _.difference is used to remove
eventual duplicates since in the DataSetStatic case, the same array is being
concatenated to itself

opw-630654 opw-617090 opw-619563
2015-03-26 17:28:02 +01:00
Jérome Maes f89c4cd78d [FIX] document : keep order during the search of ir.attachment
Backport of 16fa24d52258245af4ee9100666bae6ebe664046
2015-03-26 14:48:18 +01:00
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
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
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
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
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