Commit Graph

93407 Commits

Author SHA1 Message Date
Denis Ledoux 417f012ce9 [IMP] mail: use `has_group` to check a user is part of a group
`has_groups` is more efficient, and won't lead to useless
prefetches.

opw-634402
2015-05-12 12:21:56 +02:00
Denis Ledoux 5d4560676e [FIX] res_users: action_id must be readable by the user
`action_id` is the loaded (window) action on user sign in.
It must thefore be readable by the user.

opw-634402
2015-05-12 11:33:43 +02:00
Denis Ledoux 55fb3f6ff2 [FIX] share: do not add new rules for `res.company`
When trying to share a partner through the share feature,
a new record rule was added on `res.company`,
allowing the access to this model only if
the `partner_id` of the `res.company` was equal
to the user `partner_id`.
Except that the share users must have access
to the company he is currently in.

opw-634402
2015-05-12 11:33:43 +02:00
Denis Ledoux 953a5509d2 [IMP] mail: use `has_group` to check a user is part of a group
`has_groups` is more efficient, and won't lead to useless
prefetches.

opw-634402
2015-05-12 11:33:43 +02:00
Denis Ledoux 73432ffe9f [FIX] *: accesses of views concernings specific groups
If the whole view relates to a specific group,
apply the group on the view itself instead of
each view part (each fields, each page, each div,...),
so the view is loaded / added to the base view
only if the user is in the right group.
So the view is not loaded uselessly
and the fields are not read for nothing
(performances & security).

Indeed, when a group is applied on a field itself, the field content
is read, but hidden, therefore reading the content of the field
uselessly, and potentially leading to accesses issues
if the user hasn't the rights to read the field.
(e.g. reading a property when not having access to the model
of the proprty, pricelists on partners for instance)

opw-634402
2015-05-12 11:33:43 +02:00
Josse Colpaert cf6d7479d5 [IMP] Stock valuation: Avoid consumables with real-time valuation
When the product is a consumable, avoid to use real-time valuation, by adapting
the onchange in the views and making the valuation field invisible when the
product is a consumable / service.
2015-05-12 09:53:20 +02:00
Christophe Simonis d8d3b38cbd [FIX] ir.logging: cursor should be in auto-commit 2015-05-11 19:01:37 +02:00
Matthieu Dietrich d1c4d16a3a [FIX] account: Don't copy many2many when copying statement line
When duplicating confirmed bank statement lines,
the many2many `move_ids` links were preserved, and,
therefore, there were links between the duplicated
lines and the move entries of the original lines.

Closes #6617
2015-05-11 16:54:30 +02:00
Christophe Simonis 04b252b72c [FIX] Cursor.closed property
`_obj` doesn't exists anymore when the cursor is effectively closed.
2015-05-11 16:24:33 +02:00
Nicolas Martinelli 46d446fd47 [FIX] mrp_repair: add calculation of taxes in subtotal, reset taxes after invoice creation
The calculation of the taxes is added in the calculation of the subtotal.
When the invoice is created, a reset of the taxes is performed so the user does not have to do
it himself.
opw-634711
2015-05-11 15:51:32 +02:00
Goffin Simon bff6dffbb4 [FIX] website_sale: Coupon Code
The pricelist linked to the coupon code is just applied in the cart.
In the shop, the pricelist of the user is applied.

opw:634639
2015-05-11 14:25:11 +02:00
Goffin Simon af86f029c9 [FIX] account: Translation of journal name
The journal name showed in the pop over of the reconciliation bank statement wizard
must be in the language of the user.

opw:634378
2015-05-11 14:16:15 +02:00
Goffin Simon 740efb9349 [FIX] point_of_sale: bad indentation 2015-05-11 14:10:12 +02:00
Goffin Simon 163e7ee5ed [FIX] point_of_point: POS sales details
Total of the day must include the invoiced lines.

opw:634098
2015-05-11 13:52:44 +02:00
Julien De Coster 2d260b78d8 [FIX] Don't send mail to opt-outed contacts in mass mailing 2015-05-11 13:45:28 +02:00
Denis Ledoux 9d2dbda8ca [FIX] stock_dropshipping: not enough stock warning for MTOs
When 'stock_dropshipping' was installed, in a sale order,
choosing a product being stockable + buy + MTOs returned
the "Not Enough Stock" warning, while it shouldn't.

It's because the according method `_check_rounting` was
overriden in this module, with a @api.one, which aggregates, while
the method expects to return a simple boolean even for a list of
multiple ids.
Converting the method to @api.multi solves the issue.

opw-639426
2015-05-11 13:22:48 +02:00
Raphael Collet fdc6ba1820 [FIX] http: make sure to instantiate an environment before calling method
This fixes an issue in property `field.digits` that cannot find a valid cursor
to the database.  Forcing the instantiation of an environment makes the cursor
retrievable.
2015-05-11 12:32:00 +02:00
Nicolas Martinelli 8ab987d828 [FIX] stock_account: set the same unit price for extra moves than for moves linked to SO
When extra moves are created, the unit price of the invoice line for these extra moves is now the
same than the unit price of the moves generated from the SO.

opw-634227
2015-05-11 12:23:19 +02:00
Jeremy Kersten 2e49fc09ff [FIX] calendar: set context if none
Avoid traceback if no context in get_recurrent_date_by_event when code do:
    context.get('xx')
2015-05-11 10:41:02 +02:00
Nicolas Seinlet e7886c6d75 [FIX] doc, new API + kanban error
- fix default_group_by in kanban
- use new api in server actions
- missing @api.multi in @compute example

Closes #6640
2015-05-11 10:17:55 +02:00
Nicolas Martinelli b8779f0c53 [FIX] stock: keep inventory options consistent
Make sure that appropriate fields are emptied when switching to in between inventory filters.
This prevents incoherent results due to hidden fields which were filled in a previous selection.

opw-634388
Fixes #6512
2015-05-11 08:30:10 +02:00
Nicolas Martinelli 61a5bbfb21 [FIX] stock_account: add taxes to invoice when creating an invoice from delivery
Generating an invoice from a delivery now add the taxes to the invoice.
This impacts a returned purchase for which the invoice is created from the delivery, and a sale
order which is set to create invoice on delivery.
opw-634565
2015-05-11 08:26:14 +02:00
Christophe Simonis 94aae97c04 [MERGE] forward port of branch saas-3 up to e2bfb96 2015-05-08 18:52:57 +02:00
Christophe Simonis e2bfb969ed [MERGE] forward port of branch 7.0 up to 6e23b2a 2015-05-08 18:10:30 +02:00
Christophe Simonis 1b5576af46 [FIX] sql_db: add `closed` property on `Cursor`. 2015-05-08 16:50:15 +02:00
Denis Ledoux 4e015bd96e [FIX] payment_adyen: live Adyen payment acquirer URL
The production payment page of Adyen is not
`https://prod.adyen.com/hpp/pay.shtml`
but
`https://live.adyen.com/hpp/pay.shtml`

opw-634894
2015-05-08 16:41:20 +02:00
Denis Ledoux 63db719151 [FIX] account: Exchanges rates gain/loss during supplier reconciliations
This revision is related to dd47b6f5bc.

The above revision was allmost correct, except that, in a supplier
invoices, the `amount_currency` of the invoice is negative,
and the one of the bank statement is possitive.

To check that both are equal, we should subtract one to each other,
and check that the diff is 0, but both part need to be the
absolute value.

opw-634263
closes #6533
2015-05-08 16:13:03 +02:00
Olivier Dony 5b19ae8a59 [FIX] hw_*: enforce Python dependencies + disable if missing dependency
Prevents installing the hw_* modules at all when the python
dependencies are missing. If they were already installed
do not start the hardware threads to avoid wasting resources
and logging errors
2015-05-08 12:49:19 +02:00
Olivier Dony 5275c10e70 [FIX] hw_proxy: routes shadowed by same method name 2015-05-08 12:39:32 +02:00
Nicolas Lempereur 5804246e0f [FIX] website_membership: perf, pagination
This fixes :
 * pagination only on /members and sometimes with bad page count,
 * free members could not be searched (were always all displayed),
 * all elements are displayed even if there is a pagination,
 * for members without country, errors happened in some use case,
 * when too much locations were on a map (>2000) it failed,
 * numbers of members by countries was not displayed for guest.

And also as performance improvemnts:
 * only query all partners when the map is enabled (customize > left
   world map),
 * limit partners put on the map to 2000 (even then it's a lot for
   google maps),
 * don't browse all membership_line to get res_partner but use a query.

opw-634653
2015-05-08 11:10:53 +02:00
Daniel-CA 68599dcd43 [FIX] mrp: avoid float representation error
Avoid ZeroDivisionError if a move is confirmed with quantity of 0 (when stored
in database where the rounding is done by the precision defined on product_qty
field.
Fixes #6439
2015-05-08 10:47:32 +02:00
Olivier Dony 6e23b2a807 [FIX] ir.model.data._update: create/modify XML IDs as super-user
When importing a CSV file with an "id" column containing
external IDs (XML IDs), the system automatically creates
or updates the corresponding ir.model.data entries.
This would fail for regular users who do not have
create/write access on this internal model.
2015-05-08 10:25:44 +02:00
Goffin Simon 44fecec058 [FIX] mrp: Manufacture Order Sequence
The name of the manufacture order created must include the sequence linked
to the company of the salesperson.

opw:632600
2015-05-08 08:46:16 +02:00
Denis Ledoux 612b44648e [FIX] crm: hide mark won/lost buttons when opportunity is won
When an opportunity has a 100% probability, it is regarded
as won. When the opportunity is regarded as done,
there is no more use to show the mark won/lost button.

opw-634420
2015-05-07 18:18:03 +02:00
Raphael Collet 5efac22043 [FIX] fields: when determining `digits()`, make sure to use a valid cursor 2015-05-07 16:56:26 +02:00
Goffin Simon ac8b663d12 [FIX] im_livechat: date in website_livechat
The lang of the date used in website_livechat must be
the lang of the user as in "Instant Messaging".

opw:633746
2015-05-07 16:08:49 +02:00
Goffin Simon 4a9deb8be3 [FIX] im_chat: translate placeholder
The placeholder "Search Users..." must be translatable.

opw:633746
2015-05-07 16:08:49 +02:00
Denis Ledoux 547204b7f4 [IMP] logging: store logs in database in multi databases env.
The server parameter `log-db` gives the possibility
to store the logs of a server in a specific database,
in the ir.logging model.

Unfortunately, it wasn't possible to store these logs within
the database from which the logs came from in a multi databases
environment (e.g. the SAAS).

This revision gives the possibility to store the logs
within the database where the logs come from,
using --log-db=%d (inspired from the --db-filter arg)

We also added the possibility to change the level of logs to store in
the database, with the --log-db-level argument, which is set
by default to `warning`.
2015-05-07 15:11:58 +02:00
Nicolas Martinelli 561346db9e [FIX] stock: forbids possibility to make inventory of all products when a given product is chosen
opw-634388
Fixes #6512
2015-05-07 14:04:26 +02:00
Nicolas Martinelli f9d25973d0 [FIX] account: create statement from invoice line uses statement date instead of today's date
Using statement date is necessary in order to select the appropriate currency rate.

opw-634297
2015-05-07 13:52:21 +02:00
Jeffery Chen Fan 0e5e8d2873 [CLA] signqture for jeffery9 2015-05-07 13:45:03 +02:00
Levent Karakas 81dbbd8d87 [FIX] sale_layout: access rights 0 instead of O
Typo in ir.model.access with a letter instead of a number. 'O' will be
considered as True instead of '0' considered as False.
2015-05-07 12:13:50 +02:00
Denis Ledoux 272e085df4 [MERGE] forward port of branch saas-3 up to da93981 2015-05-07 11:34:48 +02:00
Denis Ledoux da93981cb0 [MERGE] forward port of branch 7.0 up to f300d64 2015-05-07 11:33:59 +02:00
Nicolas Martinelli 610a461099 [FIX] purchase: update and cancel of purchase order line takes into account existing procurements
Update:
When an existing purchase order line is updated, for example if a new procurement was required,
we check if the sum of existing running linked procurements is larger than the quantity in the
purchase order. If it is the case, we update the quantity and the unit price accordingly.
Without this fix, we systematically add the procurement quantity (or the provider minimum quantity)
to the purchase order line, even if the sum of the procurements is smaller than the ordered
quantity.

Cancel:
When a procurement is cancelled, we recompute the unit price of the associated purchase order
according to the quantity and make sure the provider minimum quantity is met. If the required
quantity is zero, we cancel and unlink the purchase order line.

opw: 632175 and 632176
2015-05-07 11:19:28 +02:00
Nicolas Martinelli 5b6dcbb3a8 [FIX] stock_dropshipping: use route with 2 steps for crossdock test 2015-05-07 11:19:28 +02:00
Goffin Simon f300d648a8 [FIX] web: attachment with safari
With Safari, the function content_disposition must return "attachment; filename=\"%s\"" % filename
to avoid that Werkzeug raises an UnicodeDecodeError.

Fixes #6160
opw:634205
2015-05-07 10:13:10 +02:00
Nicolas Lempereur d65dec9eef [FIX] mass_mailing: mismastched mailing list view name
opw-634693
2015-05-07 09:02:39 +02:00
Denis Ledoux dd47b6f5bc [FIX] account: Exchanges rates gain/loss during reconciliations
When processing the reconciliation of a bank statement
within the company currency with an invoice in a foreign currency,
avoid to recompute the bank statement debit / credit within
the currency rate at the time of the invoice when the
`amount_currency` of the bank statement line and the `amount_currency`
of the invoice move line are the same
(while having the invoice move line and the
bank statement move line in the same currency,
and having the bank statement currency and
the company currency the same),
to prevent gain/loss exchanges during currencies conversion.

Computing the amount of the statement line
within the currency of the invoice is useful
to compute the difference of amount paid within the company currency
when a change of currency rates occured between the invoice date
and the date of the payment.

Nevertheless, recomputing the amount in the currency of the company
is useless when the payment currency
and the company currency are the same,
and the amount of the invoice and the statement in the foreign currency
are identical, since the amount is already computed, within the
debit/credit field of the invoice move line.

Besides, this prevents gain/loss changes.
opw-631748
opw-632133
opw-631895
closes #6559
2015-05-06 18:29:47 +02:00
Denis Ledoux 9335fed9fe [FIX] account: debit/credit values for move lines in foreign currencies
When the target currency is the company currency, there
is no need to re-compute the debit/credit amounts of the move lines,
since these debit/credit values already contains the amount
of the move line within the company currency.

Avoiding the recomputation prevents gain/loss during currencies exchanges

opw-631748
opw-632133
opw-631895
2015-05-06 18:29:47 +02:00