Commit Graph
103345 Commits
Author SHA1 Message Date
Srushti Patel 1427b3660c [IMP] stock,purchase: add Product Variants menuitem in the Inventory and Purchase apps.
* Provides an easier acces to product variants from those apps
    * Fix the name of the generic product variants action in the product module.
2016-03-16 15:08:14 +01:00
Olivier Dony adddfa0d8b [IMP] website_sale: warn about acquirer with fees 2016-03-16 15:07:37 +01:00
Raphael Collet 0ec5456e63 [IMP] ir_model: add validation on custom field dependencies 2016-03-16 13:51:59 +01:00
Christophe Simonis 1431ba2f9b [MERGE] forward port of branch 8.0 up to 7b7f3fa 2016-03-16 13:15:30 +01:00
Denis Ledoux 1aeb747c6e [FIX] web: len & non zero implementation for wrapping list/dict
The implementation of `__len__` & `__nonzero__`
were not defined for the py types `wrapping_dict`
and `wrapping_list`.

For instance, this prevented an empty list
to be considered as `False` in domains
evaluated by the web client.

e.g., in the automatic partner merge wizard,
the domain
```
[('id', 'in', partner_ids and partner_ids[0] and partner_ids[0][2] or False)]
```
is used.

When the `partner_ids` list was empty (meaning the "partners to merge" list
was empty in the wizard), it wasn't considered as
`False`, and it therefore attempted to get
`partner_ids[0]`, which resulted to a crash, as
the list was empty.

opw-672095
Closes #11343

Courtesy of Xavier Morel (xmo@odoo.com)
2016-03-16 12:01:20 +01:00
Mansi Trivedi 170d7475ae [REM] stock: On stock.production.lot form view, remove some unnecessary fields.
* Since lots can only contain one product, which already appears on the form view, the serial and product name are removed from the quants list.
2016-03-16 11:58:25 +01:00
Aaron Bohy 533da62a6b [FIX] mail: read_followers() doesn't need res_id
When creating a new record, read_followers() was called without res_id and it
produced an error as the argument didn't have a default value. That argument
wasn't used anyway so this rev. simply removes it.
2016-03-16 11:21:34 +01:00
Parth Mehta db1f8ee8df [IMP] account: Clarify refund sequence on account.journal form view
* The refund sequence checkbox was not in technical features while the refund sequence selection was.This meant that in non-technical mode you could activate refund sequences but couldn't select one.
    * This commit fixes the issue by setting the the checkbox to technical features as well, and setting the refund sequence selection to required once the checkbox is ticked.
2016-03-16 11:15:45 +01:00
dut-odoo 0c95954550 [IMP] product_extended: Improve string of field 'real_time_accounting' for better usability 2016-03-16 10:46:30 +01:00
qdp-odoo 7a3d63b377 [MERGE] forward port of branch saas-7 up to revision 71d16a369e 2016-03-16 10:27:19 +01:00
Prashant Panchal 9a490b0b83 [IMP] Product: Improve type field tooltip on product. 2016-03-16 10:20:56 +01:00
qdp-odoo 71d16a369e [MERGE] forward port of branch 9.0 up to revision 083e172dd9 2016-03-16 10:08:49 +01:00
Nicolas Martinelli 7b7f3fa76a [FIX] account: filter out special periods
When computing the balance, debit and/or credit, the opening period must
be filtered out. Otherwise, the invoices which are still opened at the
time of the period closing will be counted twice.

opw-670584
2016-03-16 09:59:13 +01:00
Goffin Simon 083e172dd9 [FIX] product_extended: _get_variant_count
Due to the _set_product_template_field function, it is not possible
to set the standard price on a product template with more than one variant.

Due to the _compute_product_template_field function, it is not possible
to read the standard price on a product with more than one variant.

The field "standard_price" is in readonly to avoid some problems if the costing
method is in real time.

Closes: #11308

opw:671013
2016-03-15 16:55:04 +01:00
Nicolas Martinelli 3ca42307bc [FIX] stock_landed_costs: missing AML
There are 2 journal items missing on the accounting entry that
represents the assignation of the landed costs (for a product that has
already left the stock!) => expense account at the debit and stock
output account at the credit (amount is equal to the cost of the landed
cost)

opw-671311
2016-03-15 16:48:27 +01:00
Goffin Simon f66fcf97b2 [FIX] stock: Transfering the pack
When transfering the pack, the priority to the moves in state "assigned"
or partially_available(=true) must be given.

Used case (steps):

-set warehouse with three steps to delivery
-create one product A with qty on hand 10
-create sale order with first line product A by qty 2 and the second line with product A with qty 10
-confirm sale order
-check availability
-transfer pick by qty 10
-transfer pack by qty 10

The pack couldn't be transered

Now the pack is transfered.

Closes: #10764

opw:668682
2016-03-15 16:15:18 +01:00
Martin Trigaux c76b5d690b [I18N] fetch new terms from Transifex
To fix rfq translation
opw-672042
2016-03-15 16:02:25 +01:00
Raphael Collet dd048ae730 [FIX] fields: skip missing triggers for computed custom fields
This improves ddafbab3e4 by still loading the
field, but be tolerant if setting its triggers fails.
2016-03-15 15:03:44 +01:00
qdp-odoo 0ccb98ca2a [FIX] account: refunds are valid outstanding debits/credits that we can add on bills/invoices. 2016-03-15 14:35:10 +01:00
Raphael Collet ddafbab3e4 [FIX] models: do not load custom fields with depends when partial=True
Upgrading a module in the presence of computed custom fields can fail, if a
computed custom field depends on another field from a module that is not loaded
yet.  The patch simply prevents custom fields with dependencies from being
loaded in partial mode.
2016-03-15 14:30:39 +01:00
Goffin Simon 14436409a3 [FIX] warning: onchange_product_id_warning
To raise a warning message when selecting in a SO line a product
with a warning message set.
Inspired from c64cd05

opw:671957
2016-03-15 14:09:28 +01:00
Christophe Matthieu 1194270f9c [FIX] web: change o2m line don't set x2m dirty flag
opw-668741
2016-03-15 14:06:57 +01:00
qdp-odoo 1d2211ab63 [FIX] l10n_fr_fec: manifest and readme fixed to clean the license 2016-03-15 12:48:35 +01:00
qdp-odoo 92b1b640f6 [FIX] hr_expense: when generating the accounting entries for several expenses, set the move date as the maximum of the expenses dates, and make sure that all account.move.lines are created with the same currency rate (given by the move date). ticket 670876 2016-03-15 11:54:47 +01:00
qdp-odoo 003f2ee9bc [FIX] [tldr] account: multi-currencies fixes.
[FIX] account: fixed behavior in order to create the exchange rate difference entry at the full reconciliation only.

 This is needed in order to support the use case where an invoice in foreign currency is paid on a bank account in company currency,
 with the user encoding manually the difference due to the currency fluctuation (writeoff in the bank statement reconciliation interface): before
 this patch, Odoo was doing automatically the same, what results in a duplicated currency difference booking). ticket ID: 670876.
 A test has also been added in account/tests/test_reconcilication.py (test_statement_euro_invoice_usd_transaction_euro_full) to ensure that use case
 is now fixed.

[FIX] account_full_reconcile: a reconciliation is full as soon as either total_debit = total_credit OR if total_amount_currency is 0
[FIX] account: when registering a payment with a writeoff, always create the writeoff line exactly as entered by the user. Before, it was modified
 by the exchange rate entry, for some reason...
[FIX] account: on invoices, show the payment widget and outstanding payments in the invoice's currency always
[FIX] account: when assigning a payment in company currency on an invoice in foreign currency, save the amount_currency in order to create the correct
 exchange rate.
[FIX] account: show the currency difference entry on the invoice payments widget
[FIX] account: fixed the reconciliation methods in order to work with exchange rate entries that have debit = credit = 0
[FIX] account: fixed reconciled field computation. A line is reconciled only if its amount_residual AND amount_residual_currency are 0
[IMP] display the move name of payments on the invoice payments widget
2016-03-15 11:54:47 +01:00
Martin Geubelle 349054e41d [FIX] website: deal with unauthorized users
Show an appropriate message if the user does not have access to the analytics views.
2016-03-15 11:40:24 +01:00
Martin Geubelle 799fdffe12 [IMP] website_sale: table title in dashboard 2016-03-15 11:38:29 +01:00
xmo-odoo c824e50b3f [FIX] scaffold: correctly decode utf8 templates
As its documentation notes[0], Jinja2 only processes unicode template
data (or pure ASCII, which will implicitly decode to unicode).

The scaffolding system would read raw scaffolding data in memory (both
templates and passthrough non-templates), but fail to decode templates
before handing them to Jinja, blowing rendering up if templates
contained non-ascii.

Fix #11331 by always decoding templates from UTF8 before handing them
to jinja. This is backwards-compatible, ascii templates work as they
used to, non-ascii UTF8 templates now work correctly, non-ascii
non-UTF8 templates what are you doing?

[0] http://jinja.pocoo.org/docs/dev/api/#unicode
2016-03-15 11:25:16 +01:00
Raphael Collet ce217acf18 [FIX] fields: *2many convert_to_cache for new records
When interpreting commands, the initial value for new records is an empty list.
This regression was introduced by 0939738479.

Fixes #11239.
2016-03-15 10:40:38 +01:00
Goffin Simon 3fe01ef3c3 [FIX] purchase: type of a related field
The type of the related field purchase_id is many2one.
With the type the function _related_read in fields.py can convert
the record "purchase.order" in id.
2016-03-15 09:11:44 +01:00
Denis Ledoux 9855275203 [FIX] sale_crm: opporunities quotes & sales buttons count
A `sale.order` is considered a quote when `draft` or `sent`,
not just draft.

Before this revision, a `sent` quotation was took into account
in the amount total of sales, not in the number of quotes.

opw-668340
2016-03-14 17:02:53 +01:00
Mitali Patel f9cd11e13a [IMP] sale_crm: On the opportunity form change Quote stat-button icon.
* Some people were expecting a $ amount instead of the number of quotations due to the dollar sign on the stat-button. This should clear the confusion.
2016-03-14 16:49:44 +01:00
Denis Ledoux 01cff457e9 [FIX] website_event_track: urltype has been removed from kanban
Before Odoo 9.0, `type="url"` leaded
to the use of `do_action_url` in `kanban.js`, which
basically redirected to the link url.

This action no longer exists in Odoo 9.0, besides, this
is not really useful, you are redirected
anyway when using a `<a href="..."/>`.

opw-668215
2016-03-14 16:12:26 +01:00
Goffin Simon 50586acbc0 [FIX] purchase: Default Taxes in _prepare_purchase_order_line
According to f5989bc3d8

Only the supplier taxes of the company set in the procurement
must be set in the PO.

opw:671339
2016-03-14 16:01:24 +01:00
Nicolas Martinelli d377ffd5bf Revert "[FIX] stock_landed_costs: stock input account"
This reverts commit b955bac100.
The previous behavior was the correct one. However, accounting entries
are missing.

opw-671311
2016-03-14 14:52:23 +01:00
Tanguy Charlier 5bc0bd3707 [REF] hr_timesheet: migrate project_timesheet.py to new API
* New API migration
    * Fix delay hours and total computation : Delay was wrongly computed as 0.0 in every case.
    * Remove onchange from task. They were more confusing than helping.
2016-03-14 14:27:41 +01:00
Invitu bc758128a8 [IMP] add widget support in pivot views (issue odoo#10473)
For example, add widget="float_time" in hr_attendance pivot view measure
field.
2016-03-14 14:24:04 +01:00
Nicolas Martinelli f6b6eb906d [FIX] stock_account: AML date
The a product valuation is real-time, the date used is the scheduled
date of the move, not the actual move processing date. This is because
the date is updated on the move after the AML creation.

opw-671372
Fixes #11228
2016-03-14 14:07:50 +01:00
Goffin Simon e2b3d50ca9 [FIX] crm: deleting a crm.activity
crm.activity inherits mail.message.subtype with the field subtype_id
Before rendering "chatter.ChatComposer", the internal subtypes are fetched
on model mail.message.subtype(in function "fields_view_get").
But when deleting a crm.activity, the linked mail.message.subtype was not
deleted.

Used case:

When deleting a crm.activity, the activity still appeared in the chatter
if you log an internal note for an opportunity as an employee.

opw:670654
2016-03-14 13:30:21 +01:00
Denis Ledoux a7a71bcaa3 [FIX] purchase: report currency conversion
This is equivalent to revisions
- 000ce6a66d
- 48ccb19937
2016-03-14 12:42:33 +01:00
Denis Ledoux 000ce6a66d [FIX] sale: price currency conversion
In the sales report, the price are displayed within
the company currency.

The rates in `res.currency.rate` are the
rate TO the company currency

e.g., if the company use the USD as currency,
3152.20 COP TO USD, for the Colombian Peso

To display the price within the company currency
from the currency in which the sales happened,
the price must be devided by the currency rate,
not multiplied by
e.g., with the same setup and the above example,
If the product was sell to 315220.00 COP,
the price within the company currency (USD) is
315220.00 / 3152.20 = 100.00 USD

This was corrected at revision
48ccb19937
but it has been omitted during the salepocalypse
94716a3f14

opw-671931
2016-03-14 12:34:46 +01:00
Mahendra barad 7bc875724e [FIX]web_settings_dashboard: Fix traceback on click of breadcrum, click on X-more invitation and click back on breadcrum it will generate error. 2016-03-14 12:01:52 +01:00
Richard Mathot 9f7085586b [DOC] web: do_action accepts also the XML id of an action 2016-03-14 11:37:46 +01:00
Denis Ledoux 8158827d2e [FIX] sale: Quotations filter in the sales report
The `quotations` filter in the sales report did not
take into account the `sent` sale orders.

This is following the revision
7f5f945dcf
which meant sense in Odoo 8.0, as
this report is based on the `sale.order.line`,
and the state on the line could be different
than the state on the order, and there was no
`sent` state anyway among the possible values
of the line state selection.

But, for Odoo 9.0, the state on the line
is a related to the state of the order,
and `sent` must therefore be taken
into account again.

opw-671719
2016-03-14 10:48:30 +01:00
Denis Ledoux 24a93d689a [FIX] website_sale: invalidate session pricelist if no longer available
opw-670898
2016-03-14 10:48:30 +01:00
Denis Ledoux afe1d20dac [FIX] website_sale: cached available pricelists
The result of the method `_get_pl` is cached:
```
@tools.ormcache('uid', 'country_code', 'show_visible', 'website_pl', 'current_pl', 'all_pl')
```

But, the result depends as well on the partner pricelist set
in the partner form (or even the pricelist used correctly in his cart),
and, unfortunately, this value is not among this method parameters.

To force the recompute of the method when the partner pricelist
change, one of the method arguments (mentioned above) must change.

To serve this purpose, another method is created, adding
the partner pricelist and the order pricelist among its
parameter, to force the recomputation of the available pricelists
when there is a change in the partner or order pricelist.

The old method is kept for retro-compatibility purposes,
and basically call the new one without the two last arguments

For information, the pricelist in the cookie is set only when
the user choose a pricelist different than the default one
among the available pricelists.

opw-670898
2016-03-14 10:48:30 +01:00
Jairo Llopis 3c5e760e9d [8.0][FIX] Fix broken layout on xs Firefox.
Before patch (screenshot from runbot):

![](https://cloud.githubusercontent.com/assets/973709/13699411/6fc781b2-e77a-11e5-92fe-1e181f9e6b7f.png)

After patch:

![](https://cloud.githubusercontent.com/assets/973709/13699410/6fc774a6-e77a-11e5-83ab-dd31ccb1c4df.png)
2016-03-14 10:47:00 +01:00
Christophe Matthieu a395a54a7c [FIX] web: dataset alter_ids method must use options
x2m send_commands add options for all command to avoid onchange trigger for internal change.
2016-03-14 10:14:16 +01:00
Christophe Matthieu feeac2a4f1 [FIX] web: various small issues in form view onchange/one2many
- Issue: Edit sale.order form view, add new line, change product who have
  taxes and click quickly on save (with slow network) => error message.
  Because some deferreds are lost.
- reduce number of reads and onchange for x2m widgets
- remove before_save method and use commit_value (the issue was that if the
  before_save and the change trigger an onchange, the onchange deferred is not
  checked before saving the content.
2016-03-14 10:14:16 +01:00
Christophe Matthieu bbbf3db581 [FIX] web: avoid double write in the form view 2016-03-14 10:14:16 +01:00