Commit Graph
117975 Commits
Author SHA1 Message Date
Nicolas Martinelli f57f133047 [IMP] account, l10n_*: remove dependency on base_vat
Localizations depend on the module "base_vat". It is therefore
impossible to remove base_vat without the localization. This causes
issues for users who simply want to deactivate the VAT check.

opw-743260
2017-05-18 17:05:22 +02:00
Yannick Tivisse 707e5ea861 [FIX] sale: Don't hide CRM menuitem when installing ecommerce 2017-05-18 16:51:53 +02:00
Goffin Simon 9553355660 [FIX] crm: quick create in crm.lead
When making a quick create for a crm.lead record, the field user_id is set
with its default value (introduced by aa44700dcc)
But the date_open('Assigned') was not set.

When creating a challenge with goal="New opportunities", the new opportinities
are counted with date_open. But when creating an opportunity with the quick create,
it was not counted as date_open was empty.

opw:742751
2017-05-18 16:32:52 +02:00
Nicolas Seinlet 12808c512d [FIX] point_of_sale: speedup order creation
When creating orders from the interface, all the orders of the current session
are in the cache and slow compute methods are recomputed.
Clear the cache before evaluating to execute _compute_amount_all on the current
order only.

The cache mechanism has changed in v10 and no longer contrains all orders.

opw-741442
2017-05-18 16:17:50 +02:00
Goffin Simon fa87b0d6ff [FIX] purchase: _anglo_saxon_purchase_move_lines
Let's consider a stockable product P with a product category PC with costing method = real price,
valuation = perpetual, stock valuation account = SVA and price diff account = PDA.
The cost defined for P in product.template is equal to 1$.

Steps

-Create a PO for P with a price unit = 5$
-Confirm PO and generate the invoice
-Update the qty for P in the invoice and validate it(price unit is still 5$)

Bug:

In the general ledger: a move with a debit of 1$ is created for SVA and a debit of 4$
is created for PDA which is wrong. The expected result is: just a move of 5$ created
for SVA and nothing for PDA because the difference between the purchase price and the
invoiced price is 0.

This commit fixes this problem.

NB: in real price and average price, the considered cost must be the purchase price
and not the cost defined in the product template.

opw:740879
2017-05-18 15:15:01 +02:00
Yannick Tivisse 5dfd342d08 [ADD] sale_management: Separate sales menu items from sale app
Purpose
=======

Don't display sales app icon in Odoo homepage when installing ecommerce (only website should be visible)
it's confusing to have sales icon  -> where do I manage my sales? In sales or in website? -> in website

Specfication
============

We need one new modules to add Sales menus to the homepage. Currently they come with "sale". So when installing "website_sale", we get them (because sale and account are dependencies of website_sale). We don't want that anymore. Along with that you need to replace modules in Apps menu:
sales menu items must be in the new sale_management module, no longer in sale

- create new app "sale_management"
- Currently 3 app icons when installing ecommerce (Sales, Invoicing, Website) -> too many icons, where to start? -> GOAL: Only 2 icons > Website, Invoicing
- new module to display Sales Icon (like account_accountant): "sale_management"
- move menu items to sale_management
- sale, sale_management: move app description, rewrite the manifest file
- sale, sale_management: move tour from sale > sale_management
- Changes in some dependency module "sale" > "sale_management" modules: event_sale, mrp_repair, pos_sale, report_intrastat, sale_crm, sale_expense, sale_stock, sale_timesheet, website_quote

Menu items to move 'sale' --> 'sale_management'
===============================================

Sales
	Quotations
        Sales Orders
Invoicing
	Orders to invoice
        Orders to Upsell
Catalog
	Products
        Product Variants
        Pricelists
Reporting
	sales
Configuration
	Settings
        Products -Attributes, Attribute Values, Internal Categories
2017-05-18 14:41:48 +02:00
Yannick Tivisse 0f92eed8a0 Revert "[ADD] sale_management: Separate sales menu items from sale app"
This reverts commit 9ab421d99a.

We should use the active field on the ir.ui.menu with the root menuitem instead of moving all the menuitems into a new module
2017-05-18 14:41:48 +02:00
Martin Trigaux f4ce2c7c2a [FIX] point_of_sale: restore removed method
Was removed at 173b76c7bb but was used in pos_blackbox_be (and maybe other
custom modules)
Restore the previous method that will call a read on the computed fields
2017-05-18 14:34:52 +02:00
Raphael Collet afef71d6b9 [FIX] Always round monetary values in database (#17010)
Let `create` and `write` round monetary field values before sending them to the
database. Pass the values to be written to `field.convert_to_column`, so that
the currency can be retrieved from the values, and the value be rounded.
2017-05-18 14:15:07 +02:00
Nicolas Lempereur 41c75ad0c3 [FIX] report: blank page on Background template
The `Background` template report (added in 3d04e4488) has been reported
in some instance to have CSS which could cause an empty page at the end
of the report.

This is caused by the following CSS rule which allow to have the
background at the bottom of the content:

.o_report_layout_background {
	min-height: 1000px;
}

this is probably caused by a difference in header/footer height, font or
version of wkhtmltopdf (this has been reproduced on wkhtml 0.12.1).

A fix is hard to do for this and keeping the background at the bottom of
the report content because of how wkhtml behave. So to mitigate (and
hopefully it doesn't come back) the issue, this commit just change the
CSS min-height.

opw-726546
opw-743315
closes #17072
2017-05-18 14:02:40 +02:00
Aaron Bohy 8af3d452f4 [FIX] web: BasicModel: read_group on selection field
When grouping on a selection field, the read_group may return a
group for value false (containing records with the selection field
unset, typically). When this happened, there was a crash because
the BasicModel didn't handle that case (it assumed that the value
of the groups was always a valid key of the selection).
2017-05-18 13:55:46 +02:00
Aaron Bohy f77e86b67b [FIX] mass_mailing: read_group: grouped on selection field
The model MassMailing overrides read_group to handle the case when
it is grouped by field state, which is of type selection. However,
it sets as value for each group the array [key, name] of the
selection option, which is incorrect (it should set key as value,
like the default read_group does, and as the name is known client
side anyway).

This case was handled by the old views, but it isn't by the new
ones, which are less permissive. We choose to fix the read_group
override instead of allowing both cases in JS, as it is always
better to have a clear and single API.
2017-05-18 13:55:46 +02:00
Aaron Bohy abacdd9776 [FIX] web: FieldRadio with numerical keys encoded as strings
Before this rev., the FieldRadio didn't work on selection fields
with keys like "0", "1"... i.e. strings that can be converted to
numerical values. This was due to an automatic conversion of those
keys to their numerical value by JQuery, so when the user changed
the value, an unknow key was sent to the server (e.g. 1 instead of
"1"), causing a crash.

This rev. changes the logic a bit so that the keys are no more
written in the DOM, but their index in the selection are.
2017-05-18 13:55:46 +02:00
Aaron Bohy 787daee41f [FIX] stock_account: inventory valuation: default value
... for 'compute_at_date' field (default 0, 'Current Inventory').

Before the new views, this value was selected by default by the
FieldRadio, but it was a mere coincidence. Indeed, as the field
had no default value, no value was specified in the default_get,
and for no reason, the widget selected 0 as value.

Anyway, as this behavior was wanted, we simply specify a default
value in the action.
2017-05-18 13:55:46 +02:00
Aaron Bohy 94c91374e3 [FIX] web: selection field with value 0
The server doesn't make a distinction between an unset selection
field, and a value 0 (integer). So when 0 is a valid key for the
field, the server returns false as value if the field is unset, or
if its value is 0, which is not really convenient.

As a consequence, when the value is 0, it appears as unset in the
interface. To circumvent this, we automatically converts false
value of selection fields to 0, if 0 is a key of the selection.
2017-05-18 13:55:46 +02:00
Géry Debongnie 3dd97db07f [FIX] web: properly loads default values for many2manys
Many2many default value can be a list of ids, and in that case, we did
not properly load data.

It could be seen by selecting a few contacts (in list view), then
opening the 'Merge contact' wizard in the sidebar (action menu).  Before
this commit, the wizard did show a list with some empty rows (for the
field partner_ids).
2017-05-18 11:33:32 +02:00
Nicolas Martinelli 4cbbbaddd5 [FIX] account: Sales team on refund
When doing a refund of an invoice, the sales team is not kept. At the
same time, remove fields which don't exist anymore.

opw-743093
2017-05-18 11:11:37 +02:00
Jérome Maes c5555a439e [FIX] calendar: use the correct model
Getting the recurrent event in an order that make
sense for this model.
`self` is mail.message model, so this order can cause
crashes, since calendar.event and mail.message have
many different fields.

opw-743265
2017-05-18 09:30:11 +02:00
Goffin Simon 64eb5ce48e [FIX] account_bank_statement_import: journal without default credit/debit account
A traceback was raised when importing a statement for a journal without default credit/debit account.

opw:742196
2017-05-18 09:21:26 +02:00
Fabien Pinckaers 440177f2fa [IMP] MRP: managers should be able to fix eroneous times 2017-05-17 11:42:17 -07:00
Josse Colpaert 817ec3e814 [FIX] delivery: delivery slip wrong forward port aea68e4 2017-05-17 18:27:02 +02:00
Josse Colpaert e7da75dd3c [FIX] delivery: delivery slip wrong forward port aea68e4 2017-05-17 18:26:03 +02:00
Pragnesh Mistry 1b8050a30a [IMP] sale: Move the Margin field below Total on a sales order
move margin field from the bottom left corner of sales order to below the total_amount field
2017-05-17 16:52:09 +02:00
Mahendra Barad 0982047101 [IMP] mail: better navigation when expanding chat windows
Before this commit, expanding a chat window would open the discuss application, which means that the current navigation state (breadcrumbs) is lost.  With this commit, it simply opens a new action in the breadcrumb, and does not lose the current action. (PR 16725, closes task 31767)

Note that this implies that it is possible to have two discuss client actions open at once.
2017-05-17 16:08:46 +02:00
qdp-odoo 6db235385a [IMP] account: replace bank_acc_number by bank_account_id on bank journal form view.
Was PR#16105
2017-05-17 15:35:06 +02:00
Martin Trigaux ae1aec32c2 [FIX] point_of_sale: round taxes as in amount_tax
amount_tax compute method uses `price * (1 - (discount or 0.0) / 100.0)`
_create_account_move_line method used `price * (100.0 - discount) / 100.0`

with price = 9.95 and discount = 0.1 it makes a difference
>>> 9.95 * 0.9
8.955
>>> 9.95 * 90.0 / 100.0
8.954999999999998

Cumulative errors makes a 1 cent difference between totals of the orders and
computed amounts.

The session could not be closed as debit != credit

opw-743188
2017-05-17 15:22:07 +02:00
Martin Trigaux 6de2990f8d [FIX] account: reset the move reference on bank statement
When removing a move previously linked to a bank statement, the move_name value
must be removed too.
This field is set when reconciling the entries.
When move_name is set, it is not possible to delete the bank statement line,
even if the refered move no longer exists.

opw-741205
2017-05-17 15:21:43 +02:00
Jitendra Prajapati 6cd0f5c44c [MERGE] payment, website_sale: improve view and use of acquirers
Purpose is to ease user flow and understanding when configuring and
managing payment methods. UX of acquirers (form, kanban) and their
integration in ecommerce is improved. Please refer to individual
commits for more details.

This merges 'dev/master-clean-payment-views-jpr-tde'.
2017-05-17 14:45:30 +02:00
Pragnesh Mistry 22e0b857bb [IMP] hr_expense: Show expense date instead of creation date in reports
Purpose
=======

In Expenses > Reporting > All Expenses, the X-axis of this pivot by default is the creation date of expense report. It should be the expense date instead.
make the same changes in graph view.

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

In "All Expenses" report by default "Expense Date" instead of "Create Date"  in pivot
Also rename "Date" to "Expnese Date"
Changes should be made in to graph view.
2017-05-17 14:42:37 +02:00
Jitendra Prajapati 9a9f9e1ab7 [IMP] website_sale: perform small UX improvements
* Display 'order confirmed' only if it is actually the case;
 * Display uom only if those are managed;
2017-05-17 14:41:00 +02:00
Jitendra Prajapati b6d636617c [FIX] payment: perform small code improvements
* add a constraints about authorized state for tx and authorize feature
   available on acquirer;
 * order acquirers first by publish, then sequence then name;
 * add a sequence on some provider data and use a default to have some
   popular acquirers first;
 * use update instead of write in an onchange;
2017-05-17 14:41:00 +02:00
Jitendra Prajapati de5433f415 [IMP] payment: improve usability of tx views
* add provider, related on acquirer_id.provider, in order to display
   certain piece of information on tx depending on their provider;
 * better tx form view and partner address display;
 * remove unnecessary notebook on tx form view as it is not used;
 * rename Payment Acquirers menu into Payment Methods, easier to
   understand;
 * acquirer kanban view improved to install / activate / configure them
   depending on their state;
 * be able to publish / unpublish acquirers without having to wait for
   website_payment to add a button;
2017-05-17 14:40:35 +02:00
Dhaval Panchal db41366b67 [IMP] discuss: action buttons always visible on touch screens
We add the o_touch_device css class to the body (it was done in enterprise only), and various other small changes to make sure that the action buttons (in discuss, next to the message title) are always visible (not only on hover) when we are on a touch device. (pr (#15459, closes task 31208)
2017-05-17 14:39:09 +02:00
Laurent Smet 31b37b8abf [FIX] crm: bad computation of 'Won in opportunities'
The filter on activity_date_deadline has been added during a fix, see
28c158cd13
It's incorrect for the computation of the 'Won in opportunities'
because it excludes opportunities not having activity_ids.

Furthermore, the way to compute the 'won' amount is not equals to the
filters when clicking on the button. Then, we need to keep only
opportunities standing in a kanban column having a probability of 100%.

opw-742489
2017-05-17 13:37:06 +02:00
Jitendra Prajapati 327be89d0b [IMP] payment: improve labelling and description of various acquirers
Be less ecommerce centric and try to explain a bit better the various
payment options. Purpose is to ease user understanding.
2017-05-17 13:14:54 +02:00
Sylvain GARANCHER 57b3894ca0 [IMP] stock: allow to define from_date
The context key `from_date` can be retrived from `self.env.context,
while the context key `to_date` can be defined for each procurement
group.

We extend the code so that `from_date` can also be defined for each
procurement group.

Closes #16803
opw-743013
2017-05-17 13:10:43 +02:00
Edser Solís f17bc70fbc [CLA] Iterativo signs CCLA
Done at #16967
2017-05-17 13:08:46 +02:00
Deepak Geriani 6ea3b8de38 [IMP] mail: close chat window with Esc key
Closes task 32316
2017-05-17 12:48:44 +02:00
Aaron Bohy ba6a3a91ae [FIX] web: MonetaryField: read currency_field in options
In the xml definition of views, a 'currency_field' can be specified
in the node options:

<field name="amount" widget='monetary'
       options="{'currency_field': 'currency_id'}"/>

It indicates which field the monetary widget has to use to
determine the currency to display.

Before this rev., the widget didn't look for the 'currency_field'
in the options, but directly in the node attrs, so this simply
didn't work. This was for example the case on the crm.lead kanban
and form views.
2017-05-17 12:36:16 +02:00
Aaron Bohy 59584283c5 [FIX] web: properly escape field values when necessary
This rev. removes some html injections issues:
  - in char and text field widgets
  - in phone field widget in mobile
  - in list views (when no widget is instantiated)
2017-05-17 12:36:09 +02:00
qsm-odoo a83f812357 [FIX] mass_mailing, web_editor: increase mail clients compatibility
Following bee3253b44, this commit is made
to increase the mail clients compatibility for the mails that are
created with the odoo mail editor.

Three new problems are handled:

- Font family of titles had to be forced too as outlook was not
  inheriting parent font family on those either.

- Default text font-size had to be forced as was not detected in
  transcoding correctly.

- text-decoration rule was decomposed in text-decoration(-line,
  -style and -color) in transcoding. Outlook is ignoring those
  three rules for some reason. As the decomposition is useless,
  the transcoder now forces the recomposition of these three rules.
2017-05-17 11:29:24 +02:00
Nicolas Lempereur 533f03fe7f [FIX] event_sale: auto_confirm free ticket
After 5d4dd98a a registration was confirmed once an invoice was fully
paid.

This is not very handy if the registration was free to begin with, you
need to create a 0.00 amount invoice.

This commit get back the previous behavior of auto-confirming
regitration directly when the registration is free.

opw-742901
closes #17035
2017-05-17 10:39:59 +02:00
Aaron Bohy 0f9e986c46 [FIX] web: BasicModel: discard changes when reloading
... from a new record.

Steps to reproduce the issue:
  - go to a multi-record view (e.g. list) of basically any model
  - click on 'Create' -> it opens a form view in edit mode
  - click on 'Discard' -> it goes back to the list
  - click on an existing record -> it should open the selected
    record in readonly.
However, it didn't display the data of the selected record, but
the default data of a new record (the result of a default_get).

This was because the changes weren't properly discarded when
reloading from a new record (it rather restored the record to its
initial state, i.e. to the result of the default_get).
2017-05-17 08:10:49 +02:00
Olivier Dony 5f4db9df66 [MERGE] Forward-port saas-16 up to 5afe894f44 2017-05-16 18:23:15 +02:00
Martin Trigaux 722017ca83 [FIX] hw_posbox_homepage: do not display not working links
The '/point_of_sale/display' controller is added in the hw_screen module.
This module is not loaded if the init scripts are not modified.
This means that updating a posbox with the internal update feature will not work.

This adds the link only in hw_screen and display an information message for old
versions.
2017-05-16 18:14:45 +02:00
Jerome Boisvert-Chouinard 43be0c1ab2 [CLA] Update Savoir-faire Linux CLA
Add new collaborators, remove old ones

Done at #16939
2017-05-16 18:10:03 +02:00
Nicolas Lempereur 65808bbb2e [FIX] models.py: less botched copy for callable translate
Fields translated with function such as `xml_translate` or
`html_translate` have translations such as:

  lang=fr_FR, src="Tree", value="Arbre"

when the value directly stored in the table could be:

 <strong>Tree</strong>

The code to copy translations when duplicating a record did not take
this into account and when not in english, would add previously not
existing translations such as:

 lang=fr_FR, src="<strong>Tree</strong>", value="<strong>Arbre</strong>"

This is wrong since for example after a copy in french, what is in the
database is:

 <strong>Arbre</strong>

This commit change this so that the translation in the database stay the
same:

  lang=fr_FR, src="Tree", value="Arbre"

This translation will still not apply (if the base language is different
and a translation different than the source exists) but it is more
logical to have this.

This change also magnify an issue that was that if a translation was:

  Tree -> Arbre

and the content `<strong>Arbre</strong>`. The translation doesn't happen
in one way, but does when doing the reverse translation.

So:

 translation (Tree -> Arbre):
  `<strong>Arbre</strong>` -> `<strong>Arbre</strong>` <= FAIL
 reverse translation (Arbre -> Tree):
  `<strong>Arbre</strong>` -> `<strong>Tree</strong>` <= WORKS

this broke the test that something reverse translation of a translation
got the original. But testing this if the translation did not work seems
to make little sense.

opw-740213
closes #16984
2017-05-16 18:05:49 +02:00
Jeremy Kersten 5bbe4a8ce7 [FIX] website_portal_sale: fix vat and name comparison in /my/account
Before this commit, we compare in some case False != u''

Commit #56c798a fix u'' != False but in case of the partner has been
edited from front end, partner.vat will be u'' and not False
2017-05-16 17:47:51 +02:00
qsm-odoo 490764ae11 [FIX] website_blog: fix "select to tweet" feature
There was two main problems with the feature

- The author name was not properly fetched so the feature which was
  supposed to add the author of the blog post in the tweet never
  worked -> this commit simply deletes it

- The code was considering the url length in the size of the tweet,
  so if the url was 135 characters long, it considered that only 5
  characters have to be taken in the selected text... which is wrong
  as twitter URL are all shortened to 23 characters by twitter

opw-741530
2017-05-16 17:21:34 +02:00
Olivier Dony 5afe894f44 [MERGE] Forward-port saas-15 up to 878fbc75ff 2017-05-16 17:09:45 +02:00