When refunding a supplier invoice with tax cash basis and no cash flow,
a movement for the cash basis tax was created.
Only entries with cash flow must be created for cash basis taxes.
opw:693453
On a account journal, as no default value is set, the label appears in bold on the form, and the value is not displayed (because equal to False)
Add a default value 'no_feeds' on the selection field
We add the filter during the instantiation of the search view by the "Discuss" client action
because we can't access the partner_id in the xml filter definition.
children_quant_ids is a computed field that does a search based on current
record id. However this causes a traceback when creating a record as
there is no id. This commit fixes this issue.
Those fields were stored computed fields before. However store has been
removed while migrating to the new API. We need a search function if we
want to be able to search on those fields and to use domains.
Domains are necessary to take packages from the right source locations.
The computation is done by searching the packages with the
"location/owner/..." domain and by returning a parent-of domain
in order to include all parent packages too.
When uninstalling a module followers stay in the database because there is no
real link between ir.model and followers. Adding a m2o ensure followers are
correctly removed when uninstalling a module.
res_model fields is kept as a stored related field. This allows to keep
compatibility with almost all code using / searching on followers. Only
followers creation is changed a bit. As follower creation is done mainly
through a dedicated method few changes are required. Yey. Mat should be
happier now.
fix test
When on a page event for example, when the user choose "Edit menu",
a modal is first opened to ask which menu to edit (the top menu or
the event menu ?).
This feature was broken with a web_editor refactoring. Indeed, the
dialog was converted to use the standard dialog class but the
widget was still inserted in the DOM thanks to "appendTo" instead of
the modal built-in "open" method, preventing it to be properly opened.
* web_editor, website_portal_sale, website_project,
website_project_issue, website_project_issue_sheet
- Use bootstrap grid the right way (missing row)
- Use table-responsive for website portal tables
- Remove web_editor table layout style if inside a table-responsive
in mobile mode
Commit 0b87f76628 introduced in 9 some new
controllers in hr holidays. They are used to activate some workflow signals
through dedicated controllers.
However hr holidays workflow have been removed meanwhile at commit
6a8e4c6119. This commit fixes the forward-port
by correctling calling methods instead of trigerring workflow signals.
With a9bd9ab1 the access action was refined depending on the user.
But when sending a mail about a sale order, this lead to an issue since
a mail template is rendered with the current user and not the mail
recipients.
So in the case of a sale order, the recipient could not have a button
leading to /my/orders/{order_id} whilst he should have, because the
user used to render the mail was the sender (which was an employee and
not a share user).
This commit adds a context key "force_website" which force the action to
an available /my/orders even if the sender is not a share user.
opw-691040
This commit is a refactoring of the 's_parallax' snippet. Note that it
is compatible with previous parallax snippet (old snippets are just
transformed into the brand new one on page load). Note that scroll
speed are changed by this implementation though.
This solves several issues:
- Bg image went easily off of the frame if scroll speed was too fast
- The 'scroll speed' effect was visually inconsistent across different
devices.
- If the Bg image was smaller than the frame (condition which occurs
often in a responsive environment), then the image was totally
offset.
- Since the previous implementation use background-position property
to perform the effect, It was not possible to define an image
focus point.
This implementation solves the previous issues introducing a safe-area
that limit the effect range. It's calculated dynamically, according to
the current screen size and the 'speed' option.
The effect if now achieved thanks to the translation of a DOM element
instead of background-position changes. This allows to solve the last
mentionned problem and improve performance.
The implementation rely on the new animation methods of the snippets
Animation class.
As this use the "requestAnimationFrame" function, the snippet knows
the right time to repaint itself, instead of using the "scroll" event
which is triggered too many times and thus occurs between painting
frames. This change greatly improved performances (CPU/painting usage
many times smaller).
This commit extends the behavior of the Animation class of the
"web_editor.snippets.animation" module.
Now, all animations can easily define an animation algo update without
much caring about performances. All that must be done is:
* If the "start"/"stop" method is/are defined, do not forget to call
the _super parent method (which will now initializes the animation
components).
* Define particulary-named method in your Animation class extension.
See in-code comment of the _prepareComponents method.
This extension should be used to define all animations. For example the
use of $(window).scroll(function () { /* do stuff */ }) is now the same
as defining the function with on_scroll: function () { /* do stuff */ }
except that the later one will be more efficient, smoother and allow
you to not care about throttling / event binding/unbinding / ...
In some cases, when the destoy method of 'Tip' calls the off() function on
'$breathing', even if this one is not defined.
To fix this error, we check that '$breathing' is not 'undefined' before
calling off() on it.
When we are trying to use the button 'set date to all order lines, we
get a traceback saying, that update cannot be done, because it ensure
that there's only one record. (After 9.0, there is no more this
'ensure_one').
This bug has been introduced in rev: https://github.com/odoo/odoo/commit/401a3cfaf6fd09f594e45c181e908900acba3777
To fix it, we iterate over the order lines, and do the update of each
line.
When tax cash basis is used, the user might face the error "Wrong credit
or debit value in accounting entry !". A detailed use case can be found
in issue #14158.
The reason is that a float representation of `1.0` of the field
`matched_percentage` will become `1.000...2` when used in Python.
Therefore, such an expression such as `line.credit_cash_basis -
line.credit * matched_percentage` might lead to a slightly negative
value for the credit/debit, which will not pass the condition `CHECK
(credit+debit>=0)`.
Fixes#14158
opw-692797
More information from https://en.wikipedia.org/wiki/Decimal_mark section:
"examples of use"
`The following examples show the decimal mark and the thousands separator in
various countries that use the Arabic numeral system.`
`Style: 1,234,567.89 Countries: Malaysia, Mexico, New Zealand, Pakistan,
Philippines, Singapore, Taiwan, Thailand, United Kingdom, United States`
Closes#14402
In Sale settings, enable "Personalize the sales orders and invoice
report..." and also "Show line subtotals with taxes included (B2C)".
Print an invoice ==> traceback.
This is because the field `price_total` doesn't exist on an invoice
line. Note that this field exists on a SO line.
opw-694438
Previous implementation did not allow the user to search for pages 'name'
but only on the slugified name.
Now we slugify the needles before to find a match.
1. Create a new page: 'The new'
2. add a link on your website and try to find this page...
- Before this commit, the only ways was to type 'the-new'
- After this commit 'the new', 'The new', 'The-new', ... will match
This commit closes#10771
The location field is shown all the time. However it is only used for 2-steps
which is more complicated to configure and understand. That is why advanced
routings group is used to hide this field in other cases.
onchange_operation_type on repair line sets source and destinations locations
when changing the type. However the code does not handle multiple warehouses
in one company. Now the first found warehouse is taken into account and
code does not crash anymore.
Having 'Post Inventory' button highlighted makes it look like a necessary step
to take. However in practice using 'Mark As Done' is sufficient. Moreover this
action also posts the inventory.
Removing the oe_highlight makes it look like an optional step. It is still
necessary in some cases with SO / MO when not all products are produced.