The delivery line in the SO was added among other lines,
in second most of the time, due to the fact
the sequence of the line was set after
all other order lines sequences.
opw-649629
In order for the printer to work we need to configure it in USB vendor
mode. This means it will not have a USB interfaceClass of 7. So when
we don't find any USB device that identifies as a printer, we search
for Star devices and use the first one of those we find.
This should be reasonably safe because Star does not manufacture other
devices apart from printers that one would attach to the posbox.
Although it might be a good idea to make sure a printer device is
properly closed, trying for >1 min to do so is too much. It can cause a
>1 min delay between receiving a receipt and actually printing. Also,
just because the device is not cleanly closed does not mean that it will
not work when we open it again.
Fees were not recomputed when the amount or the acquirer of the
payment transaction was changed.
This can happen if the user clicks on
"Pay now", which creates the transaction and computes
the fees for the first time and then redirects
to the payment provider, and then the user
came back from the payment provider, hitting the previous
button in his browser, for instance, and then
changes the content of his cart (the quantity, or even
the products) or change of payment provider
(from Ogone to Paypal, for instance).
opw-649509
The function "open_table" is not called when triggering the action
window "Current Inventory Valuation". Then the 'history_date' is not
set in the context.
opw:649168
Add multilang=False to website_image controller to prevent redirects
Because website_image is decorated with website=True
Requests made for the product image at
`/website/image/product.template/xx_xx/..`
triggered redirections to add the language code to the
requests URLs. This redirection was useless, as setting
the language code for images is non-sense.
Adding `websitelang=False` prevents this redirection.
In addition, the redirection could lead to
SSL security concerns, as the redirection
could use the http:// scheme.
Closes#8515
The function interval_get_multi must take into account the minutes in
hour_from and hour_to. hour_to and hour_from are float fields in the model
"resource.calendar.attendance" and the decimal part of these two fields is
for the minutes.
opw:648349
The widget SelectCreatePopup display the search view drawer directly
after the search view input field. But in current firefox version this
could lead to an issue with float positionning.
fixes#8462
opw-648999
In 7d40a7d, f820c07, 3ed0628 the way the mobile preview iframe is set
was altered several times. This left an inconsistent needless page load.
This page load was cancelled, but as a side effect in a given set of
conditions:
- an ajax request is done early in current (and so iframe) page,
- phantomjs is used for the test,
- server response time
this could lead to a false positive caused by a cancelled xhr request
throwing the error: "Can't load template, http status 0".
When creating a SO in dropshipping with 'create invoice' = 'on delivery order',
the resulting invoice must not be linked to the PO but to the SO created.
Inspired from '_create_invoice_line_from_vals' in addons/sale_stock/sale_stock.py
opw:647628
The undiscounted amount did not take into account the taxes
included in the price. Included taxes were seen as a discount.
For a quotation with one line with an included tax of 15%,
but no discount, the undiscounted amount must be the line price subtotal,
the price subtotal already removing the taxes from the price unit.
For a quotation with one line with an included tax of 15%,
and a discount of 10%, the undiscounted amount must be the line price subtotal,
plus the amount discounted. That way, the taxes included are already removed
from the price, but the discount is not included.
opw-648388
The former cost of a stock.valuation.adjustment.lines line is the sum
of cost * qty of each quant linked to the stock.move record linked to
this line (with the field 'move_id').
opw:648922
Backport of 1989495 without breaking existing translations.
do not forward port in 9 where proper fix has been made at 1989495.
Do not generate the messages by putting bits of sentences together.
Other languages do not have the same structure (and 'have not' was not
translated anyway).
For 8.0 keep the same source for the base error message but create a new one for
the negation as it was wrong in other languages.
When delivery_set is called from the website_delivery module, the
uid is set to SUPERUSER_ID. In a multi-company environment, this
causes the linked taxes from the delivery product to be added
to the sale_order_line.
Closes#8311
Check receiver_email only if receiver_id was not checked.
In Paypal, this is possible to configure as receiver_email
a different email than the business email (the login email)
In Odoo, there is only one field for the Paypal email:
the business email. This isn't possible to set a receiver_email
different than the business email.
Therefore, if you want such a configuration in your Paypal,
you are then obliged to fill
the Merchant ID in the Paypal payment acquirer in Odoo,
so the check is performed on this variable instead of the receiver_email.
At least one of the two checks must be done, to avoid fraudsters.
opw-648776
The product search field already handle product scanned by a code bar
(by adding it if it corresponds to only one product to the order) so
when the barcode is entered in this search input, the scan doesn't need to
be done.
closes#8433
opw-648856
As eCommerce is not complete and could be improved easily and was
not working anyway until
9d0cb024fd
- Use EAN13 instead of internal product id if available
- Add tax to transaction data
- Add shipping costs if available to transaction data
For an event during all day, during 2 days,
e.g. September 9th and September 10th,
Google expects as start date the first day, and as
stop date the day after the last day.
e.g.
start 2015-09-09
stop 2015-09-11
Even if, afterwise, in the Google Agenda interface, it will
be correctly displayed 2015-09-10 as end date.
This must be applied at the event creation AND at the event
update. It was not the case until this revision.
Besides, we now use the event `stop_date` in Odoo, instead
of the duration, in case the duration has been incorrectly
computed.
opw-648867
`False` is not syntax valid for a domain.
It leads to errors when trying to evaluate `False`
as a domain in the evaluation of `pyeval.js`.
Therefore, using `False` as default value for `mailing_domain`
isn't correct
opw-648857
Correctly use the email_from tag from template.
This partially reverts commit 0f82346167.
"[FIX] email_template: keep email_from and outgoing server"
Remove the email_from part that was incorrect, keeping the one on mail_server_id
Instead of assigning an non-evaulated email_from in the context, specify the
email_from in the onchange method. This way the created email has an evaulated
from value. This was an issue for templates using email_from like
"${(object.user_id.email or '')|safe}"
In the _notify method method, the email_from is partially respected as it will
be used a fallback only. However changing that would introduce a modification of
behaviour not suitable for 7.0 branch.
Fixes#8409
In Accounting > Bank and Cash > Cash Registers, when clicking in "More" button
on 'Put Money In' or 'Take Money out', the date used for the bank statement line
created must be the date of the bank stattement(same behaviour then when clicking
on "Add item" in edit mode). It's forbidden to put/take money in/out for a bank
statement which is not open.
opw:647631
To compute the intervals of working time, the function interval_get_multi
used 'hour_to' and 'hour_from' from "resource.calendar.attendance" model. 'hour_to'
and 'hour_from' are not in UTC timezone. All the dates in odoo are compared in UTC.
Then 'hour_to' and 'hour_from' must be converted.
To take into account the minutes in this computation, the minutes from the start date
are added in the variable todo (number of working hours).
opw:648349
Complement of the fix 6f355623f0
Adds the button for cash registers as well since the base view is
different than the one for bank statements.
Closes#8410Closes#8342
The product_id_change was always triggered at the creation of a sale order line.
This is due to the 'type' field that is no longer present in 8.0 and makes the
condition to be always verified.
When a account.bank.statement.line is created by clicking on "Put Money In"
(Accounting(Menu)>Bank and Cash(Menu)>Cash Registers(Menu)>More(Button)>"Put Money In"),
the account.bank.statement linked to this line must be updated(by passing in the write of
this model) to compute the real closing balance. This fix allow to have the same
behaviour than when a line is manually added (with "Add Item) in an account.bank.statement.
opw:647631
The `check` decorator expects the context to be in the `kwargs`
or to be the last arguments of the method.
The `call_kw` route, which is decorated by the `check` decorator,
like every route,
expands its kwargs arguments.
Therefore, once in the `check` decorator,
the context is located in the `kwargs` key
of the kwargs.
(More simply, instead of
`kwargs.get('context', {})`
it's
`kwargs.get('kwargs', {}).get('context', {})`
As the context is not retrieved correctly,
the lang is not set correctly either,
and the sql constraints were not translated.
In 7.0, it worked, because there was a double
check, as the call_kw was called trough an rpc
(`dispatch_rpc`) call,
which was decorated by the `check` as well.
As a fix for 8.0, we apply the same logic,
we perform a double check, with an indirection.
The check decorator should probably be
refactored, but this cannot be done
in a stable release such as 8.0.
Closes#3634
To compute start and end date of a working interval this function replaced
hour in datetime object without taking into account the time zone. The start and end date
taking respectively from calendar_working_day.hour_from and calendar_working_day.hour_to are
in the time zone of the user and the datetime object are compared in UTC to avoid schedule's gap.
This is why the start and end must be converted in UTC after being replaced by these hours.
The tz_info must be removed from dates because it's forbidden to compare naive and aware dates.
opw:648349
With 3e82c94d we use the timezone in the context to format date
sequences when formatting an ir.sequence.
This commit adds the other missing context when getting a sequence, so
these sequences are also dependant on the timezone.
closes#8351
opw-646487
The total used to check which delivery.grid.line to apply must be in
the currency of the company because the delivery.grid.line records with
variable == Price are expressed in the currency of the company.
opw:647799
When creating timesheet,
default from-date and to-date are adjusted for user timezone.
Fixes#3627
User timezone considered when assigning attendance records to timesheet
Fixes#3628Closes#3632
Written in the new API even though the rest is in the old API, because otherwise we'd have to add an onchange in the views which may be a problem for existing custom modules.
We want this behavior because previously, in some cases the default values were only added at create() time, ie. possibily when the users close the pop-up, so they may never have an opportunity to see and adjust the default.
This rev. is related to 1c533b193f
The reason why we force the event Google internal id is
explained in the above commit.
Forcing the internal id must be done only when creating the
event in Google, not when updating, for retro-compatibility:
if the event is already in the attendee calendar, with a different
internal id then the other attendee, we must leave it like this,
otherwise Google will be lost.
This rev. is related to a9e3d74713
This new revision is about the same use case than above, except
that both Google users login doesn't match the Odoo login email.
e.g.
User A: A@agrolait.com in Odoo, A@gmail.com in Google
User B: B@agrolait.com in Odoo, B@gmail.com in Google.
When A creates an event, with B in the attendees, and
syncs his calendar to Google, B is not automatically invited
Google side, as his attendee email is B@agrolait.com, which
doesn't match any existing Google User (doesn't match B@gmail.com)
While the revision mentioned above, a9e3d74713,
expected the attendee to be automatically invited Google side, and therefore
expected the event to already exists in B's calendar.
Therefore, when B syncs his calendar in Odoo, as the event
was there in his Odoo calendar, but not in his Google Calendar,
the code actually think it's no - longer - there, and take the assumption
the event has been deleted Google side. So, it deletes the event
in Odoo side as well, for both users A & B.
To overcome this new issue, when the Google & Odoo users emails
do not match, while keeping the compatibility when the Google & Odoo
emails do match (and therefore the invitation is automatically sent
Google side, as the email matches an existing Google account, and
the event is automatically created in B's calendar without needing the
sync in Odoo), we now force the Google internal id to be the same
for all attendees of an event, event by Google side.
opw-645745
Confirm lines of account cash statement on closing
The `account_bank_statement_extensions` adds
a state field to account.bank.statement.line
and sets the status to 'confirm'
when a bank statement is closed.
When a cash statement is closed,
the lines remained in draft.
Closes#3584
`hr_timesheet_invoice.py` overrides `on_change_account_id`
of model `hr.analytic.timesheet`.
The super call wasn't done, probably because this on_change
method in the base model was trivial:
`return {'value':{}}`
Nevertheless, if another module overrides this on_change,
according to the module dependences,
this method could have been called first in the calling chain,
discarding the changes from the other overriden
`on_change_account_id` methods, preventing
any customization in this on_change according to the
current database state.
Closes#8248
When we export a recurring event, there was an error since there is
virtual ids (like '{real_id}-{date_of_the_event}').
Events steming from a recurring events are in fact shown virtually. In
the database there is really only one event and a suffix is appended to
the id to target a given instance of a recurring event.
If we want to separate a recurring event from the instances, we can edit
the instance and use the link "Update only this instance", once done
this instance is separated for the recurring event.
This commit if one or more recurring events instances are selected when
an export is done, will only export one source event of each of the
events occurences.
fixes#7932closes#8262
opw-647676
Regarding _schedule_days, similar thing was done in
saas-6, @ fd5e7f2.
When the argument `days` was negative, the
returned intervals were wrong.
Regarding `get_working_intervals_of_day`,
calling this method without
`default_interval` and calendar
set crashed.
Closes#8208
Escape text nodes changed via the web editor before sending the content
it to the server controller.
It is done since the content is unescaped one time when being displayed,
and it is not done for inline style and script tags (which may be
injected by dropping a snippet) since that would break them.
replacing the solution in cdb900044.
When clicking on the button "Refresh Challenge" in the "gamification.challenge"
view form, all the "gamification.goal" records linked to this challenge must
be updated.
opw:647983
In bank statement reconciliation, when selecting an other partner(with the pencil),
the possible invoices to reconcile must be suggested.
opw:647210, 647885
On a first edition of a view list editable, scrolling before the first
edition might cause an issue: the editing fields are higher than they
should.
This commit solves this.
This issue stems from jQuery .offset({value}) function which is broken
if the element we want to position:
- is in absolute postionning,
- is inside a scrolled element in non static positionning,
- has not both top and left css property setted,
- has no ancestor element between itself and the scrolled not in static
positionning.
This issue happens less (and probably not at all) in saas-6 since the
last condition is most often not met thanks to this change:
https://github.com/odoo/odoo/commit/1ccd87a#diff-27c072074221456684bfc5f150ca0bc9R876
This issue of jquery is solved since jquery 3.0.0-alpha1:
https://github.com/jquery/jquery/commit/2d71594
( the issue is shown in https://jsfiddle.net/wpjrnggf/ and we can see it
is solved with jQuery 3.0.0-alpha1 https://jsfiddle.net/L6ykpjgy/ )
closes#8251
opw-647622
In the case of a signup with token, the user login
already exists, and changing of login (email) is
therefore not allowed.
It's the same behavior than in the reset password
view (`auth_signup.reset_password`)
opw-648125
/var/log/syslog gets filled up quicker than usual because of all the
crontab logs:
Aug 26 09:29:01 raspberrypi /USR/SBIN/CRON[21223]: (root) CMD (rm /var/run/odoo/sessions/*)