Did you know that if you iterate on an OrderedDict in Python 2 and add
to the dict during iteration, the new items will be iterated? No? Me
neither.
And did you know that that does not work in Python 3 likely because
OrderedDict's implementation details changed? Why the fuck would
anyone do that and thus why would we care you ask?
WELL WE FUCKING DO IT TURNS OUT and that breaks
test_partial_reconcile_currencies on Python 3...
Fix it, try to make it more obvious that we're doing weird crap
instead of abusing OrderedDict in ways it was never meant to be used.
When the invoice is validated, the related timesheet are
set as invoice, and are not updateable anymore.
In order quantity, create and confirm SO, log 2 timesheet
lines and validate invoice. Your 2 timesheet lines will be
mark as invoiced. The other hour to deliver will not be linked
to the invoice (and their revenue=0), so the futur lines will
be updateable. But for the 2 first, the user will have to create
a new timesheet line, intead of updating an existing one. The
color will tell him which line is invoiced.
When the user remove the partner, the reconciliation widget try to read
information on 'res.users' without any partner id.
Open the match view when change the partner.
Remove max-height which can hide the last proposal.
P2 and P3 subprocess stdout seem to have very odd/different behaviours
in the face of mixing select and buffering.
Use raw/low-level IO (os.read) with select to try and fix that
up. Also read more than one byte at a time since os.read will not
block *if* the fd is readable, it will just get whatever data is
immediately available.
In P2, list comprehensions "leak" their variables to the surrounding
scope, in this case leading to "stl" from the first listcomp being
visible to the second one leading to code which does not break but
does not seem to make any sense.
/cc @csn-odoo
Python 3 removed "universal"
ordering. ``ResCompany.fiscalyear_lock_date`` is not required and thus
needs a fallback in case it's empty lest we try comparing a string and
None or False, which is an error.
There was an error message when trying to move an entire
pack that contains multiple quants saying that every component
in the pack should be in the same location. (it the case with the
bug)
It happens because after action_done only one quant of the package is moved
to the new location and other quant still in the old location. Thus the
check fail. Also the extra move for remaining was not created.
This commit changes the get_remaining_prod_quantities on pack operation
that had a migration error between old/new api. This change returns the
correct remaining quantities and thus the extra move is created and all
quants for the pack are moved to the new location.
- Create a mass mailing including a 'tel' or 'sms' link, e.g.
`<a href="tel:555-000-0000">555-000-0000</a>`
- When sent, the link is converted to a tracked linked (`http://...`)
We do not want to convert these links, they should be handled by the
browser directly.
opw-765885
- Create Products A and B, tracked by unique serial number.
- Receive some quantity of B.
- Create a BOM for A which uses 1 unit of B.
- Create a MO for 2 units of A, save and check availability.
- Click on the 'Produce' button.
- Change the suggested lot (choose a new one or create), then click on
the '+' button.
When the wizard is reloaded, the lot chosen is lost.
We reach an exception in the framework: when clicking on the '+' button,
no `create` is performed on the transient model `mrp.product.produce`,
therefore the values are not saved.
Since this use case is an exception and is likely to lead to errors, we
remove the button.
opw-761044
Users will generally not have the right to read Journal Items unless
they are members of one of the Accounting/Invoicing groups.
Removing the payment-related fields & widgets from the view should let
those users view relevant customer invoices (e.g. for Salesmen) without
getting an AccessError, due to the underlying access to Journal Items.
The field 'location_id' on quant package is not computed anymore, as all
quants of a package are in the same location we take the location of the
first quant
When you use the produce wizard of mrp, you can select the lot_id of any
existing prosuct to set on the consumed product.
To avoid the seletion of a lot of another product, we set a domain
showing only the lots of the current product.
When a serial number is set or changed on a move line during a picking,
we automatically set the quantity done to 1 because, you will always
process one quantity of the product having the serial number you've just
entered
It may be confusing that a constraint is not triggered in a name_create call.
Testing the absence of value should be done in an override of create, not in a
api.constrains.
Closes#18382
It is costly to compute all issues, return the full list of all issues, only to
compute the length and display it.
Use proper issue_count field.
Closes#18858
The reference widget is also meant to be used on a char field, not only on a
reference field.
The rev. https://github.com/odoo/odoo/commit/a4e30a1b43d0b9acd76508d9e6c466cd1dbdffab removed
the use of `field_utils.format.many2one` and replaced it by `_formatValue` to
support this use case.
The replacement wasn't complete as some occurences was remaining (in reset),
which led to traceback when the widget was reset (impossible to create an
External Identifier anymore).
Also, the reference `_formatValue` wasn't correct as it was displaying the
record `display_name` and not the reference field value ; this only makes sense
for the External Identifier as its display name is the reference field value but
it doesn't make any sense for other reference field.
Last but not least, this commit implements the `onchange` and `default_get` for
the reference field.
Use case to reproduce:
- Create multiple warehouse
- Select a warehouse to ressuply on a warehouse form view
- Go to the supplied warehouse form view
- Change the delivery method -> Traceback can't adapt stock.location type
This happens because there is a write method using a stock
location instead of its id.
This commit use the location id instead of location
Before this commit, the calendar view showed Sunday as the
first day of the week.
Now it depends on the user lang.
This is the same behavior that we had before the refactoring
of views.
before this commit, when a portal user edited its details, the State field was not updated on change of country_id
This was because a CSS class was missing.
We make the details template calling portal_layout as it should to get every resource we need in the rendering of details
OPW 767041
Closes#18984
When a product has multiple company taxes and b2c prices is enabled, price is
not computed properly and adds to the base price every company tax present.
This patch filters the company set on the company so taxes are computed just
for that company.
This closesodoo/doo#18840