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
By default auto_search is set to `True` on window actions, this mean
that for example on a list or kanban view the records will be searched
on the view opening without any user action needed.
Setting it to `False` disable this.
Doing this had two drawbacks:
- depending on race condition, the view could be displayed before the
search view was loaded,
- the code expected `active_search` to be present which was not the case
in this instance.
Before 151c9074 the second issue would not happen (active_search was set
directly resolved if a search was not to be done) and this commit also
wait for the search view being ready before showing the view.
opw-741186
opw-741546
closes#16805
- Create an article with one supplierinfo (with a delivery delay and a
min. quantity > 0) and a customer delivery delay
- Trigger the creation of a PO by a procurement order for this article
The supplier delivery delay is not taken into account in the date order
of the PO because the seller is not selected.
This is because the procurement quantity is not sent to the seller
selection.
opw-16702
Closes#16702
- Create 5 PO with 40 lines each for Partner A
- Create an invoice
- Add each PO thanks to the field "Add Purchase Order"
The process takes more and more time for each PO.
Most of the time is spent in the recomputation of the secondary fields
(in the `onchange` method of "models.py"). The root cause is the cache
invalidation due to the relational fields recomputed as superuser by
default.
opw-740485
The calendar view display records with the start corresponding to the
record field set as `date_start`, and the stop to the record field set
as `date_stop`.
Since ef886aed2 there some issue when mingling calendar with
`date_start` or `date_stop` date fields and `all_day` unset:
- if user had timezone between UTC+8 and UTC+14, when moving as
"All day", the record start would be saved on the previous day.
- if used had timezone between UTC-12 and UTC-5, when moving as
"All day", the record end would get on the following day.
- if the event was moved onto a given time (in the "Day view"), the
event start would be set to the previous day if it was before midnight
in UTC time, and the end would be set on the following day if it was
after UTC 23:59.
The source of the issue was that after ef886aed2 a datetime was always
sent to the server, so depending on the browser timezone the server
could for example receive '2017-04-27 23:00' instead of '2017-04-28'.
This fix go back to the previous behavior.
fixes#15540
opw-15540
closes#16698
In some email templates of Odoo, the From: field is generated from the
company name. If this name contains an "&" character, this will lead in
an escaping eg; &
Sender header will look like:
From: Machin & Brol <machinbrol@toto.com>
This case is not well handled by email providers like Gmail, that
splits the line on the ";" and considers there are 2 senders, and then
discards the email.
We then fix the templates, waiting for a better fix in master.
To reproduce, see issue #16611.
In the mentioned use case, a line with a quantity of zero is created,
which generates a traceback at invoice validation.
Fixes#16611
opw-741055
Mass mailing `mail templates` when selected in a mass mailing are
always used in the english version.
But when another language is involved the edition of mass mailing
`templates` had a number of issue. For example saving the edited english
would only modify the user current language.
These issues are cause because the widget with snippets used for mass
mailing templates edition is not compatible.
Several fixes were proposed, what was choosen finally was to use the
correct widget with the following behavior changes:
- the snippets are not showed anymore in mass mailing templates,
- the current language can be edited and is saved rightly,
The shortcoming this give mass mailing templates can be partly
compensated by:
- editing the template back (if someone want the old behavior),
- duplicating mass mailings which keep the snippets and translations,
- doing a customization to improve the situation
closes#16255fixes#16165
opw-726746 opw-727232
note: this fix is only needed for 9.0 and saas-11.
When creating a pad before this change these were the steps:
- modify pad URL for new pad URL
- end of record loading
This caused an issue because modifying the record at this point would
mark it as dirty before displaying it (which would result in a erroneous
warning "The record has been modified, your changes will be discarded.
Are you sure you want to leave this page ?").
With this fix:
- modifying the pad URL is done after the record is ready
- deferred have been unified (to remove possible race conditions)
closes#15239
opw-702797
forward port note: this change is needed up to saas-15, over saas-15
only a small part is needed (because x2many views are loaded with the
root view and there is one widget instance per record).
code note: it would be better to modify load_record of form view and
delay `record_loaded` upto after x2many views are loaded, but possible
impacts have been judged too risky so this is done only in pad widget.
Don't check ids with "id is None" statements, as it won't match if id is False. This caused some bugs with MRP when confirming a MO with no calendar defined, if mrp_operations was installed.
When a partner has a lot of contacts, the computation of the issue total
takes a lot of time. Indeed, it performs the computation for the
partner, but also for all the children, despite the fact that the amount
is not displayed.
opw-726355
Currently the amounts of all invoices (linked to sale or purchase
journals) is summed regardless of these invoices being bills or
refunds, this means e.g. if you create an invoice for 1000 then a
refund for 500 on this invoice, the dashboard will display an
"awaiting payment" total of 1500 which while technically correct is
not really logical or helpful from a user's POV.
Fix summation to take in account the invoice type (invoice or refund)
and remove refund amount from the total amount.
Intent validated by @lap-odoo, also not ignoring or removing refunds
from count to avoid situations like "0 Awaiting Payments [for] $-1200"
which would be really strange.
OPW-728860
To substract the included tax from the unit price when it's mapped
by a fiscal position in the POS.
To keep the same behavior introduced by this commit odoo@503820a
opw:710437