This is an oversight during the conversion to the new API
in the revision
788c1334e2
In the above revision,
```
visible_attrs = set(l.attribute_id.id
for l in product.attribute_line_ids
if len(l.value_ids) > 1)
```
has been converted to
```
visible_attrs_ids = product.mapped('attribute_line_ids.attribute_id').filtered(lambda attr: len(attr.value_ids) > 1).ids
```
which leads to a change of behavior:
Before the conversion, the filter is applied on the attribute line `value_ids` field:
`if len(l.value_ids) > 1`, `l` being one item of `attribute_line_ids`
After the converison, the filter is applied on the attribute line `attribute_id.value_ids` field
`filtered(lambda attr: len(attr.value_ids) > 1)`, `attr` being the `attribute_id` field of one item of `attribute_line_ids`
Therefore breaking the availability of the product variants in the products pages of the ecommerce.
e.g.
Attribute color, values red, blue, white, black
The product "Tshirt" is defined with as possible colors values red only.
Before, the filter would not return the attribute `color` for this product,
as the product has only one possible value for this attribute
After, the filter would return the attribute `color`, since this attribute
as more than one possible values (but, not for this product)
opw-688470
The class `oe-search-options`
has been renamed to `o_search_options`
at the revision
977db823c7
See the full explanation of the bug fix here:
4601b044a6e4dbf162cfca9bf0be5ff2a21dd4f5q
A portal user couldn't change his address details if he was
of type `contact`
This happens because users usually
have no access to write their parent company.
opw-688192
Closes#13430
This is an oversight of the revision
cb486d7eb6
In the above revision, which converts the module
`stock` to the new API,
the return value of the method `action_confirm`
has been changed:
- Before, it returned the list of move ids that have
been confirmed,
- After, it returns `True`
The former return value is expected by `mrp`,
when using kits BOM: In this use case,
the purchase of one product can lead to the reception
of multiple products, and therefore the confirmation
of one move can lead to the confirmation of multiple
moves.
In addition, the move that was initially confirmed could
no longer exist after the call of the method `action_confirm`.
The method `action_confirm` of `stock.move`
is expected to return the list of moves that were actually confirmed.
e.g. in purchase, before the conversion to the new API (<= saas-10),
to assign all the moves that were created through
the action confirm of the initial move, and not only the initial moves,
thanks to:
```
move_ids = moves.action_confirm()
moves = self.env['stock.move'].browse(move_ids)
moves.force_assign()
```
The above code has been wrongly converted in the new API with just
```
moves.action_confirm()
moves.force_assign()
```
Which changes the behavior, as, before, all the moves that were
created through `action_confirm` were being assigned, and, after,
only the moves with which the method `action_confirm` has been called
are being assigned.
Besides, with the kits BOM, the move with which `action_confirm` was
being called no longer exists after the call, and attempting to
call the `force_assign` method on it leads to the error
`Record does not exist or has been deleted.`
opw-688231
The snippet options can define an on_remove method which was supposed
to be called when the snippet is removed. This was not the case since
the method was written so that the options were removed before the
on_remove method was called... (Un)fortunately, the on_remove callbacks
were not doing any critical job in current implementation. In saas-13
however, some elements will rely on this.
Although we have been reluctant to perform this change, a specific
use case can cause customers to be redirect to the Odoo DPN url
with a GET request.
This happens when a Paypal Merchant account has the feature Guest
Checkout active; in that case, a customer can pay without having
a Paypal account (using only his credit card) and will *not* be
subjected to auto-return; as detailed here:
https://www.sandbox.paypal.com/be/cgi-bin/webscr?cmd=p/pop/help-account-optional
Request coming from that payment flow will always trigger a GET
request, causing the customer to be welcomed by a
405 - Method Not allowed
error on the Odoo server. The payment is normally correctly processed
through IPN, so this does not normally causes loss of data; however
this is not a nice way to welcome back your customer right after
they pay you.
Commit 8ad0c0f3 introduces back the base amount taken into account for
tax calculation. However, the way it calculates the amount is wrong in
several cases:
- the tax amount is a percentage
- the tax is calculated thanks to Python code
opw-686846
When selectionning a saved shipping address when setting the shipping
address of an ecommerce order, the country and state should be set
accordingly.
unrelated issue noticed when testing e0d4dd01cc
In 1ef52c9c the code displaying state of a given country was improved
for some incompatibilities.
But, if when setting the billing informations we choose to create a new
shipping address, the shipping state* would not be displayed even when it
should be (currently, if the shipping country is Australia or U.S.).
opw-687948
*a state being a subdivision of a country
Until 9.0 our psycopg2 DSN connection strings do not allow having
spaces within the db name, and passing some can cause duplicate
registries to be loaded.
Stripping spaces is a simple workaround until we actually support
spaces within db names.
Fixes#13078
The sale of the day report was removed during new api migration as it was
thought, it could be replaced by pivot view.
Due to the lack of some options and the problems to be printed, create similar
report.
This commit adds a report in the PoS interface to be printed on ESC/POS printers
and add a JS wizard to restore it in the backend with date selection.
The wizard is made in a new web widget because adding a wizard requires changes
not compatible with stable version.
Creating a proper wizard should be done in v10
opw-681833
Since 9.0, `message_follower_ids` are
`mail.followers` records,
the partner are in `message_partner_ids`.
Therefore, the partner images displayed in the note kanban
were not the images of the right partners.
opw-688100
Wrong class selector and must add '#' to force the browser to reload the picture because the picture is in the cache with the previous cache informations.
Do not force the `search_default_product_id`to the current
product variant, as the domain just above could return a
result, a BOM which is set for the template of this variant
but not for the variant istself, that this filter would hide.
This is following the revision
52cba1b563
Because of this, a product variant smart button could
display "1 BOM", but when clicking on it, none would be displayed,
which is not user-friendly at all.
opw-687912
If `method_time` is set to end, `method_number` is not the reference for the number of depreciation lines.
Take directly the number of depreciation lines is more correct.
When creating a task on a project which is accessible to followers only,
an access error pops up.
This comes from the `subtask_project_id` field on the task, which is a
related to a `project.project` field. When a task is created, the ORM
tries to write on the related field, and hence on `project.project`.
opw-687252
This revision removes the context from the action:
afd29b277d
The thing is, in saas-11, the `product.template.type`
no longer has in its selection values `product`,
in the module `product`,
there is only `consu` and `service`.
the type `product` is added in the module `stock`
Therefore, this `product` cannot be used as default value
when only the module `product` is installed and not
`stock`.
We force the empty context for migration purposes,
so bases in ealier releases than saas-11 do not have
`'default_type': 'product'` within this action
when they are upgraded to saas-11.
opw-687986
Commit 06754b32 brings an inconsistency between the PoS frontend, the
pos_order and the account_invoice tax calculation. Part of the commit is
correct since it corrects the matching between the `compute_all`
methods, however.
opw-680891
Removing a slide was buggy :
* Removing the last slide left the slide handles (and the user had to
click on remove slide again)
* There was an ugly delay before the removal
* Changing the bg image of a slide was not possible anymore once one
slide was removed
* ...
WHen checking `Dedicated Refund Sequence` in a
sale / purchase journal,
the field `Refund Entry Sequence` must be filled with a sequence.
Otherwise, later, when issuing a refund invoice, it won't be able
to generate the number of the refund invoice as it won't be able
to find the sequence to use.
opw-687839
Inconsistencies can arise between the tax calculation performed in the
PoS and in the backend (e.g. in a SO). For example:
- Unit price: 9.479
- Tax: excluded, 5.5 %
- Buy 5 units
- Round globally
In the backend, the result is 47.40 + 2.60 = 50.00
In the PoS, the result is 47.40 + 2.61 = 50.01
We make the PoS apply the same logic than in the backend. First, at the
level of the `compute_all` method, especially to use the appropriate
rounding precision before starting the calculation (so we move the
rounding of `total_excluded` after the rounding precision adjustment).
Then, by calculating the taxes amount as the difference between
`priceWithTax` with `priceWithoutTax`. This is mandatory since they
contain the result of `compute_all` in which the rounding logic has
already been applied.
opw-680891
In saas-11 stock was migrated to new API, but some old API still called
_prepare_values_extra_move so it needs to be callable via both API
version.
opw-687958
When we drag and drop a record in a folded column, the number of elements
in this column displayed in the column title is not updated.
This issue is present because when a record is droped in a column
its id is not added to the dataset of its new column.
To fix this, we had to add the id of the record in the dataset, and
override the method 'add_ids' in 'DataSetSearch' to have the size
of the dataset equal to the number of ids in it. We have replicated
the behaviour of the function 'remove_ids' in the new function 'add_ids'.