Commit Graph
115592 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
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
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
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
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
Odoo Translation Bot d9f7490f55 [I18N] Update translation terms from Transifex 2018-04-08 04:13:24 +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
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
Martin Trigaux 282605a8fc [FIX] website_blog: cut teaser after 150 chars
Space as word separator does not work in some non-latin languages like Japanese.
Cut arbitrarily after 150 chars

Closes #23219
2018-04-05 16:17:29 +02:00
Florent de Labarre f8ade1c96d [FIX] stock: To avoid singleton error
Execute on a single record is used when calling the function
_update_line_quantity and avoid singleton error

Closes #23860
2018-04-05 14:48:53 +02:00
Andreas Perhab 115b9616c1 [FIX] doc: remove not existent attribute
color is not accepted by rng on gantt views
copy-paste the code would not work

Closes #24055
2018-04-05 14:42:54 +02:00
Christophe Simonis f4326b4dab [MERGE] forward port branch 9.0 up to eaf54656fc 2018-04-05 14:39:37 +02:00
Lucas Perais (lpe) e05b2d01d1 [FIX] hr_recruitment: email from in template should be safe
Create a hr.attendant in a stage where a mail template is present.
Fill the email field as: Name Surname <name@surname.com>

Before this commit:
- the created partner's email has been rendered as name@surname.com&gt;
- the email failed to be sended because of this

This was because Jinja rendered that snippet escaping the special characters
Putting a 'pipe' safe in the snippet does the trick

After this commit:
both the partner and the email are created successfuly

OPW 1830739
closes #24059
2018-04-05 13:35:30 +02:00
Xavier Morel 4e784adbf7 [FIX] doc: non-module JS autodocumenters
Also when there is both a docstring and directive-level content put
the docstring first. That seems to match what Sphinx's autodoc does
and looks less odd.

Possible future improvement: a parameter to suppress the docstring?
Possibly a way to reorder the non-docstring content (e.g. members
documentation)?
2018-04-05 12:31:27 +02:00
Nicolas Martinelli 9b6ca49b58 [FIX] http: Bokmål language code
- Install Website
- Load the 'Norwegian Bokmål' translation, and choose to translate the
  website
- Logout

When accessing the website, the language displayed is not consistent to
the browser language.
1. `no` shows homepage in `nb_NO` (Firefox only) => expected since
    Bokmål is the main language in Norway
2. `nb` shows homepage in `en_US` => unexpected
3. `nn` shows homepage in `en_US` => expected since 'Norwegian Nynorsk'
   is not a language available (this will be the topic of another PR)

The issues comes from Babel's side, since `nb` is not in the
`LOCALE_ALIASES` while `no` is. We monkey-patch the value to avoid this
while Babel is corrected.

opw-1827258
2018-04-05 11:01:11 +02:00
Yenthe V.G 0fc2ee8c6a [FIX] stock: complete 85499c76d4
Was another one remaining

Closes #24047
2018-04-05 10:50:14 +02:00
xmo-odoo b5c660d8c0 [IMP] base: batch XID generation during export
* add UUIDs to XID sections (4 bytes / 8 hex digits) so it's not
  necessary to handle collisions & add a fallback generator
* use COPY for performances over executemany: executemany just
  performs an implicit loop on all statements (in psycopg2)
* ~pure SQL was possible:

      INSERT INTO ir_model_data (module, model, name, res_id)
      SELECT
          '__export__',
          '{model}',
          '{table}_' || A.id || '_' || uuid_generate_v4(),
          A.id
      FROM {table} A
      LEFT JOIN ir_model_data B
             ON A.id = B.res_id AND B.model = %s
      WHERE B.res_id IS NULL;

  but would have required installing pg extensions (problematic
  especially in stable) and performances are about the same as
  the COPY version

task 36343
Fixes #22493
2018-04-05 10:34:48 +02:00
Martin Trigaux 85499c76d4 [FIX] stock: do not set useless filters
The filters have no effect and it may be confusing to remove it and see the same
result.
The filters themself will be removed in master.

opw-1832502
2018-04-05 10:29:53 +02:00