Commit Graph
358 Commits
Author SHA1 Message Date
Nicolas Lempereur 8e77632e58 [FIX] *mail_thread: don't modify modified help
The 'help' of window action is often fiddled with, adding thing before,
after or arround it.

For example in CRM leads, we add at the beginning "Click to add a new
opportunity" with an arrow towards the button, and after if there is a
mail alias: "All email incoming to * will automatically create new...".

But for crm.lead, hr.expense, sale.order this would not take into
account that the fiddled "help" can be edited, so if we edit 2 times
help in studio or backend action editing, we would get:

  Click to add a new opportunity
  Click to add a new opportunity
  Click to add a new opportunity
  [Original help content]
  All email incoming to * will automatically create new...
  All email incoming to * will automatically create new...
  All email incoming to * will automatically create new...

And see several "arrows" towards the button (in enterprise the
additional ones are on same color background).

With this commit we do what is done in "mail.thread" by default which is
not fiddling with the `help` if has been fiddled before (if it contains
"oe_view_nocontent_create" class).

note: this is the 11.0 version of #26912

opw-1877663
closes #26911
2018-09-12 13:18:35 +02:00
Nicolas Martinelli 79a7d58a1c [FIX] sale: prevent confirmation of SO
Prevent the confirmation of a SO in state 'cancel' or 'done'.

opw-1881333
2018-09-06 15:05:09 +02:00
Goffin Simon 3504529fb5 [FIX] sale: Server Error when trying to process card
Due to this commit: b367625248
The function "_get_payment_type" was not defined in module "sale_payment" but defined in "website_quote"
The bridge module for "website_quote" and "sale_payment" is "sale" so the first definition of "_get_payment_type"
must be in "sale".

opw:1881990
2018-09-06 08:36:04 +02:00
Christophe Simonis 2a13863f43 [MERGE] forward port branch saas-15 up to 653bbbc733 2018-09-04 17:02:36 +02:00
Christophe Simonis 653bbbc733 [MERGE] forward port branch saas-14 up to 14f8ef59b8 2018-09-04 16:48:31 +02:00
Christophe Simonis 14f8ef59b8 [MERGE] forward port branch 10.0 up to 0f0e43ae55 2018-09-04 16:11:09 +02:00
len-odoo 43877095ed [FIX] sale: more explicit error message
Some users are confused by the generic error message asking to confirm a sale
order that is in locked or cancelled state.
We add specific error messages in these two cases.

opw 1871019
2018-08-31 09:35:59 +02:00
len-odoo 792520926a [FIX] sale: pass correct action when accessing quotation from email link
When accessing a quotation from an email link, no action is given.
As a result, after create/discard of a new record, the abandonRecord method does
not find a fallback page to go to, and it appears as if the discarded new record
had been created.

opw 1869350

11.0-opw1869350-action-len
2018-08-10 16:11:30 +02:00
Christophe Simonis ced9156a97 [MERGE] forward port branch saas-15 up to 65a80cf3fd 2018-08-07 18:11:15 +02:00
Christophe Simonis 65a80cf3fd [MERGE] forward port branch saas-14 up to 0c5cbbe0bb 2018-08-07 17:01:16 +02:00
Christophe Simonis 0c5cbbe0bb [MERGE] forward port branch 10.0 up to 692a32e780 2018-08-07 16:54:18 +02:00
Christophe Simonis 650bc6419c [MERGE] forward port branch saas-14 up to eb56e6dcb3 2018-07-12 14:07:36 +02:00
Christophe Simonis eb56e6dcb3 [MERGE] forward port branch 10.0 up to 755081cbf4 2018-07-12 14:07:08 +02:00
Goffin Simon dad19a769a [FIX] sale: Price on SO not working with different uom
Steps to reproduce the bug:

- configuration on sale:
   - Unit of measure: Some products may be sold/purchased in different units of measure (Advanced)
   - Sale Price: Advaced pricing based on formulas (discounts, margins, rounding)
   - Discount: Allow discounts on sale order lines
- kg as the Reference UOM for weight
- create an uom 10 kg
   - Category: Weight
   - Type: Bigger...
   - Bigger ratio: 10.0
- create a product P
   - Sale price: 100
   - Unit of measure: kg
   - Purchase UOM: kg
- create a pricelist "My pricelist"
   - Discount policy: Show public price & discount to the customer
   - Items : All products - 10% discount
- create a SO with "My pricelist"
- create a SO line with P, the unit price is automatically 90 with 10 % of discount
- change the uom of the line with 10kg

Bug:

The unit price of the line didn't change and the discount on the line disappeared.

In function product_uom_change, the uom of the SO line has been set in the context
of the product(like in function product_id_change). So in funciton _get_display_price,
the function _get_real_price_currency must be called with the uom of product in the context.
In this way, the lst_price will be fetch on product with the right uom without any bad conversion
(because uom.id == product_uom with uom from the parameters and product_uom from the context).

But with function get_product_price_rule, no need to call this function with the uom in context as
it is already set in the product(check "if uom_id: ... else ..." in this function).

The same logic has been applied in function _onchange_discount

opw:186385
2018-07-12 11:45:15 +02:00
Andrea 85e8d13768 [FIX] sale: Amount Invoiced in Sales Analysis 2018-08-06 09:52:04 +02:00
Christophe Simonis 52e28c903c [MERGE] forward port branch saas-15 up to 650bc6419c 2018-07-12 16:06:19 +02:00
len-odoo d7f5a1b25e [FIX] delivery, sale, sale_order_dates: ignore delivery line in commitment date computation
The commitment date is computed using every line from the sale order.
When the picking policy is set to direct, it takes the earliest date
among the sums of the order date and lead time.
However when the delivery is set, is adds a line with an order date of 'now' and
no lead time.
This date thus necessarily becomes the commitment date, bypassing what was
intended by setting a lead times on products.

We simply ignore delivery lines in this computation.

opw 1855646
2018-06-26 10:35:57 +02:00
Lucas Perais (lpe) db994ca57a [FIX] sale: do not always overwrite discount on soline
Before this commit, the discount on a so line was always brought to zero when changing the price

After this commit, we do this only when the pricelist is supposed to compute the discount

OPW 1867262
closes #25851
2018-08-07 11:04:29 +02:00
Christophe Simonis bdd051bf78 [MERGE] forward port branch saas-14 up to c43c540172 2018-06-13 14:12:12 +02:00
Christophe Simonis c43c540172 [MERGE] forward port branch 10.0 up to 788750ea51 2018-06-13 10:55:58 +02:00
Christophe Simonis 788750ea51 [MERGE] forward port branch 9.0 up to 444f0b6a7f 2018-06-13 10:50:43 +02:00
Christophe Simonis e7f0dffb6a [MERGE] forward port branch saas-15 up to c301122b5f 2018-06-05 15:10:45 +02:00
Goffin Simon d91c0a2013 [FIX] sale: Number of SO linked to an archived article
When archiving a product template P with one SO linked to it,

- Going to P by Accounting > Configuration > Products > P shows 1 sale
in smart button

- Going to P by Accounting > Sellable products > P showed 0 sale in smart
button

Now it shows 1 sale in these two cases.

opw:1852948
2018-06-05 09:58:28 +02:00
Christophe Simonis f2e105eeca [MERGE] forward port branch saas-15 up to d3a040cebe 2018-05-08 18:12:03 +02:00
Christophe Simonis d3a040cebe [MERGE] forward port branch saas-14 up to 1813f42dbc 2018-05-08 17:18:48 +02:00
Christophe Simonis 1813f42dbc [MERGE] forward port branch 10.0 up to 14f59f4b78 2018-05-08 16:23:54 +02:00
Christophe Simonis 14f59f4b78 [MERGE] forward port branch 9.0 up to 468e2e454e 2018-05-08 14:51:36 +02:00
jem-odoo aee95705d2 [FIX] sale: normalize domain is smart
When manipulating domain, this is always better to
normalize them, otherwise we can have strange behavior
when handleing them with `expression.OR` and
`expression.AND`.

For instance:
domain = [('so_line', 'in', [91]), ('amount', '<=', 0.0)]
timesheet_domain = ['&', ('so_line', 'in', []), ('project_id', '!=', False)]

`expresion.OR(domain, timesheet_domain)` will give
['|', ('so_line', 'in', [91]), ('amount', '<=', 0.0), '&', ('so_line', 'in', []),
('project_id', '!=', False)]

And this is not what we attempt.

Closes #24038
2018-05-08 11:17:54 +02:00
Wolfgang Taferner 3310d842f6 [FIX] sale: wrong key was communicating wrong references 2018-04-17 09:24:24 +02:00
Christophe Simonis ad825b673b [MERGE] forward port branch saas-15 up to bfa5af45df 2018-04-16 17:10:23 +02:00
Christophe Simonis bfa5af45df [MERGE] forward port branch saas-14 up to aab0908818 2018-04-16 14:21:00 +02:00
Christophe Simonis 412501a5dc [MERGE] forward port branch 10.0 up to 7147622665 2018-04-16 11:18:08 +02:00
Goffin Simon 9bf1f97d9b [FIX] sale: Translation issue on T&C on Invoices
The sale_note field is translated according to the language of the customer in a SO.
This fix applies the same behavior on the customer invoice.
Inspired from this commit: 978b8f64ec

opw:1830838
2018-04-12 11:57:29 +02:00
jem-odoo 25912970ce [FIX] sale: name_get of SO line
This commit format the display_name of sale.order.line,
without context key.
The webclient trigger the name_search with context
key, but display the field without it.
So on task form view, when searching an SO line, user
will see 'SO0001 - my product' in its dropdown, but the
complete SO line description when saving.
This commit proposes, in aggreement with AL and FP, to
a global (and non conditionnal) format, since it seems
task form view is the only one place requiring the SO
line name_get.
2018-04-06 16:40:41 +02:00
Christophe Simonis c94d30541c [MERGE] forward port branch saas-15 up to 97a70c2d8e 2018-04-06 14:33:40 +02:00
Christophe Simonis 97a70c2d8e [MERGE] forward port branch saas-14 up to 5eb6e14e85 2018-04-06 13:43:57 +02:00
Christophe Simonis ff46163bca [MERGE] forward port branch 10.0 up to f4326b4dab 2018-04-05 16:21:23 +02:00
Goffin Simon a36ff26ce0 [FIX] point_of_sale, sale_stock, stock_account: POS Anglo-Saxon Accounting
In average price or in FIFO, the stock move cost related to the picking of the POS Order
must be used to compute the price.

opw:1829842
2018-04-04 16:16:59 +02:00
Lucas Perais (lpe) b2299fb4ff [FIX] sale: invoice count on SO: only take inv on same company
Before this commit, the smart button on the SO was computed
with only the SO's name field
In a multicompany setting, it could give up invoices from other companies

After this commit, only the invoices of the same company as the order are accounted for

OPW 1831551
closes #23925
2018-03-30 09:10:52 +02:00
Christophe Simonis f2c3561334 [MERGE] forward port branch saas-15 up to b7f35428f4 2018-03-29 18:42:47 +02:00
Christophe Simonis b7f35428f4 [MERGE] forward port branch saas-14 up to c1c10e2c4c 2018-03-29 17:56:29 +02:00
Christophe Simonis c1c10e2c4c [MERGE] forward port branch 10.0 up to 2b4bc45e58 2018-03-29 17:09:37 +02:00
Goffin Simon 2b4bc45e58 [FIX] sale: Wrong display of taxes in PRO-FORMA
Steps to reproduce the bug:

-Create a tax of 21% tax included but don't select the "affect base" checkbox.
-Create another tax of 5.2% (no tax include)
-Create a sale order with a line that has a unit price of 121 and both taxes.
Notice that the total amount is: 126.2 (100 base amount + 21 from 21% tax + 5.2 from 5.2 tax)
-Click on "Print the proforma invoice"

Bug:

The total amount was still 126.2 and base=100, however taxes were wrong, there were 21 for the 21% tax
and 6.29 instead of 5.2 for the 5.2 tax.

Back-port of this commit: f50a08bc3d

Forward up to saas-15

opw:1819882
2018-03-29 16:21:25 +02:00
Goffin Simon 2f55b57b11 [FIX] sale: Tax amount is showing zero
The group of taxes were not taken into account in function _get_tax_amount_by_group.

opw:1830752
2018-03-29 15:27:03 +02:00
Goffin Simon f50a08bc3d [FIX] sale: Wrong display of taxes in PRO-FORMA
Steps to reproduce the bug:

-Create a tax of 21% tax included but don't select the "affect base" checkbox.
-Create another tax of 5.2% (no tax include)
-Create a sale order with a line that has a unit price of 121 and both taxes.
Notice that the total amount is: 126.2 (100 base amount + 21 from 21% tax + 5.2 from 5.2 tax)
-Click on "Print the proforma invoice"

Bug:

The total amount was still 126.2 and base=100, however taxes were wrong, there were 21 for the 21% tax
and 6.29 instead of 5.2 for the 5.2 tax.

opw:1819882
2018-03-20 13:27:50 +01:00
Christophe Simonis c921d94236 [MERGE] forward port branch saas-15 up to 3730a0d2df 2018-03-13 12:05:36 +01:00
Christophe Simonis 3730a0d2df [MERGE] forward port branch saas-14 up to 0e898eae35 2018-03-12 18:48:15 +01:00
Christophe Simonis 0e898eae35 [MERGE] forward port branch 10.0 up to 0440e25380 2018-03-12 18:16:02 +01:00
Martin Trigaux 205fd6afe2 [FIX] sale: translate Uncategorized layout 2018-03-08 14:19:54 +01:00
Laurent Smet f4262e1a36 [IMP] sale: remove duplicate codes for price_total
The price_total field (computed) on the account.move.line model in the account module is overrid
in the sale module with a new compute method doing exactly the same thing. This override is
useless and leads to a duplicate field on the database making the ORM slower and providing
unecessary work for the migration team.

- Added on account at revision:
    https://github.com/odoo/odoo/commit/d2e33ba57c0517b88f3cdf987f6b161883b8272e#diff-f3712147f4b25231caa371bd83265dbeR1415
- Added on sale at revision:
    https://github.com/odoo/odoo/commit/3d3a23c9196b84e2189c89c107fbdf09024cca48#diff-eb374e5f26e99054eaf8b40daaebf6f9R118
2018-02-28 16:49:21 +01:00