Commit Graph
112144 Commits
Author SHA1 Message Date
Thibault Delavallée 0f207f755e [REM] website_sale: remove dead controllers and templates used by old payment form
Those do not seem necessary anymore since commit 1fdb10f0ac introduced
new routes along with the new payment form.
2017-09-06 11:41:25 +02:00
Thibault Delavallée 01f69f65fe [IMP] account_payment: add invoice payment support in customer portal
This commit adds support of payment in the account customer portal. This
is done in the account_payment module. This way customers can now pay
invoices directly on the customer portal and have access to the status
of their invoices. It replaces the old website payment mechanism that
was only allowing to pay without generating payments and reconciliating
them.

Two routes are defined in this commit, one for form-based payments and
one for server2server-based payment. Please refer to commit 1fdb10f0ac
for more details about the new payment form.

Tools methods are added to handle transaction / invoice matching, the
check of invoice and the automatic payment and reconciliation.
2017-09-06 11:41:25 +02:00
Thibault Delavallée 699aa47b00 [IMP] account_payment: add invoice / transaction link
Purpose of this commit is to add a link between invoices and transactions
to store payment data like what is already done for sale orders.

 * add payment_tx_id on account.invoice model that stores the last
   transaction; also add the acquirer related on the tx;
 * add a stat button on invoice with links to all transactions linked
   to that invoice;
 * add account_invoice_id on payment.transaction model that stores the
   link to the invoice;
 * add the inverse one2many from invoice to all its transactions so
   that we can browse them if necessary;
2017-09-06 10:49:03 +02:00
Thibault Delavallée e6120eb7d6 [IMP] account: improve invoice page view on customer portal
* keep query on pdf link so that customers have access to the pdf when
   using the access token instead of having an access rights error;
 * add redirect to record override that allow to take into account
   /mail/view links containing an access token for invoices like what
   is already supported for sale orders;
 * improve action buttons display;
 * reduce headers and better display invoice name and customer address;
2017-09-06 10:49:03 +02:00
Thibault Delavallée 1fad5698fc [IMP] account: support error, warning and success codes in customer portal
Purpose is to allow to display error, warning or success messages based
on some user action like payment. This is done using kwargs in the invoice
view route. Codes are added in URL and message display has to be managed
in the template itself. Inheriting modules and/or new features will have
to add their specific message according to the error, warning or success
messages they want to support.
2017-09-06 10:49:03 +02:00
Thibault Delavallée 2d4c8103f9 [IMP] sale, website_quote: improve email link and wording computation
The 'View', 'Accept and Sign', 'Pay Online' buttons are now correctly
computed based on the sales settings or the online quote settings.
Indeed it is now possible to sign and/or pay quotations without having
website_quote module installed.
2017-09-06 10:49:02 +02:00
Thibault Delavallée 1925837d47 [IMP] sale_payment: support payment in sale customer portal
This commit adds support of payment in the sale customer portal. This
is done in the sale_payment module and uses the settings introduced
previously about online confirmation and payment. This way customers can
now pay orders without having to rely on online quote mechanism.

Two routes are defined in this commit, one for form-based payments and
one for server2server-based payment. Please refer to commit 1fdb10f0ac
for more details about the new payment form.

Some small modifications are done SO confirmation and invoice generation
methods to return error codes that can be used in the customer portal.
As return values were not used in website_sale or website_quote this
should not impact those modules.
2017-09-06 10:48:52 +02:00
Thibault Delavallée 06fe263a15 [IMP] payment: add new explicit parameters to the payment widget
Purpose of this commit is to ease the use of the payment widget and
avoid having to perform too much custom code in the various routes used
when doing payments :

 * when instantiating the widget give him its parent element data so
   that parameters given when calling the payment form template are
   automatically present in the widget options;
 * support more parameters when calling the route for form-based acquirers
   including access_token, URLs and callback method;
 * when doing a form-based payment a call to a JSON route returning the
   rendered form is done. Payment widget now uses all data from that
   form including the URL of the acquirer website. This way form-based
   acquirers are really dynamic and values update is easier;
 * remove hidden display of form-based acquirers as all data come now
   from the called JSON route that returns the form;
 * add a warning about partner-id not being set as it is an issue some
   people may encounter;
2017-09-06 10:40:46 +02:00
Thibault Delavallée faea658382 [IMP] website_quote: use generic portal signature widget
Online quote can now use the generic signature widget already used on
the standard sale customer portal. We therefore remove the custom
widget build in website_quote.

A route already exists to sign quotes; the old route is removed. The
existing route is overridden so that quotations with template requiring
payment cannot be signed. This is the expected behavior.
2017-09-06 10:40:32 +02:00
Thibault Delavallée 22734f47d8 [IMP] website_quote: improve quote url management in customer portal
* website_quote should not override all sale links from the customer
   portal to replace them by website_quote specific view. Indeed the
   quote view should be used only if the order has an active template
   defined on it;
 * do not override existing columns of the order page view on portal
   with same content;
 * implement redirection at route level by overriding the
   controller order route;
2017-09-06 10:40:22 +02:00
Thibault Delavallée 071451a884 [IMP] sale: propagate token use to invoices when viewing order on customer portal
Customers can access orders using an access token. Order page view may
contain links to invoices linked to that order. However currently the link
does propagate the use of access token and therefore leads to a crash due
to access rights error. This is improved here by adding the invoice access
token in the embedded links.
2017-09-06 10:39:24 +02:00
Thibault Delavallée a3e048a001 [IMP] sale: support quote confirmation and sign in customer portal
Purpose is to allow customers to accept and confirm orders on the
customer portal without having to rely on advanced website_quote
(online quotation) features. Including :

 * add quote confirmation route;
 * add support in customer portal using the newly-introduced signature
   widget;
 * add action button on the order page view;
2017-09-06 10:39:05 +02:00
Thibault Delavallée 3275aacb27 [IMP] sale: add download link on customer portal to access the order report
This commit also adds a route to have the sale order report. It supports
access token so that email links already enables the download of the
pdf.
2017-09-06 10:38:43 +02:00
Thibault Delavallée 5e619ceb20 [IMP] sale: support error, warning and success codes in sale customer portal
Purpose is to allow to display error, warning or success messages based
on some user action like signature or payment. This is done using kwargs
in the order view route. Codes are added in URL and message display has to
be managed in the template itself. Inheriting modules and/or new features
will have to add their specific message according to the error, warning
or success messages they want to support.
2017-09-06 10:38:10 +02:00
Thibault Delavallée e9948e4fdf [IMP] sale, website_quote: update sign, pay and online quote settings
* separate signature and payment option from website_quote template
   feature;
 * add a settings to choose whether to display the confirmation or
   pay buttons in customer portal;
 * simplify settings about website_quote now talking only about
   the module itself;

This commit only adds the settings and parameter. Future commits will
use those parameters to effectively trigger some features and hide or
display part of customer portal.
2017-09-06 10:37:42 +02:00
Thibault Delavallée 27f0d3115e [IMP] portal: add a generic signature widget to be used in customer portal
This generic widget allow to confirm and sign documents on the customer
portal. Purpose is to reuse it in sale customer portal and online quotes
notably. It is made generic to call a route using parameters given to the
widget. It also supports access token to ease its use in various customer
portal pages where the customer is not always connected but is granted
access through an access token.
2017-09-06 10:36:37 +02:00
Thibault Delavallée 93436f45f9 [FIX] website_portal_sale: fix override not giving correctly parameters to super
It does not have any impact in current stable as the inherited
method does not use it. However if another addon inherit it
it will not receive access_token depending on call chain. Let
us fix it.

This is a manual forward-port of ce9ed600ca.
2017-09-06 10:36:16 +02:00
Parth Gajjar 1c3c3ab9fc [MOV] marketing_campaign: Move to enterprise
According to fp, this outdated and incomplete module will be moved to enterprise to become a fully developed and integrated application.
2017-09-06 08:02:01 +02:00
Kirti Choudhary 72c1f07d53 [IMP] mrp: show boms in which a product has been used as a component 2017-09-05 16:53:12 -07:00
Luis González e5fb056809 [FIX] l10n_mx: Rename field use_cash_basis on model account.tax.template
This field was renamed from use_cash_basis to tax_exigibility, so it needs to be renamed here too
2017-09-05 17:23:54 +02:00
Yannick Tivisse f49683bc0f [IMP] image.py: Make 6801baa work in python3 2017-09-05 16:31:47 +02:00
jpr-odoo 46699c5214 [IMP] mail: Add a preview popup for attachments
Purpose
=======

The goal is that when you click on an attachment, you should get a preview of it and then you get the possibility to download it.
2017-09-05 15:52:15 +02:00
Yannick Tivisse fa432175e9 [FIX] mail: Don't compute channel history if no channel
Purpose
=======

As the method `channel_fetch_message` calls self.ensure_one(), we shouldn't load the channel history if no channel is already existing for the external user.

Specification
=============

Return a empty list if channel_id is False
2017-09-05 15:52:15 +02:00
Yannick Tivisse 2e3848b394 [IMP] web: Add the possibility to crop an image in web/image controller
Purpose
=======

Could be useful if you want to load a preview of an image as a thumbnail
2017-09-05 15:52:15 +02:00
Yannick Tivisse 6801baa662 [IMP] image.py: Crop image with maximum size instead of ratio
Purpose
=======

It makes no sense to crop an image from a ration. We don't say "I don't know my image size, but divide it by 2"

Specification
=============

Pass a maximum size argument instead of a thumbnail ratio
2017-09-05 15:52:15 +02:00
Laurent Smet fe2bdc2649 [FIX] l10n_ch: fix missing renaming of settings
account.config.settings has been renamed by res.config.settings, see 781a03b2bc
2017-09-05 15:02:30 +02:00
Sanjay Jamod 160001ca68 [IMP] mrp: Improve settings labels and installable modules
Purpose
=======

Improve settings of manufacturing app

Specification
=============

https://drive.google.com/a/odoo.com/file/d/0B0ITmdw6h3ZrMndPb2ZWbUY2Tm8/view?usp=drivesdk
2017-09-05 13:29:16 +02:00
Kirti Choudhary 36a2bfb9cf [IMP] *: add and improve kanban views for mobile
This commit improves readability in kanban views.
The default view in mobile is kanban and many of them
needed to be improved.

task-33438
closes 17853
2017-09-05 13:21:58 +02:00
qsm-odoo 41e7a1374f [MERGE] web, mail: introduce new chatter/discuss design 2017-09-05 12:16:28 +02:00
qsm-odoo 489db80101 [REF] web: better mock images routes
Before this commit, only the routes which began by '/web/image' were
mocked (simply ignored). This forgot the case were it is a full URL
(http://www.test.com/web/image). Now, also mock the static images
routes (for .png and .jpg).
2017-09-05 12:13:55 +02:00
qsm-odoo 24ea61163d [REF] mail: review new chatter design
- Use classes instead of repeated mixins
- Add real user avatar instead of fake one
- Reorganize LESS rules
2017-09-05 12:13:55 +02:00
stefanorigano 12b818d375 [REF] mail: introduce new chatter/discuss design
- Improve overall design
- Better use of UI colours
- Replace planned activities icon
- Vertically align kanban icons
- Remove the 'bell shtcut' and followers caret
- Use a mixin to style the chatter (inline, not inline, compact)
2017-09-05 12:13:55 +02:00
stefanorigano 378fe92b60 [REF] web: add btn-links variations
Create variations for btn-link with UI color classes.
These btns appear as default text (muted necessary) and they will use
an UI color on hover.
2017-09-05 12:13:55 +02:00
stefanorigano 1f78ae3c18 [REF] web, mail: change minors top-menu design
- Remove carets
- Fix badges position
- Vertical align user avatar
- If a dropdown is open, the menu-toggle should appear active
- Dropdown menus' widths should be at least as the dropdown-toggle
2017-09-05 12:13:55 +02:00
Yannick Tivisse 7a4de30cee [IMP] base: Rename 'Cancel' Call-to-action into 'Discard'
Purpose
=======

Be consistent with other screens

Specification
=============

Replace "cancel" by "discard" in all setting page.
2017-09-05 11:55:10 +02:00
Yannick Tivisse a22dee58e1 [IMP] project: Hide email_cc field on tasks 2017-09-04 16:53:57 +02:00
Yannick Tivisse 76fdd10b18 [IMP] web: Modify timeout duration on test_js.py 2017-09-04 16:53:39 +02:00
Yannick Tivisse d48b0c40bd [IMP] settings: Remove unnecessary field redefinitions in config models 2017-09-04 16:52:30 +02:00
Yannick Tivisse c39abeeefe [IMP] settings: Remove redefinition of company_id in settings.
On the other hand, create a new field for the configuration of the inter company rules.
2017-09-04 16:52:30 +02:00
Yannick Tivisse 955ad1d85d [FIX] crm,hr_expense: Give 2 different names for alias prefix
Purpose
=======

Now that the res.config model have been merged into a single model, the 2 alias prefixes should have different names to avoid conflicts.
2017-09-04 16:52:30 +02:00
Yannick Tivisse eb4ad33513 [IMP] project: Remove field use_tasks
Purpose
=======

This isn't useful now that project issues and tasks have been merged.

Specification
=============

Keep the label field, remove the checkbox
2017-09-04 16:52:30 +02:00
tbe-odoo f65d13fc94 [FIX] website_sale: Fix terms & conditions
- Fixed accept terms & conditions button when paying on e-commerce.
2017-09-04 14:53:54 +02:00
Thibault Delavallée e986f0986e [CLN] payment: lint newly-introduced payment form
This commit performs just some linting in order to ease code reading and
prepare future updates.

 * extract duplicate variable computation;
 * link spaces and indentation;
 * light renaming to ease code understanding;
2017-09-04 14:09:58 +02:00
Thibault Delavallée 7cb704a324 [IMP] payment: add acquirer computation tools to ease future additions
* add a method computing available acquirers and payment tokens for a
   given partner and company. Those data will be used notably in customer
   portal when displaying the payment form;
 * raise if no partner_id set in s2s process. Indeed this field is
   required but values come from a dict. Current code raises an error
   about None being converted to Int instead of giving the real error;
2017-09-04 14:09:54 +02:00
Thibault Delavallée 4b746b3b9b [REF] account: factorize portal code to ease future additions
* get invoice access right check in its own method. Purpose is to allow
   its use in other methods and avoid writing same code several times;
 * factorize invoice customer view values computation. Purpose is to allow
   adding values when displaying the page through inheritance. For example
   to add available payment means in sale_payment;
2017-09-04 11:15:49 +02:00
Thibault Delavallée 2ec4dbeb49 [MOV] sale: put all assets in same file and rename portal templates 2017-09-04 11:15:38 +02:00
Thibault Delavallée 44c062a2f8 [REF] sale: portal: factorize some portal code to ease future additions
* get order access right check in its own method. Purpose is to allow
   its use in other methods and avoid writing same code several times;
 * factorize order customer view values computation. Purpose is to allow
   adding values when displaying the page through inheritance. For example
   to add available payment means in sale_payment.
2017-09-04 11:15:30 +02:00
Laurent Smet aee43c0d14 [ADD] account: add cash rounding managment
In some countries, we need to be able to make appear on an invoice a rounding line, appearing there only because the smallest
    coinage has been removed from the circulation.
    For example, in Switerzland invoices have to be rounded to 0.05 CHF because coins of 0.01 CHF and 0.02 CHF aren't used anymore.

    Was PR #15231
    Was task 30904
2017-09-01 18:23:45 +02:00
d-fence c030213fa3 [IMP] hr_expense: Allow a user to refuse an expense sheet from a line
Purpose
=======

Currently, a manager or a accountant can only refuse one expense report with a justification message.

If there are a lot of lines too comment individually or if only one line should be modified, the manager or the accountant can now refused one line and give a reason for it. That will refused the expense report automatically while waiting the employee to make the modifications.

Specification
=============

- Rename wizard files, models and ids according to the model

- Allow to refuse one or several lines with a reason

- Use a qweb template to log messages, use message_post_with_view instead of message_post

- Print expense name instead of sheet name. In the log when expense is refused, it prints expense report name instead of expense

- Prevent modifying approved expenses
	* A user should not be able to modify an expense once approved
	* Method refuse_expense renamed to refuse_sheet when applied to a whole
	expense report/sheet
	* 'model' dict key renamed to something more explicit and less prone to
	confusion (passed in context to the refuse wizard)
	* Usage of explicit fields in the wizard to avoid confusion
	* Overriding 'default_get' to get default values for those fields

- When an expense is paid or reported, it must be impossible to refuse it.

- Replace refused expenses tree
	Purpose: The menu 'Refused expenses' is confusing. This improvement
	replaces it by 'Refused Reports' and leads to the refused reports tree
	view. That way, it's easier for the user to find back his refused
	expenses reports.

- Hide create button on refused
2017-09-01 15:30:30 +02:00
Yannick Tivisse 5b7e991c42 [FIX] test_main_flows: Fix induced error from 23e77b8 2017-09-01 13:46:31 +02:00