Before this commit, images in kanban view of the Contact app were not displayed
on non-latin languages, such as Russian.
This was caused by the is_bin_size helper that wrongly assumes that a certain
string is not a binary size, although it is (e.g. 64.2 Кб).
This commit fixes the issue by including such strings as valid binary sizes.
Bug found and fixed by @true-datura
Test by @alexkuhn
closes#23526closes#22519
On creation of a new landed cost,
in the web client,
the name was filled with the next sequence
`self.env['ir.sequence'].next_by_code('stock.landed.cost')`
but then, as the field is readonly,
it is not sent in the create values to the server,
and therefore the server sets again the default value
and generates a new sequence name.
The previous assigned sequence name is therefore never assigned,
and there was an obvious gap in the landed costs sequences.
Besides, using a sequence as a default is never a good
idea, as the record can be discarded, and this will not discard
the sequence number that has been used. There will be again
a gap in the sequence.
See this forum topic for reference:
https://www.odoo.com/forum/help-1/question/how-to-handle-reading-and-writing-to-read-only-fields-2247#answer_2281
I therefore remove the default value,
and use the exact same behavior than on the sale order,
which is pretty similar:
- The default value is set to `New`
- Then, on creation, it is replaced to the actual sequence number.
https://github.com/odoo/odoo/blob/bfe88c50e2b4975a23c624cc5b5171158bb9f855/addons/sale/models/sale.py#L273-L279
opw-1823133
Note: This can be back-ported to Odoo 9.0,
but the fix will be different since the module has
been converted to the new API since then.
If I did it in 9.0 in the first place,
mostlikely it would not have been forward ported correctly.
msgid ""
"You cannot set a negative product quantity in an inventory line:\n"
"\t%s - qty: %s"
Was creating a ir.translation record with a src as
You cannot set a negative product quantity in an inventory line:
t%s - qty: %s
('t' instead of \t)
Closes#23541Fixes#23521
When a chatter is displayed and the document is accessed with a valid
access_token, the message related to the document are searched in sudo.
This bypass valid filtering we may down the line.
This change apply the filtering so note type messages are not displayed
for user who are not employees.
note: before 11.0 this logic was in 1b5c2ced. In future version it would
probably be better to have a method eg. _get_domain_based_on_user
that would be called before sudo and if not sudo.
opw-1819702
closes#23544
Before this rev., the field widget 'mail_activity' kept an internal
cache of fetched activities (like the 'mail_thread' and
'mail_followers'). However, for activities, this cache may cause
issues.
For instance, create a new lead in 'My pipeline', schedule a
'Meeting' activity on that lead (it opens the Calendar view so
that real meetings can be created), create a meeting 2 weeks from
now, go back to the lead form view: the activity still diplays that
the meeting is today (when the view is refreshed, the correct date
is displayed).
This rev. removes the internal cache for this field widget, as the
activities can easily be updated in business flows (unlike messages
or followers).
This rev. also fixes a bug in the BasicModel, where the res_ids of
a list datapoint was altered in place to return a list of x2many
commands instead of the list of ids when being stringified. This
caused a traceback when opening a lead with activities, as soon
as the internal cache had been removed.
When a membership line has its dates changed
(date_from, date_to, date_cancel)
The membership start/stop dates on the member
(res.partner) were not changed accordigly.
opw-1823981
Steps to reproduce the bug:
- Set your company in anglo-saxon
- Create a product P in a category which is in real price and perpetual
- Create a PO with P at 500$ and validate it
- Change the unit price of P in the PO line and set 100$
- Receive the product
Bug:
The two journal entries generated for the goods were created with the price unit
500$ instead of 100$.
Fix:
Now the right price is taken into account to generate the journal entries.
opw:1813946
Before this commit, model that create ir_ui_view via _inheritS was ignored in --dev xml
The arch_fs was not set. Because it was not ir.ui.view, and because xml_id was suffixed by _ir_ui_view.
Now we manage the case of inherits. So if model model.name inherits ir_ui_view
class MyClass(models.Model):
_name = 'model.name'
_inherits = {'ir.ui.view': 'view_id'}
view_id = fields.Many2one('ir.ui.view', string='View', required=True, ondelete="cascade")
...
<record name='model.name' xmlid='pok'>
<field name='arch' type='xml'>content</field>
</record>
will be read from xml in dev mode.
parsing the xml file for xml_id pok_ir_ui_view and pok.
The orm by default will add this suffix.
The 'dynamic' view created when we update the groups is a special case, which we don't want the arch_fs
for dev mode because the xml only contains by default and an empty container and btw the imd was wrong
since we had the res.group model a xml_id into the _inverse_arch.
The page create via a template (method new_page) will automatically remove the arch_fs since we don't
want to see the empty container if we are in dev_mode.
When the inventory adjustement has been validated, changing accounting_date has no
impact on the stock moves created by the inventory adjustement.
This behavior cannot be changed in stable version.
opw:1817813
When a pricelist was set on the public user that was different from that of the
website, the prices were displayed using the public user default currency,
but the currency symbol displayed was the website default currency.
The issue was that in the template, the currency was accessed as a computed,
related field of website while the price was obtained using a function call.
In the first case the field was obtained using sudo, and thus the call would not
get the public user pricelist.
opw-1817761
When a user returns a tracked product in the POS, it is not possible to
register the serial number. In case a customer returns 2 units of a
tracked product, the following error occurs:
'Cannot set the done quantity from this stock move...'
Since the serial number were not set, `qty_done` remains equal to zero
and `pack_lots` is empty. Therefore, we are trying to set a zero value,
which is actually useless.
opw-1817695
In a multi-company environment,
if a user in company A
created a Payslips batch for an employee in the company B
and used the `generate payslips` button,
the created payslip was set with the user company (A) while
it must be the employee company (B).
opw-1820138
When changing the employee to None in an allocation,
this onchange raised an error because it attempted
to set an employee browser record (empty but still)
in a department many2one.
- Create a new leave allocation
- Try to change the field Mode (holiday_type) from "By Employee" to "By Employee Tag"
Fixes#23345
opw-1820069
When there were no status widget in the form view statusbar, the left
buttons appeared without any vertical space around them in a smaller
statusbar.
There also was a 1px mistake that made the buttons appear non-centered.
Now they appear centered in any case and a row of buttons is always
forcing the correct statusbar height.
Closes https://github.com/odoo/odoo/pull/22053
opw-(1)813479
Before this commit:
Expense emails title are parsed to find a product that match the given [CODE].
For example, an email title like '[CARD] Graphic Card $900' will create an
expense for the product having 'CARD' as internal reference.
Since the search is done with an 'ilike' and with no 'limit', it could return
multiple product: all the one containing the CODE in their internal reference.
This would throw a singleton error when trying afterward to read product.id.
Then, the mail would not go through the mail.thread flow and it would return
a Mail System Delivery fail saying the address does not exist.
Users would get stuck with this, having no way to understand where the error
comes from.
Now, we ensure to find only 1 product.
To avoid breaking the ilike behavior that could be used by users only typing
the first caracters of a long CODE, we still use ilike but force exact match if
there is multiple results.
Closes#23419
opw-1816340
The following bugs in detailed operations have been fixed in this
commit:
- Avoid to edit reserved quantity on move lines. When a picking is set
in 'UNLOCK' mode you are able to edit the reserved quantity of move
lines, even if it doesn't really causes problems it create confusion
on what is the reserved quantity.
- Avoid to edit the product_id on a move if there is a move lines linked
to it. This will cause inceonsistencies by having move lines with
product_id different than the related moves.
- Avoid to edit the product_id on a move line if it has a linked move for
the same reasons as above. We also avoid the edition when picking is
done to avoid issues with the stock valuation
- Remove call to 'force_assign' method on demo data as this method is
not used anymore and set some pickings in wierd states
- Adding a move line in the detailed operation view does not create an
associated move.
- Don't allow editing moves when we are in detailed views and state is
done, even if picking is unlocked.
TASK-1817931
Allow the user to set the quantity with barcode
scanning. This functionality was present in v9 but
didn't work in v11.
The code in order to make it work was already present in
_quantityListener however it makes a check on setQuantityWithKeypress
key on the obejct activeBarcode. Howver the key was never set during the
activeBarcode event.
This commit set the key on the activeBarcode if passed in the event data.
It also allow to trigger a barcode if the user is inside a modal.
Have the public user (not logged in -- user B) having a live chat with any logged in user (user A)
Having in mind that:
- (A) issues /history in his chatter to see where (B) has gone on the website
- The bus sends a kind of a "pull cookie request" on each clients
- The browser of (B) retrieves the cookie info and calls the relevant route
- That route sends the transient message for (A)
Before this commit:
The command did not work because the user of the route we end up on is the public one
hence, the search for the channel would not yield anything
After this commit:
The command does work as expected
OPW 1818732
closes#23485
Set up a delivery method that has a country set on it, but no states
(e.g. USA)
When the client is required to fill his address info in and when he chooses USA as the country
Before this commit:
The selection field where the states are selectable is not displayed.
After this commit:
All the states of the country are selectable
The usability choice is to say that if states are not specified on the delivery method
that means all states are supported
OPW 1818591
The python/xml try to create a default value for
property_stock_account_input_categ_id for all categories, but the yaml
only try for the All category and in 11.0 this is not propagated to
child categories.
This commit make the yaml coherent with account.chart.template
generate_properties and
stock_account.property_stock_account_input_categ_id XML record.
note: second part of 1bf25fc01
property_stock_account_input_categ_id,
property_stock_account_output_categ_id,
property_stock_valuation_account_id ir.property default values on
product.category could be duplicated eg. if l10n_generic_coa was
installed before stock_account.
This did not happen in enterprise but happened in enterprise breaking
the test added in odoo/odoo@6bcf9ac2e.