Commit Graph
103111 Commits
Author SHA1 Message Date
Christophe Simonis c19d3c6f12 [FIX] point_of_sale: restrict field pos_order_count to users in POS/User group 2016-06-23 11:25:41 +02:00
Christophe Simonis c88c70e900 [MERGE] forward port of branch saas-10 up to d73f0d8 2016-06-21 13:58:24 +02:00
Christophe Simonis d73f0d8063 [MERGE] forward port of branch saas-9 up to 68f5163 2016-06-21 12:42:34 +02:00
Christophe Simonis 68f51630b9 [MERGE] forward port of branch 9.0 up to e8827d0 2016-06-21 12:16:53 +02:00
Christophe Simonis e8827d013f [MERGE] forward port of branch saas-6 up to be94653 2016-06-21 11:59:15 +02:00
Christophe Simonis be94653462 [MERGE] forward port of branch 8.0 up to fe15829 2016-06-21 11:55:55 +02:00
Christophe Simonis 0a2317d303 [FIX] test_new_api,web: tests 9.0 adjustments
Rev e37ba61 forward-ported 8.0 revision f02b230 from PR #12379.
This patch introduces extra tests and views for o2m onchange behavior,
including new fields in the test models.

In 9.0 a new convert_to_onchange() mechanism had been
introduced at 9f81c6d

The combination of both requires some adaptation to the
expected results of the new tests and adaptation of existing tests.

The test models in `test_new_api` have an implicit depencies between
models which cannot be express on ORM:
    messages depends on participants of their discussion.

So, when editing a discussion, the field `participants` should be
processed before field `messages`. This is not always done because
field processing order depends of the iteration order of a `dict` (which
is undefined in python).
The testing tour `widget_x2many` worked by chance until now.
Adapt the tour to save the participants before the messages.
2016-06-21 11:23:18 +02:00
Josse Colpaert fe15829c16 [IMP] stock: when applying a push rule the new move should not be linked to the same procurement anymore 2016-06-21 10:16:07 +02:00
Goffin Simon c77745b9c5 [FIX] sale, slae_stock, website_quote: get sale_delay in onchange_template_id
Inspired from a706ada

opw:681245, 681289, 681285
2016-06-20 15:13:01 +02:00
Christophe Simonis 91e04da933 [MERGE] forward port of branch 9.0 up to e37ba61 2016-06-20 14:28:20 +02:00
Goffin Simon 6101b856f0 [FIX] Wrong amount currency in account move line
When computing the amount currency, the date must be set in the context
to use the right currency rate.

opw:680693
2016-06-20 14:20:53 +02:00
Christophe Simonis e37ba61832 [MERGE] forward port of branch saas-6 up to b87a93a 2016-06-20 14:20:03 +02:00
Christophe Simonis b87a93a091 [MERGE] forward port of branch 8.0 up to 5b1beec 2016-06-20 13:34:46 +02:00
Nicolas Martinelli eea15ac92e [FIX] point_of_sale: taxes after fiscal position
Commit 358e285 introduces fiscal positions on the PoS. The new taxes
applied should be used in the form view of the pos order lines and in
the detailed sales report.

opw-680796
2016-06-20 12:46:03 +02:00
Martin Trigaux da82a6b705 [FIX] payment_stripe: correctly compute reference number
As explained in 15f27b26, the transaction information should be computed when
hitting the "pay now" button, not at page rendering (e.g. in case of users going
back to previous page).

Stripe do not work as typical providers as it does not redirect to the provider
page but opens a popup.
The route /shop/payment/transaction/<id> needs to be called manually.
2016-06-20 12:31:06 +02:00
Christophe Simonis 5b1beec1f2 [FIX] models: commit *before* trying to set NOT NULL constraint
Setting NOT NULL constraints on required fields may fail if there are
any row with unset value for this column.
The ORM handle this case by catching the exception raised and warning
user.

However, not commiting the current transaction before, will rollback
changes made before like setting default values or renaming a column.
2016-06-20 11:53:59 +02:00
Denis Ledoux 1061cb5696 [FIX] expression: search on *2many fields with domain
Some one2many fields have a domain specified
in their definition
e.g.
`mail.thread`.`message_follower_ids`
`hr.applicant`.`attachment_ids`
`project.task`.`attachment_ids`

which is required for the one2many field to make
sense. For the mail thread, it does not make sense
to include the followers of other models with the same
`res_id`.

This domain must be took into account when doing a
'like' search on the one2many field
e.g. Followers contains demo
Otherwise it will include threads from other model

opw-680825
2016-06-20 10:53:37 +02:00
Nicolas Martinelli 8a1d7dfe7b [FIX] sale_stock: do not count discount twice
When a product is a kit and a discount is applied thanks to a pricelist,
the discount is counted twice if the invoice is created from the stock
picking.

This is because the pricelist will modify the price unit, but moreover
the discount will be applied a second time by the method
`_compute_price` of the account move line.

opw-676838
2016-06-20 08:36:19 +02:00
Odoo Translation Bot cd369396d9 [I18N] Update translation terms from Transifex 2016-06-19 02:59:13 +02:00
Xavier ALT f02b23006b [FIX] fields: during an onchange(), do not invalidate *2many fields because of their domain
Our usage of domain on fields One2many seems to trigger an obscure behaviour on
onchange.

With the following (simplified) config:

    Message(models.Model):
        _name = 'test_new_api.message'
        important = fields.Boolean('Important')

    Discussion(models.Model):
        _name = 'test_new_api.discussion'
        name = fields.Char('Name')
        important_emails = fields.One2Many('test_new_api.emailmessage', 'discussion',
                                           domain=[('important', '=', True)])

    Email(models.Model):
        _name = 'test_new_api.emailmessage'
        _inherits = {'test_new_api.message': 'message'}

        discussion = fields.Many2one('test_new_api.discussion', 'Discussion')
        message = fields.Many2one('test_new_api.message', 'Message')

Steps:
- We change 'name' on discussion, triggers an `onchange()` call
- we ends up filling cache on virtual record (on secondary fields, we calling
  record.mapped('important_emails.important'))
- we get a cache miss ('important' field not provided, only 'important_emails' ids,
  i.e with no change on existing records)
- we fill the cache, this mark 'important' field as modified
- because of commit 5676d81 and because 'important' is that case is a related (i.e
  computed) field we triggers cache recomputation
- as there is no way to recompute 'important_emails' for virtual record (no real
  ID) we ends up with empty 'important_emails' generating removal of existing records.

=> Finally changing any value for 'test_new_api.discussion' that trigger an onchange
will always reset 'important_emails' to empty

Fixed by Raphael Collet <rco@odoo.com>, and test by Xavier Alt <xal@odoo.com>.
2016-06-17 17:50:25 +02:00
Jeremy Kersten 39a7ce44b0 [FIX] tools: don't save dev_mode in config file.
When user reset master password from web database manager, the
config file is saved.

If server was started in dev_mode the param dev_mode was saved
in openerp_serverrc silently. (in 9 or always in trunk)

Remind: --dev_mode should be never used on a production server.
2016-06-17 17:19:00 +02:00
jeffery chen fan bcb191f273 [FIX] crm_profiling: backport of cf9230d1ff
Do not redefine the view arch but do a proper inherit.
It was a problem as the redefinition removed some fields (headers,..).
It was also a problem if crm_profiling was uninstalled as the redefinition was
not removed.

Closes #12454
2016-06-17 15:19:39 +02:00
Nicolas Lempereur e1deae7eab [IMP] base: allow 'render' override with new api
New API use a frozendict for context, so when a function in the call
chain is overrided by new API (eg: render function of ir.qweb) the code
now changed by this commit would cause an error.

Instead this code duplicate the context frozendict as a dict removing
the need to set back the intial language in the context.

opw-681167

note: no need for >=saas-11
2016-06-17 15:11:06 +02:00
qdp-odoo ba49172929 [FIX] account: on ir_sequence, number_next_actual must always be read instead of number_next which might contain wrong value in case of 'standard' sequence. This was causing a crash on creating a new invoice, if demo data were installed and the user went to settings\accounting to do some modification. Issue #12471 2016-06-17 14:41:12 +02:00
Christophe Simonis 10148c3c3a [MERGE] forward port of branch saas-9 up to 8ddf1b9 2016-06-17 12:24:47 +02:00
Jeremy Kersten e9aa5fdd85 [FIX] base: fix domain of serialization_field_id in ir model field view
During refactoring of the field view, parent.model has been replaced by
model_id since it is more elegant. (odoo/odoo@4a60a3)

That was correct when you was working directly from the ir.model.field.
But if you was comming from ir.model -> fields -> 'add an item', the
model_id is unknow in the context of pyeval.

This commit close #12455
2016-06-17 12:13:35 +02:00
Christophe Simonis 8ddf1b909a [MERGE] forward port of branch 9.0 up to 8284c73 2016-06-17 11:32:09 +02:00
Christophe Simonis 8284c7389f [FIX] website_quote: avoid setting unknow field
The field `delay` on `sale.order.line` has been renamed into
`customer_delay` and is already set.

This revert commit d0d3ba921d.
2016-06-17 11:09:44 +02:00
Damien Bouvy c8a94fda19 [FIX] website_quote: test uses field that doesn't exist
Or at least doesn't exist anymore.

(Backport of 654237b43c)
2016-06-17 10:56:46 +02:00
luc-demeyer 1750b90252 [FIX] account: fixed group_lines method of invoices.
The group_lines method didn't make the sum of the quantity field, hence resulting in incorrect results when making product based statistics from the account.move.line records.

Courtesy of Luc De Meyer. Was PR #10551
2016-06-17 10:27:53 +02:00
Khwunchai J a9ea4e7cab [FIX] web_settings_dashboard: Incorrected plural form of "Active Users"
Odoo add the extra letter "s" to the translated word "Active User".
This is caused by adding "s" at the end of the word directly from the template,
which makes no sense in many language.
This prohibits translators from translating the plural form in any language.
The plural form and singular form of "Active User" should be translate
separately.

Fixes #12469
Closes #12470
2016-06-17 10:18:41 +02:00
Nicolas Martinelli 4bb5110926 [FIX] website_livechat: prevent traceback
If no image is defined for the channel, the template rendering will
crash since it will concatenate a string and a boolean.

opw-680938
2016-06-17 10:05:44 +02:00
Martin Trigaux 9007ed4c0b [FIX] doc: Research -> Search
If I need to do researchs to find a quotation, the goal of having a userfriendly
software may be missed.
2016-06-17 09:48:47 +02:00
Nick-OpusVL bdf93910c3 [FIX] doc: 'Searching' instead of 'Research'
The word 'Research' isn't usually used in this context.  'Searching' is better.
Closes #11517
2016-06-17 09:40:46 +02:00
Ramon Bartl 46867bbbce [CLA] Corporate signature for RIDING BYTES
Closes #11888
2016-06-17 09:36:39 +02:00
Jarmo Kortetjärvi 41da40d49c [CLA] Signature for jarmokortetjarvi
Closes #10997
2016-06-17 09:33:58 +02:00
Telnet Data 4beb1a9f7e [CLA] Corporate signature for Telnet Servizi Srl
Closes #11070
2016-06-17 09:33:58 +02:00
Sharjeel Ali Shaukat 9a20889fd2 [CLA] signature for salishaukat
Closes #11940
2016-06-17 09:33:58 +02:00
Ross Golder 8ca505d6f6 [CLA] Signature for rossigee
Closes #11488
2016-06-17 09:33:58 +02:00
Florian Kisser 80db184616 [CLA] Corporate signature for Seekda GmbH
Closes #12463
2016-06-17 09:20:40 +02:00
William Moreno eeb53881dc [CLA] signature for williamjmorenor
Closes #12467
2016-06-17 09:20:40 +02:00
Goffin Simon 225023f1d1 [FIX] account: Wrong "amount_currency" in account move line after reconciliation
Use case:
-enable multi currency (use UDS as company currency and EUR as secondary currency)
-create account account in a different currency (EUR)
-create journal for the bank account in EUR
-create a new tax included tax
-create a new bank statement in EUR journal and add one line
-reconcile
-Choose a counterpart with the included tax and click on reconcile

Before the fix:
After reconciliation the amount_currency for tax and expense were wrong.
You could check this in the journal items linked to the bank statement.

Video:https://youtu.be/678rFb4OE2Q

opw:680693
2016-06-17 09:18:39 +02:00
Damien Bouvy 9c007ac375 [IMP] db_manager: better uuid management
* Always change the uuid of a duplicate database by default
* Clearer message when restoring a backup
2016-06-16 17:29:41 +02:00
Cedric Snauwaert b350ee65a4 [FIX] account: speed optimization of dashboard
when there are too many unreconciled entries, showing dashboard is really slow, switch the computation of unreconciled entries to SQL
2016-06-16 16:44:30 +02:00
Cedric Snauwaert 6b1bff4ee9 [FIX] account: fix condition to create exchange_rate_entries, in some case we don't want to create one
Typically when sum(debit) = sum(credit) and sum(amount_currency) = 0
2016-06-16 16:12:45 +02:00
Nicolas Lempereur f7ec48b6df [FIX] crm: needed _order for group by crm.stage
When grouping result the BaseModel method _read_group_fill_results add
the possible groups which had no result.

But, if the order of the group is not consistent, we can get really
wrong results. The code logic is expecting that the grouped result
gotten and the list of groups (returned by _read_group_stage_ids of
crm.lead) is in the same order.

If the _order attribute of the model is not enough specific (as was the
case in crm.stage) the inconsistent order would kill aggregation values
(displaying 0 instead of what should have been present).

opw-680952
2016-06-16 15:38:27 +02:00
qdp-odoo a59703e652 [FIX] account: on opening of bank statement reconciliation widget, don't make automatic reconciliation if we have only one open invoice but also an unreconciled payment line (blue line) with the same amount 2016-06-16 14:30:20 +02:00
qdp-odoo 26dfe8944d [FIX] account: in bank statement reconciliation widget, searching on a given amount now also return blue lines with that amount (previously it was only looking on payable/receivable lines) 2016-06-16 14:26:46 +02:00
Olivier Dony a324b22d1e [FIX] mass_mailing: avoid breaking template layouts by stripping classes/data-attributes/style
Rev. c9e38cae9f made the html sanitizer
stricter, and it will not badly break any attempt at composing
a good-looking mail template.
It will also strip all data-* attributes due to the default
`strict` mode, so any theme/snippets used in the template
will be dropped/crippled after saving.

mass-mailing templates are strictly meant for composing
outbound messages, and never displayed directly in users' Inbox
or published on the website. So there does not seem to be any
strict necessity to sanitize them.
2016-06-16 12:47:45 +02:00
Denis Ledoux 9114d36414 [FIX] account: statement_id write on multiple journal items
Before this revision, this was not possible to write
`statment_id` on multiple journal items at a time,
as the condition:
`if 'statement_id' in vals and self.payment_id:`

required `self` to contains only one record
2016-06-16 12:22:42 +02:00