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
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'.
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.
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.
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.
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.
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
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
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
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
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
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)
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.
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.
* 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.
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.
* 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)
* 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.
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.