Commit Graph
107356 Commits
Author SHA1 Message Date
Olivier Dony 2cffcfd860 [FIX] website_mail: disable sha_in based message_post
The _message_post_helper() method historically allowed
passing a `sha_in` signature to let an unauthenticated
user post a message on a record.

This option is unused and an alternative is preferred:
passing a `token` value that matches the value of a
given field of the record.

In light of the increasingly grim future of SHA-1
as a cryptographic hash function, we consider it
better to entirely remove this specific option.

It has been unused for a while, and a simple
alternative exists.

The `object_shasign` method itself will be dropped
in master.
2017-02-25 02:10:36 +01:00
Jeremy Kersten 6969c6c5ad [FIX] website: allow to edit master if 'automatic footer' is disabled
Before this commit, impossible to edit the master if no language switcher
was displayed on the web page.
2017-02-24 19:18:31 +01:00
Jeremy Kersten 14d1f6f6c1 [FIX] website_event[_sale]: don't allow register when event is done
Some previous links could still point to old register page and so display an
error 500 if product of ticket has been already archived.
2017-02-24 19:18:31 +01:00
qdp-odoo 807751aece [FIX] base: fix mixing currency in company/pricelist
A company should have at least a pricelist having the same currency, that's common sense.
This was causing problems in tests on 10.0-nightly, where the main pricelist was created
in EUR, then the localization module was setting the right currency on the company without
any reflection on the pricelist.
To avoid this problem, when we write the currency on a company, we reflect that change on
the main pricelist if it's the only company in the system. Otherwise as we can't decide
which pricelist modify, we just create a new one, which should be ok.
2017-02-24 17:57:36 +01:00
Laurent Smet bf8b359b29 [FIX] delivery: fix bad Exception handling
When get_price() is called during tests, a ValidationError was returned but not catched
correctly due to the unavailability of delivery service.
Because this method is called during the creation of new sale order, it leads to some
operational error (broken cursor).
2017-02-24 17:57:36 +01:00
gilles 961b731da3 [IMP] hr: add name attribute on page to improve inheritance
Closes #15620
2017-02-24 17:51:49 +01:00
gilles f1a7e3142c [CLA] signature for GillesTephaneMeyomesse
Done at #15620
2017-02-24 17:50:27 +01:00
Whitley 914f509284 [IMP] doc: add dependency to CentOS installation
yum-config-manager is not installed by default with CentOS from some VPS companies.

Closes #15631
2017-02-24 17:23:13 +01:00
Leandro Di Pasquale 3401887e6e [CLA] Update List of Contributors of bacgroup
Add Osvaldo Jorge Gentile and remove Cesar Rodriguez from Bacgroup Organization

Done at #15630
2017-02-24 17:20:23 +01:00
Stéphane Bidoul (ACSONE) 6f1c291982 [FIX] auth_ldap: allow non-ascii ldap base
For installations with accents in the name

Closes #15597
2017-02-24 15:18:51 +01:00
Martin Trigaux 685f146d48 [FIX] account: correct pluralisation
Do you ever think about translators?
"Bankafschrift afsluitens" is not valid Dutch

opw-709657
2017-02-24 11:01:54 +01:00
Pierre Masereel 907034b1f6 [FIX] mrp_repair: map_tax missing attributes
When the function map_tax is called on the fiscal position in repair
lines to compute taxes, the partner and product are not passed to the
method which leads to mistakes when the module account_taxcloud tries to
get back the taxes for the specific partner and tic_category of the
product.

To fix the issue, we pass the product and partner that we already have
to the function map_tax.
2017-02-24 10:43:14 +01:00
Goffin Simon 95038f0bf3 [FIX] stock_account: product_price_update_before_done
When updating several moves for the same product, each time a write was done,
the move.product_id.standard_price was not updated due to "with_context(force_company=move.company_id.id)"
before write. Making a with_context before write changes the environment of the write, this why the cache
was not updated.

opw:709329
2017-02-24 08:22:48 +01:00
Christophe Simonis 387b2acfcb [MERGE] forward port branch saas-11 up to 1730dca101 2017-02-23 19:40:03 +01:00
Christophe Simonis 1730dca101 [MERGE] forward port branch 9.0 up to f3491a27a5 2017-02-23 16:51:40 +01:00
Martin Trigaux 773a631a77 [FIX] mail: remove comma
The email content was a tuple instead of a proper string.
Introduced at 0028c421

Fixes tw:jaynvora/status/834435897554710528
2017-02-23 14:01:02 +01:00
Denis Ledoux 731a21e5b4 [FIX] rating: security issue to the last_value related field depends
The `rating_last_value` field was a related on the One2many
field `rating_ids`, on which the domain
`[('res_model', '=', self._name)]` is applied.

The problem is that this domain is not taken into account
when retrieving the records for which this value must be recomputed

Therefore, when computing the `rating_last_value` of a record,
if there was a record with the same `res_id` but another
`res_model`, the `rating_last_value` of this other record
is recomputed as well.

And, if you did not have the write access rights on this other
record, it raised a security exception.

There is at the moment no way in the ORM to filter the
depends on a specific subset of records for which
a computed field must be recomputed. Therefore,
we have no other choices to make the recomputation
of the records value as sudo. It will
recompute the value of other records which have nothing
to do with the one on which this value must be recomputed
(nothing to do except the id of the records which is common),
but at least it will succeed.

opw-709349
2017-02-23 13:57:31 +01:00
Christophe Simonis f3491a27a5 [MERGE] forward port branch saas-6 up to 2cc44f5c62 2017-02-23 13:45:34 +01:00
Christophe Simonis 2cc44f5c62 [MERGE] forward port branch 8.0 up to a6c2210770 2017-02-23 13:36:19 +01:00
Christophe Simonis bbe7cdf05f [IMP] sale_margin: lint uninstall hook 2017-02-23 13:33:39 +01:00
Nicolas Martinelli 9808f952c0 [FIX] stock_account: unit price on stock move
To reproduce:
1. Set a product with 'Perpetual (automated)' valuation and 'Average
   Price' costing method.
2. Make a PO of 2 units, unit price 100, receive the delivery
   => Cost of product is 200 / 2 = 100
3. Make a SO of 1 unit, unit price 250. Confirm the SO, but do not
   deliver the product and do not create the invoice.
4. Make a PO of 1 unit, unit price 200, receive the delivery
   => Cost of product is 400 / 3 = 133.33
5. Deliver the product sold
   => A debit of 133.33 is created on the 'Stock Output Account'
6. Make a PO of 1 unit, unit price 250, receive the delivery
   => Cost of product is 516.66 / 3 = 172.22
7. Create the invoice of the SO
   => A credit of 100 is created on the 'Stock Output Account'

There is an inconsistency between entries created at steps 5 and 7. The
reason is that the price unit on the stock move is not updated when the
delivery is completed.

opw-709726
2017-02-23 10:59:57 +01:00
Goffin Simon 36b7d980ca [FIX] sale_margin: uninstall_hook
When uninstalling the module sale_margin, the view 'sale_report' was deleted
because this view was overwritten  in this module.

But the module sale still uses the 'sale_report' view so it raised an error
each time this view was required.

opw:709328
2017-02-22 14:46:26 +01:00
Goffin Simon f0178abe9b [FIX] base: Early commit when making uninstall_hook
Due to these commits, it was impossible to make an uninstall_hook
just after an uninstallation.

In some case, it 's needed to make an uninstall_hook just after the uninstallation.

Look this commit for example: e03c919e9955c5d3f678c0580744d9ef8c483c74
2017-02-22 14:46:07 +01:00
Goffin Simon d111c2fe02 [FIX] stock_account: Wrong label
When the internal category of a product is in costing method = "Average Price"
and Inventory Valuation = "Perpetual(automated)", a button with the label
"Compute from average price" was displayed. But when clicking on this button,
it just allows to set the standard price. So the label of this button must be
"Set standard price".

opw:709329
2017-02-22 14:09:18 +01:00
Andrea Piovesana f471535054 [FIX] reference odoo 10 in setup_dev
Instead of links to 9.0 branch

Closes #15588
2017-02-22 10:57:12 +01:00
Gilvan Leal 53ceda5a43 [CLA] Signature for gilvanleal
Done at #15590
2017-02-22 10:55:32 +01:00
Raphael Collet 4f62a65b1d [FIX] fields: on monetary fields, allow x_currency_id as currency field
OPW 704684
2017-02-22 10:46:28 +01:00
Nicolas Martinelli fcdb50ae3b [FIX] website_sale: "Ship to the same address"
- Create a partner with an invoicing and a delivery address.
- Connect to the website as this partner, create an order
- In the "Shipping & Billing" page, the delivery address is selected
  automatically. Change and set to "Ship to the same address", and
  confirm.

The "Ship To" address is still the delivery address, while it should be
the same than the "Bill To" address.

This reintroduces the v8 behavior:
`order_info.update(partner_shipping_id=checkout.get('shipping_id') or partner_id)`
https://github.com/odoo/odoo/blob/8.0/addons/website_sale/controllers/main.py#L623
2017-02-22 09:32:47 +01:00
Nicolas Martinelli a6186990bc [FIX] website_sale: invoice and delivery address
Create the following
- Create a partner of type "Company" (Address 1)
- Add an "Invoicing" address to this partner (Address 2)
- Add a "Contact" address to this partner
- Authorize this contact as a portal user

Connect as the portal user created:
- Place an order from website, add a product to cart
- In "Shipping & Billing", confirm the order. The proposed billing
  address is "Address 1". Do not change the shipping address ("Ship to
  the same address"), and confirm.

The "Bill To" as well as the "Ship To" address are set to "Address 1".
This is a regression from v8. In v8, "Bill To" is set to "Address 2",
while "Ship To" is set to "Address 1".

opw-707283
2017-02-22 09:32:47 +01:00
Martin Trigaux 1a1b0e238a [FIX] l10n_sa: use official currency
Saudi Arabia uses Saudi Riyal, not Egyptian Pound
Introduced at 932748d

Fixes #11741
2017-02-22 09:30:30 +01:00
Denis Ledoux 2f66e77fe8 [FIX] account: variable st_line used outside its scope
The variable `st_line` was used outside of its scope,
in the line
`move.line_ids.filtered(lambda x:x.statement_id == st_line.statement_id).write({'statement_id': False})`

It leaded to issues when calling the method
on multiple `account.bank.statement.line`: Only
the items associated to the last line were unlinked

opw-709196
2017-02-21 17:27:44 +01:00
Nicolas Martinelli 73bd7ef0e0 [FIX] hr_payroll: calculation of work days
The current calculation of work days is inconsistent with the leaves of
the employee in several cases.

The core of the problem is the logic of the algorithm: for a given day,
if we can find one hr_holiday within this day, we consider it as a
leave. One can easily spot several issues with the existing logic:
- if an employee takes less than a day-off (e.g. a half day), the
  complete day is considered as a leave.
- the timezone (TZ) is not taken into account when searching for a
  leave, while it is when computing the number of working hours. A leave
  from 3:00 AM to 3:00 PM in the Los Angeles timezone would then be
  considered as two days-off since it spread on two days in UTC.

The logic is therefore completely modified. For each day of the period:
- compute the work intervals (TZ taken into account, converted in UTC)
- search for a hr.holiday which completely includes the work interval
- if a holiday is found, the work interval is considered as a leave.
  Otherwise, it is considered as a normal work period.

This is a first step in improving the logic. The first faulty use case
is partially solved, since we cover now complete work intervals.
However, a leave covering only partially a work interval will not be
taken into account.

The second faulty use case is solved.

opw-707897
2017-02-21 15:28:49 +01:00
Denis Ledoux 534c9e9c15 [FIX] hr_timesheet: computation of the children hours according to the child stage
The below revision:
9bea8a8bd3

Change the behavior on how are computed the children hours
according to their stage fold state, while it was not intended
to. The subject of the above revision was an issue
in the recomputation dependence for the field
`children_hours`, but not how the field was computed.

It's important to count the effective hours when the
sub task is in a final stage (e.g. done) rather
than the planned hours in this case.

opw-709008
2017-02-21 15:12:44 +01:00
Denis Ledoux de57e638c2 [FIX] hr_timesheet: children_hours computation
The computation of the `children_hours` wasn't
reset at each compute, and they ended up
to be added at each recomputation involving
the method `_hours_get`

This is a regression during migration to the new api
in revision
e6ac7a7d25

opw-709008
2017-02-21 15:12:44 +01:00
Denis Ledoux 9e7bc3623a [FIX] hr_timesheet: recomputation depends of the task progress
The task progress value depends on the stage of the task,
if it's a folded stage or not.

If the task was being changed of stage, from
a non-folded stage to a folded stage,
the recomputation of the progress was not done,
while it was needed as a task in a final
stage is considered to be done.

This is a regression during migration to the new api in
e6ac7a7d25
2017-02-21 15:12:44 +01:00
Denis Ledoux b7dffb59ff [FIX] link_tracker: convert link with ampersand
Links containing HTML escaped characters,
such as the ampersand
`&` escaped `&`
were not shortened correctly:
Their redirecting URL contained the escaped value
(e.g. `&`) instead of the actual character,
leading to the wrong redirected URL.

e.g. creating a mass-mailing with a link
contains as query string
?test1=1&test2=2 were shortened
with as redirect link
?test1=1&test2=2

opw-708272
2017-02-21 12:26:02 +01:00
Nicolas Martinelli 05810dc7de [FIX] base: default partner email
In a lead:
- Fill in contact information (phone, address, email...)
- Create a new contact

All information is copied to the new contact, except the email.

opw-706711
2017-02-21 11:04:54 +01:00
Goffin Simon 79d88494d6 [FIX] stock: Customer address in deliveryslip
When there is no move line linked to the picking, the customer address must
be the address of the partner linked to the stock.pick

Fixes #15092

opw:707890
2017-02-21 10:56:19 +01:00
Denis Ledoux 3598538b57 [FIX] sale: Hit the Sales button of an archived product
Without passing `active_test=False` in the context,
a one2many fields exludes the record with
`active` set to False.

For an archived product template, this means
`product_variant_ids` returned an empty array

opw-708828
2017-02-20 16:29:07 +01:00
Levent Karakaş a6c2210770 [FIX] hr_payroll: sum correctly category code
If amount = 1 and the category amount = -1, the sum is 0 and the returned
value was amount instead of zero (`0 or amount`)

Avoid this evalution error by splitting on multiple lines

Closes #15470
2017-02-20 16:19:12 +01:00
Goffin Simon e2bbee6df5 [FIX] crm: Creating an opportunity from the pipe
When creating an opportunity from the kanban view with the crm.lead.form.simple,
setting the partner_id didn't set the fields email and phone by the onchange.

opw:708514
2017-02-20 16:16:24 +01:00
Denis Ledoux b36b79cfbc [FIX] hr_expense: hook to allow override the payment values
As it's done in
https://github.com/odoo/odoo/blob/10.0/addons/account/models/account_payment.py#L149

This is to allow `hr_expense_sepa` to inject the bank account
when creating the payment.

opw-708451
2017-02-20 12:49:52 +01:00
Goffin Simon f63fb28579 [FIX] rating: Typo error
When record.id was not in the dictionary result, it raised a error.

opw:709072
2017-02-20 11:40:19 +01:00
Goffin Simon 32e0f0954f [FIX] crm_claim: _claim_count
When clicking on the smart button "Claims" of a contact, it shows
a tree view with all the claims of this contact and his children(because
the domain on the filter is [('partner_id','child_of',self)]).
So the function _claim_count has to return the sum of the # claims
of a contact and the # claims of the children of this contact.

opw:708698
2017-02-20 11:36:11 +01:00
Goffin Simon 6c1aeceffb [FIX] purchase: purchase: null stock_moves creation
Link to this commit: 40507c4
To have the same behavior as in 10.0

opw:708099
2017-02-20 09:16:06 +01:00
gilvanleal e1045e4625 [FIX] doc: correct server action variable name
self is not defined, use model instead

Closes #15556
2017-02-20 08:46:52 +01:00
Odoo Translation Bot 2ab080bcae [I18N] Update translation terms from Transifex 2017-02-19 04:30:24 +01:00
Odoo Translation Bot 0616016b47 [I18N] Update translation terms from Transifex 2017-02-19 02:54:42 +01:00
Odoo Translation Bot e2bbb01665 [I18N] Update translation terms from Transifex 2017-02-19 00:30:54 +01:00
Denis Ledoux 1a9a082d10 [FIX] web: create="0" in many2many list views
The revision
dd657c42f7

intended to give the possibility to add an existing
record to a many2many list even without the `create` access
on the model of this record.
This is accepted by the ORM, as there is no need of the create
right on the model, only the write on the source model on which
the many2many field is.

The revision has as unexpected side effect to remove the possibility
to manually set `create="0"` on the tree of a many2many field,
to hide the "add an item" of the list view.

As this last feature is more important, we therefore revert this.

We will provide another solution for the above issue.
We think about forcing what the view definition says, so if you
set create="1" on the view, it will display the "add an item" link
in any case, even if you do not have the access right to do it.
This would allow to display the link for the above case, and in case
you actually do not have the access right, and this is an error
in the view definition, you will have an access error raised anyway.

opw-708310
2017-02-17 18:21:45 +01:00