Commit Graph
103231 Commits
Author SHA1 Message Date
Mansi Gandhi 4afadb3257 [IMP] Generic: change the string of report ==> Reporting replace with Reports. 2016-03-18 08:36:59 +01:00
Erwin van der Ploeg 4dbc81f910 [IMP] l10n_nl : When we create supplier invoices for costing invoices (not from purchase orders) it is a good practice to enter the total invoice amound including vat. Then Odoo calculates the taxes and you will never have a roudnding difference on the invoice total (maybe only on tax amound). To do this you need purchases taxes including tax in price. This commit adds those by default. 2016-03-17 18:14:07 +01:00
Rutul Raval afd29b277d [ADD] product: New entry in the app switcher / root menu: Products
* This commit adds an easy access to products and variants from the app switcher / root menu, similar to what exists for contacts.
    * Move an action to view stockable products to stock, as it is only executed from stock.
2016-03-17 17:55:37 +01:00
Martin Trigaux 1cfc5c4983 [MERGE] website_sale: migration to the new API
and some other various and glorious commits
if you are curious, check the commit messages
2016-03-17 17:42:39 +01:00
Martin Trigaux ec3110898e [FIX] website_sale_options: increment of cart
Before the patch:
- product A, with optional product B and C
- buy A with B and C as options
- buy (again) A with B and C as options
  => existing line A,B,C is incremented
- buy (again) A but with only B as option
  => existing line A,B,C is incremented

This was wrong as a new line should be created instead without option C.

Side note: this should probably removed as confusing to have duplicated lines
and has no interrest to keep the link.
2016-03-17 17:42:11 +01:00
Martin Trigaux b363cac202 [FIX] website_sale: missing noupdate on security rules
Allow people to customize it
2016-03-17 17:26:53 +01:00
Martin Trigaux 76f9f5c51b [MOV] website_sale: move configuration files in appropriate directories 2016-03-17 17:26:52 +01:00
Martin Trigaux ea50cb3806 [IMP] website_sale: clean cart update methods
* _cart_find_product_line

The method _cart_find_product_line is always called with only one record.
The fact that the return statement was inside the loop confirms the for loop is
not useful.

The method will now return recordsets instead of ids.
Convert the overrides to the new API for cleaner code and avoid old-new api
headhache.

Side note: the website_sale_option override logic is very counter intuitive and
should probably be refactored.

* _cart_update

Add ensure_one to be sure working on only one sale.order.

The method is always called on only one order and does not make sense to be used
on multiple (is the action that is done on one line of the cart).
The return format is the updated line without link to multiple orders.

Remove the for loop and assume self is only one order.
2016-03-17 17:26:52 +01:00
Ravi Gadhia 788c1334e2 [IMP] website_sale: migration to new api 2016-03-17 17:26:52 +01:00
Martin Trigaux 2c904509a3 [IMP] website_sale: cleaning of outdated code
- remove field complete_name
  is the same as the ORM field display_name, compute the name_get

- website_publish_button is duplicated
- write outdated, according to TODO (field color already renamed)
- Instead of open_website_url, should use website_publish_button
- styles, style_in_product, attrib_encode: are no longer used in templates

- remove unnecessary rebrowse
  This check was added at d3678bf5 either
  - to prevent browsing as public user (wrong as always browsed with SUPERUSER_ID)
  - to refresh fields of the record (I find your lack of faith in the cache
  invalidation distrubing)

- remove get_pricelist method
  equivalent to call request.website.get_current_pricelist
2016-03-17 17:26:38 +01:00
Martin Trigaux a1339c5aad [IMP] website_sale: propagate modified context only in useful methods
The pricelist in the context is only useful when computing the price of the
product.
Do not modifiy request context but only a local copy.

active_id is only used for the computation of the extra price from variants
2016-03-17 17:18:55 +01:00
Mitali Patel 7b1d655d8c [FIX] mrp_byproduct: correctly handle fixed quantities
If the fixed quantity was higher than the produced quantity, the quantity of the
manufacturing order was used for the byproducts instead of the one specified on
the BoM.

This bug was due to the computation of the subfactor (`_get_subproduct_factor`
in mrp, because I love the modularity) that was computing remaining quantity,
only considering the variable quantities cases.
In fixed quantity, the MO quantity being lower than the byproduct quantity, it
was never fully produced.

Corrected the test to correctly check the quantities and handle the usecase with
an higher quantity in fixed byproduct.

Added a field subproduct_id on the stock.move object that allows to easily find
the attributes of the mrp.subproduct item without making hacky (and probably
wrong in case of more than one byproduct) search to find it back.

Closes #8031
2016-03-17 15:36:54 +01:00
Goffin Simon af61494667 [FIX] account_asset: compute depreciation button
It is not allowed to recompute the depreciations when the asset
is confirmed.

opw:672203
2016-03-17 14:38:42 +01:00
Denis Ledoux f4f6e6c5dd [FIX] purchase: remove base. from Vendors menu xml id
Otherwise, when uninstalling the `purchase` module, this
menu is not deleted, while it should.

Besides, there is no reason to set `base.` to this xml_id:
It's not used by any other module.

opw-672130
2016-03-17 14:17:32 +01:00
Denis Ledoux f5c5223a10 [MERGE] forward port of branch 9.0 up to 9a2e3c2 2016-03-17 14:02:20 +01:00
Joren Van Onder 1ec6a384fa [FIX] point_of_sale: order product.product consistently with backend
In the backend product.product records are not just ordered on their
name, they are first ordered on default_code and then on name. The POS
should order records the same way.

opw-672284
2016-03-17 14:01:20 +01:00
Goffin Simon 9a2e3c2987 [FIX] account, sale: Sales Team filter
The field "team_id" doesn't exist in account module, this field is
added in module sale on the model account.invoice.report

opw:672047
2016-03-17 12:29:45 +01:00
Goffin Simon 360b9eb3a3 [FIX] account: Sort by account code
In communtiy, the order of the accounts shown in the reports
didn't follow the order written in the legend(How account type affects your reports?)
Adviser > Chart of Account > create

opw:669270
2016-03-17 11:45:48 +01:00
Yannick Tivisse 6b31d254e0 [IMP] website: Do not resize favicon on each page load 2016-03-17 10:14:00 +01:00
Yannick Tivisse 22ba0f2402 [FIX] website_event: is_participating checks partner if no mail address 2016-03-17 10:14:00 +01:00
Yannick Tivisse b78a64a2cc [FIX] base/ir: Run cron manually calls _callback with current uid
It should be called with the user on set on the cron itself
2016-03-17 10:10:28 +01:00
Parth Mehta b1f8abadf2 [IMP] crm: Name the root menuitem 'CRM' if only CRM installed
In sale_crm: Redifine the menuitem with the name 'Sale' in the
case that CRM was installed after Sale.
2016-03-17 10:03:13 +01:00
Goffin Simon 21beef4b19 [FIX] account_asset: period_id field
The field period_id didn't exist in model "account.asset.asset"

Closes: #11262

opw:671494
2016-03-17 09:41:47 +01:00
Antony Lesuisse 0c1c1f60b6 [FIX] Stock allow barcode input on stock.picking o2m kanban 2016-03-17 09:40:11 +01:00
Joren Van Onder 5bb64d40d0 [IMP] barcodes: allow immediate quantity input after scanning
When scanning items with a device like the Symbol MC3200 you are
presented with the Kanban view because of it's limited resolution.

In this view it is not possible to quickly set the quantity of scanned
products. Ideally users just want to scan the barcode, input the
quantity and repeat without having to click on virtual buttons on the
usually less than ideal touchscreen.

This implements a way for users to immediately start typing numbers
representing a quantity after scanning a barcode. The quantity will be
set on the specified m2x_field.quantity_field of the record associated
to the last scanned barcode. Because KanbanRecords are not editable
without opening a new view window.prompt is used. It will create an easy
to use native dialog of whatever device is being used. It also avoids us
having to implement a custom input field which would have to handle
keypress events like numbers, backspace, delete, etc.
2016-03-17 09:39:18 +01:00
Joren Van Onder c6fc91b318 [IMP] stock, barcodes: make barcode operations more mobile friendly
We want to properly support devices like the Symbol MC3200. This is a
handheld computer running a modern operating system like Android or
Windows with an integrated barcode scanner. After installation of a
modern web browser and configuration of the integrated barcode scanner
Odoo works as well as it does anywhere else.

The main issue with these types of devices is that the displays (and
their resolution) are very small (3" @ 320x320 for Symbol
MC3200). Because of this a lot of tree views become awkward to use
because they require vertical scrolling. A Kanban view however scales
nicely on these displays.

This implements Kanban views for both the picking.form view and the
stock.inventory form view because those are the views typically used
when using a barcode scanner.

Doing this alone is not enough, because the barcodes module does not
work with Kanban views. Small changes where made to
barcodes.FormViewBarcodeHandler to make it work with both List views and
Kanban views.
2016-03-17 09:39:18 +01:00
Nicolas Martinelli 8639df55c0 [FIX] mass_mailing: required field
`popup_content` cannot be required since it is only visible if the
option `group_website_popup_on_exit` is activated.

Fixes #11268
opw-671532
2016-03-17 09:34:26 +01:00
Goffin Simon c8f751c46e [FIX] mail: get_selection_id
Introduced by 4899be001a

opw:672113
2016-03-17 09:26:17 +01:00
Nicolas Martinelli 5c81327a5e [FIX] account: reset date
An issue occurs in the following use case:
- Create an invoice, validate.
- Cancel it, reset to draft.
- Change the invoice date
- Validate the invoice

The date of the account move is still the first date entered. This is
because the accounting date has not been reset on the invoice, and
therefore it is not updated.

opw-671672
2016-03-17 08:52:08 +01:00
Denis Ledoux 93ed3e29bf [FIX] sale_timesheet: remove unused, invisible timesheet_ids
The `timesheet_ids` was added in the `sale.order` form.

As it was invisible, and not used by the attrs of another
field, or by an onchange, this is pointless to load
it for no reasons.

Besides, this could lead to issues regarding the form validation,
in case the analytic lines were not valid.
e.g. if an editable list view is used to load
these analytic lines and if a field in this editable list
has been made required,
while analytic lines exist with this field not filled.
In such a case, it was not possible for the user to correct the
analytic lines, as they were invisible, and it was not the place
to correct them anyway.

opw-672184
2016-03-16 16:23:38 +01:00
Christophe Simonis 1a3e807fc2 [MERGE] forward port of branch saas-7 up to 5238b77 2016-03-16 16:11:12 +01:00
Christophe Simonis 5238b77430 [MERGE] forward port of branch 9.0 up to e8b965f 2016-03-16 16:09:13 +01:00
Joren Van Onder e8b965f93c [FIX] point_of_sale: correctly copy the base_amount sign of fixed tax
All the POS has to do is copy what accounting does. In the case of a
fixed tax we should do (from account.tax._compute_amount):

return math.copysign(self.amount, base_amount) * quantity

where copysign(x, y) returns x with the sign of y.

When base_amount is 0 it's positive, not negative. This also correctly
handles a base_amount of -0, although it's something that we shouldn't
encounter in the POS.

opw-672118
2016-03-16 16:06:02 +01:00
Joren Van Onder fc32ff2243 [FIX] point_of_sale: round subtotal of orderline according to currency
Before this we used line.price_subtotal directly when creating
account.move.line records, which causes issues when dealing with
non-integer quantities. In that case the amount paid by a POS customer
will never accurately be able to match the total computed amount of the
order.

opw-672118
2016-03-16 16:03:11 +01:00
Christophe Simonis a34d496069 [MERGE] forward port of branch saas-6 up to 1431ba2
Also include 2939800ed4 which seems to
have been forgotten during previous forward-ports
2016-03-16 15:30:03 +01:00
Dhaval Panchal 7373f8bb91 [FIX] project: allow project user to favorite project 2016-03-16 15:12:52 +01:00
Srushti Patel 1427b3660c [IMP] stock,purchase: add Product Variants menuitem in the Inventory and Purchase apps.
* Provides an easier acces to product variants from those apps
    * Fix the name of the generic product variants action in the product module.
2016-03-16 15:08:14 +01:00
Olivier Dony adddfa0d8b [IMP] website_sale: warn about acquirer with fees 2016-03-16 15:07:37 +01:00
Raphael Collet 0ec5456e63 [IMP] ir_model: add validation on custom field dependencies 2016-03-16 13:51:59 +01:00
Christophe Simonis 1431ba2f9b [MERGE] forward port of branch 8.0 up to 7b7f3fa 2016-03-16 13:15:30 +01:00
Denis Ledoux 1aeb747c6e [FIX] web: len & non zero implementation for wrapping list/dict
The implementation of `__len__` & `__nonzero__`
were not defined for the py types `wrapping_dict`
and `wrapping_list`.

For instance, this prevented an empty list
to be considered as `False` in domains
evaluated by the web client.

e.g., in the automatic partner merge wizard,
the domain
```
[('id', 'in', partner_ids and partner_ids[0] and partner_ids[0][2] or False)]
```
is used.

When the `partner_ids` list was empty (meaning the "partners to merge" list
was empty in the wizard), it wasn't considered as
`False`, and it therefore attempted to get
`partner_ids[0]`, which resulted to a crash, as
the list was empty.

opw-672095
Closes #11343

Courtesy of Xavier Morel (xmo@odoo.com)
2016-03-16 12:01:20 +01:00
Mansi Trivedi 170d7475ae [REM] stock: On stock.production.lot form view, remove some unnecessary fields.
* Since lots can only contain one product, which already appears on the form view, the serial and product name are removed from the quants list.
2016-03-16 11:58:25 +01:00
Aaron Bohy 533da62a6b [FIX] mail: read_followers() doesn't need res_id
When creating a new record, read_followers() was called without res_id and it
produced an error as the argument didn't have a default value. That argument
wasn't used anyway so this rev. simply removes it.
2016-03-16 11:21:34 +01:00
Parth Mehta db1f8ee8df [IMP] account: Clarify refund sequence on account.journal form view
* The refund sequence checkbox was not in technical features while the refund sequence selection was.This meant that in non-technical mode you could activate refund sequences but couldn't select one.
    * This commit fixes the issue by setting the the checkbox to technical features as well, and setting the refund sequence selection to required once the checkbox is ticked.
2016-03-16 11:15:45 +01:00
dut-odoo 0c95954550 [IMP] product_extended: Improve string of field 'real_time_accounting' for better usability 2016-03-16 10:46:30 +01:00
qdp-odoo 7a3d63b377 [MERGE] forward port of branch saas-7 up to revision 71d16a369e 2016-03-16 10:27:19 +01:00
Prashant Panchal 9a490b0b83 [IMP] Product: Improve type field tooltip on product. 2016-03-16 10:20:56 +01:00
qdp-odoo 71d16a369e [MERGE] forward port of branch 9.0 up to revision 083e172dd9 2016-03-16 10:08:49 +01:00
Nicolas Martinelli 7b7f3fa76a [FIX] account: filter out special periods
When computing the balance, debit and/or credit, the opening period must
be filtered out. Otherwise, the invoices which are still opened at the
time of the period closing will be counted twice.

opw-670584
2016-03-16 09:59:13 +01:00
Goffin Simon 083e172dd9 [FIX] product_extended: _get_variant_count
Due to the _set_product_template_field function, it is not possible
to set the standard price on a product template with more than one variant.

Due to the _compute_product_template_field function, it is not possible
to read the standard price on a product with more than one variant.

The field "standard_price" is in readonly to avoid some problems if the costing
method is in real time.

Closes: #11308

opw:671013
2016-03-15 16:55:04 +01:00