Commit Graph
111138 Commits
Author SHA1 Message Date
Jitendra Prajapati b6d636617c [FIX] payment: perform small code improvements
* add a constraints about authorized state for tx and authorize feature
   available on acquirer;
 * order acquirers first by publish, then sequence then name;
 * add a sequence on some provider data and use a default to have some
   popular acquirers first;
 * use update instead of write in an onchange;
2017-05-17 14:41:00 +02:00
Jitendra Prajapati de5433f415 [IMP] payment: improve usability of tx views
* add provider, related on acquirer_id.provider, in order to display
   certain piece of information on tx depending on their provider;
 * better tx form view and partner address display;
 * remove unnecessary notebook on tx form view as it is not used;
 * rename Payment Acquirers menu into Payment Methods, easier to
   understand;
 * acquirer kanban view improved to install / activate / configure them
   depending on their state;
 * be able to publish / unpublish acquirers without having to wait for
   website_payment to add a button;
2017-05-17 14:40:35 +02:00
Dhaval Panchal db41366b67 [IMP] discuss: action buttons always visible on touch screens
We add the o_touch_device css class to the body (it was done in enterprise only), and various other small changes to make sure that the action buttons (in discuss, next to the message title) are always visible (not only on hover) when we are on a touch device. (pr (#15459, closes task 31208)
2017-05-17 14:39:09 +02:00
Laurent Smet 31b37b8abf [FIX] crm: bad computation of 'Won in opportunities'
The filter on activity_date_deadline has been added during a fix, see
28c158cd13
It's incorrect for the computation of the 'Won in opportunities'
because it excludes opportunities not having activity_ids.

Furthermore, the way to compute the 'won' amount is not equals to the
filters when clicking on the button. Then, we need to keep only
opportunities standing in a kanban column having a probability of 100%.

opw-742489
2017-05-17 13:37:06 +02:00
Jitendra Prajapati 327be89d0b [IMP] payment: improve labelling and description of various acquirers
Be less ecommerce centric and try to explain a bit better the various
payment options. Purpose is to ease user understanding.
2017-05-17 13:14:54 +02:00
Sylvain GARANCHER 57b3894ca0 [IMP] stock: allow to define from_date
The context key `from_date` can be retrived from `self.env.context,
while the context key `to_date` can be defined for each procurement
group.

We extend the code so that `from_date` can also be defined for each
procurement group.

Closes #16803
opw-743013
2017-05-17 13:10:43 +02:00
Edser Solís f17bc70fbc [CLA] Iterativo signs CCLA
Done at #16967
2017-05-17 13:08:46 +02:00
Deepak Geriani 6ea3b8de38 [IMP] mail: close chat window with Esc key
Closes task 32316
2017-05-17 12:48:44 +02:00
Aaron Bohy ba6a3a91ae [FIX] web: MonetaryField: read currency_field in options
In the xml definition of views, a 'currency_field' can be specified
in the node options:

<field name="amount" widget='monetary'
       options="{'currency_field': 'currency_id'}"/>

It indicates which field the monetary widget has to use to
determine the currency to display.

Before this rev., the widget didn't look for the 'currency_field'
in the options, but directly in the node attrs, so this simply
didn't work. This was for example the case on the crm.lead kanban
and form views.
2017-05-17 12:36:16 +02:00
Aaron Bohy 59584283c5 [FIX] web: properly escape field values when necessary
This rev. removes some html injections issues:
  - in char and text field widgets
  - in phone field widget in mobile
  - in list views (when no widget is instantiated)
2017-05-17 12:36:09 +02:00
qsm-odoo a83f812357 [FIX] mass_mailing, web_editor: increase mail clients compatibility
Following bee3253b44, this commit is made
to increase the mail clients compatibility for the mails that are
created with the odoo mail editor.

Three new problems are handled:

- Font family of titles had to be forced too as outlook was not
  inheriting parent font family on those either.

- Default text font-size had to be forced as was not detected in
  transcoding correctly.

- text-decoration rule was decomposed in text-decoration(-line,
  -style and -color) in transcoding. Outlook is ignoring those
  three rules for some reason. As the decomposition is useless,
  the transcoder now forces the recomposition of these three rules.
2017-05-17 11:29:24 +02:00
Nicolas Lempereur 533f03fe7f [FIX] event_sale: auto_confirm free ticket
After 5d4dd98a a registration was confirmed once an invoice was fully
paid.

This is not very handy if the registration was free to begin with, you
need to create a 0.00 amount invoice.

This commit get back the previous behavior of auto-confirming
regitration directly when the registration is free.

opw-742901
closes #17035
2017-05-17 10:39:59 +02:00
Aaron Bohy 0f9e986c46 [FIX] web: BasicModel: discard changes when reloading
... from a new record.

Steps to reproduce the issue:
  - go to a multi-record view (e.g. list) of basically any model
  - click on 'Create' -> it opens a form view in edit mode
  - click on 'Discard' -> it goes back to the list
  - click on an existing record -> it should open the selected
    record in readonly.
However, it didn't display the data of the selected record, but
the default data of a new record (the result of a default_get).

This was because the changes weren't properly discarded when
reloading from a new record (it rather restored the record to its
initial state, i.e. to the result of the default_get).
2017-05-17 08:10:49 +02:00
Olivier Dony 5f4db9df66 [MERGE] Forward-port saas-16 up to 5afe894f44 2017-05-16 18:23:15 +02:00
Martin Trigaux 722017ca83 [FIX] hw_posbox_homepage: do not display not working links
The '/point_of_sale/display' controller is added in the hw_screen module.
This module is not loaded if the init scripts are not modified.
This means that updating a posbox with the internal update feature will not work.

This adds the link only in hw_screen and display an information message for old
versions.
2017-05-16 18:14:45 +02:00
Jerome Boisvert-Chouinard 43be0c1ab2 [CLA] Update Savoir-faire Linux CLA
Add new collaborators, remove old ones

Done at #16939
2017-05-16 18:10:03 +02:00
Nicolas Lempereur 65808bbb2e [FIX] models.py: less botched copy for callable translate
Fields translated with function such as `xml_translate` or
`html_translate` have translations such as:

  lang=fr_FR, src="Tree", value="Arbre"

when the value directly stored in the table could be:

 <strong>Tree</strong>

The code to copy translations when duplicating a record did not take
this into account and when not in english, would add previously not
existing translations such as:

 lang=fr_FR, src="<strong>Tree</strong>", value="<strong>Arbre</strong>"

This is wrong since for example after a copy in french, what is in the
database is:

 <strong>Arbre</strong>

This commit change this so that the translation in the database stay the
same:

  lang=fr_FR, src="Tree", value="Arbre"

This translation will still not apply (if the base language is different
and a translation different than the source exists) but it is more
logical to have this.

This change also magnify an issue that was that if a translation was:

  Tree -> Arbre

and the content `<strong>Arbre</strong>`. The translation doesn't happen
in one way, but does when doing the reverse translation.

So:

 translation (Tree -> Arbre):
  `<strong>Arbre</strong>` -> `<strong>Arbre</strong>` <= FAIL
 reverse translation (Arbre -> Tree):
  `<strong>Arbre</strong>` -> `<strong>Tree</strong>` <= WORKS

this broke the test that something reverse translation of a translation
got the original. But testing this if the translation did not work seems
to make little sense.

opw-740213
closes #16984
2017-05-16 18:05:49 +02:00
Jeremy Kersten 5bbe4a8ce7 [FIX] website_portal_sale: fix vat and name comparison in /my/account
Before this commit, we compare in some case False != u''

Commit #56c798a fix u'' != False but in case of the partner has been
edited from front end, partner.vat will be u'' and not False
2017-05-16 17:47:51 +02:00
qsm-odoo 490764ae11 [FIX] website_blog: fix "select to tweet" feature
There was two main problems with the feature

- The author name was not properly fetched so the feature which was
  supposed to add the author of the blog post in the tweet never
  worked -> this commit simply deletes it

- The code was considering the url length in the size of the tweet,
  so if the url was 135 characters long, it considered that only 5
  characters have to be taken in the selected text... which is wrong
  as twitter URL are all shortened to 23 characters by twitter

opw-741530
2017-05-16 17:21:34 +02:00
Olivier Dony 5afe894f44 [MERGE] Forward-port saas-15 up to 878fbc75ff 2017-05-16 17:09:45 +02:00
Thibault Delavallée cbca7e1313 [MERGE] payment, website_sale(_delivery): simplify payment configuration
This commit proposes to simplify payment acquirers configuration in
backend and frontend. Includes mainly

 * configuration boxes for website admins at checkout process;
 * better and fixed display of transaction status at checkout;
 * hide unnecessary fields for transfer provider;

This commit merges 'dev/master-payment-tde'.
2017-05-16 15:41:26 +02:00
Nicolas Martinelli efa4f85480 [FIX] account: prevent invoice line unlink
Nothing prevents the deletion on invoice line at the Python level. Other
modules might give access directly to the invoice lines, and make their
deletion possible when the invoice is not draft.

opw-743154
2017-05-16 15:39:03 +02:00
Laurent Smet 259c5d9145 [IMP] report: pass pdfreport_path to postprocess_pdf_report method
Restore a feature lost due to refactoring in https://github.com/odoo/odoo/commit/e80238042c9d93d492ea8b06b0041aced0d81dcd
that pass the path to the report instead of the attachment content in order to perform changes to be part of the final result.

see https://github.com/odoo/odoo/pull/16936#issuecomment-300827614
2017-05-16 15:37:23 +02:00
Laurent Smet d5fa3232fe [FIX] base, report: fix some issues due to removed 'report' module.
fix related to task: https://www.odoo.com/web#id=31625&view_type=form&model=project.task&action=333&active_id=967&menu_id=4720

The 'report' module no longer exists but a dependency was still there in l10n_ca.

- fix dependency in l10n_ca
- fix broken company layout
- move layout templates from base to web
2017-05-16 15:37:15 +02:00
Thibault Delavallée dac90e79f7 [FIX] payment_transfer: hack the broken hack
Put bank data back in transfer providers. Otherwise users are very very
sad to not have a default message containing bank accounts data.
2017-05-16 15:35:11 +02:00
Thibault Delavallée f0abe5b0ed [IMP] payment_transfer: hide unnecessary fields for transfer provider
Indeed as transfer transactions are always pending and independant of
any callback, it is not necessary to see credentials, auto confirmation
settings and error / cancel / done messages.
2017-05-16 15:35:11 +02:00
Thibault Delavallée a995e28554 [FIX] payment: set enviroment back in its own environment 2017-05-16 15:35:11 +02:00
Thibault Delavallée 24d996c534 [IMP] website_sale: simplify code and improve display of tx status after checkout
Currently displaying tx status after checkout is done using two templates
and two separate pieces of code, aka "order_state_message" and
"payment_confirmation_status". This leads to checkout information
being displayed twice in the page. It is displayed once before the
order details and once after payment information.

This commit simplifies the code to display only once the transaction
status after payment information. This one is the "polled" one aka
refreshed automatically several times to try to catch responses from
payment providers.

From the confirmation message it is also now possible to directly jump
in the backend for website administrators in order to edit the displayed
messages.
2017-05-16 15:35:11 +02:00
Thibault Delavallée 6c2535b9b6 [IMP] website_sale(_delivery): allow to choose a payment / delivery methods in frontend
When choosing a payment and/or delivery provider in website_sale admin
now see a link to install and configure them.
2017-05-16 15:35:11 +02:00
Thibault Delavallée f9a8c53e48 [REF] website_sale(_delivery): correctly set data processing methods for payment in controllers instead of model
Currently /shop/payment controller perform some data processing. It calls
model methods _get_errors and _get_website_data that are defined on sale
order model only to be inherited in website_sale_delivery.

This commit proposes instead to have a data processing method in sale
controllers that is inherited in website_sale_delivery. There is no need
to have model methods only to format data.
2017-05-16 15:23:14 +02:00
Sanjay Jamod 8dac9cfc93 [FIX] web: website tour and website seo are using ajax_service
so load ajax_service service into assets_common instead of assets_backend (#16993)
2017-05-16 15:05:16 +02:00
Olivier Dony 656accfde4 [FIX] payment_*: remove obsolete license entry
The license entry in the manifest files for these modules were
leftovers from previous versions.

Once integrated in Odoo Community they share the same license as all
other modules, as mentioned in the LICENSE notice at the top of the
files.

opw-743686
2017-05-16 14:58:12 +02:00
Olivier Dony 7a443aabf9 [MERGE] Forward-port saas-11 up to 6490e652c3 2017-05-16 14:56:02 +02:00
Nicolas Martinelli b218c5410f [FIX] point_of_sale: journal domain
- Sell a product in the POS
- Go back in the backend
- Return the product
- Click on "Payment"

The user is allowed to select any journal. It should be restricted to
the payment method available in the POS.

opw-743585
2017-05-16 14:52:09 +02:00
Olivier Dony 6490e652c3 [MERGE] Forward-port 9.0 up to 1070b83e14 2017-05-16 14:48:43 +02:00
Géry Debongnie c3ca877d81 [IMP] web: better error logging for qunit tests
Before this commit, when a test in the qunit test suite failed, the
error displayed by the runbot was not really interesting.  It just said
that test_01_js failed.  With this commit, each assertion error is now
logged as an error, which means that they are displayed in the short
error log by the runbot.
2017-05-16 14:41:03 +02:00
Géry Debongnie 15a227375a [ADD] web: add benchmark support
With this commit, we introduce a benchmarking infrastructure: a new
controller, accessible at the route /web/benchmarks which will render a
new template (web.benchmark_suite).

This template uses benchmark.js and qunit.js to display a list of
benchmarking informations.  For example, the number of op/s for
instantiating and destroying a list view.

I hope that this is the start of the beginning of taking the habit to
check our JS code performance sometimes, and making sure we do not have
large regression without a good reason.
2017-05-16 14:41:00 +02:00
Yannick Tivisse 0a523a16cd [IMP] delivery: Define _get_shipping_price_from_so for a single order
These functions are always called with a single order. We don't need to make a big pâté in multi
2017-05-16 14:37:23 +02:00
jpr-odoo bc705c0fce [IMP] (website_sale_)delivery: Clean carrier form view, enlarge carrier box on payment 2017-05-16 14:37:23 +02:00
Aaron Bohy 0c8d1f6089 [FIX] web: Form: col width of x2many lists inside groups
The form renderer defines inline style on the groups it renders to
set the width of their children according to the col and colspan
attributes specified in the view.

However, before this rev., this impacted inner list views (for
x2many fields), as their columns get an harcoded width as well,
whereas they shouldn't.

This was for example the case in the stock.location.route form
view, for the push rules and procurement rules o2m fields.
2017-05-16 14:07:49 +02:00
Wolfgang Taferner 58c928a732 [FIX] mrp: fix unlinking of move lots for production during create_lots
Closes #17007
2017-05-16 13:54:43 +02:00
Olivier Dony 1070b83e14 [FIX] l10n_cn*, payment_sips: clarify obsolete licensing info
The license info for these modules was a leftover from previous versions.

Once integrated in Odoo Community they share the same license as all
other modules, as mentioned in the LICENSE notice at the top of the
files.

opw-743686
2017-05-16 13:42:10 +02:00
Nicolas Martinelli 0fab06204c [ADD] hr_expense_check: add amount in words on check
- Create an expense, approve.
- Register the payment by check
- Print the check

The amount in words is not written.

The core of the issue is that the wizard
`hr.expense.register.payment.wizard` has been defined as a brand new
model instead of inheriting from `account.register.payments`. Hence the
Enterprise module "hr_expense_sepa" and now "hr_expense_check".

opw-742305
2017-05-16 13:27:40 +02:00
Nicolas Martinelli 8fdf046df2 [REF] account_check_printing: avoid duplicated code
Small refactoring necessary for the following commit, to avoid
duplicated code.

opw-742305
2017-05-16 13:27:40 +02:00
Olivier Dony 878fbc75ff [MERGE] Forward-port saas-14 up to a6e2b3929f 2017-05-16 13:27:08 +02:00
Olivier Dony a6e2b3929f [FIX] website: remove extra % char in forward-port 2017-05-16 13:25:56 +02:00
Goffin Simon 8c22c8b625 [FIX] sale: _get_invoiced with same sequence for PO and SO
When PO and SO used the same sequence, a vendor bill with a source
document equal to the sequence of a SO could be displayed by this
SO(in the smart button "invcoies").

opw:693991
2017-05-16 13:23:57 +02:00
Olivier Dony 61c2b8efd5 [MERGE] Forward-port of saas-14 up to 9b3ca1af23 2017-05-16 12:47:44 +02:00
Olivier Dony 9b3ca1af23 [MERGE] Forward-port 10.0 up to 1545995b39 2017-05-16 12:12:30 +02:00
Nicolas Martinelli 6c38a80b6f [FIX] purchase: modify expected date
- Create a PO with a line scheduled 2017-07-01
- Validate the PO => the expected date of the related stock move is
  2017-07-01.
- Modify the PO line date to 2017-07-15 => the expected date of the
  related stock move is not updated.

Since we allow the modification of the scheduled date, we should make
sure that the related information is changed accordingly.

opw-741815
2017-05-16 12:06:47 +02:00