Commit Graph
115052 Commits
Author SHA1 Message Date
Rémi Rahir 002bf77df3 [FIX] crm: incorrect description of phone validation module
The curent behaviour of the 'phone validation' module will only format a
number to the national conventions IF possible and will never block a
user.
The term of 'Validation' isn't suited.
2018-02-28 15:58:57 +01:00
Nicolas Lempereur 8438470c3a [FIX] project: kanban needaction link well shown
When something like this is in a html content:

```
  <a href="hello">
    <div>
      <b>this</b>
      <a href="world">!</a>
    </div>
  </a>
```

browsers may correct it to:

```
  <a href="hello">  </a>
    <div>
      <a href="hello">
        <b>this</b>
      </a>
      <a href="world">!</a>
    </div>
  </a>
```

which breaks our CSS.

This change transforms the inner tag in a button tag.

opw-1817668
closes #23373
2018-02-28 15:36:18 +01:00
Arnold Moyaux 2c5022b4f3 [FIX] purchase: orderpoint should redirect to linked PO
Since procurement order removal. We lost the behavior
to access PO directly from the orderpoint.
In 10.0 the puchase button redirect to the procurement order
and the purchases were accessible from the procurement order.

We do not have the procurement order anymore thus the button
return to a list view with all RFQ and PO.

Fixes #23096
2018-02-28 15:36:27 +01:00
Goffin Simon c7526407ab [FIX] stock: Wrong production/scrap/adjustment location used in multicompany
- When using perpetual inventory valuation, the accounts used for scrap, manufacturing,
and inventory adjustment operations are set on the corresponding locations .
- In a multicompany environment, you will have a separate chart of accounts for each company.
- Account fields on locations are not property fields.
- Therefore, in order to separate the accounting of manufacturing, scrap, and inventory
adjustment operations, you must use a location for each operation for each company.
- Set up one location for each company for scrap, production, and adjustment
locations, setting the company field on each.

Bug:
- When attempting to create a MO, inventory adjustment, or scrap order while signed
in to the second company, you will receive a permissions error on stock.location.

Fix:
- Now the right location is taken according to the company of the user.

opw:1817339
2018-02-28 15:32:30 +01:00
Laurent Smet bff30f58c5 [FIX] base: disable the copying of the res.company
When copying a company, the default accounts/journals are copyied too.
The chart_template_id and the opening move are also copyied.
To conclude: copying a company is a very bad idea that leads to a lot of access rights issues.

-githug issue: 21213
2018-02-28 15:19:48 +01:00
Laurent Smet d5d2a33424 [IMP] account_analytic_default: get the analytic acc. based on commercial_partner_id
The suggested analytic account must search based on the commercial_partner_id instead of
the partner_id field.

E.g. create an invoice with 'Agrolait, Thomas Passot', the analytic account 'Agrolait' wasn't set by default.

-github issue 21401
2018-02-28 13:32:18 +01:00
Aaron Bohy d4126f7278 [FIX] web: DomainSelectorDialog: prevent overflow
The DomainSelectorDialog behaves differently from classical dialogs
in terms of height and overflow: (1) its height can be larger than
the screen height, and (2) its content is never scrollable
(overflow visible).

However, before this rev., the 'height: auto' rule ensuring (1)
didn't apply, so the dialog's height was limited to the screen's
height, and when it had to much content to display, it overflowed.

It didn't work because the code tried to apply the rule too soon,
so the .modal-dialog element was not yet available.

Fixes #23292
2018-02-28 12:04:33 +01:00
Nicolas Martinelli 26325dc943 [FIX] sale: sale_count
- Create a user with Inventory access but no Sales access
- Access a product

An AccessError is raised because the user doesn't have access to
`sale.report`.

We hide the stat button if user has no access to Sales, and moreover we
do not compute the sales count in this case.

opw-1815436
2018-02-28 11:59:52 +01:00
Laurent Smet 91be355bf9 [FIX] account: set "Financial Report" print action invisible
This action is generic to print the account reports (in community).
However, it doesn't make sense to call this method from list view because
the data are added explicitly in the _print_report method (in account.common.report).

-github issue 22349
2018-02-28 11:49:09 +01:00
Nicolas LempereurandHumberto Arocha f0c801778a [FIX] base_import: allow whitespace as empty float
Empty cells containing only spaces may have unexpected results (not
shown traceback and broken import) when being imported and they were
intended for a float or monetary field.

To avoid the error we could either, ignore left/right whitespace when
parsing a float value (so same behavior as en emtpy cell) or prevent the
error and get an friendly import report error:

 ' ' does not seem to be a number for field 'Name of Field'

This change choose the first way, so a float ' ' (just whitespace) will
be considered as '' (empty).

opw-1816784
closes #23105
closes #23355

Co-authored-by: Humberto Arocha <hbto@vauxoo.com>
2018-02-28 11:17:21 +01:00
Sergei Ruzki 0dc32e6b8c [IMP] base_iban: add support of IBAN code for Republic of Belarus
Was PR #23058. Courtesy of Sergei Ruzki
2018-02-28 11:10:01 +01:00
Laurent Smet c08f563795 [FIX] account: fix access rights of sequence journal
Changing the next sequence number on a journal requires having Administration/Settings access
rights. However, this feature should be available for advisors.

- github issue: 23352
2018-02-28 09:57:10 +01:00
Humberto Arocha 13a59a4610 [FIX] l10n_mx: Add new tag to allow the reporting of importation taxes
This is needed in the DIOT report (l10n_mx_reports)
2018-02-28 09:46:25 +01:00
Florent de Labarre 6c044b3675 [FIX] base : prevent unallowed launch
Do not allow to trigger the cron manually (e.g. via RPC call)

Closes #23157
2018-02-27 18:02:58 +01:00
qsm-odoo a206cca404 [FIX] base: properly layout contact name + country flag
Commit https://github.com/odoo/odoo/commit/13ee5596c6dd32b3471ce705b62b54ea59c00431
broke the behavior by changing a <t> to a <div> for no apparent reason.

(opw-1819038)
2018-02-27 17:03:27 +01:00
Martin Trigaux 65be76829a [ADD] doc: add missing params and profiling
* Add some missing database parameters in documentation
* Explain how to profile code

Closes #22554
2018-02-27 16:51:05 +01:00
Swapnesh Shah bd0827ed23 [Fix] base_gengo: add target Inline
To open the setting in the full window

Closes #23209
Fixes second part of #23170
2018-02-27 16:07:11 +01:00
Aaron Bohy 462c3956d9 [FIX] web: NotificationManager: warnings style
Warnings are styled a bit differently than notifications, as their
background is red (thanks to classname 'o_error' on the warning
root element). This classname isn't correctly added since rev.
920df59, which changed the root element of the 'Notification'
template, which is extended by the 'Warning' template, making
qweb.js fail to add the 'o_error' classname.
2018-02-27 14:31:02 +01:00
Nicolas Lempereur 60974227cf [FIX] product: create_variant forward-port 5c2380e
In 5c2380e9f an issue when modifying variants values was solved when an
attribute on the product variant had "create_variant" unset.

This commit forward-port what was lost of it in 11.0, that part was
probably lost because the code was previously changed when adapting to
python3.

Without the change, the added test failed creating a new variant keeping
the existing one. With this change, 'nocreate' value are ignored when
computing new variants to create.

opw-1815226
closes #23332
2018-02-27 12:06:49 +01:00
Goffin Simon d3843d7ed0 [FIX]fleet: Error when clicking on the costs of a vehicule
Steps to reproduce the bug:

- Go to Fleet
- Group by status
- Click on a vehicule
- Click on Costs

Bug: A traceback was raised because a group_by was made on the model "fleet.vehicle.cost"
for the field "state_id" and this field doesn't exist on this model.

opw:1815454
2018-02-27 09:42:40 +01:00
Hiral Bhavsar 03645bc51f [FIX] account: filters on invoices and bills
- Removed 'Invoices' and 'Credit Notes' filters.
- Removed inherited view of filters to remove the 'Not Draft' filter.
- Renamed 'Not Paid' to 'Open' filter.
- Added new filter 'Paid'.
- When click on 'Invoices/Bills' or 'Credit Notes' link of 'View'
  column from 'Customer Invoices' and 'Vendor Bills' dashboard, it
  should be open invoices with a specific domain instead of default
  filters.

Co-authored-by: Nicolas Martinelli <nim@odoo.com>
opw-1817236
2018-02-27 09:03:57 +01:00
Yannick Tivisse 6f614c3254 [FIX] payment: Be less resrictive for payment journals on acquires
Purpose
=======

It looks a little to restrictive to only allow bank journals on payment acquirers.

For example on could want to define a manual payment acquirer linked with a journal of type "cash".

Allow both journal types instead of only bank.
2018-02-26 17:17:33 +01:00
Yannick Tivisse dc6913e2e0 [FIX] payment: Avoid to reset journal_id on acquirer edition
Coming from https://github.com/odoo/odoo/pull/17067

Don't reset the journal but make it required on the form view instead.
2018-02-26 17:17:33 +01:00
Martin Trigaux a546b34f52 [FIX] mail: use correct emoji for shortcode
:) is not the shortcode for 😊
:-) is not the shotcode for 😂
source https://emojipedia.org
2018-02-26 17:14:02 +01:00
Ayman Adam Dawood e7c81ce536 [CLA] aymanadam5 signs Odoo CLA
Closes #23295
2018-02-26 16:38:10 +01:00
Adrian Torres d33ce2b4d1 [FIX] base_import_module: don't assume data/ exists
Before this commit, while performing a check on whether a customization
being imported was done using studio or not, we would assume that the
.zip would, at the very least, contain a data folder.

This is not the case as loose files can be imported and the data folder
is only generated by studio customizations.

To solve this, we walk over the whole zip instead of walking over the
data/ folder only (which may be non-existant), so loose files, files
inside the data folder and potentially files in other folders can be
parsed without raising unexpected errors.
2018-02-26 15:33:37 +01:00
qdp-odoo 25b49fe624 [FIX] account: don't _post_validate() an account.move after a reconciliation
Previously, trying to register a payment on today towards an invoice posted with a date prior to the FY lock date, was raising an error... which was completely wrong.
2018-02-26 15:30:16 +01:00
qsm-odoo c254c4c684 [FIX] web_editor: stop crashing on applying fonts with standalone summernote
Commit https://github.com/odoo/odoo/commit/137c4f5d76b55c3dd3c4f593de484aadfcf5e6da?w=1#diff-6a334b274d95fb88a4fbc29b910fbb59R2120
introduced a bug as it is using a function which is defined in another
asset. This is fine for connected users but not for summernote-only
users like public users on the forum.

The reason the line was introduced is unsure so it is simply removed for
now. The bug it was supposed to fix will be fixed later if it ever needs
to be.
2018-02-26 12:58:28 +01:00
Aaron Bohy 034c075e7e [FIX] web: default_get returning unknown field
Before this rev., it crashed when trying to create records of the
res.users model. This is due to commit ad1cceb.

The 'default_get' of 'res.users' always returns a value for field
'groups_id', whereas the docstring of 'default_get' states that it
only returns default values for fields given in arguments.

Rev. ad1cceb changed a bit the way the result of 'default_get' was
processed, by iterating over the values instead of over the fields
in the view. So, before ad1cceb, 'groups_id' was simply ignored,
and after, the BasicModel tried to process it and it crashed when it
attempted to retrieve its fieldsInfo, as this field isn't in the
view.

This rev. restores the previous behavior.

Fixes #23303
Fixes #23305
2018-02-26 12:45:10 +01:00
Laurent Smet 5450c5c3f7 [IMP] account: allow partial reconciliation with write-off
Suppose you have an invoice of 3000. You want to pay with paypal
    3 x 1000 but having of fee of 10 in each transaction. So, you attempt
    to reconcile 3000 with 3 x (990 + 10) that is not possible with the
    reconciliation widget.

Was PR #17489. Was task: https://www.odoo.com/web#id=23384&view_type=form&model=project.task&action=333&active_id=967&menu_id=4720
opw-815421
2018-02-26 10:37:39 +01:00
Olivier Dony 12b15cb554 [FIX] website_mail_channel: fix P3 compatibility of comparison
`msg_more_count` can be undefined, and therefore evaluates to None, which
makes the comparison with 0 invalid in Python 3.
2018-02-26 09:23:44 +01:00
Nicolas Martinelli e2c2a2fc69 [FIX] mail: rotate image in preview
When uploading an image as attachment, the document viewer doesn't
support the EXIF data. Therefore, a picture taken with a non-zero angle
will not appear with the right orientation (preview or full-size image).

Unfortunately, supporting EXIF data is not trivial in Python or
JavaScript without external libraries. Therefore, we add a rotate button
which allows the user to rotate the image by 90°. Moreover, we add the
`image-orientation: from-image` CSS property, which is only supported by
Firefox.

opw-1814407
2018-02-26 08:24:08 +01:00
Aaron Bohy a16013be66 [FIX] web: multi pages ordered o2m with onchange
Let's assume a one2many displayed over several pages with a default
order such that a record, say R, that would normally be on page 1
is actually on another page. Moreover, there is an onchange on that
one2many which converts all commands 4 (LINK_TO) into commands 1
(UPDATE), which is standard in the ORM.

When the first line of the one2many was edited, the record R was
fully loaded, whereas it shouldn't have been (as it is not on the
current page). So basically, a useless read was performed.
Moreover, if there was an x2many field in the one2many list, a
crash occurred because relational data of R that shouldn't have
been read wasn't postprocessed by the BasicModel.

The useless read occurred because the one2many subrecords weren't
correctly sorted before checking if some of them/some of their
fields should be read. This is not the case anymore.

OPW-1816800
2018-02-26 08:14:08 +01:00
Joren Van Onder 5b769650d6 [FIX] point_of_sale: allow refunds on non-cash journals
A customer can pay an order with a non-cash journal (e.g. a credit
card through a stand-alone terminal).

When this order has to be refunded later it should be possible to do
so on that same journal.

Some code prevented this from happening, notably a check in
order_is_valid which explicitly prevented this for an unknown
reason. There is no explanation in the
commit (4647f896a4) introducing that.

This commit allows the following:

1. input what you want to refund with a negative qty
2. click 'Payment'
3. click the Credit Card (type Bank) journal
4. (amount is auto-populated)
5. click 'Validate'

opw-805302
2018-02-25 19:35:11 -08:00
Odoo Translation Bot 141a2acdd8 [I18N] Update translation terms from Transifex 2018-02-25 04:54:25 +01:00
Adrian Torres 517b1d1faf [FIX] sale: re-init account.invoice.report view (#23286)
* Install sale_management, contacts
* Uninstall sale (not sale_management)
* Try to access any partner via contacts
    -> BOOM, traceback: relation account_invoice_report does not exist

For some reason, uninstalling `sale` drops the SQL view for
account.invoice.report which in turn means that anything that requires
the view will break, this was the case for accessing the res_partner
form view.

Fixes #23270 by forcing account.invoice.report.init() upon
uninstallation of the `sale` module.
2018-02-23 16:06:03 +01:00
Yannick Tivisse 3ac58d44c7 [FIX] l10n_be_hr_payroll: Use the warrant costs on wage_with_holidays
Purpose
=======

The warrant cost formulae has been modified at 5d22170.

Instead of using the (remaining) warrant costs formulae, use the corresponding field instead.
2018-02-23 15:23:07 +01:00
William Henrotin a4e05fb185 [FIX] point_of_sale: create picking at pos payment registering
previously, it was not possible to complete a payment on return in POS because of a stock move function that does not exist. The commit https://github.com/odoo/odoo/commit/6aebc800538b6fabd79c6cd1e819ef6d961e7589 changed some function names in stock.move model to make them private but the forward-port https://github.com/odoo/odoo/commit/aea68e4730d6c06a111504dacb3357e208971288 was not compatible with these new names.
2018-02-23 11:53:13 +01:00
Pierre Masereel 57f6c12834 [FIX] point_of_sale: add menu taxes to POS
When only point_of sale module is installed, it is impossible to modify
existing taxes because the One2many tags widget doesn't allow to open the
taxes and edit them. So we add a menu item allowing to modify them.

It is needed if we want to set a tax included in the price.
2018-02-23 11:19:48 +01:00
Christophe Simonis d6f5b7e2e6 [FIX] payment_ogone: correctly decode 3DS html form 2018-02-23 11:15:46 +01:00
Lucas Perais (lpe) 801b02f0ce [FIX] account: reconciliation widget: avoid created lines proposition may be empty
Before this commit, when stroking "Enter" in the filter, a JS traceback popped, because no created lines where found

After this commit, we control that we have created lines

OPW 1814309
2018-02-23 11:10:57 +01:00
Simon Lejeune 001b360458 [FIX] stock_account: fifo vacuum
If the vacuum finds that there is nothing to do regarding the accounting
entries, do not call `_account_entry_move`, else an accounting entry
will be created for the entire cost of the compensated move.

opw-1817372
2018-02-23 11:07:45 +01:00
Jeremy Kersten 708ad186d5 [FIX] website: sitemap is not translatable
Disable the multilang on the route sitemap to avoid the user to be redirected
from /sitemap.xml to /<lang>/sitemap.xml
2018-02-23 10:37:09 +01:00
Jeremy Kersten 7179008ffa [FIX] doc: fix link to our website
Remove wrong slash trailing

Now, in V11, matching of page are done on the exact name.

Previously, the error was transparent because we was using a
dedicated controller that allow trailing slash.
https://github.com/odoo/odoo/blob/11.0/odoo/http.py#L936

https://webmasters.googleblog.com/2010/04/to-slash-or-not-to-slash.html

    http://example.com/foo/ (with trailing slash, conventionally a directory)
    http://example.com/foo (without trailing slash, conventionally a file)

    Google treats each URL above separately     (and equally) regardless of
    whether it’s a file or a directory, or it contains a trailing slash or
    it doesn’t contain a trailing slash.

    Different content on / and no-/ URLs okay for Google, often less ideal for users

   Special case for homepage
       Rest assured that for your root URL specifically,
       http://example.com is equivalent to
       http://example.com/ and can’t be redirected even if you’re Chuck Norris.
2018-02-23 10:36:15 +01:00
Jeremy Kersten dee3b87ae4 [FIX] website_customer: fix sitemap when customer had no country
Before this commit, the sitemap will crash if you have some res.partner
without country that are publish and with an assigned_partner_id.

Now, we only search for customer with country that are set and avoid to have
a traceback:
  File "/home/odoo/src/odoo/11.0/addons/website_customer/controllers/main.py", line 31, in sitemap_industry
    loc = '/customers/country/%s' % slug(country['country_id'])
  File "/home/odoo/src/odoo/11.0/addons/http_routing/models/ir_http.py", line 91, in slug
    identifier, name = value
  TypeError: 'bool' object is not iterable
2018-02-23 10:36:15 +01:00
Adrian Torres ff7efbb1e8 [FIX] website,sale,auth_signup: prevent shared field deletion
The field `auth_signup_uninvited` is defined in the 3 aforementioned
modules, yet they are independant modules in respects to one another.

This means that whichever module is installed first will create an XMLID
for the field, if this module is uninstalled before the other two: boom!
crash when changing general settings because the res.config.settings
field set by the other two modules no longer exists.

To solve this, we simply ignore the field during ir_model_field.unlink()

Fixes #23171
2018-02-23 10:28:10 +01:00
Aaron Bohy ad1cceb4fb [FIX] web: one2many and onchange corner case issue
Let's assume a one2many list view inside a form view, displaying
a single char field A. There is an onchange on the form view
returning a command 0 (CREATE) for the one2many. The command 0 only
specifies a value for field A. The one2many list isn't editable, so
when a sub-record is clicked, it is open in a form view (in a
dialog). In this form view, an x2many field B is displayed in a sub
list or kanban view.

Before this rev., it crashed when the user tried to open the
created one2many sub-record (returned by the onchange) in the form
view, because of the presence of the x2many field B, which wasn't
correctly processed by the BasicModel (its value was undefined,
whereas it must be a valid, empty, dataPoint).

Moreover, the limit of the x2many field B wasn't set, so a pager
was displayed as soon as it contained at least one record.

Fixes #22050
2018-02-23 10:01:39 +01:00
Nicolas Martinelli 8a29e37dda [FIX] sale_timesheet: format amount
Due to the representation of floats, it may happen that the amounts in
the project overview appear with much more decimals than expected.

We use the usual `monetary` widget to render the amounts.

opw-1814843
2018-02-23 08:59:28 +01:00
Martin Trigaux 370c944c2f [IMP] pos_mercury: do not translate technical error messages
Error messages are given by vendor and have specific meaning
Translating it does not specifally help to find out more about the problem
pos_mecury is intended for US market anyway
2018-02-23 08:45:40 +01:00
Christophe Simonis 69ef302aa0 [FIX] website_quote: call existing method 2018-02-22 19:45:42 +01:00