Commit Graph

4613 Commits

Author SHA1 Message Date
Odoo Translation Bot 0093372184 [I18N] Update translation terms from Transifex 2015-12-20 02:54:53 +01:00
Goffin Simon 4ed5d6517c [FIX] sale: sale-onchange_product_uom
To avoid duplication of code and to allow overwrite on product_uom_change
Introduced by ca40236
2015-12-17 16:16:21 +01:00
Goffin Simon ca40236ddc [FIX] sale: onchange_product_uom
The function "product_uom_change" was built to reset the price unit
of a SO line when the uom was changed. Before this fix 503820a, the
price unit of the SO line only depended on the price list then it was
not needed to pass the fiscal position to this function.

After this fix 503820a, the price unit of a SO line also depends on
the taxes set on the SO line(e.g.:if an included tax is deleted, the
price unit must be recomputed without this tax). Then to recompute the
unit price, the function "product_id_change" must take into account
the fiscal position set on the SO to consider the right taxes to
recompute the unit price.

The fiscal position set on a SO must be passed to onchange_product_uom
each time it will be called because the price unit will be recomputed.
2015-12-17 15:54:53 +01:00
Danimar Ribeiro 1ac94db8e8 [FIX] context to map_tax
Missing context to map_tax calls
Fixes #9909
2015-12-15 16:10:16 +01:00
Odoo Translation Bot 63414bef54 [I18N] Update translation terms from Transifex 2015-12-13 02:56:20 +01:00
Luis Felipe Mileo 16dbef4a13 [FIX] sale: missing digits precision on sale/th_weight
Make sense as the weight field has the 'Stock Weight' precision in product and
delivery.
Closes #9932
2015-12-11 10:14:23 +01:00
Denis Ledoux a148e2a47a [FIX] sale: team bar values for sent quotations
The "Quotation" bar in the sales team
dashboard excluded sent quotation,
it only included draft quotation.

A `sale.order` in the state `sent` must
be considered as a quotation, the only
different is that it has been sent by
mail to the customer, that's all.

opw-658861
2015-12-08 16:17:01 +01:00
Odoo Translation Bot 0de99dd2c8 [I18N] Update translation terms from Transifex 2015-12-06 02:56:34 +01:00
Goffin Simon 2749f73f9b [FIX] sale: update_tax in product_id_change
Thanks to the fix 503820a, when a fiscal position mapped an included
tax on a SO line, the price unit of the product is recomputed.
This fix has been applied in the function product_id_change in
the model "sale.order.line"

Before the fix, when changing the product uom on a SO line, the price
unit of the SO line was reset with the pricelist price without taking
into account the fact that a included tax could be removed on the SO line.

To avoid this kind of problem, the price unit must be recomputed in any
case according to the taxes.
2015-12-03 09:21:03 +01:00
Odoo Translation Bot b8dfa91613 [I18N] Update translation terms from Transifex 2015-11-29 02:58:05 +01:00
Odoo Translation Bot 396181648c [I18N] Update translation terms from Transifex 2015-11-15 03:03:19 +01:00
Odoo Translation Bot 7a0a649deb [I18N] Update translation terms from Transifex 2015-11-08 03:01:35 +01:00
Odoo Translation Bot 82cd86f181 [I18N] Update translation terms from Transifex 2015-11-01 03:03:27 +01:00
Odoo Translation Bot e84c01ebc1 [I18N] Update translation terms from Transifex 2015-10-25 02:02:17 +01:00
Odoo Translation Bot a7c474b3a7 [I18N] Update translation terms from Transifex 2015-10-18 03:00:56 +02:00
Raf Ven 38c9deeab4 [FIX] sale: Wrong filter definition
'state', 'in', ('draft') is an invalid definition, ('draft') is not a tuple
should have been ('draft',)

Replacing by simpler 'state', '=', 'draft'

Fixes #8115
Closes #9016
2015-10-13 10:47:48 +02:00
Commandant Custo 1881a13699 [FIX] sale: report: find sales of subcategories
When searching for sales of a specific category,
display the products of the whole category subtree.
Consistent with:
* 633df8dc92
* https://github.com/odoo/odoo/blob/8.0/addons/account/report/account_invoice_report_view.xml#L72

Closes #4631
2015-10-12 15:43:36 +02:00
Denis Ledoux 4c901f8ac6 [FIX] sale: use default_get to define the invoice journal
When creating the invoice of a sales order, from the sales order
(`Create invoice` button on the sale order),
the journal used for the invoice was forced
with a specific domain. Besides, the only reason the journal
is forced is to check there is a sale journal for the
quotation company, and raise a warning if not.
This check was added in 1578c2858d.

This prevented to use the user defined defaults,
(`Set defaults` in the `debug` menu)
to set a different default journal per user.

Using the `default_get` instead solves this issue,
as it uses first the user defined defaults. Besides,
if no user defined defaults are set, it then uses
the default value set in the field definition, which
in this case returns the same journal then the forced
domain mentioned above, the domain used being the same.

There is therefore no change of behavior, while giving
the possibility to use the user defined defaults.

Fixes #8786
2015-09-30 15:59:54 +02:00
Goffin Simon 48ccb19937 [FIX] sale: currency in report sale analysis
In Sale Report Analysis, the price total must be in the currency
of the company.
Introduced by b5c1cb4298
opw:649781
2015-09-29 16:43:47 +02:00
Jos De Graeve c88f0d926c [FIX] sale: company filtered taxes for fix_tax_included_price
This revision is related to:
 - 503820acb6
 - 3b02e3d63d

The taxes used to define the price must be the product taxes
of the company of the order.

Closes #8759
2015-09-29 10:40:33 +02:00
Odoo Translation Bot c764b703ca [I18N] Update translation terms from Transifex 2015-09-27 01:58:59 +02:00
Odoo Translation Bot 7ed58916df [I18N] Update translation terms from Transifex 2015-09-13 01:55:09 +02:00
Odoo Translation Bot 101540b491 [I18N] Update translation terms from Transifex
Fetch the translations with the option --all to fetch missing languages
and use --minimum-perc 10 to avoid empty files

Fixes #8423
2015-09-08 17:07:59 +02:00
Martin Trigaux a3a2f374ff [FIX] sale: onchange always triggered
The product_id_change was always triggered at the creation of a sale order line.
This is due to the 'type' field that is no longer present in 8.0 and makes the
condition to be always verified.
2015-09-07 11:29:59 +02:00
Odoo Translation Bot 927c00525c [I18N] Update translation terms from Transifex 2015-09-06 01:50:52 +02:00
Odoo Translation Bot b79d492ec4 [I18N] Update translation terms from Transifex 2015-08-30 01:51:03 +02:00
Christophe Simonis 416364fcca [FIX] sale: typo in field context 2015-08-28 11:03:34 +02:00
Pedro M. Baeza cbe85f42d0 [IMP] sale: hooks for the base price and the quantity
To make it easier to override without rewritting the full method
Closes #1470
2015-08-27 17:42:20 +02:00
Denis Ledoux 42ecf5e346 [FIX] sale: remove useless print
Introduced with rev. 3b02e3d63d
2015-08-26 13:38:38 +02:00
Denis Ledoux dedc40ba1d [FIX] sale: context can be done
This rev. is related to 3b02e3d63d
2015-08-26 13:37:31 +02:00
Goffin Simon 503820acb6 [FIX] account, purchase, sale: included taxes
-account:_fix_tax_included_price
If a fiscal position mapped an included tax on a SO or on a PO line
then the price unit of the product must be recomputed.

-purchase: onchange_product_id test
Test that when an included tax is mapped by a fiscal position, the included tax must be
subtracted to the price of the product.

-sale:product_id_change test
Test that when an included tax is mapped by a fiscal position, the included tax must be
subtracted to the price of the product.

opw:647321
2015-08-26 09:02:39 +02:00
Denis Ledoux 3b02e3d63d [FIX] sale*: company tax filtering
f26b94f had as goal to filter the taxes of the product
according to the company when the sale.order
was created/edited as SUPERUSER_ID
(Who ignores the record rules).

Unfortunetaly, to filter the taxes,
it used the company of the customer,
while it's actually the company of the order which
should be used.

Indeed, for instance,
partners can be shared among all companies.

It was way less simple to access the company
of the sale.order, this parameter being
not available in the on_change method signature.

This is the easiest way to solve this issue
without breaking the API / retro-compatibility.

opw-647819
2015-08-25 14:52:20 +02:00
Denis Ledoux 9a9720ac14 [FIX] sale: in a SO line, changing uom qty must change uos qty
This is a regression from rev.
1cedcf6abb

Not updating the product uos qty on updating the uom qty
is wrong, and it has multiple side-effect.

The SO line margin not being correctly recomputed
when changing the quantity is one of them.

opw-647902
2015-08-24 18:07:24 +02:00
Odoo Translation Bot 99931637d5 [I18N] Update translation terms from Transifex 2015-08-23 01:51:13 +02:00
Odoo Translation Bot 4359f65522 [I18N] Update translation terms from Transifex 2015-08-16 01:58:03 +02:00
Christophe Simonis 02954bad2b [MERGE] forward port of branch saas-3 up to d5a6380 2015-08-11 16:38:35 +02:00
Christophe Simonis d5a6380726 [MERGE] forward port of branch 7.0 up to f410266 2015-08-11 16:35:00 +02:00
Juan Jose Scarafia 97fdf7bc6d [IMP] sale: call product_id_change with company_id from wizard
Add company when calling product_id_change from _prepare_advance_invoice_vals on
sale.advance.payment.inv wizard.

This way we have same on change call as the one called from account_invoice
(e.g. on uos_id_change and onchange_account_id).

Closes #7939
2015-08-11 08:57:07 +02:00
Odoo Translation Bot 4fcc756ef9 [I18N] Update translation terms from Transifex 2015-08-09 02:00:12 +02:00
Goffin Simon 4a46ca474d [FIX] sale: comment in partial invoice
When a partial invoice is created from a sale order, the field "note"
in the sale order must be written in the field "comment" of the invoice.

opw:646852
2015-08-07 15:19:01 +02:00
Nicolas Martinelli f26b94fd7d [FIX] sale: filter taxes to keep the ones applying to the partner company
The problem originally arises in the frontend (eCommerce). In this case, it is
necessary to switch the user id to the SUPERUSER_ID in order to be allowed to
create a SO. This is done in the method sale_get_order in the module
website_sale. The consequence is that in a multicompany configuration, all taxes
of the product will be retrieved and applied in the frontend.

This fix filters the taxes retrieved to keep only the ones which apply to the
company of the partner, when the user id is SUPERUSER_ID.

opw-645258
opw-645915
2015-08-05 10:39:56 +02:00
Olivier Dony c96174da5f [MERGE] Forward-port of latest bugfixes from saas-3 up to 733cb3e76f 2015-08-04 15:22:49 +02:00
Olivier Dony 733cb3e76f [MERGE] Forward-port from 7.0 up to 8b3d69a0d7 2015-08-04 15:17:51 +02:00
Martin Trigaux 180b2e7746 [I18N] Transifex project URL
Thank you Transifex to change the URL scheme from time to time, that's cool.
cf https://www.transifex.com/blog/2015/new-url-schema/
2015-08-03 17:25:44 +02:00
Odoo Translation Bot 218ffc1a5a [I18N] Update translation terms from Transifex 2015-08-02 01:59:36 +02:00
Goffin Simon f10c03ac68 [FIX] sale: onchange task_work
The unticked option in Sales settings "Prepare invoices based on task's activities"  doesn't
have to uninstall the options "Record timesheet lines per tasks" and "Generate tasks from sale orders"
in Project settings.
When "Prepare invoices based on task's activities" is unticked, this fix avoid to uninstall these options each
time we go to Sales settings because "onchange_task_work" is triggered each time we go to Sales settings.

opw:645833
2015-07-31 08:48:12 +02:00
Goffin Simon 7f5f945dcf [FIX] sale: _sales_count
The field "state" in "sale.report" model must consider the state used
by "sale.order.line" to be consistent with the view created in this model.

The function _sale_count in 'product.product' model must return
the number of product included in a "confirmed" or "done" sale order line.

opw:644200
2015-07-23 15:28:36 +02:00
Odoo Translation Bot 0871f423a3 [I18N] Update translation terms from Transifex 2015-07-19 02:01:00 +02:00
Valentin Chemiere 3033790ef1 [FIX] sale: use updated context instead of new one
Keep the existing information in the context for the price_get call instead of
creating a new one.
Closes #7646
2015-07-17 16:40:35 +02:00
Goffin Simon 1cedcf6abb [FIX] sale: Sale Order Line Onchange
Changing the product quantity must not change Product UOM.

opw:644542
2015-07-17 09:48:42 +02:00