Commit Graph
107623 Commits
Author SHA1 Message Date
Goffin Simon 130e71f2e4 [FIX] sale: _get_display_price with pricelist item based on other pricelist
Create a product P with a price = 1799
Make a pricelist P1 in USD with an item I1 for a product P with a
fixed price to 100.
Set P1 with discount_policy = "with_discount"(include in price)
Make another pricelist P2 in USD with an item I2 based on P1.
I2 is a formula = 50% of the price
Set P2 with discount_policy = "without_discount"
Create a SO with P2 for the product P

Bug: The subtotal of P is 899.5 instead of 50

The problem came from _get_display_price wich in this case recomputed
the price according to the discount(in this case equal to 50% and this is
the good discount to display because P1 include the discount) and the lst_price
of the product(=1799) So the displayed price was equal to 899.5 instead of
50.

All the other cases worked because

1.  P1 without_discount and P2 without_discount:

Price returned by _get_display_price was equal to 1799 with a discount of 97,2%
So the subtotal was equal to 50

2. P1 without_discount and P2 with_discount:

Price returned by _get_display_price was equal to 100 with a discount of 50%
So the subtotal was equal to 50

3. P1 with_discount and P2 with_discount:

Price returned by _get_display_price was equal to 50 with a discount of 0%
So the subtotal was equal to 50

And the last case(P1 with_discount and P2 without_discount) didn't work because:

Price returned by _get_display_price was equal to 1799 with a discount of 50%
So the subtotal was equal to 899.5

NB: The subtotal is computed with function "_compute_amount" with the following line:

price = line.price_unit * (1 - (line.discount or 0.0) / 100.0)

opw:724924
2017-04-05 09:25:18 +02:00
Lucas Perais (lpe) d24f86337e [FIX] account: account_reconciliation: t-values shouldn't be translatable
+ .pot update
OPW 706759

Closes #16239
2017-04-05 08:51:10 +02:00
Nicolas Martinelli c028e3806b [FIX] account: tax base on invoice report
Commit e1deead1cb introduces back the table of taxes. But it is still
incomplete:
- it should appear all the time
- the tax base should be included as well

Sources:
http://ccff02.minfin.fgov.be/KMWeb/document.do?method=view&id=21786bb3-69a0-4323-8631-aa898b988097#findHighlighted
http://www.ipcf.be/Uploads/Documents/doc_1704.pdf
http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2002:015:0024:0028:FR:PDF

opw-724519
2017-04-05 08:23:58 +02:00
Sergio Teruel Albert 5b670aa864 [FIX] fleet: access record fields on api.multi
Would not work if executed on several records

Closes #16218
2017-04-05 07:52:34 +02:00
Pedro M. Baeza dc8010c9b1 [CLA] Signature for Tecnativa
Done at #16241
2017-04-05 07:50:53 +02:00
Nicolas Lempereur 3ad1867ea4 [FIX] sales_team: get good team in multi company
When getting the default sales team, we could get erroneously the
team of another company (either because the use is in a team of another
company or the default sales team was in non-bethren company).

This fix when searching a sales team:

- search only teams the user should see (with access rules)
- make default teams "Website Sales" and "Direct Sales" not restricted
  to one company (and it's ancestors).

opw-726461
2017-04-04 17:57:07 +02:00
Josse Colpaert 11f0a5c29f [FIX] sale, purchase: better info on qty update in purchase/sale order line
When the quantities on a purchase or sale line decrease,
the amount of the receipt or delivery order is not adapted.
Also, when the quantities increase, it is good to follow it up.

That is why, when we change some quantity, a message is
posted in the chatter of the purchase/sale to indicate about
the change.  There is also a message when you add a new line.
2017-04-04 17:36:02 +02:00
Goffin Simon 42e1efded5 [FIX] web_kanban: column_add_record
When grouping by a field datetime in kanban view, the name of the
column is an abreviated datetime. Afterwards, when making a quick
create, the abreviated datime was set in the context and
used as default value. So it raised a tracebacks because the value
of the datetime was not in the correct format.

Now it's only possible to make a quick create if the type of the field grouped
is a char, a boolean or a many2one.

opw:727266
2017-04-04 15:19:42 +02:00
Lucas Perais (lpe) fc0d2e2c83 [FIX] account: Dashboard used to open provider bills instead of customer invoice
Correcting patch on PR16042 by Alexis delatre
OPW 726679
Closes #16210
2017-04-04 09:48:54 +02:00
Martin Trigaux ec17d636a9 [FIX] point_of_sale: allow to create more than one rescue session
Fixes #15101 (cf comment 273208287 for details)
Closes #15862

Restore the rescue mechanism from v9, without the field it will be based on
the session name containing '(RESCUE FOR'

Add tests
2017-04-03 15:19:37 +02:00
Goffin Simon ef5fee54b2 [FIX] account_asset: typo error
To follow this commit: 07cbde54d6

opw:724571
2017-04-03 14:42:56 +02:00
David Tran 3d696be967 [CLA] add team members to the tvtmarine-automation CLA
Done at #16200
2017-04-03 10:56:51 +02:00
Jerther 925d8175f5 [CLA] Corporate signature for MetalSartigan
Métal Sartigan accepts the CCLA

Done at #16185
2017-04-03 10:37:29 +02:00
Wolfgang Taferner 51975ccf5a [FIX] doc: wrong header syntax for field 2017-04-03 10:08:37 +02:00
Odoo Translation Bot 48bf1bc863 [I18N] Update translation terms from Transifex 2017-04-02 04:32:01 +02:00
Lucas Perais (lpe) 635f6931d4 [FIX] event: the field mail_registration_ids is a technical one.
It cannot be used for micro-management of what mail has been sent or not and to whom
OPW 725633
2017-03-31 11:55:46 +02:00
Wolfgang Taferner 0fd502ed9f [IMP] point_of_sale: allow to override auto printing
As show is needed to call super it is impossible to override the
function without running into the immediate print. It is possible though
that you might need some delay that local CPU has rendered everything on
the PoS Ticket before printing...based on this you are able to override
the handle_auto_print and add a delay there.

Closes #16174
2017-03-31 10:12:42 +02:00
Martin Trigaux 0942ae9b29 [CLA] signature for OnTruck
CLA signature sent at opw-726787
2017-03-31 09:42:01 +02:00
Martin Trigaux aaa2000c01 [FIX] doc: correct markdown for CLA signature
Code part was not rendered
Probably introduced at
https://github.com/blog/2333-a-formal-spec-for-github-flavored-markdown
2017-03-31 09:38:06 +02:00
Goffin Simon b8ce0db8e1 [FIX] website_quote: translations for website_description
When creating a SO with a quote template(QT), the website_description
of the QT is transfered with the lang of the partner to the field
website_description of sale.order model(in onchange_template_id on
sale.order model). But when changing the partner_id on the SO, the
lang of the new user was taken into account.

opw:697893
2017-03-30 14:42:52 +02:00
Nicolas Martinelli f60c18d832 [FIX] website_sale: product detail scroll
On mobile view, in the product detail page, the image of the product
fills the largest part of the screen. However, when the user tries to
scroll by clicking on the image, it zooms on the image instead of
actually scrolling. This is confusing for the users who report that they
cannot buy anything on the webshop.

A solution is to simply deactivate the zoom on mobile.

opw-704026
2017-03-30 11:15:55 +02:00
Nicolas Martinelli 7bbbc6f12d [FIX] account: decimal precision
Missing decimal precisions.

opw-726110
2017-03-30 10:32:07 +02:00
AZER c00a131309 [FIX] point_of_sale: add missing sudo
Main journal is not accessible for user from different company,
a security error is raised during the default get

A pos manager could not create a new pos configuration without create rights on
ir.sequence (only admin has by default)

Closes #16063
2017-03-29 16:08:09 +02:00
AZER 74f46a3980 [CLA] signature for monami7001
Done at #16063
2017-03-29 16:08:09 +02:00
Goffin Simon 0ff9af64ef [FIX] hr_expense: Creation of entries from several expense lines
When posting journal entries for an hr.expense.sheet with several expense lines
(by clicking on the button "Post journal entries"), all the account move lines
created for the same sheet must be linked to the same account move because
the model hr.expense.sheet has just a field "account_move_id" to access all the entries
(by clicking on button "Accounting Entries")

This commit reverts f97eb0ac2b

opw:715523,709930,725798,716239
2017-03-29 13:11:25 +02:00
qsm-odoo 72fa3e8bda [FIX] web: properly display tooltips with much data
When there is a lot of texts to display in a tooltip, it will overflow
the viewport vertically as the max-width of the tooltip is set at 200px
(bootstrap default). This commit increases the max-width to the
viewport full-width.

opw-725804
2017-03-28 16:45:35 +02:00
Christophe Simonis c37f1f6cb9 [MERGE] forward port branch saas-11 up to 8bab7aebd6 2017-03-28 16:17:09 +02:00
Christophe Simonis 8bab7aebd6 [MERGE] forward port branch 9.0 up to e876becada 2017-03-28 16:14:34 +02:00
Martin Trigaux 26df9e8900 [FIX] doc: escape correctly code
Was rendered 'UNKNOWN NODE title_reference'

Closes #16064
2017-03-28 16:04:54 +02:00
Christophe Simonis e876becada [MERGE] forward port branch saas-6 up to 7bcfa2b52a 2017-03-28 16:01:05 +02:00
Sébastien Le Ray 90a5e7f38b [CLA] signature for beuss
Done at #16065
2017-03-28 15:57:47 +02:00
Christophe Simonis 7bcfa2b52a [MERGE] forward port branch 8.0 up to 5fc3979262 2017-03-28 15:22:58 +02:00
Jairo Llopis 5fc3979262 [FIX] web: Avoid double-fetching many2many tags in list views
Before this patch, #15920 was happening. The problem was that calling `render_cell` produced a call to [`record.set(column.id + '__display', value)`][1], which triggers the `change` event, which called `render_record` the first time, which called again `render_cell` and produced the 2nd data fetch.

After this patch, `render_record` is only called if there is some place where to put the result, which does not happen in those situations.

There is still the problem that there is one call to name_get for each many2many widget found in a list view (instead of one per full view rendering), but at least they are not two calls!

[1]: https://github.com/odoo/odoo/blob/5d17749ff47c02294d5ff2ae56bbcef9d082562e/addons/web/static/src/js/view_list.js#L1125
2017-03-28 15:12:56 +02:00
Wolfgang Taferner 8e7f34c323 [FIX] web: domains might be undefined, so we check
Introduced recently in b2d66d0c14

opw-726354
Closes #16068
2017-03-28 15:02:47 +02:00
Christophe Simonis 27496730d8 [MERGE] forward port branch saas-11 up to c2569b9df1 2017-03-28 14:51:14 +02:00
Nicolas Martinelli 0dbc8b0e58 [FIX] hr_holidays: compute number of days
- Create a user with only "Employee" as only right
- Create a leave

An access error occurs.

opw-726049
2017-03-28 14:41:36 +02:00
Nicolas Martinelli 59a6397867 [FIX] stock: sort moves to do
- Activate the MTO route on SO lines
- Activate the route "Buy" on a Product A without quantity on hand, add
  a supplier
- Create a SO with 2 lines. First line is Product A, second line is
  Product A with route MTO
- Confirm the SO, run the procurement if necessary
- Confirm the PO, receive the products
- On the picking generated from the SO, you should have one line
  "Waiting Availability" (the line not MTO) and one line "Available"
  (the line MTO).
- Click "Recheck Availability". One reserved quant from line 2 is moved
  to line 1.

A trick is to assign first the move with ancestors, so we don't "steal"
the reservation on the other move.

Fixes #15950
opw-725373
2017-03-28 13:30:29 +02:00
Christophe Simonis c2569b9df1 [MERGE] forward port branch 9.0 up to 30dda3faee 2017-03-28 13:21:24 +02:00
Christophe Simonis 30dda3faee [MERGE] forward port branch saas-6 up to 8fd0f8664b 2017-03-28 13:16:16 +02:00
Goffin Simon 099081ae79 [FIX] hr_maintenance: Field owner_user_id not used in form view
In maintenance.equipment form view, the field owner_user_id has been replaced
by equipment_assign_to, employee_id and department_id. But in the kanban view,
this field was still displayed even though the image was replaced by the image
of the employee. So now, the kanban view follows the same behavior as the form view.

opw:724378
2017-03-28 13:09:05 +02:00
Martin Trigaux e25dad4fed [I18N] point_of_sale: missing source terms reference 2017-03-28 12:49:01 +02:00
qdp-odoo e2a239f4a4 [FIX] account: fix test.
This was broken since commit 925440b7a0 that was specifically restricting the closing of a FY if any unposted move was left in the system.
2017-03-28 11:59:00 +02:00
qdp-odoo 925440b7a0 [FIX] account: restrict fiscalyear closing if there are still unposted entries 2017-03-28 10:49:32 +02:00
Nicolas Martinelli c9545bda30 [FIX] purchase: invoice status
- Create a PO with a product "Control Purchase Bills" set to "On
  received quantities".
- Validate the PO.

The invoice status is "Waiting Bills", while it should be "Bills
Received".

opw-726245
2017-03-28 10:30:06 +02:00
Jeremy Kersten 7c95c14c06 [FIX] website_sale: apply _fix_tax_included_price similary to sale module
If you had a price with a tax included and the user has fiscal position.
The tax included in the unit price was not substract before the mapping.

Eg: product $115 with tin 15% included in price.
Once in the cart with a fiscal position intracom (0% tva), the unit price
should be 100$ and not 115$.

This commit closes #16022
2017-03-28 09:35:38 +02:00
Serpent Consulting Services Pvt Ltd 6a64d2dd8f [FIX] hr_attendance: fix singleton error
This commit closes #15805
2017-03-28 09:35:38 +02:00
Nicolas Martinelli 83a2947d98 [FIX] l10n_be: incorrect tax types
opw-726242
2017-03-28 08:38:26 +02:00
Nicolas Martinelli ee8fbcbeae [FIX] mrp: same unique SN
- Create a product with unique SN, create a BOM for this product
- Create a MO to produce 2 units
- Produce the first unit, create a lot number
- Produce the second unit, use the previously created lot number

Nothing prevents the user to do this. However, the user won't be able to
set the MO as "Done", but it is better to prevent the issue as soon as
possible.

opw-724944
2017-03-27 18:13:26 +02:00
Pierre Masereel 7a039c730d [FIX] stock: multiple global push rules with same origin
When you have multiplle global push rules with the same source location,
a traceback is raised because the '_apply' method of
"stock.location.path" is called with more than one record, and doesn't
handle multiple record.

To fix this, we limit the number of records returned when a global rule
is searched to 1 (as for other 'search' of push rules in this file).

This bug has been introduced during migration in rev: https://github.com/odoo/odoo/commit/cb486d7eb6353a66eea2cb3610141b4f3a778791

opw-725874
2017-03-27 17:36:25 +02:00
Raphael Collet 48c773de1d [FIX] base: do not create field x_name when importing a model definition (#16039) 2017-03-27 17:28:23 +02:00