Commit Graph
117156 Commits
Author SHA1 Message Date
Nicolas Lempereur b79d8b99ff [FIX] base: amount_to_text possible difference
In 79038055 amount_to_text was refactored and improved, but there is a
drawback.

ie. if we have .29 cents with two decimals, `Twenty-Eight` was displayed
because `int(0.29 * 100) == 28` due to floating-point representation.

This commit keeps the improvements and fix this issue by using string
formatting of float as was done before.

opw-1829924
closes #24161
2018-04-11 08:57:20 +02:00
Joren Van Onder 7805825941 [FIX] pos_mercury: allow test transactions again
It used to be possible to run test transactions against mercurypay.com
using a regular swiper device, test credentials and test cards
provided by Mercury.

Mercury has recently disabled this saying this feature did not adhere
to certain PCI regulations.

It means that currently on the regular mercurypay.com network only
real cards (and thus real money) can be used.

Because we require a way to test without spending money this commit
allows to switch to the test network (mercurycert.net). It uses a
system parameter because we cannot introduce a Boolean on
pos_mercury.configuration in a stable release. It also changes the
test credentials to some that work on mercurycert.net.

Note that the regular 'production' swiper devices can not be used on
this test environment. This results in:

Error 004118: Failed to decrypt

The swiper contains embedded cryptographic keys specific to
mercury*pay*.net. Instead a specific 'development' swiper device with
embedded keys for mercurycert.net is required.

opw-1832156 (this is necessary to test that issue)
2018-04-10 12:05:00 -07:00
Goffin Simon 8d851e4a17 [FIX] mrp_repair: repair fee lines without product_id filled
It's impossible to add a repair fee line without a product because the
product uom is required.

opw:1833233
2018-04-10 16:47:26 +02:00
Swapnesh Shah d805354123 [FIX] google_calendar: redirect to proper setting
Added the context key in action to open the General Setting menu instead of the
first configuration page (e.g. CRM)

Closes #24144
2018-04-10 16:43:30 +02:00
Romain Derie 0879cb88fe [FIX] payment: make the error handler works for non s2s acquirer
Before this commit, error handling would not work for non s2s payment acquirer
since it would always check for `o_payment_add_token_acq_[id]` in the DOM but
this is only present for s2s acquirer.
Non s2s acquirer got `o_payment_form_acq_[id]` in the DOM.

Now, we retrieve the correct DOM element depending if s2s is enabled for this
payment acquirer or not.

task-1825701
2018-04-10 16:10:59 +02:00
Nicolas Martinelli b7462ca224 [FIX] payment_authorize: number of decimals
- Create a SO of 56.16
- Send the payment link to the customer

At payment, the transaction is refused by Authorize because of an
invalid amount.

When looking closely, the data sent to Authorize contains the amount
56.160000000001. This is due to the float representation. To avoid this,
we use `float_repr` instead of `str`.

opw-1832468
2018-04-10 16:05:23 +02:00
Nicolas Martinelli 076cf05c2e [FIX] mail: composer expand
The expand arrow hides the last characters of the first line, which many
people (and me in particular) find annoying. We put it at the bottom
instead.

opw-1830762
2018-04-10 11:14:52 +02:00
Nicolas Martinelli d64ce53071 [FIX] stock_calendar: scheduled data
- Install stock_calendar
- Create a stockable product
- Add the route "Buy"
- Add a vendor with a delivery lead time of 30 days
- Create a reordering rule for x units
- Run the schedulers

A PO is created, but the scheduled date is set as today, not today + 30
days.

What happens is the following:
1. Since no `calendar_id` is defined on the orderpoint, `_get_group`
   returns `[(now, None)]`
2. `now` is used in the `procurement_values` of the `res_groups` by
   `_procurement_from_orderpoint_get_groups`
3. The `res_groups` values are used in `_procure_orderpoint_confirm`
   when calling `_prepare_procurement_values`.
4. `_prepare_procurement_values` is overridden by `stock_calendar` to
   set a value for `next_delivery_date`. At this point, the `now` value
   is used.
5. Finally, when creating the PO line, `_prepare_purchase_order_line` is
   overridden by `stock_calendar` to set the `next_delivery_date` as
   `date_planned`.

So, `date_planned` becomes `now`.

There should not be any date set when no `calendar_id` is defined.

opw-1828371
2018-04-10 11:10:29 +02:00
Nicolas Martinelli 77bf2c96af [FIX] stock_landed_costs: defer AML creation
In order to improve the speed of landed cost validation, we defer the
creation of AML at the very end of the process. This way, we don't
suffer from various performance issues caused by:
- cache invalidation (use of `with_context`)
- recomputations

opw-1824661
2018-04-10 11:02:36 +02:00
gustavovalverde 3d653a2c02 [CLA] Update iterativo SRL, adding Jose
Closes #24122
2018-04-10 10:35:28 +02:00
Goffin Simon e62fb90e7d [FIX] point_of_sale: POS anglo-saxon in FIFO
In FIFO, the stock move cost related to the picking of the POS
Order must be used to compute the price.

Fine tuning of this commit: a36ff26ce0

opw:1829801
2018-04-10 10:22:12 +02:00
len-odoo eca99f1f12 [FIX] point_of_sale: fix quantity rounding
When the user set a decimal accuracy on the product quantity, the point_of_sale
(POS) frontend would display the correct rounding of the quantity according to
both the decimal accuracy and the rounding set on the unit of measure.
However the quantity used to compute the price was only using the rouding on the
unit of measure. This led to an inconsistency in what is encoded in the backend,
and thus made it impossible to close the session as the price paid by customers
did not match what is encoded.

The problem comes from the fact that there is a variable this.quantity and
another one to display this.quantityStr. Unsurprisingly, this.quantityStr
was not computed directly from this.quantity, leading to the inconsistency.

opw 1826092
2018-04-10 09:32:05 +02:00
Andreas Perhab b856561f89 [FIX] doc: json rpc example
Could crash if note was note installed.
Add example of parameters to connect to the database

Closes #24085
2018-04-09 17:31:19 +02:00
Martin Trigaux 75f8eef26d [FIX] doc: correct reference to backend documentation
Avoids warning
2018-04-09 17:26:05 +02:00
Takuya Sawada d8b99b83f8 [FIX] sale: use proforma group
To hide the pro-forma report from the sale order

Closes #24066
2018-04-09 17:17:14 +02:00
Takuya Sawada 9f6180865f [CLA] eternalharvest signs Odoo CLA
Done at #24066
2018-04-09 17:17:14 +02:00
jem-odoo 9b92732570 [FIX] hr_timesheet: changing project resets the employee
The preprocess method checked if the project_id value
was given to determine if it was a timesheet or a normal
analytic line (since a timesheet is an AAL with project_id).
The problem came in the write, when changing only the project
value, the preprocess use the timesheet case, but since the
employee field was not changed, no value was passed, and it
compute the default one. So changing the project of an existing
timesheet reset the employee to the current one.
2018-04-09 16:52:22 +02:00
Jeremy Kersten 8decf4c956 [FIX] website_sale: multi-image - enable first image in carousel
Before this commit, the first thumbnail from the multi image carousel was
always disabled since there are no atribute data-slide-to.

Now we force a '0' string instead of 0 falsy value to have explicitely
data-slide-to="0" after the qweb rendering.
2018-04-09 15:57:24 +02:00
Goffin Simon ec7f88c334 [FIX] account_asset: Access error with shared product with deferred revenue
Steps to reproduce the bug:
-Let's consider a multicompany environment with company A and B
-Let's consider a shared product P for A and B
-P has a deferred revenue type D set on it
-D is defined in A
-Let's consider a user U in company B
-U creates a SO with P and try to generate the invoice

Bug:

A access error was raised because U is not allowed to see D and
D is needed to genrate the invoice.

opw:1825944
2018-04-09 14:47:31 +02:00
Goffin Simon 026781ec3e [FIX] account: Validating a statement with old posted moves
When validating a statement with old posted moves, the lock date
was checked by function, _check_lock_date and then it was impossible
to validate the statement even if all the moves were already posted.

Backport of this commit: 86a0d31251

opw:1830804
2018-04-09 14:33:29 +02:00
Nicolas Lempereur 90da0f5a64 [FIX] note: css margins of next activity
Fix CSS so it is more in line with other kanban tiles and avoid
unecessary margins.

opw-1817718
closes #24128
2018-04-09 12:07:04 +02:00
Christophe MatthieuandNicolas Martinelli 9961bbf4eb [FIX] web: check domain after action button in kanban
When a user click on an action button, we need to check if the record
match with the domain to remove it from the view if this action change
the record value.
Special case: we filter by active field equal true, if the active field
is available in the data (field present in the kanban view).

opw-1832879

Co-authored-by: Nicolas Martinelli <nim@odoo.com>
2018-04-09 09:54:20 +02:00
Lucas Perais (lpe) 6ee5b6fd6f [FIX] base: update module list without translating fields
Install a database in some other language than en_US
In debug mode and in the app list viewer,
   you'll see that the apps field are translated into your language
Then do an "Update App List"
Reload your page

Before this commit, the Apps' field lost their translation
This was because when checking for any updated data for known modules,
the ORM fetched the translation automatically, and compared the old (translated)
value with the new (English) value from the manifest

After this commit, This operation doesn't make the translations to be lost,
because only english values are compared

OPW 1832796
closes #23910
closes #24091
2018-04-09 09:22:11 +02:00
Odoo Translation Bot d9f7490f55 [I18N] Update translation terms from Transifex 2018-04-08 04:13:24 +02:00
Odoo Translation Bot 1735ac582c [I18N] Update translation terms from Transifex 2018-04-08 00:29:15 +02:00
Nicolas Lempereur ef2646ae9d [FIX] stock: location barcode more than one page
Since 3d04e4488, several pages have to be denoted by:

  `<div class="article" />`

And not as previously:

  `<div class="page" />`

This was not taken into account in the "Location BarCode" report so we
had only one page of barcode (so 4 barcodes since there is 4 barcode by
page) displayed.

fixes #19698
opw-1817574
closes #24098
2018-04-06 18:17:56 +02:00
Christophe Simonis 00ef138ce0 [REVERT] point_of_sale: change back to a write() to change company currency
This test being run during install, thih does not provoque any problems
as no CoA are already installed.

This partially revert commit b11621476b
2018-04-06 17:52:21 +02:00
jem-odoo 25912970ce [FIX] sale: name_get of SO line
This commit format the display_name of sale.order.line,
without context key.
The webclient trigger the name_search with context
key, but display the field without it.
So on task form view, when searching an SO line, user
will see 'SO0001 - my product' in its dropdown, but the
complete SO line description when saving.
This commit proposes, in aggreement with AL and FP, to
a global (and non conditionnal) format, since it seems
task form view is the only one place requiring the SO
line name_get.
2018-04-06 16:40:41 +02:00
Christophe Simonis 43509423e3 [FIX] account_cash_basis_base_account: adapt view to renamed field 2018-04-06 16:08:10 +02:00
Christophe Simonis 91a075fb3d [FIX] account_cash_basis_base_account: python3 compatible imports 2018-04-06 15:38:16 +02:00
Nicolas Martinelli d277adf4d5 [FIX] l10n_fr_pos_cert: import api
Following forward-port.
2018-04-06 15:05:18 +02:00
Christophe Simonis c94d30541c [MERGE] forward port branch saas-15 up to 97a70c2d8e 2018-04-06 14:33:40 +02:00
Martin Trigaux eb9f72ba62 [FIX] web_calendar: unlink parsed id
The id of the record may be a real database id or a string containing a virtual
id (e.g. "42-20380119031417").
The id is always stored as a string but must be converted to int when sent to
the ORM (to avoid self.browse('42'))

The calendar modules do handle correctly virtual ids in its unlink method but it
is not the case of the other modules that are expecting integers.

Convert to int if we are working with real ids

Replace and closes #22115
2018-04-06 14:31:52 +02:00
Christophe Simonis 97a70c2d8e [MERGE] forward port branch saas-14 up to 5eb6e14e85 2018-04-06 13:43:57 +02:00
Christophe Simonis 5eb6e14e85 [MERGE] forward port branch 10.0 up to e5fd52d28c 2018-04-06 13:40:40 +02:00
Denis Roussel e5fd52d28c [FIX] purchase: button_approve in a multi recordset fails
Closes #24079
2018-04-06 11:36:04 +02:00
tfo 990b7356b6 [CLA] Wink signs CCLA
Done at #24083
2018-04-06 11:23:13 +02:00
Christophe Simonis 76131b7970 [MERGE] forward port branch 10.0 up to ea42f6c176 2018-04-06 10:35:25 +02:00
Nicolas Martinelli ea42f6c176 [FIX] account: missing decorator 2018-04-06 09:44:47 +02:00
Alexis de Lattre c41f7297d3 [FIX] report: create a new environment
self is a rml_parse instance, not a BaseModel
create new environment to call ORM methods
prevent crash when calling formatLang on a RML report

Closes #24068
2018-04-06 09:27:35 +02:00
Olivier Dony 3f975f9769 [FIX] account_payment: make partner_id required only when draft
When not draft, the partner_id field is readonly and cannot be modified
anyway, but it makes the form invalid, so form buttons cannot be used,
e.g. to access the journal items, etc.
2018-04-06 08:51:54 +02:00
Olivier Dony f5b00c11dd [FIX] account_payment: properly compute destination account without partner
When the `partner_id` is not set (it is not required at the model
level), we can still compute the default destination account based on
the company chart of account configuration.

This is necessary to allow creating "customer" or "supplier" payments without
selecting a specific partner.
2018-04-06 08:44:34 +02:00
Christophe Simonis 91ea17af5f [MERGE] forward port branch 10.0 up to a93a5c6824 2018-04-05 19:40:54 +02:00
Christophe Simonis a93a5c6824 [MERGE] forward port branch 9.0 up to 27162b0e73 2018-04-05 19:35:27 +02:00
Christophe Simonis 82f45063c0 [FIX] account_cash_basis_base_account: use correct inherited view
Oversight of previous oversight of previous forward-port.
2018-04-05 17:45:12 +02:00
Romain Derie 27162b0e73 [FIX] website_blog: optimize crawler prevention
Commit d39856db prevents crawler to crawl and index blog tag URL which could
lead to possibly millions of URLs combinaison.

Still, it would crawl (but not index) second level of tags combinaison.

This commit ensure that crawling is prevented when already one tag on the URL.
2018-04-05 17:40:30 +02:00
Christophe Simonis ef3ad219de [FIX] account_cash_basis_base_account: correct dependency
Module `account_tax_cash_basis` has been merged into `account` in
saas~14.

Oversight of previous forward-port.
2018-04-05 17:21:06 +02:00
Alexandre Kühn 9a9da5763b [FIX] web: no record abandon on discard from default_get/onchange
Before this commit, when some records were created from an `onchange`,
we have the following weird behaviour:

    Suppose that this record has some required fields that are empty.
    When we click on this record, then somewhere else, the record
    disappears from the list.

This is because the records contains invalid fields, and it is wrongfully
assuming that the record to be discarded comes from "Add an item".

A previous commit [1] fixed a bit this issue with `default_get`, but since
it relied on a fragile heuristic, we decide to apply the correct fix with
this commit.

[1] https://github.com/odoo/odoo/commit/b09f0c99be2b13d33986414485556d87da186d65
2018-04-05 17:14:57 +02:00
Romain Derie d39856dbe8 [FIX] website_blog: prevent crawler on multiple blog tags page
Before this commit:
If a blog had multiple tags on the page, the crawler would click on every one
of them one after another until every tags combination got crawled.
With a lot of tags, this could result in million of URLs.

Now, we prevent URLs with more than one tag to be crawled.

Eg: With tags 'A', 'B', C':
/A
/A/B
/A/C
/A/B/C
/A/C/B

/B
/B/A
/B/C
/B/A/C
/B/C/A

/C
/C/A
/C/B
/C/A/B
/C/B/A
2018-04-05 16:55:58 +02:00
Christophe Simonis ff46163bca [MERGE] forward port branch 10.0 up to f4326b4dab 2018-04-05 16:21:23 +02:00