Commit Graph
126133 Commits
Author SHA1 Message Date
Alexandre Kühn b67b89c315 [FIX] web: correctly align value/text in stat button
Before this commit, the style of the value and text in some stat buttons were
broken.

The design of the stat button is to have a single value and a single text which
are stacked as follow:

  [CSS]                       [Visually]           [Example]

  .o_stat_info                +---------+          +------------+
     .o_stat_value            |         |          |            |
     .o_stat_text             |  value  |          | 10         |
                              |  text   |          | Forecasted |
                              |         |          |            |
                              +---------+          +------------+

However, some stat buttons use multiple values or texts. For example:

  [CSS]                       [Visually]           [Example]

  .o_stat_info                +-------------+      +------------+
     .o_stat_value            |             |      |            |
        .o_stat_info          |  value text |      | 3 Hour(s)  |
          .o_stat_value       |  text       |      | Lost       |
          .o_stat_text        |             |      |            |
     .o_stat_text             +-------------+      +------------+

  [CSS]                       [Visually]           [Example]

  .o_stat_info                +---------------+    +---------------+
     .o_stat_text             |               |    |               |
     .o_stat_text             |  text  value  |    |  Min:  10.00  |
  .o_stat_info                |  text  value  |    |  Max:  20.00  |
     .o_stat_value            |               |    |               |
     .o_stat_value            +---------------+    +---------------+

The latter is works fine with block, which guarantees vertical alignment.
However, the former case has some alignment issues like this:

    [Visually]

    +------------+
    |            |
    | 3          |
    |   Hour(s)  |
    | Lost       |
    |            |
    +------------+

This is due to the use of `display:block` for any `.o_stat_text` and `.o_stat_text`.

This commit fixes this issue, without affecting the other cases.

Task-ID 1841523
2018-07-24 12:51:14 +02:00
Xavier Morel a56372a4ca [FIX] various broken JS docstrings
Resulting in sphinx warnings or ill-formatted doc all the way to the
doc not building at all.
2018-07-24 12:06:13 +02:00
Martin Trigaux a425695e92 [I18N] remove es_AR translations
Courtesy of Juan José Scarafía, ADHOC
The quality of the Spanish (Argentina) translations is very poor.
Remove them all and will start from scratch, translating only when needed.
2018-07-24 10:45:46 +02:00
Goffin Simon ca14f232e0 [FIX] base_vat_autocomplete: Create contact using VAT number
Let's install base_vat_autocomplete and  base_address_extended
When creating a contact with a VAT number, the street was not
formated by the autocomplete in a correct way because the function checkVat all the time
returns the street with the following format: '%(street_name)s, %(street_number)s/%(street_number2)s'
and this function doesn't take the street format of the country into account.

So the function _split_street tried to split the street into street_name, street_number, street_number2 with the
street_format of the partner but the street was  not well formated by checkVat.

opw:1867491
2018-07-24 09:54:29 +02:00
Hetashree Chauhan 26fbf93387 [IMP] repair: display product description on repair line and repair fee
PURPOSE
=======

All quotations should look the same, no matter if they are made in sales app or repair app to avoid to confuse the users.
From ticket : https://www.odoo.com/web#id=1833072&view_type=form&model=project.task&menu_id=

SPECIFICATIONS
==============

Minor refinement for repair quotations, show the product description, like in normal quotations, when printing the quotation from a repair order

This commit is related to task : 1834225
2018-07-23 18:37:28 +02:00
Jeremy Kersten f045186f23 [FIX] report: fix padding for ul in report pdf
Rendering in html was correct thanks to the webkit-padding-start 40px added
by the browser. But once printed with wkhtml, the padding was missing.

Now we force the padding manually.

This commit closes #7375
2018-07-23 17:02:09 +02:00
Raphael Collet 1748fa2aa0 [FIX] crm: fix access rights in test 2018-07-23 16:32:46 +02:00
Martin Trigaux 7fbf7e233c [IMP] base: do not load local file resources
The generation of the manifest should not be platform dependent, its content
should be the same whatever local files are present on the filesystem
2018-07-28 11:25:24 +02:00
Raphael Collet 629886434c [FIX] crm: fix access rights in test 2018-07-23 16:32:46 +02:00
Martin Trigaux 4c7e74f5e9 [IMP] base: do not load local file resources
The generation of the manifest should not be platform dependent, its content
should be the same whatever local files are present on the filesystem
2018-07-28 11:25:24 +02:00
Christophe Simonis 4e76173a43 [MERGE] forward port branch 11.0 up to 219d2296d6 2018-07-23 16:03:25 +02:00
Yannick Tivisse d00ff6187a [IMP] stock, product_expiry: Improve the traceability of the products
PURPOSE
=======

Improve the traceability of the products.

1. If you have an issue with a serial or lot number, you want to easily find from which supplier it's coming and to which customer it has been delivered, to contact them in case of problem.

2. We have the possibility to define expiration dates on products but the users are not informed when this date is reached. Now we can easily inform them with the next activities.

SPECIFICATIONS
==============

1. Locate precisely a SN/LN (find to which customer it has been delivered and from which supplier it's coming from)
Add fields "Purchase Orders" and "Sale Orders" (must be a many2many) and displays PO's and SO's related to this LN/SN.

2. Log a next activity for the product responsible when expiration date is reached for a product [OK]
- Check the alert_date on the stock.production.lot, if the date is in the past or today, log a next activity on the stock.production.lot
- Assigned to = the product responsible
- Due date = today
- Activity = Alert Date Reached
- Text = The alert date has been reached for this lot/serial number.
- Raise a next activity only for products that are still in stock = that are in a location of type internal.
- This cron checking the alert dates should be added in the existing scheduler cron
- The next activity is only create one time for the each lot. If a next activity has already be create for this lot previously, next activity will not be create again.
2018-07-23 15:58:12 +02:00
Nicolas Vannieuwerburgh edbf129372 [IMP] product_expiry: Schedule an activity on lots when expiration date is reached 2018-07-23 15:57:02 +02:00
Nicolas Vannieuwerburgh 86448be319 [IMP] purchase_stock: Compute the related purchase orders on production lots
Add a computed field on a stock.production.lot to retrieve all the purchase
orders coming from a done stock.move.line if the stock.move is also
done and if the destination usage is 'supplier'.
2018-07-23 15:57:02 +02:00
Nicolas Vannieuwerburgh cfd3e6b369 [IMP] sale_stock: Compute the related sales orders on production lots
Add a computed field on a stock.production.lot to retrieve all the sales
orders coming from a done stock.move.line if the stock.move is also
done and if the destination usage is 'customer'.
2018-07-23 15:57:02 +02:00
Christophe Simonis 219d2296d6 [MERGE] forward port branch saas-15 up to c4ee29345a 2018-07-23 15:45:08 +02:00
Christophe Simonis c4ee29345a [MERGE] forward port branch saas-14 up to 9ee882564f 2018-07-23 14:57:03 +02:00
qsm-odoo 946189eeff [FIX] base: onboarding assets should at least use backend helpers
See task-60668
2018-07-23 14:49:57 +02:00
Christophe Simonis 9ee882564f [MERGE] forward port branch 10.0 up to 6e71cf8a71 2018-07-23 14:21:06 +02:00
Priyanka Kakadiya 78a6124d5a [FIX] web: no traceback on button call action of type 'button'.
Before this commit, there was a traceback when clicking on a button
that generates a button call action with type `'button'`.

This is due to the handler of such an action that assumes only a small
set of button actions. Each of those cases correctly sets the local
variable `def` to a deferred, so that the post-processing is correct
(i.e. it handles this variable as a deferred). However, this is wrong
with a different button call action, so that this variable is `undefined`
instead of a deferred.

This commit fixes the issue by ensuring that the variable `def` is always
a deferred. As a result, the post-processing can make the correct assumption
that this variable is a deferred.

Steps to reproduce:

 - Install Google Drive Integration app
 - Go to General Settings
 - In the category "Google Drive", click on "Get Authorization Code"
   (displayed as "Get Author...")

Task-ID 1861630
2018-07-23 13:48:09 +02:00
Christophe Simonis 6e71cf8a71 [MERGE] forward port branch 9.0 up to af2e480e41 2018-07-23 13:41:04 +02:00
Kishan Gajjar 7fa1525921 [FIX] web: correctly render "font awesome" icons on buttons
Revision on https://github.com/odoo/odoo/commit/9de1bc0

From the commit above, the style of some field binary images are broken.
This is due to changes from `<span>` to `<button>`. The style has been
altered by the default browser's style, which does the following on
Google Chrome:

```
    border-color: white;
    border: 1px solid;
    padding: 1px 7px 2px;
```

Most browsers set a border and some padding on buttons. This commit fixes
the style specifically for "font awesome" icons on buttons, by removing
the border and by overwriting the padding.

Tested browsers:

  - Google Chrome 67
  - Mozilla Firefox 61
  - Safari 11

Task-ID 1864027

Closes #25691
2018-07-23 13:34:33 +02:00
Christophe Simonis af2e480e41 [FIX] http: refresh request environment after authentication
This allow the `/web/session/authenticate` route to return correct
partner and company.

Closes #25652
2018-07-23 13:25:42 +02:00
Ivan Yelizariev 1e1d3ed9e6 [FIX] base: suggested default ACL should be safer
When there is no ACL for a model, the system emits a log with a sample
ACL entry that developers should consider adding. This proposed ACL
should be safe: a default read-only access for internal users
seems appropriate.

Closes #25919
2018-07-23 13:18:04 +02:00
Laurent Smet 0a13dde432 [REF] account_reports, *: security enhancements in reports
* get_report_values() is now private
* account_reports: make private most of the methods to avoid any leak
* account_reports: ensure the options dict cannot be forged to leak any multi-company info
* [FIX] account_reports: prevent inconsistencies between options and context

Was task: 1823127
Was PR #2399
2018-07-23 12:34:09 +02:00
Laurent Smet 93cacd5e59 [FIX] account: improve security in reports and in account's query_get()
* privatize the get_report_values() method
* check read access rights and ir.rules in _query_get() from account module

Was task 36590
Was PR #25822
2018-07-23 12:21:06 +02:00
Florent de Labarre 3528e804de [FIX] stock: Error message don't contain the name of product
The message don't show the name of product.

Before the fix:

The message was: "It is not possible to reserve more products of than you have in stock."

After the fix:

The message is: "It is not possible to reserve more products of [0221] Product A than you have in stock."

opw:1868449
2018-07-23 12:09:12 +02:00
Laurent Smet 6ea300498f [REF] account, stock_landed_costs: use AssertRecordValues in tests
Was task: 1856976
Was PR #25893
2018-07-23 11:50:35 +02:00
Laurent Smet 45cde5ff38 [IMP] tests: added assertRecordValues() in BaseCase
This method will help to compare a recordset with their expected values, in the form of a list of dict

Was task: 1856976
Was PR #25129
2018-07-23 11:13:39 +02:00
Pedro M. Baeza e91f10f14d [FIX] stock: Warehouse sequences with proper company
On a multi-company environment, as sequences are created with sudo,
if admin's company is different from the user creating the warehouse
one, then warehouse sequences are incorrectly assigned to the admin's
company
2018-07-23 10:47:07 +02:00
Prakash Prajapati 6391e0044e [FIX] mail: expand/collapse planned activities in chatter
Before this commit, when the user clicks on the chatter category
"Planned activities", the user is redirected to the home menu.

The "Planned activities" category in the chatter is only visible when
there is at least one planned activity on the record.

The intended behaviour is to expand/collapse the planned activites on
the chatter. This commit fixes this issue.

Task-ID 1864452
2018-07-23 10:34:21 +02:00
Goffin Simon 88ff6beb01 [FIX] base_address_extended: Changing country on a partner
Steps to reproduce the bug:

1. Create a Vendor with these address settings

- Name: Vendor123
- Streer" Street:
- Housnumber: 123

>> DO NOT ADD A COUNTRY => by default street_format = street_number street_number2 street_name

2. Create a purchase order for Vendor123
3. print the RFQ

>> ADDRESS FORMAT "123 Street" => OK

4. Go to vendor123 and set "Netherlands" as a country
5. Print RFQ again

Bug:

>> The address was still in format "123 Street"  => NOT OK

When changing the country on a partner, the field street must be recomputed
because the street_format depends on the country.

opw:1865677
2018-07-23 09:27:05 +02:00
Adrian Torres cb4266787b [FIX] ir_model_fields: properly unlink manual fields
Before this commit:

* Install module A that implements model M and field X.

* Create a new custom field Y whose reference model is not M, implemented in
any module other than A.

* Make this field either a one2many, related or compute field depending
on field X.

* Uninstall module A.

=> The registry crashes fatally, the only way to recover from this is to
log directly into the postgres database and manually eliminate the
infringing ir.model.fields record.

The reasons are multiple:

* When creating custom fields that are relational, char fields are used
to hold data like model name, field name, instead of properly storing
the related field, which would let postgres handle the unlinking
properly.

* Despite this, the ir.model.fields method _prepare_update tries to make
up for this by verifying that the ir.model.fields being unlinked during
an uninstallation are not needed elsewhere and drops them, however it
does so naively: It assumes that the "problematic" field will be defined
within the module's scope, i.e. its model reference will be a model
defined by the module being uninstalled, this isn't always the case.

This is solved by getting the dependants of each field by accessing the
model's field_triggers, if there are any triggers (i.e. dependants) then
we add them to a `failed_dependencies` list for later processing. The same
is done for field inverses (only in the case of a many2one).

After finding the failed_dependencies, a check is performed to see if the unlink is
being performed in the context of an uninstallation, in which case the failed
dependencies will be unlinked, otherwise an error will be shown to the user.

This commit is a "backport" + generalization of commit 4265026ee2

Task-ID: 1856263
2018-07-23 07:42:57 +02:00
Odoo Translation Bot f999cbb5cc [I18N] Update translation terms from Transifex 2018-07-22 07:17:13 +02:00
Odoo Translation Bot e6b570c898 [I18N] Update translation terms from Transifex 2018-07-22 04:09:21 +02:00
Odoo Translation Bot 402aac89a7 [I18N] Update translation terms from Transifex 2018-07-22 00:27:21 +02:00
XavierDo 18b24e8a22 [FIX] mail: add missing license 2018-07-20 17:26:52 +02:00
Martin Trigaux 85423d20b2 [FIX] account: partially revert 3754280a
The changes should not have been merged in stable.
Users installing the account module before 3754280a had a not null constraint
on the field company_id.

After updating the code, the field is still required but has no default value.

If a chart of account is installed after updating the code, it would fail.

opw-1867358
2018-07-20 16:43:42 +02:00
Ivan Yelizariev 592ee660a5 [FIX] doc: remove incorrect statement 2018-07-20 12:27:10 +02:00
Yannick Tivisse e547fa0710 [MERGE] account,(website_)sale: Add onboarding configuration panels
Purpose
=======

Ease the configuration of the main applications by adding configuration panels on the main views,
i.e. on the customer invoices, quotations and ecommerce dashboard. This panels are composed by steps
to configure the company data, the report layout and templates, the payment acquirers,...

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

Invoicing Application
---------------------

The gist of the task is to add a config bar for invoicing app. After going through the config step, the system should be all set to send real invoices

Mockup: https://app.moqups.com/fgi@openerp.com/qhrp1ZJB1i/view

1. Configuration bar
- The current onboarding modal should not pop up when the user clicks on "Print Invoice" anymore: https://drive.google.com/a/odoo.com/file/d/1xMin8lBB3guDOlIQaGCnLrBKKl5nbA-9/view?usp=drivesdk
- Add the following configuration bar between the top menu and the list of Customer Invoices
- This bar can only be viewed with "administration - settings" access rights.
- Each part of the bar opens a corresponding modal (defined below).
- Once information is saved on the modal, a green checksign appears next to it on the configuration bar. The user can still open the modal and modify information afterwards.
- Add a grey cross on the top right side of the bar. Clicking on it removes definitely the bar.
- The bar has to stay as long as the user has not clicked on the grey cross.

config bar design branch: https://www.odoo.com/web#id=1835748&view_type=form&model=project.task&action=333&active_id=133&menu_id=4720

2. Company Data
Do the following changes to the current company form:
- hide company logo in the modal (will be shown next step). But keep it visible in the company full form
- remove "Report Footer", "Company tagline", "Verify VAT  Number" https://drive.google.com/a/odoo.com/file/d/1CrGoY_sH4wsTHuu6Zggilo6qOzWb0oCW/view?usp=drivesdk
- remove tabs: https://drive.google.com/a/odoo.com/file/d/1X7EglwY5zHmJtR4Xafnkm9uBX6TlcJsB/view?usp=drivesdk
- mark this step as done if street 1 is filled

3. Invoice Template
new screen to choose a report template, set a logo, etc.
- Use the default logo used in demo data as new default image for any new company. See for reference : http://nimb.ws/1TFn8O
- add "company tagline" and "document footer" (removed from company form)
- open this screen in general settings: https://drive.google.com/a/odoo.com/file/d/1hP5CW7-MPXre8r8Ex-KKSomVaef932qV/view?usp=drivesdk
- mark as done if logo is set.

4. Payment Method
- Activate the payment acquirer selected, and set in production mode (if paypal or stripe)
- For manual payment, rename "Wire Transfer" payment acquirer into the name provider by the user
- if any payment method selected, activate "Online Payment" in invoicing settings: https://drive.google.com/a/odoo.com/file/d/1Vy6os1eDznumOyR80Q2nFctzQ7S2PvYN/view?usp=drivesdk
- otherwise the customer will not be prompted to pay online.
- mark as done if any method is selected or if "Skip this step" is clicked.

5. Sample Invoice - Send a sample draft invoice to user email address
- Open the email composer modal with invoice's email template (like clicking "Send by email" in the invoice), do the following changes:
- Hide the template field and the "save as new template" button.
- Generate & delete direclty the sample draft invoice to be sent when clicking the config bar step. The user should never see this invoice appear in the invoice list
- Generate the invoice with following information:
    - put the admin as customer.
    - for the Invoice Lines : do not enter any Product. Add a 2-3 Descriptions, with a Quantity and a Unit price.
    - the Invoice has to stay in draft and should not appear in the Customer Invoices list.
- Allow to open portal view of this sample invoice from the email sent (as any other invoice) / if complex, to check with AL
- mark as done when the email is sent.

Sale Application
================

help users configure the system in order to send the first quotation to a customer

mockup: https://app.moqups.com/fgi@openerp.com/rP8gOb077Y/view

remove current mechanism of company data completion when clicking Print button in the quotation form (e.g. with company logo not set).
Signature: if Yes, activate the option in sales settings https://drive.google.com/a/odoo.com/file/d/1IoHn_3b4BbevKqdVajBWysn_jamQ1tAA/view?usp=drivesdk
Payment: activate the option in sales settings + activate the selected payment acquirer
background image: https://drive.google.com/a/odoo.com/file/d/1LXRrslRBEo8ma_1dFH8nTTlhiE1uPa-Z/view?usp=drivesdk
see in https://projects.invisionapp.com/share/2MGSJ30H53F#/screens/290568105

Ecommerce Application
=====================

help users go through all the config steps needed to start selling

Add the bar in the ecommerce dashboard: https://drive.google.com/a/odoo.com/file/d/1NmFJXjYZXN2KdZ9Fv19cPqyq1v-1ehiJ/view?usp=drivesdk
steps to implement:
Theme (checked if a theme is installed)
allow the user to change theme. When installing a new theme, uninstall any other theme installed (uninstall theme_common? what about community themes that don't use theme common?)
Company Data
[for eCommerce only] Payment Method (same screen than in invoices)
Domain Name (set a custom domain name, only for saas users) -> display the domain config modal used in https://accounts.odoo.com/my/databases/manage: https://drive.google.com/a/odoo.com/file/d/1K_AYHJGHWBb2g08vq6ICDc2BHhErb5HI/view?usp=drivesdk

Accounting Application
======================

Transform old config bar to new style config bar
2018-07-20 12:00:35 +02:00
eco-odoo 19775de261 [ADD] website_sale: onboarding steps
Add new onboarding steps: payment and theme selector. There are
initially used on the website_sale_dashboard onboarding panel.

task: 38876
2018-07-20 11:59:13 +02:00
eco-odoo 6671d3d72b [IMP] account: convert dashboard onboarding to new design
Convert the current design of the account dashboard setup bar in order to uniformize the design of the onboarding panels.

task: 1858542
2018-07-20 11:59:13 +02:00
eco-odoo f5a58effdd [ADD] sale: add onboarding panel for quotations
Help users configure the system in order to send the first quotation to a customer.
This panel appears above the sale quotations list.

task: 1839195
2018-07-20 11:59:12 +02:00
eco-odoo 15f498ebbd [IMP] sale: disable logo check before printing
When the logo was not set and you tried to print a quotation, a modal form opened and offered you to edit the company data. You then had to save, close the modal and retry to print.
Now the quotation is printed without the logo.
2018-07-20 11:59:12 +02:00
eco-odoo d1ec3306b8 [ADD] account: onboarding panel for invoicing
Add an onboarding panel for invoicing, it appears above the invoice
list.
After going through the steps the system should be all set to send real invoices.

In the payment module, add a payment acquirer step and add it to the invoice onboarding panel.

task: 60668
2018-07-20 11:59:12 +02:00
eco-odoo 9744fecd05 [IMP] base: add support for onboarding
Add a base template file, html and stylesheet for the onboarding banners.
Add a step for company onboarding.

task: 60668
2018-07-20 11:59:12 +02:00
eco-odoo 872cf9160d [FIX] web: controller update now waits for _update to resolve
Before this, the deffered returned by _update was not taken into
account.
2018-07-20 11:59:12 +02:00
eco-odoo c1498ff36b [IMP] web: add option to display a banner above a view
Add a banner_route attribute to AbstractView to allow fetching html from a
controller route and displaying it above the view.

The initial use case was the onboarding panels.

Supported views are the ones inheriting both AbstractView and AbstractController.
2018-07-20 11:59:12 +02:00
eco-odoo 0dd6a0b2bf [IMP] web: core: ajax: loadCSS now returns a promise
It is useful to know when the stylesheet has been loaded in order to prevent displaying unstyled content.

CalendarView and the dashboard_graph widget (JournalDashboardGraph) use loadCSS through cssLibs / loadLibs so the tests now have to use createAsyncView instead of createView.
2018-07-20 11:59:12 +02:00
eco-odoo 7c6bc684a9 [IMP] base: some cleaning in general settings
Use a new view to choose the document template.
Remove layout fields from base company form.
Reword Edit Header -> Edit Layout
Set a default logo for a new company in data instead of demo data

task: 60668
2018-07-20 11:59:12 +02:00