Commit Graph
113779 Commits
Author SHA1 Message Date
Simon Lejeune c6c802aac6 [FIX] purchase: kit and unit price
When buying a kit, the components should not get their unit price on the
kit. By doing this patch + a previous that set the unit_price on the
move as copy False, it'll take the standard price.
2017-11-14 17:44:15 +01:00
Simon Lejeune 99b9874ab3 [FIX] mrp, purchase_mrp: purchase_line_id also with kits
When confirming a move for a kit, it is basically unlinked and replaced
by moves for its component. The link to the purchase line was kept in
v10, but since rev[1] it is not anymore. Make an helper to get the
values and override it in purchase_mrp to add the purchase line link.

[1] https://github.com/odoo/odoo/commit/8248f0e153ae5fcc1449d0d05149b61df615ad4f

opw 779497
2017-11-14 17:44:15 +01:00
Simon Lejeune a4740861d3 [FIX] stock, stock_account: return
A return should be valued at the standard price. As the `price_unit`
field is not set as copy=False and a return move is a copy of the
original move, the valuation was wrong.

opw 779803
2017-11-14 17:44:09 +01:00
Simon Lejeune 7a4ab354be [FIX] stock_account: in or out move consideration
Only looking on the stock move to determine if a move should create
accounting entries is not enough: it is possible that sublocations
implement some strategies that impact the valuation (example: a move
between stock and stock where the move lines move things to a scrapped
location).

We now look on the move line and if any of the move lines is IN, the move
is IN, if any of the move line is OUT, the move is OUT, if there's a
mix, the move is invalid.
2017-11-14 17:39:08 +01:00
Simon Lejeune 48f4ce4afa [FIX] stock_account: the quantity to value depends on the sublocations
We can imagine a scenario into which the main stock location (wh/stock)
is set as a view location to force people to put things in the
sublocations. Since the stock_account refactoring, only the location of
the stock move is considered to know if the locations should be valued
and, if so, the quantity to value. It is problematic since a view
location shouldn't be valued, but if its move lines put or take things
to or from a valued location to a non valued one, the valuation
mechanism should run.

We now introduce these specifications to handle this kind of usecase
correctly:
- the authority to get the price_unit is on the stock move
- the authority to now how much quantity should be valued is delegated
  to the move lines.
2017-11-14 17:36:52 +01:00
Simon Lejeune 20c19560cd [FIX] stock_account: to value or not to value
The initial condition was too naive, it only checked the presence of
company_id on the concerned locations. This is problematic because
people need to create, for instance, multile inventory loss locations
once they have multiple companies, as the accounts set on the locations
are not property fields.

We also use the same condition to determine if the move is IN or OUT on
the move valuation mechanism and the accounting entries creation
mechanism.
2017-11-14 17:26:37 +01:00
jpr-odoo fb7e1ed238 [FIX] payment: correctly display additional payment icons when clicking on "and more" in payment form
Instead of being redirected to the top of the page. Which is probably not
good uzabilitiouaïze.
2017-11-14 17:00:42 +01:00
Thibault Delavallée 4d5d228b15 [FIX] sale_payment: effectively pay and reconcile invoices when journal is configured
Indentation issue leads to pay and reconcile mechanism being called
only when no journal was set, which is not the real use case.
2017-11-14 17:00:42 +01:00
Thibault Delavallée b34ce85228 [FIX] sale_payment: do not try to reconcile invoice if no journal or default journal found
Do like in account_payment/models/payment.py
2017-11-14 17:00:42 +01:00
Thibault Delavallée 03068f7ec8 [IMP] sale_payment: avoid defining out-of-the-blue context keys when odoo behavior is sufficient
As what has been implemented is basically a default, let us use the default
mechanism of odoo.
2017-11-14 17:00:42 +01:00
Laura Piraux d1c705a990 [FIX] stock: display lot_id instead of lot_name
The lot_name is only used on receipts.
2017-11-14 16:44:14 +01:00
Yenthe V.G f4d08ade92 [FIX] doc: remove reference to old vs new API
There is only one API, long live Odoo's API!

Closes #20928
2017-11-14 16:27:33 +01:00
Wolfgang Taferner 0dcf139aa7 [FIX] website_sale: missing sudo for website public + portal user
Portal user and public user do not have access on account.tax

Was already fixed at  #19153 but lost in forward port

Closes #20802
2017-11-14 15:46:10 +01:00
Nicolas Martinelli dde554726b [FIX] fetchmail: P3 compatibility
Fixes #20857
opw-782318
2017-11-14 15:41:17 +01:00
Naglis Jonaitis b52244e15b [FIX] web: removes duplicate id attribute inside DB manager template
Closes #20855
2017-11-14 15:25:15 +01:00
rde a9e3116cf2 [IMP] website_form: add state code to the created lead
Before this commit, when you had a lead coming from your website form, you
had no informations from where it was located.
It was especially painful for USA which should add customer their location to
know their timezone and know at which time they could call him.

Now, the state code is added to the created lead. It is easy to figure what
timezone the user is on without contacting him first to ask.

This closes #20424
task-29784
2017-11-14 15:10:45 +01:00
Wolfgang Taferner 66a82fd4e4 [FIX] stock: drop useless access rights "reduction" for manager
As a stock manager has anyway implied access rights from the user who
has all rights for stock.production.lot
2017-11-13 17:34:21 +01:00
Arnold Moyaux 6b7ac1c5d7 [FIX] stock: wrong default date with inventory at date
When choosing inventory at specific date the default value
is the start time of the server instead of the current time.

When using fields.Datetime.now as default value, will set the function
as default and future object will need to evaluate the funcion each time an
object without default is created. fields.Datetime.now() will evaluate the
function once at the server start and use the retun value as default value
for future objects.
2017-11-13 17:33:17 +01:00
Arnold Moyaux 8900dc2204 [FIX] stock: backorder uom issue
Use case to reproduce:
- Sell 1.1 unit
- Validate the picking with 1 unit
- With or without backorder the initial demand is 0.999
- The backorder initial demand is 0.101

It happens because _compute_quantites uses 'UP' by
default. Since 1.1 - 1.0 equals 0.10000000000000009
we face the problem.

This commit uses an 'HALF-UP' instead. It should not generate
any problem since float_compare in order to decide if we need
a back order or not use a float_round on the same precision_digits
2017-11-13 17:32:22 +01:00
Simon Lejeune 186ae1c288 [FIX] stock: update qty on hand in multi company
A similar issue and a similar fix as rev 8955d15e9d

Fixes #20889
2017-11-13 16:58:47 +01:00
Pierre Masereel 9afa83bb6a [FIX] sale: unable to install module sale
When you have another module installed before sale, and ever changed
some settings, a record of res_config_settings exists and when you
install sale, it cannot set a value for the required new column
'sale_show_tax' for existing records.

To fix this, we have set back the default values on the required field
'sale_show_tax' that has been removed in commit: https://github.com/odoo/odoo/commit/71e5c8b0b5bb10f571030a25875e33b25cda073d
2017-11-13 15:52:39 +01:00
Nicolas Martinelli 7606878a78 [FIX] account, auth_signup, sale, website_sale: settings robustness
- Delete the tax corresponding to the default 'Sales Tax'
- Access the Accounting settings

Error since record could not be found.

In the case of an `ir.config_parameter` referring to a record ID
(i.e. Many2one), the deletion of this record is not propagated to the
associated `ir.config_parameter`. Therefore, the system tries to access
a deleted record without fallback.

It's not really possible to solve it globally in a stable version, but
we can manually handle these cases by providing a fallback (usually
return `False`).

opw-781864
2017-11-13 13:19:53 +01:00
Géry Debongnie 75b0393454 [FIX] web: remove slow css rule
We do not take CSS seriously enough, but it has an impact on rendering
speed.  The rule removed in this commit slowed down the Qunit JS test
suite by a considerable amount:

With a fresh db with no extra addon installed, community version:

- in chrome, before this commit: 103.2s, with this commit: 54.8s
- in firefox, before this commit: 194.9s, with this commit: 117.7s

This is due to the way rendering is done in web browser.  They start
checking css rules from the right, so the *:nth-last-child(2) rule was
checked for every element in the dom, each time it was added/modified.
Note that the rule just above (*:first-child) had no noticeable impact,
but I still think that the universal css selector should still be
avoided in general.

The fun part is that I did not find the place where this rule was
supposed to be applied.  I assume that it is just a dead rule.  If this
is not the case, we can reintroduce the margin-top with the class mt0,
applied on the specific element.
2017-11-13 11:59:23 +01:00
Aaron Bohy b8fb8ad3f0 [FIX] account_asset: never hide depreciation widget
Before this rev., the widget was hidden when the value of its
corresponding field (move_check) was falsy. However, it should
always be visible, regardless its value.

opw 781628
2017-11-13 11:28:48 +01:00
Aaron Bohy 995610c065 [FIX] web: JournalDashboardGraph widget crash
The JournalDashboardGraph requires nv, which is lazyloaded. Before
this rev., a crash occurred when this widget was instantiated and
destroyed before the loading of the lib was complete (because a
function of the lib was called in destroy()).

For instance, press F5 (to ensure that nv isn't already loaded),
activate some throttling in the network tab, go to Accounting and
as soon as the dashboard shows up, click on another menu.

opw 781628
2017-11-13 11:18:56 +01:00
William Henrotin f80d043af2 [FIX] sales_team: impossible to print sale report.
The sale channel report was enable to be printed because a date was
computed from float numbers instead of integer. See opw-779713 for more
details.
2017-11-13 10:30:31 +01:00
Odoo Translation Bot 48e8282130 [I18N] Update translation terms from Transifex 2017-11-12 04:24:48 +01:00
Olivier Dony 56588e8d44 [FIX] ir_sequence: add support for PG 10
PostgreSQL 10 move sequences' metadata fields into a new `pg_sequence`
system catalog. As a result, selecting from a sequence relation now
only return three fields, and does not include the `increment_by`
metadata field anymore.

This patch obtains the `increment_by` value from the new system catalog
for PostgreSQL server versions >= 10.

Fixes #20269
2017-11-11 01:13:25 +01:00
Martin Trigaux 07fa8d9b97 [FIX] fleet: model description
It actually represent the brands, not the model of a car

Courtesy of the translator teams
2017-11-10 16:51:19 +01:00
Romain Derie dbce2491fe [FIX] website: Incorrect 'Go to page' link in page properties dialog
Before this commit, clicking on 'Go to page' in a page properties dialog would
redirect user to an incorrect link (relative vs absolute) because the link
would not have a leading slash. (We removed it earlier to hide it in the input)

Now, the link is correct
2017-11-10 16:39:01 +01:00
Barad Mahendra 996a817071 [FIX] website_sale_stock: effectively give access to delivery slip on customer portal
If customer has access to its sale order it should have access to the
linked pickings. It checks customer either has access to the delivery
slip record either has an access token coming from the linked sale
order.
2017-11-10 14:54:36 +01:00
Géry Debongnie 350973ff36 [FIX] web: prevent test interference
In the view dialog test suite, a few tests created a parent widget, then
created a view dialog, and destroyed the view dialog at the end, but not
the parent widget.  As a result, the environment was not properly
restored at the end.

In this case, the test 'SelectCreateDialog correctly evaluates domains'
changed the session (with user_context: {uid: 2}), and this made other
tests crash (web_editor test in particular)
2017-11-10 12:06:04 +01:00
Aaron Bohy 9bc5009481 [FIX] web(_editor): enable mobile tests
This rev. introduces a new test suite meant to test the webclient
components on mobile devices. The key 'config.device.isMobile' is
forced to true in this test suite, so that mobile specific JS files
are properly executed, which isn't the case in the classic JS test
suite (setting isMobile to true in the test definition is too late,
as the JS files are already processed).

For now, this new test suite contains a single test, which was
skipped until this rev. as it couldn't be executed in the classical
JS test suite.

Both suites are executed at each build of the runbot, and they
can be manually executed from the webclient as well (via the debug
manager).
2017-11-10 10:24:42 +01:00
Joren Van Onder b4debf7e1b [FIX] point_of_sale: take into account extra variant prices
list_price is the base price of a product which does not include
price_extra.

Note that in the backend the pricelist computation uses

product.price_compute('list_price')

to compute the base price on which to apply the pricelist. For
product.product this seems to be equivalent to the lst_price computed
field.

The original list_price field is unused but has not been removed to
avoid breaking any 3rd party code that is using this field.

opw-781629
2017-11-09 16:05:07 -08:00
Christophe Simonis 26257ad7a1 [FIX] test_performance: bump query count
When `rating` is installed, a few more queries are executed...
2017-11-09 20:35:54 +01:00
Christophe Simonis e74ef6cfb9 [FIX] test_performance: bump query count
Recent changes in tracking fields add a new query. Adapt tests.
2017-11-09 19:44:38 +01:00
Christophe Simonis de93645fe3 [MERGE] forward port branch saas-16 up to 82add438f2 2017-11-09 19:16:05 +01:00
Christophe Simonis 82add438f2 [MERGE] forward port branch saas-15 up to 90ca872071 2017-11-09 18:05:49 +01:00
Yenthe V.G acd26691ee [IMP] stock: Show title instead of id in breadcrumb
Closes #20801
2017-11-09 16:54:20 +01:00
Christophe Simonis 90ca872071 [MERGE] forward port branch saas-14 up to d171f282c3 2017-11-09 16:49:41 +01:00
Christophe Simonis d171f282c3 [MERGE] forward port branch 10.0 up to f8540501ac 2017-11-09 16:19:21 +01:00
Martin Trigaux f8540501ac [FIX] hr_expense: verify the constrain server side too
The groups were set only on the view which does not prevent abuses.
The fact that users can bypass the groups on the view is not critical as the
changes are logged but this should be improved nevertheless.

In master, proper record rules should be set.

Closes #20427
2017-11-09 15:51:14 +01:00
Christophe Simonis 9c634b5b30 [MERGE] forward port branch 10.0 up to a63ecee47a 2017-11-09 15:16:57 +01:00
Géry Debongnie ae4501da9c [FIX] web: do not lose onchange info in some rare cases
Here is a situation where we had a problem:
- a form view with a one2many field, which has no inline views
- the (non inline) list view has a field A, and is not editable
- the (non inline) sub form view has fields A and B, with an onchange on
  B which modifies A

In that case, the user could do this:
- go to edit mode
- click on 'add' a new one2many line
- change the value of B in the form view, this changes the value of A
- click on save to close the modal form view
- click on the new o2m record to reopen the modal form view
- rechange B
=> the onchange does not work

The explanation is that when we reopen the modal, we update the known fields
information, but we had to perform a fieldviewget to fetch the list
view, so we have a full knowledge of the fields.  However, the code did
not update the fields info (because it uses _.default), which means that
the onchange information contained in the form view is lost.

Note: the test system had to be adapted to more closely simulate what
actually happens.  In particular, the onchange flag is no longer added
by the mock server, since it should be done by the data manager, like
'real' code.  This change broke the basic model tests, which had to be
modified accordingly, by setting manually the onchange flag.
2017-11-09 14:03:35 +01:00
Simon Lejeune a29ec80082 [FIX] stock: _assign_picking
Commit[1] tried to improve the usability of the pick + pack + ship + a
fixed procurement group scenario by erasing the origin value on the
groupped ship that refered wrongly to only the first downstream document
(and in fact refered to multiple).

We forgot the scenario into which we add a sale order line. In this
scenario, we also go through `_assign_picking` and, if an existing open
picking is found, we also wiped its partner and origin value, which was
indeed wrong.

We fix this scenario by being more precise on the erasing condition.

[1] 4a5f07654f
2017-11-09 13:07:00 +01:00
Adrien Dieudonne fe4f63d325 [FIX] web: create in editable grouped list views
Before this commit, an issue occured when you tried to
create a new record in a editable grouped list view.
A new line was created with an undefined group.

Editable grouped list views are not supported.
So now, we have to switch on the form view when
you click on create. This behavior is already implemented
when you open an existing record.
2017-11-09 11:45:04 +01:00
Goffin Simon a63ecee47a [FIX] website_sale: Wrong apply of the fiscal positions when choosing shipping address
In 11.0, this part of the code has been removed.

When choosing the shipping address in the cart, if a tax has been mapped
by a fiscal position, the subtotal was not correctly computed.

opw:778405
2017-11-09 11:44:38 +01:00
Fabrice Henrion 053209fb0e [FIX] mail: add missing space
Closes #20782
2017-11-09 10:58:38 +01:00
Martin Trigaux b1bf99b7e3 [FIX] base: correct Model Overview report
Since 3d04e448, the reports must start with a `article` class, not `page`.
The report was not adapted.

Fixes #20066
2017-11-09 10:56:52 +01:00
Lucas Perais (lpe) 7c486b4d0c [FIX] mail: visitor to portal_user should keep livechat channel
adapting #20279 to v10

Before this commit, when starting a livechat session as a public user and continuing as a portal user, the livechat crashed
(the poral user couldn't see the channel created before as Admin)

After this commit, the conversation is kept and security insured by the uuid in the cookie

OPW 775568

closes #20281
2017-11-09 10:44:37 +01:00