Commit Graph
111208 Commits
Author SHA1 Message Date
Dhaval Panchal a436645ae8 [IMP] l10n_*: Uniformize the reporting menuitems order and labels
Purpose
=======

Accounting reports are quite confusing for an accountant as the menuitems doesn't to have a clear structure.

Specifications
==============

Move all the localizations menuitems to the first position under `Reporting`

Put the `US GAAP` report menuitem items under the localizations and rename it accordingly
2017-07-27 11:39:52 +02:00
Hiral Bhavsar a8a9dbe598 [IMP] account: Correct the settings display according to the enabled options
PURPOSE
=======

Clean accounting new settings.

SPECIFICATION
=============

- When a setting is not active, I don't want to see the green arrow sending back to the configuration part.
  Example : If I unactivate the follow-up levels, I don't want to see the green arrow "Follow-up levels" anymore
- Add checkbox to 'TaxCloud Connection'
- Also visible the label 'Fiscal Localization' and its text only if CoA is not set.
- Set '# of digits' always visible and relabel to '# of digits on accounts'. Also put it inside new setting 'Chart of Accounts'.
2017-07-27 11:31:26 +02:00
Christophe Simonis 8a1311bca1 [MERGE] forward port branch saas-17 up to 3d4238f71e 2017-07-26 23:35:06 +02:00
Christophe Simonis 3d4238f71e [MERGE] forward port branch saas-16 up to 98d3a08ebb 2017-07-26 20:36:23 +02:00
Christophe Simonis 98d3a08ebb [FIX] base: mute handled errors 2017-07-26 20:28:32 +02:00
Christophe Simonis 4f501348c4 [MERGE] forward port branch saas-16 up to 46e1104ce1 2017-07-26 19:55:44 +02:00
Christophe Simonis 46e1104ce1 [MERGE] forward port branch saas-15 up to 681f03e309 2017-07-26 19:41:57 +02:00
Christophe Simonis 681f03e309 [MERGE] forward port branch saas-14 up to c4e9b854ff 2017-07-26 18:47:54 +02:00
Christophe Simonis c4e9b854ff [IMP] core: log bad queries as ERROR
Also adapt default config and config mapping.
2017-07-26 17:46:20 +02:00
Pierre Masereel 8a497cdd5f [FIX] stock: quant: _update_reserved_quantity and negative quantity
If we have multiple quants returned when we want to decrease the
reservation of a move line, the min function will always return the
quantity passed in argument because 'reserved_quantity' is always a
positive number and quantity a negative one. This can lead to negative
reserved quantity on a quant, if the quantity to reserve on the first
quant is lower than the absolute value of the quantity to decrease.

To fix this, we correctly separate the behaviors for decrease and
increase.

We add a test that show the, now fixed, bug.
2017-07-26 17:23:55 +02:00
Simon Lejeune 2a0b158d44 [FIX] stock: move: _update_reserved_quantity
When a move line is reserved on multiple quants, we increased it with
the `taken_quantity` variable, which is used to know how much quantity
we try to reserve in total for this move, not what is available on the
quant.

The amount to increase is obviously the one returned by `stock.quant`
and is available in the loop.
2017-07-26 17:23:55 +02:00
Christophe Simonis e8d4a11e6e [MERGE] forward port branch 10.0 up to 0a089f87fb 2017-07-26 16:56:57 +02:00
Pierre Masereel 7a39ab50c5 [FIX] stock: move line: decrease reserved quantity
When we decrease the reserved quantity, the argument 'strict' must be
set to 'True', else we might unreserve quants of another move line.
This behavior has been lost in rev: https://github.com/odoo/odoo/commit/9bb696e13abcbf95c9552fab60b1dfb997afaa59

We introduce a test to show where an issue happened without this
patch: have tracked and untracked quants for the same product in stock,
reserve them and edit the untracked move line in order to set a lot to
it. The first step will be to unreserve the move line without lot, and
if we do not pass a Strict kw, stock.quant's `_gather` will return
quants with lot and unreserve on them. Everything is now inconsistent
and lead to issues upon validation.
2017-07-26 16:42:00 +02:00
Pragnesh Mistry faf7225022 [IMP] account,...: Improve accounting menuitems
A little bit a reorganization, typo correction, menuitems uniformization between localizations, useless menuitems removal.
2017-07-26 16:35:53 +02:00
Yannick Tivisse c5bd509274 [FIX] pad: Update the pad if the pad_content_field is modified
If the pad content field is modified in Odoo, the content of the pad should be modified too.

Example: When merging tasks, the tasks descriptions are concatenated into the target record. But the taregt pad is not modified if it already exists.
2017-07-26 16:01:09 +02:00
Christophe Simonis 0a089f87fb [MERGE] forward port branch saas-11 up to 4bf6f5a7e3 2017-07-26 15:45:37 +02:00
Christophe Simonis 4bf6f5a7e3 [MERGE] forward port branch 9.0 up to da0eb25221 2017-07-26 15:41:11 +02:00
Nicolas Martinelli 44b6d608b0 [FIX] website_links: missing translations
opw-756108
2017-07-26 15:03:15 +02:00
Christophe Matthieu 8fa7c68ca8 [IMP] tools: add a profiler for odoo performance analysis
Use ``profile`` to decorate an entry point method.
If ``profile`` is used without params, log as shallow mode else log
all methods for all odoo models by applying the optional filters.

:param whitelist: None or list of model names to display in the log
                 (Default: None)
:type whitelist: list or None
:param files: None or list of filenames to display in the log
                (Default: None)
:type files: list or None
:param list blacklist: list model names to remove from the log
                (Default: remove non odoo model from the log: [None])
:param int minimum_time: minimum time (ms) to display a method
                (Default: 0)
:param int minimum_queries: minimum sql queries to display a method
                (Default: 0)

.. code-block:: python

  from odoo.tools.profiler import profile

  class SaleOrder(models.Model):
    ...

    @api.model
    @profile                    # log only this create method
    def create(self, vals):
    ...
    @api.multi
    @profile()                  # log all methods for all odoo models
    def unlink(self):
    ...
    @profile(whitelist=['sale.order', 'ir.model.data'])
    def action_quotation_send(self):
    ...
    @profile(files=['/home/openerp/odoo/odoo/addons/sale/models/sale.py'])
    def write(self):
    ...

NB: The use of the profiler modifies the execution time
2017-07-26 15:02:59 +02:00
Nicolas Martinelli da0eb25221 [FIX] l10n_be: VAT-IN-V81-12-EU
The tax 'VAT-IN-V81-12-EU' should be a group of taxes, similarly to
'VAT-IN-V81-06-EU' and 'VAT-IN-V81-21-EU'.

opw-752879
2017-07-26 13:20:55 +02:00
Nicolas Lempereur 69236ada46 [FIX] web: sorted saved filter lost in merge
In 3071ef16c sorted filter was added, but arround the same time with the
change of filter in 6c579354 the js part of the feature was lost.

This commit adds it back.

opw-749422
closes #18361
2017-07-26 12:47:14 +02:00
Thibault Delavallée 50794f64af [FIX] website_portal_sale: fix link to invoices of an order on customer portal
Route seems to be /my/invoices/<id> and not /my/invoices/pdf/<id> anymore.
2017-07-26 10:26:37 +02:00
Yannick Tivisse f63ad48834 [FIX] account: Retrieve correctly default taxes on account settings 2017-07-26 09:25:27 +02:00
Nicolas Martinelli 1c4f779c33 [FIX] report_intrastat: fiscal position on invoice
Display both fiscal position and fiscal position remark on invoice.
Since the note is usually empty, it most of the time displays an empty
label next to 'Fiscal Position:'.

opw-756720
2017-07-26 09:16:53 +02:00
Nicolas Martinelli cfc2a55c06 [FIX] point_of_sale: discount != 0
Display "Discount:" only if strictly larger than zero. Most of the time,
it just shows 'Discount: 0.00'

opw-757101
2017-07-25 19:06:28 +02:00
Wolfgang Taferner 901d777591 [FIX] website_sale_stock: use sale order warehouse default first
Taking unrelated first warehouse can only be the last fallback, so we
check first if there is a default value for the SO.

opw-756265
2017-07-25 18:33:37 +02:00
Simon Lejeune 2d137f56c8 [REF] stock: action_done on stock.move.line
Before this commit, `action_done` on stock.move.line was intended to
receive the recordset of the move lines of a single move where the move
lines having a null `qty_done` were already unlinked.

This part of code was in stock.picking's `button_validate` and not
copied in mrp, and weird things happened when mrp tried to run
`action_done` on a stock.move.line with a `qty_done` of 0.

We move this check directly in `action_done`, as well as the check on
the picking type that was done in stock.move's `action_done`.

We also adapts rev[0] that was not working anymore since the new stock,
and add some tests.

[0] e79eaecc46
2017-07-25 17:24:12 +02:00
Christophe Simonis fa38adef5a [FIX] product: natural order for products
It has been remove with 08a85eb458 but
was somehow usefull.
2017-07-25 16:30:20 +02:00
Wolfgang Taferner bfa55e42f9 [FIX] hr_attendance: constraint must allow same time for check out/in
The constraint does not allow the same check out time as the next
check in time which might be rare but a possible and likely use case.

opw-756694
Closes #18400
2017-07-25 15:51:56 +02:00
Wolfgang Taferner 77b68a170d [FIX] purchase: fiscal position change must trigger a tax recomputation
It applies the same behavior than in the Sales module.

opw-756556
Closes #18377
2017-07-25 14:36:10 +02:00
Christophe Simonis 5ed09bc17c [MERGE] forward port branch saas-11 up to c16ec6405b 2017-07-25 14:27:31 +02:00
kujiu 2771b23a35 [FIX] web: do not delete records for one2many with widget=many2many
Some one2many fields are called with a many2many widget to unlink
records instead of delete them. But this behavior was modified with the
new views and the records were deleted anyway.

In this commit, we restore the previous behavior, and create a FORGET
command in basic model
to do that. Note that the widget='many2many' is a hack, and a better way
to accomplish this is to use a new custom option. But this would be a
fix for master  (PR #18413)
2017-07-25 13:43:37 +02:00
Christophe Simonis c16ec6405b [MERGE] forward port branch 9.0 up to 34bc9b4983 2017-07-25 13:04:29 +02:00
Martin Trigaux 044b8b1240 [I18N] export saas-16 source terms 2017-07-25 12:26:50 +02:00
Odoo Translation Bot 621e392b52 [I18N] Update translation terms from Transifex 2017-07-25 12:14:02 +02:00
Elkasitu a4e30a1b43 [FIX] web: prevent crash in FieldReference
Trying to display external identifiers would make the server crash
because the method in charge of requesting the external id information
would expect an object but it was being given a string and thus not
computing the m2o_value for the record.

This commit fixes this by changing FieldMany2One objects' m2o_value
instatiation to use its _formatValue method to compute it, _formatValue
is then overridden in FieldReference so that it properly handles both
strings and objects to calculate its m2o_value and relation.
2017-07-25 12:04:19 +02:00
Odoo Translation Bot 34bc9b4983 [I18N] Update translation terms from Transifex 2017-07-25 11:46:16 +02:00
Géry Debongnie a41db9a2cf [FIX] web: allow record creation even if onchange returns warning
Before this commit, the makeDefaultRecord could return a rejected
deferred if the onchange returned a warning.  This was useful in this
usecase: the user is in a form view with a one2many (for example, an
invoice with no customer set), then click on 'Add a line' (the invoice
line).  In that case, the onchange returns a warning, and we do not want
to add the line at all, so the makeDefaultRecord is rejected.

This works fine, but we then have another problem: when we create a new
record from scratch, it may happen that a warning is returned (for
example, if a vendor has its 'warning on invoice' flag set, then a
purchase order is done with this vendor, then confirmed, then the stat
button for 'vendor bills' is clicked, which opens a list view with the
vendor in the context.  Clicking on 'create' will return a warning,
which is what we want).  In that case, the record still needs to be
created.

To solve this issue, we simply add an option to the makeDefaultRecord
function to prevent rejecting the deferred.
2017-07-25 10:58:14 +02:00
Richard Mathot 4c6c16a382 [IMP] delivery: mechanism to log XML requests
This will help future debugging of integrated shipping providers by
enabling the logging of XML requests in ir.logging table.
2017-07-25 10:42:27 +02:00
Lucas Perais (lpe) 890152cb6b [FIX] website_sale, website_sale_options: fix modal prices
Backport of 8bd56bb466

OPW 744943

Closes #18416
2017-07-25 09:09:30 +02:00
Christophe Simonis 06b670e6ba [MERGE] forward port branch 9.0 up to e2a255717f 2017-07-24 19:41:30 +02:00
qsm-odoo 67e2372d61 [IMP] web_tour, *: allow to extend timeout limit for specific steps
* website

Unfortunately, we cannot guarantee that the duration between two odoo
actions is always less than 10 seconds. Indeed, loading translations
is for example quite slow. With this commit, we are now able to modify
the timeout duration for a specific step.
2017-07-24 17:55:00 +02:00
Richard Mathot 35601dfe6f [REM] tools: old and unused lib pdf_utils 2017-07-24 16:54:42 +02:00
Simon Lejeune 8822b7cfa4 [FIX] stock, stock_account: add move when picking is available
When a picking is available, any added stock move should directly be in
the available state. This is done thanks to a key in context put in the
one2many (stock.move) field on the picking view and an override of
stock.move's default_get. Sadly, an extension of the picking view in
stock_account redefined the context attributes, and the new context did
not have the special key we need. As all the context keys present in
stock_account are present in stock, we remove the extension. And we add
a simple test in stock.
2017-07-24 16:06:57 +02:00
Martin Trigaux 09c6d9f7ce [I18N] Update translation terms from Transifex 2017-07-24 15:45:48 +02:00
Xavier Morel 44304b7e24 [FIX] P3: reintroduced issues
* can't compare a function and a float in Python 3 (it works in
  Python 2, though it makes no sense and was just hiding a bug)
* no iteritems method on dict in Python 3 (use compat helper)
* P3-invalid "except" syntax (sadly pylint apparently does not have a
  standard lint for that, though it's easy to catch... if you can run
  the code under P3)
2017-07-24 15:13:03 +02:00
Nicolas Martinelli 8354efde0a [FIX] account: missing dependency
Introduced by 1e4f4299bc

opw-756270
2017-07-24 15:10:11 +02:00
David Tran 7106db6ca1 [IMP] point_of_sale: improve report.pos.order report for extendability
Closes #18253
2017-07-24 14:34:35 +02:00
qsm-odoo 5f1ef0910b [IMP] web, *: lazy load dialog xml template
* web_editor, web_planner, website

The 'Dialog' class is used in both backend and frontend. Also, lots of
actions can be done without the use of any modal. It thus makes sense
to lazy load its related xml only when a first modal is opened.

This change also allows to get rid of the "base_common.xml" file as the
dialog template is the only remaining one in there and, in the future
website update, it will allow to not load any static XML file on website
page loadings.
2017-07-24 14:28:35 +02:00
qsm-odoo 68766764bc [IMP] web: get rid of WidgetButton template
Qweb rendering is great to render "complex" widget structures. However,
using it to render something as simple as a button was not very
meaningful. This commit deletes the "WidgetButton" template and replaces
it with an utility JS function to render buttons according to given
parameters.

Also, this change will allow a better change. Before this commit, the
only templates left in the "base_common.xml" file are the "WidgetButton"
and the "Dialog" ones. With the removal of "WidgetButton", the file can
now be lazy loaded only if necessary, on the first dialog instantiation.
This will allow to remove the need to load static XML files on each
frontend page loading.
2017-07-24 14:26:59 +02:00