Commit Graph
108285 Commits
Author SHA1 Message Date
Nicolas Martinelli a93195ee4e [FIX] payment: do not create token in backend
Complement of commit e8dec0fdf1

opw-746545
2017-06-28 13:37:26 +02:00
Nicolas Martinelli 1b3a2c488c [FIX] website_portal_sale: access to invoices
In the website portal,the Sales Orders are always rendered as superuser
after access rights check. This is not the case for invoices, which can
lead to access errors when the user tries to download the invoice PDF.

To solve the issue a new route is created. It handles the access rights
checks, then access the invoice document as a superuser.

opw-747854
2017-06-28 10:05:54 +02:00
Nicolas Lempereur 2bda46ce78 [FIX] website_sale_digital: check product tmpl sudo
For example the portal user has restricted access to product template,
this can lead to an issue that should not be in this instance that is
checking if the product template correspond to a product sold.

opw-748480
closes #17871
2017-06-28 09:36:09 +02:00
Goffin Simon cf66983f37 [FIX] base: Language translation import issue
When importing translations with a csv, the state of the translations was
always set to "To translate" even if the state was "Translated"
due to function _inverse_source.

PS: Making self.source when self is considered as record set could lead to an error.
The return in this function was not needed.
In old API this function was called just for one record.
So this function expect only one record at each call.

opw:747877
2017-06-28 09:27:20 +02:00
Nicolas Martinelli 9771056c46 [FIX] mrp: unlink lot
- Set a user with 'User' access rights in Manufacturing and Inventory
- Create 2 products tracked by lot (A and B)
- Receive some quantity of B, define the lots.
- Create a BOM for A, depending on B. The BOM must use routing with at
  least one workorder

With the unprivileged user:
- Create a MO for 1 unit of A
- Update quantity to 3
- Plan the MO
- Go in workorders, start working and set the lot numbers for A and B.
- Finish the WO => Access Error

opw-748825
2017-06-28 08:38:16 +02:00
Jeremy Kersten 653e30d8f8 [FIX] website_sale, website_crm : add missing import and remove useless
Fix: NameError: global name '_' is not defined

Related to odoo/odoo@4c66eae308
2017-06-27 22:29:13 +02:00
Nicolas Martinelli e8dec0fdf1 [FIX] payment: do not create token in backend
Tokens are not meant to be generated from the backend, so we forbid it.

opw-746545
2017-06-27 12:08:15 +02:00
Xavier Morel 89a99407ce [FIX] website_forum: yet more untranslatable terms 2017-06-27 10:36:24 +02:00
Martin Trigaux 4c66eae308 [FIX] website_sale,website_crm: untranslated term
opw-748880
2017-06-26 17:05:39 +02:00
Martin Trigaux b1a3bb7d9a [IMP] doc: warn gantt view is not available in community version
May be confusing for new users

Closes #17817
2017-06-26 16:31:48 +02:00
Nicolas Martinelli d6909f42ad [FIX] stock: incorrect ordered quantity
- Create a stockable product, get 61 units in stock
- Create a SO of 75 units, validate
- In the picking, transfer only 50 units, validate and create a
  backorder
- Print the Delivery Slip of the picking: it shows 61 units ordered
- Print the Delivery Slip of the backorder: it shows 61 units ordered
- Receive the 14 missing units, recheck availability on the backorder:
  it shows 25 units ordered

The quantity ordered should be recomputed from the stock moves when a
partial transfer is done.

opw-747983
2017-06-26 15:16:07 +02:00
Nicolas Martinelli 831744684c [FIX] stock: empty state
- Update view with external_id=stock.view_move_picking_tree and remove
  editable attribute on the tree view.
- Create a new picking
- Add a line (form view will open) and click on "Save and close"

=> A traceback show up since 'scrapped' was not in the form view.

- The picking location fields become readonly, and the status bar
  disappears
- Save the picking

=> Error: "creation/update: a mandatory field is not correctly set :
   [object with reference: location_id - location.id]"

Courtesy of @benwillig

Closes #17738
opw-748353
2017-06-26 14:07:28 +02:00
Pieczynski Marcin d86f134abd [CLA] signature for piemar1
Done at #17817
2017-06-26 13:46:04 +02:00
Goffin Simon 51d072db44 [FIX] stock_account: Invalid product price history breaks stock valuation
Steps to reproduce:

1. Create a new Stockable Product
2. Set cost price to 2.00
3. Adjust stock to 10 pcs
4. Enable developer mode
5. Go to Inventory > Reports > Inventory at Date
6. Select current time and retrieve the inventory value

Bug:

The stock valuation for the product was 0.0.

Reason:

When creating a stockable product, Odoo creates
two price history entries with the same datetime
but different cost. The stock valuation report only
takes one of them into account.

Fixes #14889

opw:747857
2017-06-26 13:22:03 +02:00
Christophe Simonis aaadb232b2 [MERGE] forward port branch saas-11 up to 459ea4ab4d 2017-06-26 11:38:54 +02:00
Martin Trigaux 790ff6d655 [I18N] pull web* translations
Some were skipped due to API limit
2017-06-26 11:25:54 +02:00
Joren Van Onder 91abcdf842 [FIX] payment_*: always read callback_eval as superuser
The callback_eval field has a groups parameter of
base.group_system. Without this patch everyone not part of that group
ends up with an access right error when the system attempts to read
that field.

Previously this was not a problem because all code reading
callback_eval was executed with the superuser already. New code has
been introduced however that does not do this (eg. paying with a
payment.token from the backend).

opw-741181
2017-06-26 11:19:46 +02:00
Christophe Simonis 459ea4ab4d [MERGE] forward port branch 9.0 up to 2b2be3caa4 2017-06-26 11:15:11 +02:00
Christophe Simonis 2b2be3caa4 [MERGE] forward port branch saas-6 up to 2ae2db175f 2017-06-26 11:13:09 +02:00
Christophe Simonis 2ae2db175f [MERGE] forward port branch 8.0 up to 6b5f3c2364 2017-06-26 11:07:20 +02:00
Odoo Translation Bot afba38b88d [I18N] Update translation terms from Transifex 2017-06-26 10:49:30 +02:00
David Arnold 1930e8dffb [I18N] remove es_CO translations
Based on analysis https://gitlab.com/snippets/1665976

Closes #17815
2017-06-26 10:13:25 +02:00
Martin Trigaux 2c96c696b1 [FIX] stock: duplicated entry in pot file 2017-06-26 09:57:41 +02:00
Odoo Translation Bot ee3a6b6793 [I18N] Update translation terms from Transifex 2017-06-25 04:27:29 +02:00
Odoo Translation Bot ed46386436 [I18N] Update translation terms from Transifex 2017-06-25 00:27:33 +02:00
Martin Trigaux 4755fce915 [I18N] update source terms
Was done poncutally but no global one since the release
2017-06-23 16:34:23 +02:00
JesusZapata 6a732fd2c9 [FIX] stock: Prevent to reset a 'done' picking in 'draft' state
This change will prevent the document from going from Done to Draft

In some cases a user may make that error functionally. It is only to have an additional validation

In the past, we didn't need this validations because the workflow didn't allow the use of a transition that is not defined on the correct state but since that we don't have workflow so we need manage this inconsistent action from original method in order to avoid a wrong transition.
2017-06-23 15:32:43 +02:00
Alexis de Lattre 1a57cccc0d [FIX] l10n_fr: use full account names
Use full account names
The parent accounts have been removed but the account names have not changed.

Closes #17770
2017-06-23 14:51:19 +02:00
Lucas Perais (lpe) c284f0131b [FIX] crm: crm_lead should have its email_from set when creating one opportunity from a contact
With the flow:
- create a contact with email address set
- click on smart button "opportunities"

When creating opportunity with the plain "create button", the opportunity gets its email_from correctly
whereas
when creating an opportunity from a kanban state's quick create, only the partner is set, and not the email_from

This commit aims at setting the email_from using either way of creating an opportunity

OPW 743698

Closes #17664
2017-06-23 14:44:41 +02:00
Cedric Snauwaert e3d5176a41 [FIX] rating: after posting a rate, don't redirect to backend
Some user might be logged but not have the right to access issue or task.
Plus it does not make any sense to redirect to backend after rating a task or an issue.

OPW: 748579
2017-06-23 11:48:44 +02:00
Leonardo Rochael Almeida bbc47177ce [IMP] base: drop unused onchange_state
It calls `onchange_state()` on `res.partner` which was removed on
(24aba60).

It was added to `res.users` long ago (009ea40) to support a `state_id`
field on the view `res.users.simplified.form` that is no longer there
since v8.0.

The method is then never called and was crashing if called.

Closes #17772
2017-06-23 10:12:48 +02:00
Nicolas Martinelli c82ec7a6fd [FIX] purchase: cancelled procurement
If two MOs are using the same PO, when we cancel the first MO, the
check availability of second MO is not working.

The incoming shipment of the Purchase Order has the first MO's move_id
as the destination move. When we cancel the first MO, the incoming
shipment of Purchase Order still holds the first MO's move. Because of
that reason, the check availability is not working for the second MO.

While setting the destination move for the stock moves of the incoming
shipment, it should ignore the cancelled procurements.

Closes #17701
opw-748074

Courtesy of @suganthikarunanithi
2017-06-23 09:05:45 +02:00
Nicolas Martinelli 8185524833 [FIX] account: prevent traceback
If a user tries to reconcile already reconciled lines, the calling
method might have already filtered out these lines, and the method is
called with an empty self.

opw-748223
2017-06-22 17:39:14 +02:00
Nicolas Martinelli ca486ebe18 [FIX] mrp: sequence depending on picking type
In case you have multiple warehouses and/or multiple manufacturing
locations (procurement routes), the same sequence is taken for the
created manufacturing order no matter where it is finally produced.

Closes #17681
opw-748344
2017-06-22 17:36:25 +02:00
wardm95 4a92d87b88 [CLA] signature for wardm95
Done at #17767
2017-06-22 16:36:28 +02:00
Martin Trigaux 71d3b14691 [FIX] report: access only one report
In case two reports have the same name (e.g. duplicate).
Accessing search only on the name which may not be unique.

Fixes #17751
2017-06-22 16:34:18 +02:00
George Daramouskas 063ee0751b [FIX] base/ir_ui_view: Raise ValidationError when creating views without arch/type
Closes #16973

Steps to reproduce:

1) Go to Settings -> Technical -> User Interface -> Views
2) Create a new view and give only name, leave fields View Type and arch_base empty.
3) Exception occures

Current behaviour:
- The user gets an exception with a full stacktrace.
Expected behaviour:
- The user should get a warning
2017-06-22 16:27:20 +02:00
Yenthe V.G d6751e5b6a [FIX] account trial balance: correctly selecting accounts with movements(#17562) 2017-06-22 16:26:42 +02:00
Martin Trigaux 6b5f3c2364 [I18N] account: export source terms
Following changes at b5a8e5c864
2017-06-22 15:24:17 +02:00
Alexis de Lattre b5a8e5c864 [FIX] account: verify the partners are the same
Re-enable the constraint when reconciling entries belonging to different
partners.
The constrain was not triggerd because of the triggers on line_id.
In old API it was triggered only when explicitely writing on that field.

Convert to new API instead.

Fixes #17292
Closes #17600
2017-06-22 15:19:05 +02:00
Josse Colpaert d44b7e9b1b [FIX] mrp: workorder lots should have the correct product 2017-06-22 13:32:18 +02:00
Goffin Simon 09a686fa29 [FIX] sale: Duplicating a quotation without template
When duplicating a quotation without template, the expiration date
was duplicated even if the expiration date was already expired.
The date order is not duplicated but set to now.

opw:744671
2017-06-22 13:31:58 +02:00
Goffin Simon eba662336c [FIX] sale: Changing product qty to 0 in SO line
When changing the qty of a SO line to 0, the product_uos_qty, th_weight were not
updated and then it lead to some errors.

opw:748288
2017-06-22 13:14:11 +02:00
Christophe Simonis c6938b843c [MERGE] forward port branch saas-11 up to 637ba945e0 2017-06-22 12:29:11 +02:00
Christophe Simonis 637ba945e0 [MERGE] forward port branch 9.0 up to a03fc2d849 2017-06-22 12:21:59 +02:00
Christophe Simonis 378b161ee1 [FIX] point_of_sale: make tests consistent wrt taxes (take 2)
Rev 7b494187e9 forgot to correct some
tests.
2017-06-22 12:18:53 +02:00
Olivier Dony 7b494187e9 [FIX] point_of_sale: make tests consistent wrt taxes
After rev d938ba87ae, taxes that are
included in the price are subtracted in case the tax is not applied in
an order (e.g. when the fiscal position remove the tax).

Some of the test orders did not apply any tax, and because the products
used in the test had some tax included, the above revision made the
tests fail (by subtracting the tax amount from the price).

Fixed by making the test orders more consistent wrt to taxes, applying
the taxes as would happen in the UI, then correcting the payment amounts
to include the extra tax amounts.
2017-06-22 10:52:12 +02:00
Christophe Matthieu 6a0e07b6aa [FIX] sale_margin: wrong margin when update the discount 2017-06-22 10:25:49 +02:00
Nicolas Martinelli a03fc2d849 [FIX] mail: track date change
- Set your timezone in Brasil
- Install the Maintenance module
- Create a Maintenance Request, set the Requested Date to 2017-06-15
- Save

In the chatter, the track fields message shows a Requested Date of
2017-06-14.

This can actually happen with any date tracked. The issue comes from the
web client: it converts the date in UTC, which should of course not be
done. This only applies for a datetime, not for a date.

opw-746216
2017-06-21 20:57:16 +02:00
Joren Van Onder 10c6908c63 [FIX] stock: fix conversion to multi of _compute_location_description
Oversight of 8df0a2a98e and
c6e5d7b004.

opw-748404
2017-06-21 10:27:39 -07:00