Commit Graph
101105 Commits
Author SHA1 Message Date
Denis Ledoux 3d58cd1ca2 [FIX] mrp_repair: taxes compute_all take ids as parameters.
Not browse records.

This is an oversight of the revision
f4f4a4db73

opw-672321
2016-03-18 13:45:15 +01:00
Denis Ledoux 4ce55a2cd1 [FIX] mrp_repair: taxes domain in fees editable list
Apply the same domain which is appled in the form
view, which was redefined during the 9.0 accounting
refactoring (c04065abd8)

This is following the forward-port 51774f2a45

opw-672321
2016-03-18 13:45:15 +01:00
Joren Van Onder fe76e6bc36 [FIX] barcodes: first qualify the quantity event before handling it
Introduced by 5bb64d40d0. Before doing
anything we should first ensure that the quantity keypress event targets
body (and that it is a number, but that's less important). Before this
we didn't do that and thus the _display_no_edit_mode_warning was given
when people where just typing in the associated thread of a picking.

opw-672350
2016-03-18 13:11:25 +01:00
Yannick Tivisse b6847a0537 [FIX] ir_cron: programming error 2016-03-18 12:35:09 +01:00
Jeremy Kersten f01c195288 [FIX] base: ir field - set dependence as required when creating a compute field.
When you create a computed field, if you don't set the dependencies field
Odoo raises a traceback keyerror for ''.

Courtesy of @odony
2016-03-18 10:01:11 +01:00
Jeremy Kersten 58d587df09 [TYPO] base: ir model fix typo in comment 2016-03-18 10:01:10 +01:00
Goffin Simon 40248d77ff [FIX] stock: Wrong error when you work with lot owner
When a stock move was created in a picking with a product set with
a unique serial number existing in the stock of a specific owner.
If the owner was not specified for the stock move then a wrong message
was raised "The serial number 00005 is already in stock.". But the real
problem could come from function quants_get_preferred_domain which didn't
find the existing quant due to the fact that the system didn't check in the
right stock(owner). A new quant was then created with the existing serial number.
And a wrong message was raised.

opw:671783
2016-03-18 09:38:15 +01:00
Nicolas Martinelli 14fd46c0d5 [FIX] sale_stock: availability check
When searching for a dropshipping route, we need to access the field
`picking_type_id`. If user is not allowed to read it because of the
access rule `stock_picking_type_rule`, he will get an access error.

opw-668926
2016-03-18 08:43:39 +01:00
Erwin van der Ploeg 4dbc81f910 [IMP] l10n_nl : When we create supplier invoices for costing invoices (not from purchase orders) it is a good practice to enter the total invoice amound including vat. Then Odoo calculates the taxes and you will never have a roudnding difference on the invoice total (maybe only on tax amound). To do this you need purchases taxes including tax in price. This commit adds those by default. 2016-03-17 18:14:07 +01:00
Joren Van Onder 1ec6a384fa [FIX] point_of_sale: order product.product consistently with backend
In the backend product.product records are not just ordered on their
name, they are first ordered on default_code and then on name. The POS
should order records the same way.

opw-672284
2016-03-17 14:01:20 +01:00
Goffin Simon 9a2e3c2987 [FIX] account, sale: Sales Team filter
The field "team_id" doesn't exist in account module, this field is
added in module sale on the model account.invoice.report

opw:672047
2016-03-17 12:29:45 +01:00
Goffin Simon 360b9eb3a3 [FIX] account: Sort by account code
In communtiy, the order of the accounts shown in the reports
didn't follow the order written in the legend(How account type affects your reports?)
Adviser > Chart of Account > create

opw:669270
2016-03-17 11:45:48 +01:00
Yannick Tivisse b78a64a2cc [FIX] base/ir: Run cron manually calls _callback with current uid
It should be called with the user on set on the cron itself
2016-03-17 10:10:28 +01:00
Antony Lesuisse 0c1c1f60b6 [FIX] Stock allow barcode input on stock.picking o2m kanban 2016-03-17 09:40:11 +01:00
Joren Van Onder 5bb64d40d0 [IMP] barcodes: allow immediate quantity input after scanning
When scanning items with a device like the Symbol MC3200 you are
presented with the Kanban view because of it's limited resolution.

In this view it is not possible to quickly set the quantity of scanned
products. Ideally users just want to scan the barcode, input the
quantity and repeat without having to click on virtual buttons on the
usually less than ideal touchscreen.

This implements a way for users to immediately start typing numbers
representing a quantity after scanning a barcode. The quantity will be
set on the specified m2x_field.quantity_field of the record associated
to the last scanned barcode. Because KanbanRecords are not editable
without opening a new view window.prompt is used. It will create an easy
to use native dialog of whatever device is being used. It also avoids us
having to implement a custom input field which would have to handle
keypress events like numbers, backspace, delete, etc.
2016-03-17 09:39:18 +01:00
Joren Van Onder c6fc91b318 [IMP] stock, barcodes: make barcode operations more mobile friendly
We want to properly support devices like the Symbol MC3200. This is a
handheld computer running a modern operating system like Android or
Windows with an integrated barcode scanner. After installation of a
modern web browser and configuration of the integrated barcode scanner
Odoo works as well as it does anywhere else.

The main issue with these types of devices is that the displays (and
their resolution) are very small (3" @ 320x320 for Symbol
MC3200). Because of this a lot of tree views become awkward to use
because they require vertical scrolling. A Kanban view however scales
nicely on these displays.

This implements Kanban views for both the picking.form view and the
stock.inventory form view because those are the views typically used
when using a barcode scanner.

Doing this alone is not enough, because the barcodes module does not
work with Kanban views. Small changes where made to
barcodes.FormViewBarcodeHandler to make it work with both List views and
Kanban views.
2016-03-17 09:39:18 +01:00
Nicolas Martinelli 8639df55c0 [FIX] mass_mailing: required field
`popup_content` cannot be required since it is only visible if the
option `group_website_popup_on_exit` is activated.

Fixes #11268
opw-671532
2016-03-17 09:34:26 +01:00
Goffin Simon c8f751c46e [FIX] mail: get_selection_id
Introduced by 4899be001a

opw:672113
2016-03-17 09:26:17 +01:00
Nicolas Martinelli 5c81327a5e [FIX] account: reset date
An issue occurs in the following use case:
- Create an invoice, validate.
- Cancel it, reset to draft.
- Change the invoice date
- Validate the invoice

The date of the account move is still the first date entered. This is
because the accounting date has not been reset on the invoice, and
therefore it is not updated.

opw-671672
2016-03-17 08:52:08 +01:00
Denis Ledoux 93ed3e29bf [FIX] sale_timesheet: remove unused, invisible timesheet_ids
The `timesheet_ids` was added in the `sale.order` form.

As it was invisible, and not used by the attrs of another
field, or by an onchange, this is pointless to load
it for no reasons.

Besides, this could lead to issues regarding the form validation,
in case the analytic lines were not valid.
e.g. if an editable list view is used to load
these analytic lines and if a field in this editable list
has been made required,
while analytic lines exist with this field not filled.
In such a case, it was not possible for the user to correct the
analytic lines, as they were invisible, and it was not the place
to correct them anyway.

opw-672184
2016-03-16 16:23:38 +01:00
Joren Van Onder e8b965f93c [FIX] point_of_sale: correctly copy the base_amount sign of fixed tax
All the POS has to do is copy what accounting does. In the case of a
fixed tax we should do (from account.tax._compute_amount):

return math.copysign(self.amount, base_amount) * quantity

where copysign(x, y) returns x with the sign of y.

When base_amount is 0 it's positive, not negative. This also correctly
handles a base_amount of -0, although it's something that we shouldn't
encounter in the POS.

opw-672118
2016-03-16 16:06:02 +01:00
Joren Van Onder fc32ff2243 [FIX] point_of_sale: round subtotal of orderline according to currency
Before this we used line.price_subtotal directly when creating
account.move.line records, which causes issues when dealing with
non-integer quantities. In that case the amount paid by a POS customer
will never accurately be able to match the total computed amount of the
order.

opw-672118
2016-03-16 16:03:11 +01:00
Christophe Simonis a34d496069 [MERGE] forward port of branch saas-6 up to 1431ba2
Also include 2939800ed4 which seems to
have been forgotten during previous forward-ports
2016-03-16 15:30:03 +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
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
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
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
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