POSBoxes will be registered with the government. If a POSBox is not
registered it won't load the blackbox driver, preventing communication
with the Fiscal Data Module.
When the user duplicates an event, the `menu_id` is copied. This causes
two issues. First, it links the event to the wrong menu. Then, the
controller `event` uses this `menu_id` to compute the target URL. It
will therefore redirect the user to the wrong event page.
opw-670353
When applying the accounting configuration wizard,
the `currency_id` was being re-written on the company,
even if there was no change (if the currency remained the same),
because of the related.
This leaded as well to the re-write of the company currency
on all journal items, because the `company_currency_id` on
`account.move.line` is a related to `company_id.currency_id`as well,
and they were being recomputed due to the above re-write.
Meaning, when you had a bunch of journal items, applying the
accounting configuration wizard could have take a while.
opw-672400
This is related to 3d58cd1ca2
`compute_all` indeed does expect ids, and not browse records,
but it expects a list of ids for the `ids` parameter, or a single
id, but not `False`.
Besides, `line.tax_id` is a many2many, despite the fact
its naming seems to say otherwise, and therefore `.ids`
should be used in order to pass all the taxes of the line,
not just one.
Apply the same domain which is appled in the form
view, which was redefined during the 9.0 accounting
refactoring (c04065abd8)
This is following the forward-port 51774f2a45
opw-672321
Introduced by 5bb64d40d0. Before doing
anything we should first ensure that the quantity keypress event targets
body (and that it is a number, but that's less important). Before this
we didn't do that and thus the _display_no_edit_mode_warning was given
when people where just typing in the associated thread of a picking.
opw-672350
When a stock move was created in a picking with a product set with
a unique serial number existing in the stock of a specific owner.
If the owner was not specified for the stock move then a wrong message
was raised "The serial number 00005 is already in stock.". But the real
problem could come from function quants_get_preferred_domain which didn't
find the existing quant due to the fact that the system didn't check in the
right stock(owner). A new quant was then created with the existing serial number.
And a wrong message was raised.
opw:671783
When searching for a dropshipping route, we need to access the field
`picking_type_id`. If user is not allowed to read it because of the
access rule `stock_picking_type_rule`, he will get an access error.
opw-668926
In the backend product.product records are not just ordered on their
name, they are first ordered on default_code and then on name. The POS
should order records the same way.
opw-672284
In communtiy, the order of the accounts shown in the reports
didn't follow the order written in the legend(How account type affects your reports?)
Adviser > Chart of Account > create
opw:669270
When scanning items with a device like the Symbol MC3200 you are
presented with the Kanban view because of it's limited resolution.
In this view it is not possible to quickly set the quantity of scanned
products. Ideally users just want to scan the barcode, input the
quantity and repeat without having to click on virtual buttons on the
usually less than ideal touchscreen.
This implements a way for users to immediately start typing numbers
representing a quantity after scanning a barcode. The quantity will be
set on the specified m2x_field.quantity_field of the record associated
to the last scanned barcode. Because KanbanRecords are not editable
without opening a new view window.prompt is used. It will create an easy
to use native dialog of whatever device is being used. It also avoids us
having to implement a custom input field which would have to handle
keypress events like numbers, backspace, delete, etc.
We want to properly support devices like the Symbol MC3200. This is a
handheld computer running a modern operating system like Android or
Windows with an integrated barcode scanner. After installation of a
modern web browser and configuration of the integrated barcode scanner
Odoo works as well as it does anywhere else.
The main issue with these types of devices is that the displays (and
their resolution) are very small (3" @ 320x320 for Symbol
MC3200). Because of this a lot of tree views become awkward to use
because they require vertical scrolling. A Kanban view however scales
nicely on these displays.
This implements Kanban views for both the picking.form view and the
stock.inventory form view because those are the views typically used
when using a barcode scanner.
Doing this alone is not enough, because the barcodes module does not
work with Kanban views. Small changes where made to
barcodes.FormViewBarcodeHandler to make it work with both List views and
Kanban views.
An issue occurs in the following use case:
- Create an invoice, validate.
- Cancel it, reset to draft.
- Change the invoice date
- Validate the invoice
The date of the account move is still the first date entered. This is
because the accounting date has not been reset on the invoice, and
therefore it is not updated.
opw-671672
The `timesheet_ids` was added in the `sale.order` form.
As it was invisible, and not used by the attrs of another
field, or by an onchange, this is pointless to load
it for no reasons.
Besides, this could lead to issues regarding the form validation,
in case the analytic lines were not valid.
e.g. if an editable list view is used to load
these analytic lines and if a field in this editable list
has been made required,
while analytic lines exist with this field not filled.
In such a case, it was not possible for the user to correct the
analytic lines, as they were invisible, and it was not the place
to correct them anyway.
opw-672184
All the POS has to do is copy what accounting does. In the case of a
fixed tax we should do (from account.tax._compute_amount):
return math.copysign(self.amount, base_amount) * quantity
where copysign(x, y) returns x with the sign of y.
When base_amount is 0 it's positive, not negative. This also correctly
handles a base_amount of -0, although it's something that we shouldn't
encounter in the POS.
opw-672118
Before this we used line.price_subtotal directly when creating
account.move.line records, which causes issues when dealing with
non-integer quantities. In that case the amount paid by a POS customer
will never accurately be able to match the total computed amount of the
order.
opw-672118
The implementation of `__len__` & `__nonzero__`
were not defined for the py types `wrapping_dict`
and `wrapping_list`.
For instance, this prevented an empty list
to be considered as `False` in domains
evaluated by the web client.
e.g., in the automatic partner merge wizard,
the domain
```
[('id', 'in', partner_ids and partner_ids[0] and partner_ids[0][2] or False)]
```
is used.
When the `partner_ids` list was empty (meaning the "partners to merge" list
was empty in the wizard), it wasn't considered as
`False`, and it therefore attempted to get
`partner_ids[0]`, which resulted to a crash, as
the list was empty.
opw-672095
Closes#11343
Courtesy of Xavier Morel (xmo@odoo.com)
When computing the balance, debit and/or credit, the opening period must
be filtered out. Otherwise, the invoices which are still opened at the
time of the period closing will be counted twice.
opw-670584
Due to the _set_product_template_field function, it is not possible
to set the standard price on a product template with more than one variant.
Due to the _compute_product_template_field function, it is not possible
to read the standard price on a product with more than one variant.
The field "standard_price" is in readonly to avoid some problems if the costing
method is in real time.
Closes: #11308
opw:671013
There are 2 journal items missing on the accounting entry that
represents the assignation of the landed costs (for a product that has
already left the stock!) => expense account at the debit and stock
output account at the credit (amount is equal to the cost of the landed
cost)
opw-671311
When transfering the pack, the priority to the moves in state "assigned"
or partially_available(=true) must be given.
Used case (steps):
-set warehouse with three steps to delivery
-create one product A with qty on hand 10
-create sale order with first line product A by qty 2 and the second line with product A with qty 10
-confirm sale order
-check availability
-transfer pick by qty 10
-transfer pack by qty 10
The pack couldn't be transered
Now the pack is transfered.
Closes: #10764
opw:668682
Upgrading a module in the presence of computed custom fields can fail, if a
computed custom field depends on another field from a module that is not loaded
yet. The patch simply prevents custom fields with dependencies from being
loaded in partial mode.