On a pricelist, if multiple rules were set with the same
set of rules condition, the choice of which rule/item
is used was random, according to the postgres database
state.
Adding the `id` in the order force to always use the same
rule/item (the first that was created).
opw-744865
If you have two invoices with a same product,
- one having 1 unit of a product,
- the other -1 unit of a product,
The sum of these quantities will be 0, and it will lead
to a division by zero in the former sql request.
The nullif should be applied on the sum, not on the line quantity.
opw-745073
When the user zooms with the browser, the bottom left pads are
misaligned for some zoom levels.
By slightly reducing the width of the action pad, this can be solved for
all acceptable zoom levels.
opw-745074
In multi-company:
- Create 2 companies A and B
- Set the superuser on company B
- Set the website on company A
- Define company specific sequences for SO (e.g. SOA and SOB)
When a SO is generated from the eCommerce, it is defined on company A
(thanks to 8a1b55a), but the sequence is from company B.
opw-744561
Only the validity of a date was enforced but the date could also be
wrong in other situation (required so must be filled, validation
attributes, ...).
opw-744273
closes#17329
Because read_group can not handle non-stored fields well,
we fall back to the similar implementation as for the stock
valuation report. This allows only one non-stored field as a measure in
the graph. Then it is more logical to show the total margin as that is
what the module is meant for.
Default value is out_invoice aka an invoice of type sale. However here
we would like to test invoices of type purchase. Otherwise extending
tests for specific purchase-related invoice code is not possible. This
is done using the magical context key type.
Closes#15886
By the way Lois Rilo lois.rilo@eficent.com is now integrated in the
Eficent corporate CLA and does not require a personal one anymore on
the same email address.
Related to #15886
In v9 the right filter to use is based upon the message_needaction
field coming from mail.thread . Indeed this gives records containing
messages demanding an action which is the right way to use the
needaction mechanism in 9, like done in all other addons inheriting
from mail.thread.
Closes#16769 .
Indeed through portal users can post a message. Form used in order to
do so include a csrf token. However this one should not be propagated
to message_post because it is not a mail_message model field.
This creates unnecessary warnings.
Closes#13956 .
Backport of 10.0 commit: 5331a87f81
The snippet options are attached to `closest`, `all` and `is` functions
to be able to find/check DOM they are associated to. Their behavior
depend on the snippet option type: the search in the DOM is either done
in the body, the editable parts, the editable children only, ....
The problem is that when searching from a given DOM element, jQuery
won't match the elements whose selector contains this given DOM element.
Or in code terms, jQuery find function behavior is:
`$('A').find('A B')` <=> `$('A A B')` (not `$('A B')`)
This was indeed a problem on the job position apply form pages where the
main editable element is the <form/> element itself. Indeed, the snippet
options' selectors which began by 'form' were not able to match. Worse,
the selector is used for a jQuery search for drag & drop and saving but
not for initialization (where it is used as a `is` check on clicked
elements). So, some DOM were able to be modified by options but not
properly (re)configured before saving.
opw-705902
opw-741305
- Create a contact
- Create a lead
- Convert lead to opportunity w/ link to existing customer option
Salesperson on the lead to opportunity merge overrides the salesperson
in the contact record.
Link with existing customer should not override salesperson on contact
record. The two fields should be independent of each other unless you
are creating a new contact.
opw-659028
opw-740526
When creating orders from the interface, all the orders of the current session
are in the cache and slow compute methods are recomputed.
Clear the cache before evaluating to execute _compute_amount_all on the current
order only.
The cache mechanism has changed in v10 and no longer contrains all orders.
opw-741442
Was removed at 173b76c7bb but was used in pos_blackbox_be (and maybe other
custom modules)
Restore the previous method that will call a read on the computed fields
Getting the recurrent event in an order that make
sense for this model.
`self` is mail.message model, so this order can cause
crashes, since calendar.event and mail.message have
many different fields.
opw-743265
Fields translated with function such as `xml_translate` or
`html_translate` have translations such as:
lang=fr_FR, src="Tree", value="Arbre"
when the value directly stored in the table could be:
<strong>Tree</strong>
The code to copy translations when duplicating a record did not take
this into account and when not in english, would add previously not
existing translations such as:
lang=fr_FR, src="<strong>Tree</strong>", value="<strong>Arbre</strong>"
This is wrong since for example after a copy in french, what is in the
database is:
<strong>Arbre</strong>
This commit change this so that the translation in the database stay the
same:
lang=fr_FR, src="Tree", value="Arbre"
This translation will still not apply (if the base language is different
and a translation different than the source exists) but it is more
logical to have this.
This change also magnify an issue that was that if a translation was:
Tree -> Arbre
and the content `<strong>Arbre</strong>`. The translation doesn't happen
in one way, but does when doing the reverse translation.
So:
translation (Tree -> Arbre):
`<strong>Arbre</strong>` -> `<strong>Arbre</strong>` <= FAIL
reverse translation (Arbre -> Tree):
`<strong>Arbre</strong>` -> `<strong>Tree</strong>` <= WORKS
this broke the test that something reverse translation of a translation
got the original. But testing this if the translation did not work seems
to make little sense.
opw-740213
closes#16984
- Sell a product in the POS
- Go back in the backend
- Return the product
- Click on "Payment"
The user is allowed to select any journal. It should be restricted to
the payment method available in the POS.
opw-743585
The license info for these modules was a leftover from previous versions.
Once integrated in Odoo Community they share the same license as all
other modules, as mentioned in the LICENSE notice at the top of the
files.
opw-743686
When PO and SO used the same sequence, a vendor bill with a source
document equal to the sequence of a SO could be displayed by this
SO(in the smart button "invcoies").
opw:693991
in res.company write(), create a sub method _validate_fiscalyear_lock()
so that it is easier to inherit to modify or extend its
functionality.
Was PR #16615
If there are open rescue sessions there will be multiple opened
pos.session records with the same user.
A better solution would be to make the POS client send back the
pos.session id it belongs to and use that instead, but this would be
unsuitable for a stable release. It will instead be done in master.
opw-743318
In 4e0e376b0 an iframe for the readonly preview was added when
displaying html fields.
In e5112ee00 this iframe was only used if style-inline was set in the
widget options.
This brought an incompatibility if the not iframed preview contained an
iframe (eg. a youtube video which is then resize to a 30px height) which
is solved by this commit.
opw-725161
closes#16955
When the list view of 'ir_cron' is opened, the key 'active_test' is set
to False in the context to see all cron, even the archived ones.
The problem by passing 'active_test' in context is that it's propagated
to all actions launched from this view, for example whan you run
manually a cron, this key is passed to the cron action, which may leads
to call some actions on archived records which is not intended.
To fix this issue, we removed the key 'active_test' from context and
instead create a filter that show all crons set by default.
If an exception during the merges (such as a file descriptor overrun), we
would otherwise depend on the next garbage collection to close the
files. But the next GC may never come.
For example if we ran out of OS file descriptors during merge, all future
requests will crash for the same reason, and the process will never recover
because the GC will never run.
Much easier to explicitly close the files all the time.
When creating a down payment for a SO, the applied taxes must
be the taxes of the company order. In this way, it's the same behavior
as a product with multiple taxes is added on a SO, only the order company
taxes are applied.
opw:741958
- Activate multi-currency: EUR is main currency, USD is secondary
currency
- USD currency rate is:
1.2 on 2017-01-01
1.5 on 2017-02-01
- Create a journal in USD (e.g. Cash)
- Create a tax with Cash Basis activated
- Create an invoice of 100 USD on 2017-01-15
- Register a payment of 100 USD on this invoice on 2017-02-15
- 4 journal entries are created:
the payment itself
the exchange rate difference
the cash basis linked to the payment
the cash basis linked to the exchange rate difference
The cash basis linked to the exchange rate difference should not be
created, it is not necessary. The amounts are already included in the
cash basis linked to the payment.
opw-728767