Commit Graph
111545 Commits
Author SHA1 Message Date
qsm-odoo 4f925af06f [MOV] web_editor, website: reorganize files 2017-08-16 10:59:39 +02:00
Mehul Patel f205bfcd4d [ADD] tools: utility to merge pdf files 2017-08-14 14:23:50 +02:00
Kinjal Mehta cd05983121 [IMP] survey: ease use of "Date" questions
- ask questions about "Dates", not "Datetimes" anymore
- display dates according to website language

Thanks to Kinjal Mehta and Ravi Gadhia who contributed to this commit.
2017-08-14 09:21:50 +02:00
Christophe Monniez 613ed025b4 [FIX] point_of_sale: show pos facing display
Add the possibility to configure the customer facing display in the pos
configuration. It was removed during this commit 80e89c7a11.
2017-08-11 14:50:56 +02:00
Yannick Tivisse 4b8c1b642a [MERGE] account: Split Invoicing/Accounting + Move account_accountant to enterprise
This include mainly the 3 following changes:

1/ [IMP] account: Isolate `group_account_user` in account
---------------------------------------------------------

Purpose
=======

We want to clear the accounting access groups when only the Invoicing application is installed as follows:

If only Invoicing is installed, we should only have 2 groups: `Billing` and `Billing Manager`
If Accouting and Finance is installed, we should have the current groups: `Billing`, `Accountant` and `Advisor`

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

1/ If we have only Invoicing the should have the following hierarchy:

group_account_manager (Billing Manager) ---Implies---> group_account_invoice (Billing)

group_account_user (Accountant) is a technical group out the Accouting groups hierarchy

2/ If we have Accouting and Finance installed, we should then have:

group_account_manager (Advisor) ---Implies---> group_account_user (Accountant) ---Implies---> group_account_invoice (Billing)

The reason we want to keep the group_account_user is that we will hide the accouting fields (account_id,...) with this group, allowing the consultants to show the accouting related information on support.

2/ [IMP] account: Split clearly the accounting & invoicing applications
-----------------------------------------------------------------------

PURPOSE
=======

1) Have a clear split between the invoicing and the accounting apps
2) Have a clear split between the community and the enterprise version (no accounting in community)

SPECIFICATION
=============

(1) When only invoicing installed, we shouldn't see accounts (for community and enterprise)
(a) Perpetual Inventory Valuation:
     - Hide the field inventory valuation from the product category
(b) Taxes
- No accounts
- No cash basis option
- No tax adjustment

(2) Remove from Community, modules:
- Accounting
- Budgets
- Assets

(3) No account_report in community, keep PDF reports for
- sale/purchase journal
- Aged partner balance
- Partner Ledger

(4) Clean split between invoicing and accounting in enterprise
(a) When installing invoicing, I shouldn't have access to accounting just by changing my access right to adviser
(b) Menus (when only invoicing installed)
- Sales
    - Customer Invoices
    - Customer Credit Notes
    - Payments
    - Customer Statements
    - Customers
    - Sellable Products
- Purchases
    - Vendor Bills
    - Vendor Credit Notes
    - Payments
    - Vendors
    - Purchasable Products
- Reporting
    - Partner Reports
        - Partner Ledger
        - Aged Receivable
        - Aged Payable
    - Audit Reports
        - Tax report
    - Management
        - Invoices
        - Product Margins
- Configuration
    - Settings
    - Products
        - Products
    - Accounting
        - Taxes
        - Fiscal Positions
        - Bank Accounts
        - Journals
    - Management
        - Payment Terms
        - Follow-up levels
    - Payments
        - Payment Acquirers
(c) Settings (when only invoicing installed)
- Fiscal Localization
- Taxes
    - Default Taxes
    - Rounding Method
    - TaxCloud connection
    - TaxCloud Categories
    - EU Digital Goods VAT
    - VIES VAT CHECK
- Currencies
    - Main currency
    - Multi-currencies
- Invoicing
    - Warnings
    - Docsaway
- Customer Payments
    - Follow-up levels
    - Payment Followup
- Bills Payment
- Bank & Cash
- Analytics
    - Margin
- Automated Entries

Remarks
- Test with the different access rights

3/ [MOV] account_accountant: Move module to enterprise
------------------------------------------------------
2017-08-11 14:04:34 +02:00
Yannick Tivisse 9a6b20f5ad [MOV] account_accountant: Move module to enterprise 2017-08-11 14:01:59 +02:00
Yannick Tivisse 6ac7b55869 [FIX] account: Allow a Billing user to create an invoice/credit note
Purpose
=======

When validation his first invoice/credit note, a billing user can choose which number will be the first on the invoice sequencing but it will raise a access right issue

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

We want to allow a billing user to do it, but we can't give him the right to write on the ir_sequence.

For that reason, we won't modify the ir.sequence field on the journal and skip this part. The field won't be displayed too on the form.

Additional Point:
~~~~~~~~~~~~~~~~~

A cleaning of the code has been made to avoid raise conditions even when the first invoice has been created (2 users creating 2 invoices before having one validated).
2017-08-11 13:57:31 +02:00
Yannick Tivisse 1ab8f7c9e3 [FIX] account: Allow a billing user to create a payment
Purpose
=======

Currently, a billing user can't create a payment without raising a access rule issue.

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

The related field `check_manual_sequencing` on the account journal should be readonly on the payment form view to avoid a write on the account journal of record creation, which is forbidden for a Billing user
2017-08-11 13:57:31 +02:00
Yannick Tivisse 8cc216b659 [IMP] account: Split clearly the accounting & invoicing applications
PURPOSE
=======

1) Have a clear split between the invoicing and the accounting apps
2) Have a clear split between the community and the enterprise version (no accounting in community)

SPECIFICATION
=============

(1) When only invoicing installed, we shouldn't see accounts (for community and enterprise)
(a) Perpetual Inventory Valuation:
     - Hide the field inventory valuation from the product category
(b) Taxes
- No accounts
- No cash basis option
- No tax adjustment

(2) Remove from Community, modules:
- Accounting
- Budgets
- Assets

(3) No account_report in community, keep PDF reports for
- sale/purchase journal
- Aged partner balance
- Partner Ledger

(4) Clean split between invoicing and accounting in enterprise
(a) When installing invoicing, I shouldn't have access to accounting just by changing my access right to adviser
(b) Menus (when only invoicing installed)
- Sales
    - Customer Invoices
    - Customer Credit Notes
    - Payments
    - Customer Statements
    - Customers
    - Sellable Products
- Purchases
    - Vendor Bills
    - Vendor Credit Notes
    - Payments
    - Vendors
    - Purchasable Products
- Reporting
    - Partner Reports
        - Partner Ledger
        - Aged Receivable
        - Aged Payable
    - Audit Reports
        - Tax report
    - Management
        - Invoices
        - Product Margins
- Configuration
    - Settings
    - Products
        - Products
    - Accounting
        - Taxes
        - Fiscal Positions
        - Bank Accounts
        - Journals
    - Management
        - Payment Terms
        - Follow-up levels
    - Payments
        - Payment Acquirers
(c) Settings (when only invoicing installed)
- Fiscal Localization
- Taxes
    - Default Taxes
    - Rounding Method
    - TaxCloud connection
    - TaxCloud Categories
    - EU Digital Goods VAT
    - VIES VAT CHECK
- Currencies
    - Main currency
    - Multi-currencies
- Invoicing
    - Warnings
    - Docsaway
- Customer Payments
    - Follow-up levels
    - Payment Followup
- Bills Payment
- Bank & Cash
- Analytics
    - Margin
- Automated Entries

Remarks
- Test with the different access rights
2017-08-11 13:57:30 +02:00
Yannick Tivisse 2a45fbe3d2 [IMP] account: Isolate group_account_user in account
Purpose
=======

We want to clear the accounting access groups when only the Invoicing application is installed as follows:

If only Invoicing is installed, we should only have 2 groups: `Billing` and `Billing Manager`
If Accouting and Finance is installed, we should have the current groups: `Billing`, `Accountant` and `Advisor`

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

1/ If we have only Invoicing the should have the following hierarchy:

group_account_manager (Billing Manager) ---Implies---> group_account_invoice (Billing)

group_account_user (Accountant) is a technical group out the Accouting groups hierarchy

2/ If we have Accouting and Finance installed, we should then have:

group_account_manager (Advisor) ---Implies---> group_account_user (Accountant) ---Implies---> group_account_invoice (Billing)

The reason we want to keep the group_account_user is that we will hide the accouting fields (account_id,...) with this group, allowing the consultants to show the accouting related information on support.
2017-08-11 13:57:18 +02:00
Xavier Morel cbffd99341 [IMP] use hasclass() xpath function 2017-08-11 10:44:40 +02:00
Ankit Joshi 8cbc516f8b [ADD] point_of_sale: rename 'Public Category' to 'PoS Category' 2017-08-11 10:41:02 +02:00
Haresh Shyara ccfa03549c [IMP] mrp_repair: added default order by create_date 2017-08-11 10:31:46 +02:00
Richard Mathot c953645607 [IMP] sale_timesheet: strenghten test 2017-08-11 09:55:13 +02:00
Christophe Simonis 1fa8680286 [MERGE] forward port branch saas-17 up to 48b2ce60ed 2017-08-10 18:07:47 +02:00
Dhawal Limbuwala 39ae811417 [REF] website: improve snippet names and thumbnails 2017-08-10 17:11:09 +02:00
Christophe Simonis 48b2ce60ed [MERGE] forward port branch saas-16 up to 85571bb78c 2017-08-10 17:01:05 +02:00
Christophe Simonis 85571bb78c [MERGE] forward port branch saas-15 up to dde62073ba 2017-08-10 16:22:36 +02:00
Moisés López 0819d3f116 [FIX] doc: Sphinx 1.2 support in html_domain
9a07a459 added "override=True" to silence a Sphinx warning in about
the address node already existing, however the override=True parameter
was added in Sphinx 1.4 (alongside the warning), so this breaks in
1.2.

Only pass in override=True if we're in 1.4 or later.

Closes #18232
2017-08-10 16:18:29 +02:00
Christophe Simonis dde62073ba [MERGE] forward port branch saas-14 up to a2361e23ea 2017-08-10 16:17:28 +02:00
Christophe Simonis a2361e23ea [MERGE] forward port branch 10.0 up to 544aa9b04a 2017-08-10 15:45:07 +02:00
qsm-odoo fdc8bc1711 [FIX] web: resolve ajax.loadXML deferred at the proper time
There was a problem with the new `ajax.loadXML` implementation
introduced with 417a664f16

Indeed the following case was buggy:

```

ajax.loadXML('URL1', qweb);
ajax.loadXML().then(function () {
   ajax.loadXML('URL2', qweb);
});

```

With this code, 'URL2' is scheduled to be loaded when 'URL1' is fully
loaded. The problem is that the deferred returned by the call to
`ajax.loadXML` without argument was resolved before the internal
`isLoading` variable was reset to `false`. So, the loading of 'URL2'
was indeed scheduled when 'URL1' was fully loaded but its loading
never started because the `ajax.loadXML` loading loop was still marked
as running (so it was not started again as it should have been).
2017-08-10 15:22:20 +02:00
Christophe Simonis 544aa9b04a [MERGE] forward port branch saas-11 up to cfbac106b4 2017-08-10 15:00:33 +02:00
Christophe Simonis cfbac106b4 [MERGE] forward port branch 9.0 up to 1aed433f54 2017-08-10 14:58:24 +02:00
xmo-odoo d140f0ef0e [FIX] prefetch issues on computed/related fields (#18644)
When deciding to prefetch records (getting records from the cache with
no value for the field being fetched), if the field was computed
`determine_value` would just get all records, not limited by the normal
prefetch limit; for large recordsets this would generate gigantic
prefetch lists for records we may not need at all.

Fix by applying the `PREFETCH_MAX` limit to records from the cache as is
done in `_prefetch_field`.

Complementarily, when traversing related fields the prefetch
environment would be lost and every record would get an empty prefetch
environment, so the values would ultimately be read one by one.

Example: select (search) 1000 product.product records, access a
related field (e.g. categ_id) in a loop, on the first iteration the
system would first read 1000 templates, then it would read each
categ_id individually, resulting in >1000 SQL queries rather than the
~2 we would expect.

Fixes #18511
2017-08-10 14:51:27 +02:00
Aaron Bohy deba788b4c [FIX] web_editor: html_frame: saving in readonly
A form view record may be saved even if the record is displayed in
readonly (e.g. when a button in the form view is clicked). When
this happened, if there were an html field with html_frame widget
in the form, it crashed (e.g. in Email Marketing > Mass Mailings >
open one > click on Test Mailing).
2017-08-10 13:56:22 +02:00
Aaron Bohy 87133a8235 [FIX] web: BasicModel: correctly reload new records
Commit 7cd2f6370 (in 10.0) recently added attribute special='cancel'
on the 'Cancel' buttons of the Settings views in Odoo. The attribute
wasn't really supported in this case by the old web framework, so
this commit also slightly adapted it, and made it reload the whole
webclient when such a button is clicked.

This commit now needs to be forwardported in saas-16, so we have to
handle the case in the new views as well. Before this rev., it
crashed, because the BasicModel tried to reload a new record (the
one of the Settings form view), so basically it performed a 'read'
RPC on a virtual ID like 'virtual_123', and the server didn't really
appreciate.

This rev. handles the case where a new record is reloaded, and
simply performs a 'default_get' instead of a read. Bonus point:
with the new views, we don't have to reload the whole webclient.
2017-08-10 13:56:22 +02:00
Nicolas Lempereur 354539942d [FIX] website_sale: no-cache IE11 cached cart XHR
IE11 seems to be always using cache when doin an XHR request with the
same GET request.

It can be changed in several ways:

- returning a header: "Cache-Control: no-cache"
- altering the GET request with a nonce
- using the POST method instead of GET

to solve it, in this change the HTTP header is added on the response.

opw-752270
closes #18787
2017-08-10 13:41:37 +02:00
qdp-odoo 6d3acf6d4a [FIX] account: fix reconciliation and creation of exchange rate entries
fixed cases:
    1) having more than one account.move.line with a residual amount. This can easily be achieved by
    -make a first invoice
    -partially pay it
    -make a second invoice
    -partially pay it
    -make a payment of the remaining amount
    -reconcile the lines together

    2) having more than one foreign currency involved, with several ecxhange difference to book
2017-08-10 11:46:56 +02:00
Jérome Maes 9b4c8a4e31 [IMP] hr_timesheet: default employee
'default_get' should return a value for employee
 when asked, even if it is not a timesheet.
2017-08-10 11:29:36 +02:00
Pierre Masereel 59ed5cba8e [FIX] point_of_sale: set correct report model
The model set on a record ir_actions_report must have an existing model
since rev: https://github.com/odoo-dev/odoo/commit/b446930dc42479f524eab7e677c5b2007f9fa0a6
2017-08-10 11:09:04 +02:00
Yannick Tivisse d17ef562a9 [IMP] product,purchase: Hide the variant in supplier tree view if no variant
Purpose
=======

Issue: Product_id field should be visible only when product has more than one variant

Here's how it can be reproduced,

Assign user with group group_product_variant
Create a product without any variant

In this case, the product_id field won't be shown in product.template's internal form view for product.supplierinfo, that's working fine. But, now, as this fix is reverted, the product_id field will be visible in product.template's internal tree view for product.supplierinfo.
2017-08-10 10:52:22 +02:00
Dhaval Panchal 3d3a23c919 [IMP] account, sale, report_intrastat: compute tax included price based on sale settings
In tax-included price mode, SO and invoices don't have same line totals that confusing for both customers and users.

task: https://www.odoo.com/web#id=33455&view_type=form&model=project.task&menu_id=
2017-08-10 10:47:41 +02:00
Pierre Masereel 298eaca4d1 [FIX] point_of_sale: traceback when printing invoice from POS
When we try to print an invoice from POS, this is cause by changing
method signature and that we cannot choos the report template anymore.

Refactoring in rev: https://github.com/odoo/odoo/commit/e80238042c9d93d492ea8b06b0041aced0d81dcd
2017-08-10 10:42:19 +02:00
Pierre Masereel b15918416a [FIX] mrp: traceback on bom structure and cost reports
Since the refactoring of report in rev: https://github.com/odoo/odoo/commit/e80238042c9d93d492ea8b06b0041aced0d81dcd
2017-08-10 10:42:19 +02:00
Adrien Dieudonne 3a886327a6 [FIX] pad: don't consider record as dirty
Before this rev., when the user opened a form view
containing a pad widget, with a pad url already configured,
a dialog directly popped asking "The record has been
modified, your changes will be discarded. Are you sure you
want to ?".

This is because of an unconventional behavior of this
widget: the field actually encodes an url, the one of the pad
to display. When the user saves, a write is forced so that
the server can retrieve the pad's content and store it in DB.
To force the write, the widget always notifies a fake change
on the url. However, we don't want this change to trigger
the confirm dialog. With this rev., this fake change doesn't
make the record 'dirty'.
2017-08-10 10:33:05 +02:00
qdp-odoo 35b3617667 [FIX] account: payment onchange in multi currencies
Computation of the field 'Difference amount' was wrong as it was converting amounts in base currency in the following use case:
- company currency USD
- invoice currency EUR
- payment's journal currency USD but payment's currency EUR
- invoice of 100€, payment of 20€: difference was not 80€ because it was converting to USD
2017-08-10 10:31:51 +02:00
qdp-odoo 5641372532 [FIX] account: show payments in multi currencies with the rate of the invoice date instead of the payment date (so that we can see a meaningful residual)
Without this patch, the residual of the invoice doesn't correspond to the real residual of the invoice's receivable/payable line(s)
2017-08-10 10:29:38 +02:00
Goffin Simon 1aed433f54 [FIX] website_event: Website Event Error when you encode a 0 value in the registration
The function registration_new must return a type json.

opw:765643
2017-08-10 09:27:05 +02:00
Nicolas Martinelli ac392096d8 [FIX] stock: recompute display name
The display name of a location should be recomputed when the name of the
parent location is changed.

opw-761463
2017-08-10 09:00:59 +02:00
Aaron Bohy 1e8f6d01ff [FIX] web,*: send correct context on button clicked
*account_asset

When a button of type 'action' is clicked (execute a given action),
special keys must be set in the context (active_id, active_ids and
active_model). They must be computed regarding the record containing
the clicked button, i.e. if we are in a modal, it must be the id
and model of the record displayed in the modal.

Before this rev., we always sent the id and model of the record
displayed in the background (i.e. the id and model of the url).

This caused a bug in MRP that could be reproduced as follows:
- open a manufacturing order in form view
- click on edit
- click on one of the line of the one2many, and click on the green
  icon to edit a product
- click on the update product quantity button on top of it
- the product field must be correctly filled, which was not the
  case before this rev.
2017-08-10 08:48:32 +02:00
David Monjoie 50957038b9 [FIX] web: fix magic grouping on date fields
Date fields have magic grouping methods to specify how to group on
them like date:month, date:weeks, date:days for example. It needs
to be handled properly since date:month is not a valid field name
but date is.

Steps to reproduce the issue:
- Go to Sales/Dashboard
- Click on My Pipeline
- Group by "Creation Month"

Basically, this can be triggred from any view which has a search
view which defines a group using the magic date grouping methods.
2017-08-10 08:48:30 +02:00
Olivier Dony 08b75b7bcb [FIX] pad: do not crash during record creation
Backport of 0de067cae9
(and 9b8bc5e5a1)

Rev. c5bd509274 attempted to improve the
pad sync mechanism when merging records (tasks), but failed to consider
the case where the pad_url field is not set yet.
This happens at create(), due to the chicken-and-egg problem with the
pad URL depending on the record ID, and therefore set *after* creation.

Ignoring the sync when the URL is not yet set should be enough, as the
URL generation method also takes care of that first sync.
2017-08-09 18:51:16 +02:00
Thibault Delavallée 0fad594dc1 [IMP] http_routing, account, sale: remove pager from request
Use the pager through import directly.
2017-08-09 17:46:22 +02:00
Thibault Delavallée a97d9e7c0a [IMP] sale: make sale order use portal.mixin
Adapt sale.order model in order to use the recently introduced portal
mixin :

 * website_url field is replaced by portal_url field defined in portal
   mixin; _compute_website_url is replaced by _compute_portal_url that
   does basically the same computation;
 * get_mail_url method used in emails now uses the get_share_url of
   portal mixin;
2017-08-09 17:46:21 +02:00
Thibault Delavallée 04e8bac285 [IMP] portal: limit records pager to models having a website or portal url
Purpose: use portal.mixin recently introduced
2017-08-09 17:46:21 +02:00
Thibault Delavallée b3a9dbe231 [IMP] portal: add portal.mixin for portal access records
This mixin holds the replacement for website_published.mixin
website_url field. This field is called portal_url to avoid confusion
with the website and enforce the new portal use.

It also contains get_share_url method that will be used to generate
the URL to use in emails or various communication for customers.
2017-08-09 17:46:21 +02:00
Thibault Delavallée 37c8818059 [REM] account, sale: remove unused get_signup_url method 2017-08-09 17:46:20 +02:00
Haresh Shyara 289a487db9 [IMP] account_asset: Improve terminology for Asset/Revenue Recognition
Purpose
=======

Terms are confusing in the deferred revenue app.

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

- Rename label  "Depreciation" -> "Revenue"  in Deferred Revenue Lines wizard

- "Time method" in asset.categories shouldn't show "Number of Depreciation" but "Number of entries" instead

- In Customer Invoice visible field "Deferred Revenue Type" without developer mode

- All the menu related revenue will have same menu name "Deferred Revenues"

- Module name change to => "Deferred Revenues"

- Change module name : "Deferred revenue management for contracts" to "Deferred Revenues Management for Contracts"

- Change the label in time method 'Number of Depreciation' -> 'Number of entries'

- Also change the tooltip on Time Method
2017-08-09 17:42:26 +02:00
Christophe Simonis 3e54d9b56d [FIX] event_sale: SyntaxError
oversight of previous forward-port
2017-08-09 17:29:27 +02:00