Commit Graph
110110 Commits
Author SHA1 Message Date
Thibault Delavallée 7eca402b11 [FIX] website_portal_sale: fix access rights issues when viewing quotes
Portal users do not have access on invoices or invoice lines. However when
viewing an online quotation in website_portal_sale some computation is
performed based on invoices and invoice lines. We therefore iterate on
invoice and invoice lines as superuser as we do not want to grant any
additional access on those models for portal users.
2017-06-01 13:54:04 +02:00
Thibault Delavallée 7736eabf0d [FIX] website_sale(_delivery): limit 'Setup payment / delivery methods' to group_system
When choosing a payment acquirer or a delivery provider there is a link
allowing to directly jump in the backend to configure them. It has been
introduced at 6c2535b9b6.

However it is displayed for every user going through the checkout process.
This commit limits it to group_system. It seems a better idea to not show
it to everyone as they don't have access to it anyway.
2017-06-01 13:53:56 +02:00
Jairo Llopis a567cd796e [IMP] service: Display a warning when launching tests in multi-workers mode
Indeed, running the testsuite is not supported in multi-process (worker/pre-fork) mode, for multiple reasons: no multiple/concurrent execution of tests, necessity for in-memory cross-request statefulness (test cursor), etc.

We have no plan to work around these issues, as there seems to be no strong use case.
Our testsuite is mainly focused on the business/framework aspects, and not scalability/deployment aspects - which would require a much more complicated test infrastructure.
2017-06-01 11:51:24 +02:00
Jairo Llopis a5565cde76 [CLA] Deprecate Yajo from grupoesoc 2017-06-01 11:51:24 +02:00
Parth N. Patel 97ecc4bc93 [IMP] web: kanban: do not remove quick create if dirty
In this commit, we improve the behaviour of quick creation in grouped kanban views.  The issue was that the quick create widget was removed when the user click somewhere else, even if the user added some text. For example, the problem could be seen in the kanban view for the tasks.

In this commit, we simply keep it around if there is a non empty text.
2017-06-01 09:22:51 +02:00
Olivier Dony f0a6bb6ce3 [MERGE] Forward-port saas-16 up to eb24f96448 2017-06-01 01:57:22 +02:00
Olivier Dony eb24f96448 [FIX] hr_expense_check: repair relative imports for Py3
(Pylint W0403)
2017-06-01 01:49:16 +02:00
Olivier Dony 5d2869cbc8 [MERGE] Forward-port saas-16 up to ba15df47cb 2017-06-01 01:46:13 +02:00
Olivier Dony ba15df47cb [MERGE] Forward-port saas-15 up to 17b847c0f6 2017-06-01 01:10:29 +02:00
Olivier Dony 17b847c0f6 [IMP] l10n_be_invoice_bba: convert to unix LF line endings
For some reason this file was using Windows CRLF line endings.
2017-06-01 00:44:46 +02:00
Olivier Dony 5dd2cc8e63 [MERGE] Forward-port saas-14 up to b9e2207267 2017-06-01 00:37:30 +02:00
Olivier Dony b9e2207267 [MERGE] Forward-port 10.0 up to 7e44444878 2017-06-01 00:15:27 +02:00
Aaron Bohy f9a1241721 [FIX] web: editable list: don't create invalid records
Clicking multiple times on 'Create' (in main list views) or 'Add an
item' (in o2m lists) might create invalid rows (i.e. rows with
required fields unset).

Creating a new record requires two sequential RPCs: a default_get
and an onchange (only if there is an onchange of one of the
record's field). When clicking twice to create a new record, that
sequence of RPCs is done twice in parallel, after unselecting the
current row (i.e. saving it if it is valid). However, in both
cases, there is no line to unselect yet (as both operations are
done basically simultaneously). When the first onchange returns,
a first new record is added to the list. When the second returns,
the second one is added and takes the edition, leaving the first
one, invalid, in the list.

This rev. ensures this doesn't happen by preventing concurrent
record creation.
2017-05-31 20:53:55 +02:00
Aaron Bohy 23613b411f [FIX] web: x2m editable list: wait for onchanges
... before saving a line.

Suppose that we have an editable list with one required field
(e.g. many2one) with an onchange. We add a record and select a value
for the many2one. Before the onchange returns, we click again on
'Add an item'. If we don't wait for the onchange to return before
unselecting the row (i.e. before saving it), a confirm dialog asking
if the changes can be discarded opens, because the line isn't valid
yet. This could easily be reproduced on the sale_order form view,
with some throttling.

This rev. ensures that we wait for the onchange to return before
saving the line, and thus before creating a new line.
2017-05-31 20:53:55 +02:00
Olivier Dony 7e44444878 [MERGE] Forward-port saas-11 up to 156e9d0016 2017-05-31 20:09:51 +02:00
Géry Debongnie 5ff7199562 [FIX] web: properly parse float with '.' as thousand_sep
In a slightly too naive way, we apparently tried to improve the
parse_float method while rewriting the new views.  This was done by
using a regexp to match all occurences of a thousand separator.

The way the regexp was built was fine, until the thousand separator is a
'.', which, if used as a regexp, matches all characters.  Also, sadly,
'.' is not so rare as a thousand separator...
2017-05-31 19:31:07 +02:00
Olivier Dony 156e9d0016 [MERGE] Forward-port 9.0 up to 75e03c0f76 2017-05-31 19:28:20 +02:00
Goffin Simon bb438a2935 [FIX] account, purchase: payment term in vendor bill
When creating a vendor bill from a PO, the payment term configured in
the PO was lost due to function _onchange_partner_id.

When creating a vendor bill, the field payment term was invisibile if
there was no payment term set on the vendor.

opw:744714
2017-05-31 15:21:52 +02:00
Richard Mathot 04111cae39 [FIX] web: bad conversion to python3, el is an Etree, not a dict 2017-05-31 14:39:00 +02:00
Richard Mathot dd8f238ff7 [FIXMP] sale: make test result easier to understand 2017-05-31 14:12:58 +02:00
Martin Geubelle a5f139a504 [FIX] web: client-side sort of x2many values
When a ´default_order´ is set on an embedded view for a x2many field,
the sort was only applied server-side, after saving the record. After
adding a record in a x2many, the records were thus not correctly sorted.

We reintroduce here the client-side sort after the x2many modification.
2017-05-31 14:10:13 +02:00
Martin Geubelle e116a69f25 [FIX] web: properly handle autocomplete attribute
With the new views, the attribute autocomplete on input was no
longer supported. We simply reintroduce its support in this commit.

The basic attribute values are 'on' and 'off' but one may want to use a
random string.

Note that an input with type='password' is a special case: the autocomplete
attribute should always be set to 'new-password' to remove autocompletion
(autocomplete='off' doesn't actually remove the autocompletion).
2017-05-31 14:10:13 +02:00
Martin Geubelle e3fdce9643 [FIX] web: add parent in context after 'Save & New'
When clicking on 'Save & New' in the form view dialog, a new default record
is created. The parent was not correctly set in this record, which causes an
error if `parent` was used in context.
2017-05-31 14:10:12 +02:00
Jairo Llopis bef9b1114c [IMP] website_sale: Allow to validate VAT without country code in checkout step
Closes #17316

If the user already specifies the country and does not give the country vat prefix, use the one from the address to validate the VAT.
2017-05-31 10:47:51 +02:00
Nicolas Lempereur 75e03c0f76 [FIX] website_form: enforce 'required' date
Only the validity of a date was enforced but the date could also be
wrong in other situation (required so must be filled, validation
attributes, ...).

opw-744273
closes #17329
2017-05-31 10:38:06 +02:00
Darshan Kalola 07e1bf7850 [FIX] website: fix error while opening SEO wizard
Before this commit, error was giving on browser console when we open seo wizard which is due to the wrong (this) was passed when initializing Configurator
So in this commit, we passed correct this, to get rid of the error.

(PR #17260)
2017-05-31 09:42:00 +02:00
Yannick Vaucher 8682c54d06 [IMP] sale: remove dead code line
currency variable is defined but not used in _get_tax_amount_by_group

Closes #17315
2017-05-31 09:19:23 +02:00
Cocographique 3dcc54ccf4 [FIX] website: Front-end apps dropdown doesn’t appear on mobile
This commit closes #15551
2017-05-30 18:28:22 +02:00
Yannick Tivisse fba234741b [IMP] base: Move default address format into a method for inheritence
This diff is a small refactoring of a method to allow override.
2017-05-30 17:59:31 +02:00
Jeremy Kersten 013e9e906a [FIX] website_sale: pricelist code reading
Don't allow non employee to read code promo
2017-05-30 17:48:14 +02:00
Jeremy Kersten 7d96a302fa [FIX] website_sale: fix pricelist seletion
Don't allow to select random pricelist by id

Before this commit, code promo was broken due to odoo/odoo@97790089c4
2017-05-30 17:48:14 +02:00
Pedro M. Baeza 481872ee03 [FIX] stock: Put correct field in delivery slip report
As the header says, the expected field is "Order (origin)", which is
o.origin. The same field is also put correctly in "Picking Operations"
report.
2017-05-30 17:32:28 +02:00
Nicolas Martinelli 68391bd5c9 [FIX] hr_holidays: approval link
The approval link received by a manager doesn't take into account the
double approval configuration of the holiday type.

opw-741558
2017-05-30 17:13:18 +02:00
Nicolas Martinelli ef17f92c9f [FIX] hr_holidays: leaves left
The stat button "Leaves Left" is a computed field of type integer.
However, it aggregates the data of `number_of_days`, which is a float.
Since the field is not stored, we can change its type.

opw-743153
2017-05-30 17:05:16 +02:00
bluesoft83 aed5563000 [FIX] web: error setting wraparound on undefined
In function _next, sometimes options parameter is not passed, so setting on undefined is causing error.  (PR #15716)
2017-05-30 16:56:51 +02:00
Laurent Mignon (ACSONE) a1db50e7c8 [FIX] barcodes: fixes ean8 checksum computation
According to the docstring, the given ean is a string but was summed.

Closes #16813
2017-05-30 16:51:59 +02:00
Xavier Morel 30d2b51336 [FIX] P3: mock sometimes blows up in website_sale 2017-05-30 16:40:17 +02:00
Florent de Labarre 89170b750e [FIX] mrp: remove quick create attribute in bom line
Quick creation of attributes in the bom line of the bom form does not
make sense as it won't be related to the product (and would need to
create extra variants, ...)

closes #16924
2017-05-30 16:33:31 +02:00
Alex Comba 40e9b7563f [FIX] product: prevent ValueError when computing quantity on a void recordset
Invoice lines do not necessarily have a product and therefore an UoM set
on them. You could then compute quantityes on a void recordset. In that
case we just return the quantity untouched.

This is actually the old behavior of compute_quantity that is set back.
See https://github.com/odoo/odoo/blob/01279359b9e5340d5ecb15f0fee186f039356374/addons/product/product.py#L164 .

Closes #16377
2017-05-30 16:25:56 +02:00
Yenthe V.G 746a13df91 [IMP] base: Add missing names on filters to allow inheritence
Closes #17306
Closes #17303
Closes #17302
Closes #17301
Closes #17300
Closes #17298
Closes #17296
Closes #17295
2017-05-30 16:18:15 +02:00
Josse Colpaert 40c5366861 [FIX] product_margin: graph view only use one non-stored field as measure fixes #16565
Because read_group can not handle non-stored fields well,
we fall back to the similar implementation as for the stock
valuation report.  This allows only one non-stored field as a measure in
the graph.  Then it is more logical to show the total margin as that is
what the module is meant for.
2017-05-30 15:53:34 +02:00
Yannick Tivisse e2f3e8c4b7 [FIX] stock: Make incoterm names translatable 2017-05-30 15:52:47 +02:00
Giuliano69 c5718fa897 [CLA] Individual signature Giuliano69.md 2017-05-30 15:49:51 +02:00
Dharmraj 1b17d0a764 [IMP] web: show user menu in small devices
The user menu was not visible in portrait mode with multi company in mobile.  This was caused by the company menu taking too much room. We fix the issue by making the company menu smaller (just the size of an icon)

(PR #16685, task 29394)
2017-05-30 15:20:05 +02:00
Nicolas Lempereur 3fd0bdbd40 [FIX] crm: setting alias_prefix easy reinited
The previous code when "Manually Assignation of Incoming Emails" sale
config was set always set the alias prefix to "info" even if another
value had been previously saved.

opw-745174
closes #17305
2017-05-30 15:08:03 +02:00
Juan Pablo Arias a6025daaf0 [IMP] ofxparse: update requirements.txt
update ofxparse to 0.16: fix language issues

closes #15713
2017-05-30 15:02:58 +02:00
Jordi Ballester 82fbe03ff8 [FIX] purchase: update tests to effectively create invoices of type purchase, not
Default value is out_invoice aka an invoice of type sale. However here
we would like to test invoices of type purchase. Otherwise extending
tests for specific purchase-related invoice code is not possible. This
is done using the magical context key type.

Closes #15886
2017-05-30 14:46:53 +02:00
Jordi Ballester 8a76d4581c [CLA] Add Corporate Eficent CLA
By the way Lois Rilo lois.rilo@eficent.com is now integrated in the
Eficent corporate CLA and does not require a personal one anymore on
the same email address.

Related to #15886
2017-05-30 14:46:47 +02:00
Florent de Labarre 1c568f02df [IMP] product: Hide weight and volume on service products 2017-05-30 14:09:18 +02:00
Nicolas Martinelli a75bb06cc3 [FIX] account: default partner of analytic account
- Create an invoice
- Add a product
- Create an analytic account directly from the invoice line
- Validate the invoice

The partner is not filled in on the analytic entry.

This is because the partner of the line is a related of the partner of
the analytic account. By default, the partner is not filled in.

opw-743628
2017-05-30 14:05:24 +02:00