Commit Graph
111138 Commits
Author SHA1 Message Date
Goffin Simon b2cf9559d6 [FIX] mrp: The field "lot_id" is required in MRP Product Produce
When producing in the view "MRP Product Produce", if the field "lot_id"
is empty, it raised a UserError. So the field is required.

opw:705143
2017-02-07 16:19:10 +01:00
Christophe Simonis 6aec563b98 [MERGE] forward port branch 8.0 up to 51cf2852d8 2017-02-07 16:10:04 +01:00
Nicolas Martinelli 37169c201b [IMP] mrp: store quantity available
We store quantity available to avoid numerical inconsistencies. For
exemple, with a rounding of 1e-6:
- `product_uom_qty` = 0.058824 (stored)
- `quantity_available` = 0.058823999999994 (not stored)

The dependencies of the field are fixed from v10.0.

opw-704775
2017-02-07 16:06:10 +01:00
Haresh Shyara b0efe1d4ba [IMP] purchase: rename some 'Call for Tenders' to 'Purchase Agreements'
Purpose:
========

A blanket order (it's an agreement with a vendor) is not a call for tenders (you aks several vendor to provide you an offer) but they are regrouped under the category "Calls for tenders" in the Settings of Purchase which should be changed .

Specification:
==============

- Change the setting option for 'Call For Tenders'
- Change 'Purchase Requisitions -> 'Purchase Agreements'
2017-02-07 15:55:27 +01:00
fwi-odoo 64a0ece649 [FIX] web: simplify the datepicker template
The library needs to have a 'relative' positioned parent to place
the datetimepicker correctly.
We don't do that in the template
anymore because it was not working in all the cases.
The template which instantiates the datepicker should define
a parent in position 'relative'.
2017-02-07 15:42:25 +01:00
Sagar Ahirrao a27d826ee2 [IMP] sales: rearrange menuitems and specify some groups on them
Purpose
=======

It's hard to find all the menu items dedicated to products & pricing:
- create a product
- set up a discount
- change the pricing
such recurring actions are related to each other but you need to go to different menus: e.g. to edit pricelists you have to go to settings while editing your pricing is a business operation.

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

make one menu item like in ecommerce: CATALOG

Also clean reporting and configurion menus a bit...

Details
=======

Sales menu rearrangement :

Dashboard
Sales
Invoicing
    Orders to Invoice
    Orders to Upsell
Leads Management
Catalog (takes straight to products if no access to variant, pricelist or coupons)
    Products (move from Sales)
    Product Variants (move from Sales)
    Pricelists (move from Config)
    Promotion Programs (move from Config)
    Coupon Programs (move from Config)
Reporting (reorder items, from leads to sales)
    Leads
    Scoring Page Views
    Opp. Assignment Analysis
    Partnerships
    Pipeline
    Activities
    Phonecalls
    Sales
Configuration
    Settings
    Sales Channels (move up)
    Leads & Opportunities
    Sales
        Quotation Templates
        Report Layout Categories
        Payment Methods (if online quotation installed)
        Delivery Methods (move from Config > Delivery)
    Products
        Attributes
        Attribute Values
        Internal Categories (rename from Product Categories)
        Units of Measure
        Unit of Measure Categories
    Pricelists (remove)
    Delivery (remove)
2017-02-07 15:35:33 +01:00
Nicolas Lempereur 7c8a98e53a [FIX] im_livechat: livechat button over ecommerce
Some things in the ecommerce have z-index 1, 4 (product images) or 5. So
this went over the live chat button "Have a question? Chat with us."

opw-707086
2017-02-07 15:29:53 +01:00
Goffin Simon 8e5684250b [FIX] product, report_intrastat, stock: visibility of categ_id on product.template
When the "Inventory" module was not installed, it was not possible to set
the field "categ_id" on "product.template".

opw:707285
2017-02-07 14:52:52 +01:00
hurrinico 51cf2852d8 [CLA] signature for hurrinico
Done at #15340
2017-02-07 13:58:21 +01:00
Rohan Patel 3fbaa6c409 [FIX] sale,crm: correct model name, 'sale.config.settings' instead of 'sales.config.settings' 2017-02-07 13:15:23 +01:00
Cédric Snauwaert 064be5b9e5 [IMP] account: add demo data for overdue invoice.
This is required for testing the customer statement report
2017-02-07 11:24:05 +01:00
yueqin 6076900b3e [CLA] signature for yueqin
Done at #15359
2017-02-07 11:00:19 +01:00
scosist 07cf30064d [IMP] purchase,stock: armonize _select_seller calls
If the data is available in the current context it should be passed to
_select_seller. The calls to _select_seller throughout the lifetime of a
purchase should be consistent (as possible) or the result of
_select_seller could be inconsistent when dealing with multiple sellers
(product_supplierinfo).

Modify a few signature of private methods to pass available information.

Closes #11414
2017-02-07 10:52:56 +01:00
Goffin Simon 09237efa33 [FIX] survey: validate_multiple_choice with comments allowed
When validating a multiple choice with comments allowed,
the comment was popped from answer_candidates and then
the condition to prevent answers with blank value always
triggered an error.

opw:707072
2017-02-07 09:42:00 +01:00
Christophe Simonis 9ec95b2a68 [MERGE] forward port branch saas-11 up to 51b79a7ee1 2017-02-06 17:18:24 +01:00
Christophe Simonis 51b79a7ee1 [MERGE] forward port branch 9.0 up to 0a4db3c0d7 2017-02-06 17:15:50 +01:00
Goffin Simon 93448bb2b8 [FIX] web: Dashboards error
Steps to reproduce:
Go to any pivot view (for example Sales > Report > Sales) and add
the current view to your personnal dashboard (in the search view: Favourites > Add to my Dashboard)
Go to the dashboard, traceback because $buttons was not defined.

opw:707296
2017-02-06 16:39:59 +01:00
Nicolas Lempereur 0e15f5ddd0 [FIX] web: typo space missing in 2d753ab5 2017-02-06 16:21:46 +01:00
Lucas Perais (lpe) 85f067753a [FIX] account: added a %s when calculating invoice hash
This commit corrects the forward port https://github.com/odoo/odoo/commit/ba8a1c7ec24cba065934e8eb58f97d15bb60b55f
It corrects the OPW 707315
2017-02-06 16:04:34 +01:00
Denis Ledoux 0a4db3c0d7 [FIX] purchase: refresh on shipments action button
When opening a purchase order shipments using
the given smart button, and attempting a refresh,
it leaded to a "record has been deleted" error,
because the current `active_id` is a purchase.order
id, while the `active_id` in the window action
`action_picking_tree` context expects a picking type
id.

The purpose of using `action_picking_tree` was to use
it as a template instead of having to create a full action
dict, not to actually use it.

By removing the id from the action dict, we prevent
to re-use the action window `action_picking_tree`
on refresh.

opw-706933
2017-02-06 13:08:45 +01:00
Simon Lejeune 7d2cccfc12 [FIX] stock: manually process a pack
Before this patch, it was not possible to manually process a pack (i.e.
checking the "is_done" box), because the field was always reset
*before* saving. It was still possible to process it by hitting
"validate", but it was not possible to put a pack in a pack.

Manually process a pack means hitting the checkbox "is_done" on the pack
operation. This "is_done" field is a boolean computed field with a reverse
function, and this reverse function set the "qty_done" on the pack
operation to 1.0.

The compute field doesn't have any depends declared, so the value was
invalidated after any changes in the form view. The computed method was
used to check the checkbox is the "qty_done" is set to 1.0. It was
probably used to check the checkbox when opening later a picking for
which the pack was already processed.

The issue is that the "qty_done" was never updated, because the inverse
method is only called when saving, and the compute method already reset
the "is_done" field to False, as the "qty_done" was not updated.

To fix this issue, we do not use an inverse method but an onchange.
Indeed, this was the expected behavior: hitting the checkbox should
change the "qty_done".

We already have a test covering this use case, committed in v9 [1]. It
didn't discovered this regression because the test was using directly
the "qty_done" field on the pack operation, not the "is_done" field used
in the view. We change the test to use the "is_done" field and manually
trigger the onchanges.

This is due to a bad new API migration [2].

[1] rev e248420348
[2] rev d8548e0771
2017-02-06 12:00:36 +01:00
Rohan Patel 319789900e [FIX] l10n_in: traceback when installing indian accounting module
There was a traceback error while installing the indian accounting module.

The commit 9c77467f07 shouldn't have been forwarded.
This cancels some account tag ids modifications from the commit 500b73323d. (this commit refactors the account tag id numbering)
This implies that some st_tag_in_[0-9]* point to an old references that no longer exist and return an error.

To fix this problem, we replaced the old(canceled) account tag reference by those after the refactoring in saas-14.
2017-02-06 11:24:20 +01:00
Nicolas Martinelli 483324393e [FIX] website_sale_digital: free product
- Buy only a free product with digital download content
- It is not possible to access the download link

Since the product is free, there is no invoice created. Therefore, the
product is never considered as paid.

opw-705258
2017-02-06 11:01:16 +01:00
Nicolas Martinelli 1e67069f60 [FIX] account: unreconciled filter
The account move line filter 'Unreconciled' only takes into account the
matching number. We should also make sure the 'reconciled' boolean is
false, since a line with a zero amount (e.g. invoice with only a free
item) is considered as reconciled and should not appear in the list.

opw-705982
2017-02-06 10:51:52 +01:00
Aaron Bohy 434199a407 [FIX] web: undefined variable e 2017-02-06 09:21:26 +01:00
Aaron Bohy dd657c42f7 [FIX] web: FieldMany2Many List: allow to add items if create="0"
One can add an item in a Many2Many without creating it, so the action
should be available. However, if the create action is not allowed, there
is no 'Create' button in the SelectCreateDialog.
2017-02-06 09:21:26 +01:00
Odoo Translation Bot 8ce1e51340 [I18N] Update translation terms from Transifex 2017-02-05 02:54:43 +01:00
Odoo Translation Bot 9dc96091f3 [I18N] Update translation terms from Transifex 2017-02-05 00:31:18 +01:00
Christophe Simonis d83d0999e0 [FIX] base: ondelete cascade on transien 2017-02-03 19:01:19 +01:00
Josse Colpaert 8810a34864 [FIX] equipment: activate cron for preventive requests
The xml file with the cron that creates the recurrent
preventive requests was not loaded in the system, so we needed to add
it.

Before, the cron was foreseen to only create the maintenance request on
the day that the request was foreseen (in the morning).  Now, it will
create a request if none exists on the next_action_date. That way the
requests can be planned for.

The other problem is that the '_compute_next_maintenance' method
for calculating the next_action_date does not take into account
the possibly manually already created requests.  So, now, the next
maintenance is calculated with the closed requests and the open ones.

If the first new one is in the past, it takes that date in the past. If it is in
the future, it will see if the gap is big enough to put a maintenance
in between the last done maintenance (or now) and the first new one.
If none exists, it is today + period.

That's why we have to add the 'request_date' in the depends. And take
into account the preventive requests existing on an equipment.
2017-02-03 18:56:10 +01:00
qsm-odoo 75895ae9f7 [FIX] web: properly notify field chain change on shortening
Before this commit, when opening a field chain with a field selector
and only removing parts of it and closing, the field selector was not
notifying the change.
2017-02-03 16:17:04 +01:00
thomassomko 2abac5c89c [FIX] sale: add product and partner to tax computation
Useful for some tax configuration (e.g. account_tax_python)

Closes #15269
2017-02-03 15:59:44 +01:00
qsm-odoo a4dc9a8032 [FIX] web: do not call session load_qweb on frontend
Since commits 2a8a17024d and 9c68bc7482,
the session is not started by the webclient anymore but directly by the
session service instead, and the session info is found in the DOM
instead of by RPC.

Because of that, the session is started in the frontend and other
non-backend environments which caused a JS error while trying to
load qweb (as no qweb has to be loaded). This commit makes the
session start check if it is a non-backend environment and only
initialize session info (from DOM) in that case.
2017-02-03 15:49:23 +01:00
Lorenzo Battistini 269dbc9872 [IMP] model: log a message when an AccessError happens
With the user who is trying to access and the record they are trying to access
to.
This way it is easier to understand the reason of the error.
Do not show record and user ids in the popup as it is a technical information.

Closes #13030
2017-02-03 15:42:47 +01:00
Martin Trigaux fe32048825 [FIX] account: make account payment method translatable
opw-707022
2017-02-03 15:35:29 +01:00
qsm-odoo 82ef921874 [FIX] web: handle field selector closing/opening correctly
Ironically, clicking on the dropdown arrow of the field selector was
the only way which was not opening the dropdown. It was indeed added
as pure design element.
This commit handles the opening and closing of the dropdown in a more
robust way... while simplyfing the code too.
2017-02-03 13:34:03 +01:00
Fekete Mihai 31034de863 [IMP] l10n_ro: Update Romanian Chart of Accounts
with new default taxes, mapping of fiscal positions

Closes #15326
2017-02-03 11:58:34 +01:00
Alexis de Lattre 2b0bb5406e [FIX] product: display pricelist name on product
The product.template displays the list of pricelist items with the name of the pricelist
The product.product displays the same information except the pricelist name.
This commit harmonize both views to display the same information.

Fixes #15009 
Closes #15010
2017-02-03 11:55:44 +01:00
Martin Trigaux 31e7fcb02e [I18N] point_of_sale: export source terms 2017-02-03 11:38:30 +01:00
Lucas Perais (lpe) 19a11a12f4 [FIX] point_of_sale: export orders and traceback now work for debugging.
In debug mode the buttons "export unpaid orders" and "export paid orders" now
work. On first click, they prepare the file and display the download link. On
second click, the file is downloaded.

The error popup uses the same method to download the traceback.
Use a different icon to have a visual feedback why that 2 clicks are needed.

This 2 steps is required as it is not possible in most browsers to simulate a
click event on a link.

The download method is kept for backward compatibility but will be droped in
master.

In the next version, a proper popup will be integrated (cf #14365)

Closes #15322
2017-02-03 11:38:29 +01:00
Denis Ledoux 9c96631dde [FIX] report: associated views with report name without dots
When setting a report with a `report_name` without dots,
the associated views button raised an exception.

This has been introduced during the migration to the new API
at revision 47c67b640b

Before, a try/except made sure the exception to not raise
the exception in case the report name could not be split
in two parts.

In this revision, instead of doing the try/except,
we check if the result of the split has a minimum
length of 2.

opw-706343
2017-02-03 11:19:01 +01:00
Nicolas Martinelli 174d3fdd66 [FIX] account: bank account on invoice
In case of a supplier invoice or a customer refund, it is not possible
to set a bank account if the partner is not the commercial partner.

opw-705528
2017-02-03 10:24:01 +01:00
Florent de Labarre 3d3920dfbc [IMP] stock: most recent inventory first
Was: last inventory first which is not very usable as soon as there is many inventory registered.

Closes #15324
2017-02-03 09:20:13 +01:00
Nicolas Martinelli 01ac5949ef [FIX] website_slides: get export links
The export links also require the access token.

Complement of commit c196b55d61
opw-703750
2017-02-03 08:15:12 +01:00
Nicolas Martinelli 61784887c4 [FIX] website_slides: crash if no image
Google might return an empty 'image' value, leading to a crash when we try
to analyze it.

opw-703750
2017-02-03 08:15:12 +01:00
Joren Van Onder c0817016d2 [FIX] point_of_sale: fix country selection on touch events
The POS uses FastClick to circumvent the 300ms touch delay implemented
by browsers before a click event is fired. (Although this has since been
removed, probably we can get rid of this in the POS at some point as
well [1]).

The way FastClick works is simple: immediately fire a synthetic event
and block the one fired by the browser 300ms later.

Recently, browsers have started to only trust native events to trigger
default actions [2][3]. Chrome in particular has started not trusting
synthetic events since v53.

FastClick provides a solution for this with the needsclick class. It
will not interfere with events triggered on elements with this class.

[1] https://developers.google.com/web/updates/2013/12/300ms-tap-delay-gone-away
[2] https://w3c.github.io/uievents/#trusted-events
[3] https://www.chromestatus.com/features/5718803933560832

Fixes #14886
2017-02-02 09:46:48 -08:00
qdp-odoo 4c408d1d19 [FIX] l10n_mx: fiscal position are based on templates to scale in multi-companies 2017-02-02 16:31:34 +01:00
qdp-odoo 554ca7ba7f [FIX] base: set US back as main company's country in demo mode 2017-02-02 15:50:52 +01:00
Nicolas Martinelli 0a5a423bff [FIX] sale_mrp, purchase_mrp: delivered quantity
- Create a manufactured Product A (sold as kit), invoicing based on
  delivered quantity.
- Create the associated BOM, e.g. contains 2 Products B.
- Create a SO with Product A, validate
- Change the BOM so it contains 2 Products C
- Validate the picking linked to the SO

The delivered quantity is not updated since the delivered products (B)
are not the same than the products of the BOM.

This should not be the case. Changing a BOM should not affect the
invoicing. To solve this, we simplify the check and only verifies that
all moves are done.

The same change is applied for PO.
2017-02-02 15:47:21 +01:00
qdp-odoo e0be5bb11c [FIX] requirements: add num2words. Needed in l10n_mx_edi 2017-02-02 15:31:34 +01:00