Commit Graph
114126 Commits
Author SHA1 Message Date
Nicolas Martinelli 4b92f914de [FIX] base: make currency visible
Make company currency field visible again on the company settings.
Indeed, if Account is not installed, it's impossible to change it.
2017-11-15 13:45:03 +01:00
Christophe Simonis 00e309ed91 [MERGE] forward port branch 9.0 up to 5297321207 2017-11-15 13:39:31 +01:00
tbe-odoo 822078d16e [FIX] stripe: Fix crash when using language not defined
- This commit, fixes a crash triggered when the user is paying a quote while having his browser language set to a language not defined on the Odoo database.
This is due to the fact that the field 'name' on the model 'account.analytic.account' is translatable.
Stripe sends a json query to the server with the user's browser's language on the 'Accept-Language' http header field.
By doing this, Odoo add a 'lang' key to the context, which is then used to translate translatable fields.
2017-11-15 13:31:00 +01:00
Nicolas Martinelli 8a7426da75 [FIX] account: tax amount on invoice document
- Install French language
- Set language of Customer A to French
- Create an invoice for A (some tax must be applied)
- Print the invoice

The tax amount below 'Subtotal' is not formatted in French.

`t-esc` does make use of the `t-lang` option, so when the expression is
evaluated, the lang is not in the context. We do not change this
behavior since it can have a major impact.

opw-782118
2017-11-15 12:57:19 +01:00
Nicolas Martinelli a9beee42d6 [FIX] tools: lang in formatLang
- Install French language
- Set language of Customer A to French
- Create an invoice due in the past
- Open the Customer Statements

The customer statement of A is translated in French, but the amounts are
formatted in the company's user language (English by default).

We add the possiblity to take into account the lang in the context when
calling `formatLang`.
2017-11-15 12:57:19 +01:00
Romain Derie 86e79881e8 [FIX] website: use underscore's startsWith method for browser support
Since ES6's startsWith method is not supported by all/old browser, replace it
with underscore's one
2017-11-15 12:56:02 +01:00
Romain Derie 5297321207 [FIX] website_sale: 0.00 total is showing in empty cart if logged in
Before this commit, if you go on /shop/cart and your cart is empty, it will
show the total (Subtotal, Taxes, Total) as $ 0.00.
Indeed, the code is retrieving a 'sale.order' if you are connected and you
already have a draft sale order on DB (eg: you just add something to cart and
 emptied it afterward).

  - Add product to your cart and proceed to checkout
  - On checkout cart, remove the product, your cart is now empty
  - Reload the page (you should still be on /shop/cart) or go to /shop/cart
  - You now see the zero prices (Subtotal, Taxes, Total)

Now, we will hide this if you have an order but no line on that order.

This closes #20896
2017-11-15 12:45:41 +01:00
Roberto Lizana 1db3829540 [CLA] Trey signs CCLA
Closes #20958
2017-11-15 11:28:41 +01:00
Christophe Simonis 0a775adda8 [MERGE] forward port branch 9.0 up to b152c5be4f 2017-11-15 11:25:18 +01:00
qsm-odoo 4e32a23d96 [FIX] web_editor: restore selected images display
In the media dialog, when an image is selected, it has a colored border
to indicate it. Commit https://github.com/odoo/odoo/commit/e011d58bee140411ccfb1ef9115dddc090d573c3
made changes, part of them designed to "Improve the image dialog to be
able to select/unselect". While this commit was indeed doing that, it
was also breaking stuff: when selecting image(s) then performing a
search, the colored border disappeared while the images were in fact
still selected.

Fortunately, this stuff breaking is only due to code modification that
was made for no reason (so reverting part of the commit is enough to
restore the features while keeping the commit's improvements).
2017-11-15 10:59:49 +01:00
Yenthe V.G dfa554ba7d [IMP] doc: Improve mobile documentation (#20940)
* [IMP] Doc: improve the documentation

This makes the documentation more readable, makes cleaner sentences and removes the random capital letters within the sentences.

* [IMP] doc: make the info of switchAccount as clear as possible

* [IMP] doc: Make requested changes
2017-11-15 07:59:05 +01:00
Goffin Simon 661dab1ed6 [FIX] product: Keep the stable behavior
Revert of this commit: 7f989b94b0
because it changes the behavior in stable version.

opw:779808
2017-11-14 22:35:57 +01:00
Simon Lejeune 79821458fa [REF] stock: wording on view location constraint 2017-11-14 17:44:15 +01:00
Simon Lejeune 217661ab7f [FIX] stock_account: always compute FIFO no matter the cost method
This is to ease the change of cost method.

opw 779284
2017-11-14 17:44:15 +01:00
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
Goffin Simon 7f989b94b0 [FIX] product: Impossible to get the right pricelist in multi company
The logic was not the same in function _compute_product_pricelist and in function
_inverse_product_pricelist.

The function _get_partner_pricelist must check the default pricelist for the company when
no pricelist is given for the specific partner(res_id) because the function set_multi doesn't
set a specific pricelist to the partner if the pricelist set and the default one are the same.

opw:779808
2017-11-14 16:59:13 +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
Nicolas Martinelli 1662088ed6 [FIX] mrp: product name
Complement of commit ea96aa1676 to raw materials.

opw-781039
2017-11-14 15:55:28 +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
Nicolas Martinelli b152c5be4f [FIX] im_livechat: Creation date (hour)
Go to Report -> Operator Analysis -> Apply group_by 'Creation date
(hour)' => traceback.

`start_date_hour` is implemented for Livechat Support Report on
Channels, but not on Operators.

opw-782255
2017-11-14 15:36:58 +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
Jonathan Nemry (METRUM) 97eb4a36b0 [CLA] METRUM signature of Corporate CLA 1.0
Done at #20926
2017-11-14 15:03:27 +01:00
Nicolas Martinelli 73f0c6da6d [FIX] l10n_fr_fec: Receivable/Payable
In the FEC report, opening entries on receivable and payable accounts
should be split by partner.

opw-781321
2017-11-14 14:24:53 +01:00
fwi-odoo 466ca1e07e [FIX] web: handle SessionExpiredException in the crash_manager 2017-11-14 12:14:57 +01:00
Christophe Simonis 0d0dd0c866 [MERGE] forward port branch 10.0 up to a8b72d764e 2017-11-14 11:27:04 +01:00
Christophe Simonis a8b72d764e [MERGE] forward port branch 9.0 up to d07f9c5ef5 2017-11-14 11:26:02 +01:00
mehdi-ghezal d07f9c5ef5 [CLA] signature for mehdi-ghezal
Backported to 9.0 cf comment
Closes #20850
2017-11-14 10:56:00 +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
Manuel Vázquez Acosta d6c2906d44 [FIX] mail: access the super of TestMailGroup
Instead of the parent of TestMail class

Closes #20728
2017-11-13 16:41:03 +01:00
Victor Oliveira da Silva 13d2b29f01 [FIX] doc: fix typo
Closes #20726
2017-11-13 16:36:48 +01:00
Grzegorz Krukar e419f395a1 [FIX] requirements: update psycopg2 version
2.7.1 is broken with glibc 2.66
upgrading to latest working version: 2.7.3
cf psycopg/psycopg2-wheels#2

Add CLA

Fixes #19511
Closes #19512
2017-11-13 16:11:22 +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
Aaron Bohy 6d616c566f [FIX] web: search view: autocomplete on datetime fields
... gives wrong values due to the timezone.

For instance, let's assume that the browser timezone of the user
is UTC+2, and the user types 10/09/2017 10:00:00 in a searchview
with a datetime field in its arch (i.e. which autocompletes on a
datatime field). Before this rev., the suggested value was
10/09/2017 12:00:00, i.e. the timezone offset was added to the
value.

opw 779832
2017-11-13 15:12:18 +01:00
Christophe Simonis 0e1ac93e2d [MERGE] forward port branch saas-14 up to abfd662109 2017-11-13 15:03:56 +01:00
Christophe Simonis abfd662109 [MERGE] forward port branch 10.0 up to 9822c42707 2017-11-13 14:45:51 +01:00