Since duplicating a project copies the project
tasks, with the followers, the project followers must
remain as well.
This is done in the already overriden method
`copy` instead of simply adding `copy=True`
on the according one2many field, since this field
is defined on the inherited model
`mail.thread`, and to add `copy=True`, in the old api,
we would have to re-define the `message_follower_ids`
field within the `project.project`
model completely, making sure to copy all properties
opw-680313
When a user imports a CSV file on Windows, the "CSV Format Options…"
field does not appear. This is an issue since it might be necessary to
tune these options depending on the file, e.g. change the encoding.
For some unknown reason, on Windows, the file type is empty whatever the
browser used. Therefore, we fall back on the extension of the file.
opw-680347
The field "carrier_id" must be hidden for the incoming stock picking.
In stock picking view form,
for an incoming stock picking, the Destination Location Zone must be hidden
for an outgoing stock picking, the Source Location Zone must be hidden
Introduced by 2cb3a90
opw:676411
When tracking value is converted to be rendered as a message_post, we convert
the date/datetime with the current local from momentjs.
Related to #12327
Courtesy of @aab-odoo for help and review.
When a journal entry includes taxes, it is impossible to duplicate it
because of an unbalanced entry error.
Indeed, by default the taxes are computed at the creation of the account
move lines, leading to the creation of a new tax line, therefore
unbalancing the account move.
Fixes#11919
opw-676788
This reverts commit 07e6f28df3.
This was no longer possible to create a picking from scratch.
`Inventory > Your Company: Receipts > Create`
Because `picking_type_id` is not in the res returned by the above call to default_get
Even by forcing `picking_type_id` in the `fields` list,
it doesn't return the value in the fields.
The button "Convert to opportunity" in the mail notifications
sent when posting a message on an opportunity just coudln't
work as it attempted to call the `convert_opportunity`
method without one of its required method parameter.
opw-680017
The evaluated lang is within the variable
`d.context['lang']`
`lang` contains the non-evaluated `t` attribute,
so, in the case of `report_saleorder`,
`doc.partner_id.lang`
opw-680074
In the Filters, Group By and Favorites dropdowns,
when clicking outside the `li` elements but still
inside the dropdown menu itself
(like on the dividers,
or next to the advanced search `Apply` button),
the dropdowns was closed.
This behavior was annoying when doing an advanced search
with a field using the datetime picker, as, to close the datetime
picker, you have to click outside it, and when you did, it closed
automatically the filter dropdown... So you had to open it again to
finally apply the filter.
opw-674310
Both website_sale and website_quote have logic to independently
confirm sales orders when a successful payment transaction is
processed.
Rev 46c5f93b6c introduced an extra
check and logging for transactions with mismatching amounts in
website_sale, but the same change was not done in website_quote.
Consequently, when both modules were installed, the tx mismatch
check was bypassed by website_quote, and a spurious logging message
was emitted by website_sale if the website_quote logic had executed
first.
This patch makes tx handling consistent in both modules, and avoids
the misleading log message when both modules are installed.
Mobile virtual keyboards will often capitalize the first letter of
an input text field, which is annoying as odoo logins are case-sensitive.
This will no longer happen thanks to this new attribute.
X-port of commit odoo/enterprise@b8632f8bb6
In the case of a purchase pricelist based on the supplier price, the
price selected is incorrect if the supplier is not in the list of
suppliers of the product. Indeed, in this case, the price of the first
supplier is chosen.
We also need to make sure to go through all the pricelist items found.
opw-678440
Commit odoo/odoo@9be7a9535c changes the week number
computation to match calendar and pivot views.
Now, calendar don't use isoWeek format by default, but the weekNumber from locale(),
So we need to adapt also the format for title.
closes#12068, closes#9629
When an invoice is created automatically thanks to the cron task, the
superuser is used. However, this implies that the company of the
superuser will be used for the account invoice creation, leading to
potentially incorrect taxes and fiscal positions.
opw-669714
The billed quantity field on the purchase order line
must exclude the cancelled invoice, as a cancelled invoice
is not considered as invoiced.
`draft` could be considered as well, but we do not
take the chance now, as this field is used
when creating a new invoice, to determine the
quantity to invoice. Therefore, if there are
draft invoices with some quantities invoiced,
it can make sense to reduce the quantity
in this new invoice. Nevertheless, it must not be the case
for cancelled invoices.
opw-679363
When both selected, these filters are expected
to display Invoices - OR - Refunds.
It was not the case, because the web client
expects to receive the domains normalized
when concatenating domains together with a
`|` statement.
Selecting both filters resulted in the below domain:
```
[
'|',
('state','in',['open','paid']),
('type','in',('out_invoice','in_invoice'))`,
('state','in',['open','paid']),
('type','in',('out_refund','in_refund')),
]
```
Instead of
```
[
'|',
'&', ('state','in',['open','paid']), ('type','in',('out_invoice','in_invoice'))`,
'&', ('state','in',['open','paid']), ('type','in',('out_refund','in_refund')),
]
```
opw-679246
The test `test_balanced_exchanges_gain_loss`
failed on Jun 6, because it created a specific rate
for today's date at midnight
(e.g. on Jun 6, 201x-06-06 00:00:00) for the test purpose,
but a rate is created in the demo data for Jun 6 midnight exactly:
`base.rateUSDbis`, making the test confused about which rate
to use.
We solve this by making the test use the rate `base.rateUSDbis`,
modifying the rate for its own need, instead of creating a new
rate.
Avoid the DOCTYPE tranlation. If this tag is changed, the html rendering is altered. The other effet is that the web_editor wrap the content with <span> to translate, but some explorer eject tags (doctype, head content, script, style, meta) et insert this tags in the body.
NB: DOCTYPE is not a node but a text.
The sub-select used to fetch companies rates
was wrong in the case rates with no company set
were entered before rates for specific companies.
e.g., for USD, the below rates:
Date Rate Company
2016-02-13 0.721400
2016-02-25 0.738800 1
2016-02-26 0.740000 1
the sub-select returned
Rate Start End
0.721400 2016-02-13
0.738800 2016-02-25 2016-02-26
0.740000 2016-02-26
while it was expected to return
Rate Start End
0.721400 2016-02-13 2016-02-25
0.738800 2016-02-25 2016-02-26
0.740000 2016-02-26
as the rate 0.721400 ended on 2016-02-25,
since a new rate specific to this company 1 was
added at that date.
opw-678726
Module sales_team was auto installed if base and mail was installed, but
this isn't wanted as it is already a depends of crm and sale modules
which should be anyway installed for sales team to have a meaning.
This could lead to a glitch with the sale apps displayed whilst it
should not be.
opw-679223
Context:
Source document on invoice created through a credit note with the modify option
Current issue:
create an invoice from a sale order,
validate it,
Create a refund with the modify option
The first invoice is reconciled with the refund
The new draft invoice doesn't have a source document and can't be reached from the SO
Expect result:
The new draft invoice should have the sale order as the source document