Commit Graph
106769 Commits
Author SHA1 Message Date
Damien Bouvy d3538dbe47 [FIX] payment_ogone: migration error
Only happens if Ogone answers with "wait", which explains why it
took so long to happen.
2017-01-02 11:11:49 +01:00
Goffin Simon 7fc1a3ca7b [FIX] mrp: Computing the qty of the BOM Structure report
Each qty of a line in the BOM Structure report must be computed in
the uom of its BOM line.

Example:

With 2 products: A, B

BOM A: 100 kg of A is produced by 5t of B

So 1kg of A needs how many t of B ?:

In the code:
qty_per_bom = 100 kg expressed in the uom of B => qty_per_bom = 0.1t
qty = 1 kg expressed in the uom of B => qty = 0.001t
l.product_qty = 5t
qty of B = (l.product_qty *qty)/ qty_per_bom = 0.05t

opw:697502
2017-01-02 10:37:08 +01:00
Odoo Translation Bot e8b0c1db69 [I18N] Update translation terms from Transifex 2017-01-01 04:42:12 +01:00
Thibault Delavallée 84a650e33a [FIX] resource: fix computation of limited attendances
Due to an error introduced when migrating the module at new API
at commit a4e57ea16c limited attendances
having date_from and / or date_to were not correctly taken into
account.

Tests have been added to avoid regression.
2016-12-30 16:38:02 +01:00
Nicolas Lempereur 5869cd6bd0 [FIX] website_customer: error if customer without countries
For customer without countries, we get False instead of tuple:
 (country_id, 'country name')

Introduced by a35cce2008.

opw-703234
2016-12-30 15:27:48 +01:00
Nicolas Martinelli e1deead1cb [FIX] account: reintroduce tax lines in invoice
Commit d861cdc1c4 introduced the tax group feature. The tax line
details were removed from the printed invoice in favor of the tax group.

However, it requires that all tax groups are correctly defined in the
localization, otherwise the printed invoice doesn't show the required
tax details.

The correct fix, which is the complete definition of the tax groups,
will be done for the upcoming v11 version. In the meantime, this simply
introduces back the tax details table.
2016-12-30 09:16:08 +01:00
Jose Morales 3c67bf038f [FIX] l10n_mx: add missing account in chart template.
Some cash basis taxes were assigning the account 208.01.01 but this account was not created. Also add tax group
2016-12-29 22:31:16 +01:00
Nicolas Martinelli 1e22870d26 [FIX] product_margin: crash of read_group
Introduced by 9a479e6572
2016-12-29 14:55:31 +01:00
Nicolas Martinelli 3667516a74 [FIX] product_margin: computed values
After commit 9a479e6572, all values in the report are 0.0.

opw-695649
2016-12-29 14:54:06 +01:00
Denis Vermylen (dve) 1879964116 [FIX] hr_holidays: add followers to employee leave
from odoo#14848

Those subscribed to the department of the employee didn't get notified when
the employee encoded a leave.

It was due to the department_id not being given as value in create when the
employee made the leave.

This is because there's a group group_hr_holidays_user on that field in the
view, so only when they created a leave the followers would be added correctly
(as department_id was given as value in create).

This commit also remove the useless subscribe_followers method.
2016-12-29 11:52:47 +01:00
Fabien Pinckaers 347494c06b [FIX] gamification: avoid sending blank emails 2016-12-27 15:28:01 -08:00
Nicolas Lempereur 2639d634bb [FIX] calendar: day of month is expected filled in code
Before this commit there was an error when we chose a monthly recurrence
with "Day of Month" of type "Day of" because the code expect them to be
set. In any case they are required field so if they are not field we
should just ignore it.

opw-702852
2016-12-27 16:50:39 +01:00
Nicolas Martinelli 80963c33b0 [FIX] hr_holidays: leaves by department
In the report "Leaves by Department", the start/end dates of the
holidays are computed based on the UTC datetime stored in the database.
This makes the report inconsistent with what is displayed in the
interface.

opw-702202
2016-12-27 15:20:30 +01:00
Nicolas Lempereur a497300be8 [FIX] website_sale: star rating for first comment
For first comments on a product in the ecommerce we would not
have the star rating displayed till a page refresh, and the star widget
would not be reset after posting.

Also in other situations, we would get a 0 star widget when posting
comment without rating, but after a refresh the widget would dispappear.

With this change the new comment get the same stars as when refreshed.

opw-702608
2016-12-27 13:16:25 +01:00
Nicolas Martinelli cd3988e689 [FIX] base: duplicate ir.model.constraint
There is a contraint on `ir.model.constraint` that contrains the name to
be unique per module.

opw-702516
2016-12-27 10:14:02 +01:00
Nicolas Martinelli 285964b710 [FIX] event_sale: ticket price currency conversion
When adding a ticket to a SO, the currency of the SO is not taken into
account in order to convert the ticket price.

opw-702683
2016-12-26 16:25:45 +01:00
Nicolas Martinelli 634fb9f390 [FIX] purchase: purchase count
The field `purchase_count` is described as '# Purchases' (which is an
integer), so the user should expect the number of POs associated to the
product, not the quantity ordered as it is the case before this commit.

opw-697815
2016-12-26 13:27:01 +01:00
Nicolas Lempereur 46f84b0284 [FIX] mail: linkify livechat message so frontend has them
In ff56304f58 a solution was tried to have message posted from
backend livechat linkified for visitor in frontend. This was
forward-ported when it should not have been and introduced issues
including:

- `href="{link}"` would become `href="<a href="{link}">{link}</a>"`

- if html entities such as the ones for U+00A0, and entities <, >,
  ', " or ` were next to the link, the entity would be linkified
  too (up to the ;)

This happen because utils.linkify function is to be used with text
content and not html which was the case in this instance.

opw-693457
opw-702410
2016-12-26 12:18:09 +01:00
Nicolas Lempereur 88d7e7f646 Revert "[FIX] mail: livechat escaping"
This reverts commit 1c60a631df.

The fix was done to conciliate 83956d4 and ff56304f5 but ff56304f5 was
forward-ported erroneously and introduced other issues.

opw-702410
2016-12-26 10:26:21 +01:00
Nicolas Martinelli 562f141ffc [FIX] stock: hide "Run Reordering Rules"
This should only be accessible in debug mode, since it is already
possible to run the schedulers (with a simialr effect) manually.
2016-12-26 09:59:45 +01:00
Nicolas Martinelli bdbda19b6d [FIX] stock: prevent concurrent procurement creation
When the user clicks on "Run Reordering Rules", it might create
procurements. However, the cron "Run mrp scheduler" will also create
procurements and might already be running in the background. Therefore,
we need to make sure that both actions don't run concurrently.

Note that the same check is done for the wizard "Run Schedulers".

opw-695607
2016-12-26 09:59:45 +01:00
Goffin Simon 22fb76a002 [FIX] mrp: field resource_type in mrp.workcenter tree view
The field resource_type in mrp.workcenter tree view must be invisible because
this field was not available in the form view before f9f4bba

Adding resource_type in the form view had no business case.

opw:698183
2016-12-26 09:47:56 +01:00
Odoo Translation Bot b21d1ae98e [I18N] Update translation terms from Transifex 2016-12-25 04:42:15 +01:00
Jérome Maes 2f82aa8230 [FIX] website_mail: remove class which hide the attachment
Attachment should be visible in website chatter.
Due to a bad copy/paste, the attachments are hidden
when website_mail_channel is installed.
2016-12-23 14:05:29 +01:00
Denis Ledoux 6cb5fc33dd [FIX] sale_order_dates: commitment date for policy all at once
When the policy of the sale order is set to
`Deliver all products at once`,
the commitment date should be the maximum of the order lines lead time
rather than the minimum, as you will deliver all lines at the same time

It looks like the former behavior is applied since Odoo 7.0
d8d0b88467

It should therefore actually be applied in 7.0/8.0/9.0,
but we consider the risk too high for databases
that are used to the former behavior, and expect the old behavior.

We therefore apply this revision only in 10.0, to minimize the risks.

opw-702271
2016-12-23 13:07:27 +01:00
Nicolas Martinelli 1c60a631df [FIX] mail: livechat escaping
- In a livechat window, type a URL, then end by a space. For example,
  type "https://odoo.com " (whithout quotes)
- Press enter

It is converted into "https://odoo.com&nbsp;".

opw-702410
2016-12-23 11:22:47 +01:00
Nicolas Lempereur dd363f03da [FIX] project_issue: new issue if create_date in view
The depends for an issue inactivity_days expects a set create_date but
this may not be the case (when creating the record for example with the
field create_date in the form view).

opw-702532
2016-12-23 10:58:42 +01:00
Nicolas Martinelli 3d777ad262 [FIX] mail: escape canned responses
Create a canned response containing the character "<". It is
automatically converted into "&lt;".

The substitution field is systematically escaped, for security reason.
This causes the substitution observed. However, the canned responses are
only used in text-only messages. The escaping is therefore not
necessary, since the HTML is not interpreted.

opw-693970
2016-12-22 17:46:59 +01:00
Nicolas Martinelli bb2a948216 [FIX] web: y-axis width in graph view
Simplifies the left margin calculation logic with a pre-defined width.
In practice, more use cases should be taken into account, and that could
just make the logic overkill.

opw-697626
2016-12-22 16:14:34 +01:00
Martin Trigaux 4a515a0415 [I18N] point_of_sale: update source terms 2016-12-22 15:05:56 +01:00
Nicolas Martinelli a67ba328d7 [FIX] web: y-axis precision
In graph view, the y-axis always uses the standard float precision with
2 digits. This might not be enough if the precision was defined
differently for a given float type.

opw-697625
2016-12-22 11:25:59 +01:00
Henry Zhou 2455e17842 [CLA] signature for jlzhou
Done at #13888
2016-12-22 11:08:45 +01:00
Iker 3ed91cea17 [CLA] signature for iluque
Signed at #13976
2016-12-22 10:58:50 +01:00
smartupdo 22e563af5f [CLA] signature for smartupd
Signed at #14010
2016-12-22 10:57:01 +01:00
lnkdel fd985ffaf9 [CLA] signature for Liujianyun
Closes #14251
2016-12-22 10:52:26 +01:00
Martin Trigaux dae737eca1 [IMP] pos: better default start date
1;2802;0c
now() was bad as it excluded the orders of the latest session
midnight is not good either because
- midnight server != midnight user (timezone)
- some restaurant, bars start in the evening and finish after midgnight

With this default, with 4 sessions:
- POS A, start 2016-12-21 08:05:36
- POS B, start 2016-12-21 08:08:11
- POS A, start 2016-12-22 08:17:51
- POS B, start 2016-12-21 08:19:23

The default start date will be 2016-12-22 08:17:51 to include all orders of
both sessions.
2016-12-22 10:37:38 +01:00
Nicolas Martinelli a552a74f4f [FIX] web: rotate graph label
When there are too many labels to display on the x-axis, they overlap
and it simply becomes unreadable. By slightly rotating them, this can be
avoided in most cases.

opw-697625
opw-697626
2016-12-22 10:06:19 +01:00
Martin Trigaux eca8a08710 [FIX] point_of_sale: generates sale details using dates
The dates were lost when in render_html as replaced by the one in the context
(None so fallback on today).

Avoid calling twice get_sale_details

Fixes #14789
Replaces and closes #14790
2016-12-22 09:51:03 +01:00
Raphael Collet 81a4830c73 [FIX] base: race condition in filestore GC (ir.attachment) 2016-12-21 16:14:25 +01:00
Nicolas Martinelli 806989b7b0 [FIX] stock_account: change standard price
When MRP and Product Extended are installed:
- Define a manufactured product with valuation as 'Periodic (manual)'
- On the product form, click on "Compute from BOM"

Several issues:
- The field "Counter-Part Account" is mandatory
- Account moves are posted although the product valuation is 'Periodic
  (manual)'

The problem is that the wizard is originally used for products with
valuation 'Perpetual (automated)', where this behavior makes sense. In
this use case, however, it's an issue.

Making the field not mandatory is not possible without an upgrade of the
module, so this will have to be fixed in master branch. Regarding the
creation of account moves, however, this commit solves it.

opw-697867
2016-12-21 15:38:42 +01:00
Jeremy Kersten daa90edc8a Revert "[FIX] base_import: parse format from relation fields."
This reverts commit 8416c2bcfa.

Temporary revert this commit, to have enterprise green again...
Need to replace 'full' args by key in context to don't break override
Need to rewrite account_bank_statement_import_csv from enterprise
2016-12-21 14:37:39 +01:00
Martin Trigaux 0b0afc62b1 [FIX] test_translation_import: remove inexistant menu
Introduced at 11812b0
2016-12-21 11:04:49 +01:00
Martin Trigaux 53f6552d08 [FIX] tests: migrate to the new api
Leftover references to cr, uid
2016-12-21 11:01:33 +01:00
Goffin Simon f9f4bba2c1 [FIX] mrp: field resource_type in mrp.workcenter form view
The field resource_type must be displayed in mrp.workcenter form view

opw:698183
2016-12-21 10:20:51 +01:00
Raphael Collet 253b1a8251 [FIX] performance: do not prefetch binary and serialized fields by default 2016-12-21 09:22:30 +01:00
Jeremy Kersten 3f267a5951 [FIX] mail: avoid to send email about assignation to active_domain.
Before this commit, 'select all' into a list view, and use an action that assign
a user_id to all the records will send n² email, because the function send_mail
use active_domain instead of the current record.

Now, we keep mass_mail mode, but simulate the case where we have clicked on
each record one by one and not all the records matching the active_domain.
So we send only one email by record.

How to reproduce:
   create a action server "record.write(dict(user_id=env.user_id))"
   add this action in context menu
   select all records in a list and apply the action server
2016-12-20 17:58:03 +01:00
Jeremy Kersten 8416c2bcfa [FIX] base_import: parse format from relation fields.
Before this commit, the parser (date, datetime, float, monetary, ...) was only
called on field from current model, and not on sub field.

Eg: product_id.price was not parsed as float, because product_id != float

This commit add an overiddable function to get all the parsers: get_parsers

This commit closes #14572
2016-12-20 17:30:54 +01:00
Denis Vermylen (dve) 0c1348345e [FIX] product: return id instead of recordset (bis)
correct 3068afd85a .
2016-12-20 16:30:59 +01:00
Denis Vermylen (dve) 3068afd85a [FIX] product: return id instead of recordset
_get_partner_pricelist could return both a recordset or an ID.
While the ORM handles both where the method is called, a migration script
relies on an ID being returned.
( migrations/sale_contract/9.saas~13.1.1/pre-models.py", line 24 )

This commit ensures an ID is being returned every time.
2016-12-20 16:03:14 +01:00
David Tran 8a589ac143 [FIX] l10n_vn: wrong account code
account 343112 should be 34312
account 343113 should be 34313

Closes #14557
2016-12-20 15:23:51 +01:00