Commit Graph
111551 Commits
Author SHA1 Message Date
Xavier Morel 56704c19d6 [FIX] account: iteration different under ordereddict mutation
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.
2017-08-23 19:00:17 +02:00
Christophe Simonis 877e709871 [MERGE] forward port branch saas-16 up to db0810dc6e 2017-08-23 18:20:46 +02:00
Christophe Simonis db0810dc6e [MERGE] forward port branch saas-15 up to 0cfbc7581f 2017-08-23 18:15:56 +02:00
Christophe Simonis 0cfbc7581f [MERGE] forward port branch saas-14 up to f8bf335aea 2017-08-23 18:14:18 +02:00
Christophe Simonis f8bf335aea [MERGE] forward port branch 10.0 up to 420e433fa3 2017-08-23 18:12:24 +02:00
Christophe Simonis 420e433fa3 Revert "[FIX] website_sale: Avoid compute tax for every company"
This reverts commit 04cddc447b.

Public user can't read taxes (map_tax() only play with ids)
2017-08-23 18:07:38 +02:00
Christophe Simonis 30bd5ac0e9 [MERGE] forward port branch saas-16 up to aec6248bb3 2017-08-23 16:44:58 +02:00
Christophe Simonis 7f2bd08608 [FIX] core: define float_utils.round also in python2 2017-08-23 16:31:57 +02:00
Jérome Maes aec6248bb3 [FIX] sale_timesheet: apply correct discount in revenue computation
The discount is saved as a percentage, not in a decimal value
between 0 and 1.
2017-08-23 15:21:38 +02:00
Jérome Maes a8bb544628 [FIX] sale_timesheet: take care of the UoM for revenue computation 2017-08-23 15:21:37 +02:00
Jérome Maes 3bcea6389a [FIX] sale_timesheet: color invoiced timesheet on task
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.
2017-08-23 15:21:37 +02:00
Jeremy Kersten a5d05ae783 [FIX] mass_mailing_event_track: remove duplicated string
Text was displayed 2 times
2017-08-23 15:18:11 +02:00
qsm-odoo e0d5a875f0 [FIX] web: make "slow" create of m2o fields work
There were some coding mistakes since some changes introduced by
https://github.com/odoo/odoo/commit/d19671f0d0ff7189055cbe0794afed32f8a387e6
2017-08-23 15:14:37 +02:00
Christophe Matthieu 11af3b7339 [FIX] account: unless query when remove partner in reconciliation widget
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.
2017-08-23 14:47:49 +02:00
Christophe Matthieu 0b4f3542b2 [ADD] account: reconciliation widget, add load more button in widget to load more statements 2017-08-23 14:46:07 +02:00
Christophe Matthieu cf03a74c32 [IMP] account: reconciliation widget: add a test for load more button 2017-08-23 14:45:46 +02:00
Cedric Snauwaert 1de418aa7a [ADD] account: reconciliation widget, add load more button in widget to load more statements 2017-08-23 14:45:46 +02:00
Xavier Morel 8361ec8819 [FIX] phantomjs for p3
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.
2017-08-23 14:34:50 +02:00
Xavier Morel 1cec339092 [FIX] account: bug which blows up in P3
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
2017-08-23 14:34:50 +02:00
Xavier Morel 1b3ac016af [FIX] account: P3 invalid comparison
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.
2017-08-23 14:34:50 +02:00
Xavier Morel a65dfe2421 [FIX] P3: exception semantics issues 2017-08-23 14:34:50 +02:00
Xavier Morel f315ea4b71 [FIX] resource: P3 rounding issue 2017-08-23 14:34:50 +02:00
Xavier Morel 9d0af3c72c [FIX] web_editor: P3 io error
Views archs (and sub-archs) should be serialized to and deserialized
from unicode, not bytes.
2017-08-23 14:34:50 +02:00
amoyaux 857778fa94 [FIX] stock: move entire pack with multiple quants
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.
2017-08-23 14:24:11 +02:00
Martin Geubelle 65ecd109a5 [FIX] web: reimplement conditions in the "Set Default" dialog
The rev. https://github.com/odoo/odoo/commit/49f0413290821cb123e75b4546873cf98edf1d25 reintroduced
the "Set Default" dialog but forgot the conditions part.

This rev. reintroduces the missing part.
2017-08-23 13:53:18 +02:00
Christophe Simonis 59f8b849fb [MERGE] forward port branch saas-15 up to d5f2a38b50 2017-08-23 11:23:08 +02:00
Nicolas Martinelli 3b232b9eff [FIX] link_tracker: do not track 'tel:' or 'sms:' links
- 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
2017-08-23 11:08:19 +02:00
Nicolas Martinelli b3590bc58e [FIX] mrp: change lots in produce
- 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
2017-08-23 10:17:49 +02:00
Nicolas Martinelli fa36e98368 [FIX] website_sale: default "Product Prices" value
The default value should be 'subtotal' in the website settings, since it
is already the case in the sales settings.

opw-766024
2017-08-23 09:56:41 +02:00
Benjamin Willig 00125215f7 [FIX] Allow inheritance to change writeoff lines values
Allow inheritance to change writeoff lines values in function _create_writeoff

opw:766422
2017-08-23 09:45:48 +02:00
Olivier Dony dbdf994df8 [FIX] account: do not show payment data to non-billing users
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.
2017-08-23 03:03:49 +02:00
Nicolas Martinelli cda1bc55af [FIX] product_extended: traceback on bom_count
Complement of commit 543f75f46e

opw-766678
2017-08-22 18:25:45 +02:00
Jeremy Kersten 2850612d37 [FIX] sale_timesheet: update test comparaison
Use float_repr to get the comparison value into the log

Add this log to debug why this test make runbot red randomly.
2017-08-22 17:38:20 +02:00
Jeremy Kersten f2cc28268c [FIX] website_crm_partner_assign: fix signature escaping
| safe was applied on '' and not user.signature
So the mail was send with the signature in text plain
2017-08-22 17:38:20 +02:00
Borni DHIFI c02f9e433d [CLA] signature for Borni DHIFI
Closes #18989
2017-08-22 17:27:58 +02:00
Pierre Masereel cde29c29eb [FIX] stock: compute location on quant package
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
2017-08-22 17:20:56 +02:00
Christophe Simonis d5f2a38b50 [MERGE] forward port branch saas-14 up to 6956ad54de 2017-08-22 17:20:15 +02:00
Christophe Simonis 6956ad54de [MERGE] forward port branch 10.0 up to 6dc0f31415 2017-08-22 16:45:43 +02:00
Pierre Masereel 472384e658 [FIX] mrp: Only show lots of consumed product
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.
2017-08-22 16:44:29 +02:00
Christophe Simonis 6dc0f31415 [MERGE] forward port branch saas-11 up to 92ec666f8d 2017-08-22 16:28:10 +02:00
Pierre Masereel 56b0e29c4f [FIX] stock: auto complete serial number product quantity
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
2017-08-22 16:27:03 +02:00
batuto feef39aee0 [IMP] doc: add warning about constrain method trigger
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
2017-08-22 15:46:48 +02:00
Holger Brunn 8a4a232e54 [FIX] project_issue: use issue_count instead of counting issues
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
2017-08-22 15:25:12 +02:00
Martin Geubelle dbab6f7417 [FIX] web: advanced use of widget reference
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.
2017-08-22 14:18:14 +02:00
amoyaux 92ec666f8d [FIX] stock: change delivery method on a supplied warehouse
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
2017-08-22 14:15:46 +02:00
Adrien Dieudonne 717b472ef9 [FIX] web: calendar: first day of the week
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.
2017-08-22 14:03:12 +02:00
Christophe Simonis e68da600de [MERGE] forward port branch 9.0 up to caf78d22e1 2017-08-22 13:55:05 +02:00
Lucas Perais (lpe) e38de9dfa4 [FIX] website_portal: modify user details should inherit from portal
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
2017-08-22 13:33:35 +02:00
Christophe Simonis 902fc764d5 [FIX] mail: only set header value for emails (not comments) 2017-08-22 13:32:34 +02:00
David Vidal 04cddc447b [FIX] website_sale: Avoid compute tax for every company
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 closes odoo/doo#18840
2017-08-22 13:18:05 +02:00