This reverts commit bd9cbdfc41.
The above revision solved the SQL constraints not being
translated when raised. They were not translated because
the context, containing the lang, was not located as expected
in the `kwargs` dict.
While it solved this issue, it had as side-effect to raise
`current transaction is aborted,
commands ignored until end of transaction block` errors more
often when using the web client.
This can be explained by the double check, when the first
check raised this error
- which can happen, e.g. when the cursor is closed,
there is a retry mechanism in such cases -
and by the fact the transaction was not rollbacked.
This issue could have been solved as well by rollbacking
the transaction, but it is regarded as not-so-clean.
Therefore, to solve this issue, while still having
the SQL constraints translated, we apply the
second patch proposed in bd9cbdfc41
commit message, which is not-so-clean as well, but
which is a proper solution.
opw-651393
'state', 'in', ('draft') is an invalid definition, ('draft') is not a tuple
should have been ('draft',)
Replacing by simpler 'state', '=', 'draft'
Fixes#8115Closes#9016
When delivering partially a picking in which the moves
had an owner (`restrict_partner_id`) set,
the owner were not kept in the backorder moves.
Closes#4693
In the landed cost types form view
(landed costs types being nothing else than `product.product`),
we force users to choose an account of type `other`,
in order to prevent them from entering wrong data,
other types of accounts,
or receive an error message when setting a view account type.
This domain is actually the domain already applied in the
regular `product.template` and `product.product` form
view, thanks to `account.product_template_form_view`
Closes#4719
To reproduce use a form view with a one2many editable list and create a lot of lines. Then click a few times quickly on the delete.
If the user click at least two times on delete of a same record, the dataset add the id in "to_delete" the virtual id because "to_create" doesn't contains the virtual id of the record deleted previously.
E.g.: create a "Customer Payments" and select a "Customer" and "Payment Method" who generate a lot of "Credits" lines.
Double clicking on the confirm button was actually possible and could confirm the orders multiple times (which could be problematic if some action are linked to the so confirmation)
Before this fix, it was possible to validate then cancel a quote (or the other way around) simply by using two tabs in your browser. From now on, we only validate/cancel a quote if it's the 'sent' state and advise the customer of the situation if he tries to abuse the process.
Initialise quant_dict inside for loop as doing outside loops
renders to be a quadratic write of quant object due to the fact that
previous quants are kept each time a new valuation line is read.
In case of posting a Landed Cost record with a huge amount of cost_lines
and huge amount of stock_move having several quants would result in a
extra overhead.
Closes#9005
Since we're not duplicating work items when duplicating tasks during
project duplication, it doesn't make sense to duplicate the
likely correspondingly adjusted remaining hour.
Behave as if the planned hours had just been set/reset and set the
remaining hours of the new task to that instead.
fixes#8985
Sometimes it's useful to ssh into a posbox to quickly troubleshoot an
issue. Talking customers through port forwarding is very difficult
however. We use ngrok to solve this issue.
This implements an interface that allows a user to enter an ngrok
authentication token. After this, ngrok can be started and we should be
able to remotely connect.
Note that ngrok does NOT run by default on the posbox. It can only be
started manually by the user.
Every time the posbox boots it would say something like:
This raspberry pi is not configured, please run raspi-config
Which is a leftover from the original raspbian image. Raspi-config is
removed on the posbox because we don't need it.
This allows people to connect the posbox to networks using a wireless
network adapter.
When plugging in a USB Wi-Fi adapter and no network cable, the posbox
will boot and host its own Access Point called "Posbox". Users can
connect their device to this network and can then connect to the posbox
the usual way.
An interface for has been provided that also allows users to instruct
the posbox to connect to a different Wi-Fi network. This is useful when
the client is not running Odoo locally.
It is also possible to make this configuration persistent. With a
persistent Wi-Fi network configuration, the posbox will always try to
connect to the specified network after a reboot.
Attempts have been made to make the Wi-Fi connection as robust as
possible. Upon connection loss, the posbox will automatically attempt to
reconnect.
The current default values leads to standard proposals of 6 digits
account numbers and in many cases wrong default tax settings. The fix
prevents most users to apply manually the right settings of digits and
default taxes.
Closes#8837
We search for USB devices that identify as a printer through their
DeviceClass or one of their InterfaceClasses. The issue is a lot of
printers use vendor-specific Device/InterfaceClasses.
Apparently the Epson TM-T88IV is one of those devices. So in order to
work around this, we now first look for a USB device that identifies as
a printer. If those do not exist, we pick the first Epson device, if
those do not exist we pick the first Star device.
Perhaps we should instead start using some kind of probe-based approach
to identify ESC/POS compatible devices.
The code used the key vals['company_id'] while it was not checked it was present
in the write call (and it should not necessary).
If a key is not present, browse the record instead.
Fixes#8906
Users not belonging to the project user group can not access the model
project.task.history.cumulative
Hide the dashboard for them
Fixes#8606Closes#8607
Fixes#8902
In order for the payment wizard to work, the accounts in invoice header, account_id, should have reconcile=True.
In l10n_br the accounts are, amongst others, "Clientes" and "Fornecedores", a the chart of account should make them by default as reconciliable.
Previously, if there was a sale_order_id but it was wrong,
like when the sale order was deleted for example, the function
didn't return a sale order, even with force_create=True.
It used to pass the first 'if' as sale_order_id had a value, so
no new sale order was created. However, as sometimes the id was
referring to a non-existant sale_order, a sale_order.exists() test
was used later, resulting in the function sometimes returning None,
even with force_create = True.
Proposed solution is to test the existence of the browse record with
the given id earlier, instead of testing the existence of the id itself.
The field timesheet_ids (hr.analytic.timesheet) and analytic_account_id
(account.analytic.account) should not be accessible by the portal user.
Fixes#8338Closes#8354
The user creating the event should be by default in the attendees (to see the event
he just created in his calendar) and the contact on the logged call
should also be in the attendees by default.
opw:650556
Use the parameter zoom as in `google_map_img`
Change the default value to 10 to avoid changing the behaviour for existing
links (zoom was not used anyway).
Closes#8318
When duplicating a user, an email was sent to a user at the email of the
previous user (as the create is called before changing the email).
Closes#8754