Commit Graph
117975 Commits
Author SHA1 Message Date
Nicolas Martinelli e5075147cf [FIX] web: pie chart
Mixing positive and negative values in a pie chart is not possible.
However, in this case, a crash occurs instead of displaying an error
message.

opw-786137
2017-12-04 14:02:12 +01:00
Nicolas Martinelli 055f8e0fcd [FIX] project: archive project
Archive the associated analytic account when a project is archived. Once
a porject is archived, it is assumed that we don't want to use the
analytic account anymore.

Moreover, it might be tempting for a user to delete these "useless"
analytic accounts, and therefore it would delete the archived projects
and tasks without notification.

Closes #21224
opw-784685
2017-12-04 13:57:50 +01:00
Arnold Moyaux 9c4c51f417 [FIX] mrp: handle by_products
When creating by products during a workorder the move lines
for the final moves are not created and the user has to manually
create them on the manufacturing order view.

This commit adds an automatic action in order to create
the correct move lines with the consumed quantity for the
by products not tracked by lot or SN.

This commit also fixes a bug where the consumed move lines where
not linked to the by products move lines
2017-12-04 13:44:40 +01:00
Arnold Moyaux 2afedc99a6 [FIX] mrp: workorder SN required only when moves are consumed
When the user do a work order with a final product
tracked by lot or serial number. A serial number is
asked at the end of the first workorder. The purpose is
to link consumed products with the SN/lot produced.

However it could happens that no component are consumed
during the first and following work order.

This commit allows to by pass the lot/SN registration if
nothing is consumed.
2017-12-04 13:38:22 +01:00
Lucas Perais (lpe) 8b875e4dd4 [FIX] web: hide binary file download when new record
Let's have:
- on res.company a binary file field named x_file
- on res.users a related binary field to company_id.x_file, and make it readonly
On the res.users form view, display the new field

Before this commit in create mode, upon clicking on download the file, the server crashed, because the record id was empty.
Then, the JS crashed in turn because of the unhandled 404 from the server.

Since the id of a new record will always be unset, we choose to disable the download event in this very specific case

OPW 777042
2017-12-04 13:20:18 +01:00
Xavier Morel 3c4c192cae [FIX] sale_mrp, stock_dropshipping: suppress warnings
* create product correctly (via form) & enable crossdock route
  otherwise no purchase order is created (surprise!)
* silence logger when creating SO as apparently stock warning can not
  be disabled even when it makes no sense
* suppress warning about cost methods when creating a product
  category, that's apparently normal (happens every time on runbot)
2017-12-04 13:11:57 +01:00
Xavier Morel 346d770291 [FIX] sale_mrp: clear product routes before adding manufacturing ones
If purchase happens to be installed before MRP is, the "buy" route is
set by default on products *and* takes precedence over the MRP
one (because created first and same sequence).

This leads to purchase trying to buy products (which have no seller)
instead of MRP trying to manufacture them, which is what we're trying
to do & test.

Fix by clearing the route_ids field before adding the MRP routes.
2017-12-04 13:11:56 +01:00
Xavier Morel d59abc4c74 [ADD] doc: Form & proxies 2017-12-04 13:11:55 +01:00
Xavier Morel 804169fa98 [IMP] sale_mrp: Formify tests
* warn on onchange warning instead of error
* fallback on a node not having modifiers attributes
* required field should apparently fail on False but not 0 or 0.0
* improve error message when adding an incorrect object or model to an
  o2m
  * remove useless test_move_explode
2017-12-04 13:11:55 +01:00
Xavier Morel df695e2d92 [IMP] stock_dropshipping: convert tests to SSF 2017-12-04 13:11:55 +01:00
Xavier Morel 08461c439b [IMP] product_margin: formify tests 2017-12-04 13:11:54 +01:00
Xavier Morel ccaf3b218b [IMP] account_voucher: formify tests 2017-12-04 13:11:54 +01:00
Xavier Morel ecfd4d2c2a [IMP] l10n_generic_coa: port tests to SSF
Tests were previously yaml, then converted to Python with hand-rolled
interactions (e.g. onchanges), finish the conversion.
2017-12-04 13:11:53 +01:00
Xavier Morel 4bf97bdbe2 [ADD] base: server-side formview
Useful to better test business flows & replace yaml test files:
instantiating records & calling onchanges by hand is very
error-prone (it's easy to miss onchanges, or to manually set fields
which can't be set through the view we're interested in, ...)

odoo.tests.common.Form implements the basic *creation*
flow (fields_get, default_get, onchange) up to saving the record,
including proper handling of the required and readonly modifiers &
their domains.

* edition of existing records, including filtering out unmodified
  fields when saving
* possibly buttons
* ensuring the API is convenient
2017-12-04 13:11:53 +01:00
Christophe Simonis 7b808982a0 [MERGE] forward port branch 9.0 up to 5e38bef5a5 2017-12-04 12:55:38 +01:00
Sanjay Jamod 026979c278 [REF] account: remove option to change number of digits
Remove the possibility to define the number of digits for the accounts in the accounting settings.
 People can do a export/import to do that.
Was PR #16587. Was task 32750
2017-12-04 12:15:44 +01:00
qsm-odoo 5e38bef5a5 [FIX] website: review iframe video building
/!\ This commit *must* be "forced" forward-ported /!\

Recent commit(s) broke existing databases making website videos
disappear / not be saved / ...

Original code was broken then fixed by a succession of commits which
solved some errors to create new ones. Hopefully, this one is the right
stable one. Existing databases should be restored while allowing new
videos to be added correctly no matter the version. In master, a solution
must be found to smoothly migrate old videos to a new better system.

See:
https://github.com/odoo/odoo/commit/8749410b1033ddec1207ce1db42d1889a0d2ea33
https://github.com/odoo/odoo/commit/45e0cd564afdae71e9525193250744e88076da71
https://github.com/odoo/odoo/commit/6d2bf44fee76a8b73ebad206cd7a283c88b6c4ef (opw-783233)

opw-786165
2017-12-04 11:45:06 +01:00
Alex 424533f694 [CLA] signature for satriani-vai
Closes #21387
2017-12-04 11:40:47 +01:00
qsm-odoo 3a1c56f885 [FIX] point_of_sale: set correct label for start category setting
The label of the setting was linked to the invisible m2o field to
choose the start category instead of the start category setting
itself. The problem was that when clicking the label, instead of
checking the config checkbox, it opened the m2o's dropdown though
it was invisible.

opw-784599
2017-12-04 11:34:12 +01:00
Luc De Meyer ab52c636c3 [FIX] account: use proper return format for default_get
default_get expects ids, not recordset (e.g. called by webclient)

Closes #21358
2017-12-04 10:22:35 +01:00
qdp-odoo 03b8c10262 [IMP] purchase: copy currency and company from PO on vendor bills
Was PR #1930. Was task 35219
2017-12-04 10:21:52 +01:00
Yannick Tivisse c423f9c209 [FIX] l10n_be_hr_payroll: Correct frenglish labels 2017-12-04 10:13:41 +01:00
Yannick Tivisse 878d44cf1c [FIX] l1On_be_hr_payroll: Compute correctly the brut2net if >20 holidays
Purpose
=======

Currently the wage reduced by a superior amount of 20 holidays is not taken into account in the brut2net computation.

Specifiation
============

Take also the wage deduction into account
2017-12-04 10:13:41 +01:00
Yannick Tivisse 671b9172e2 [FIX] l10n_be_hr_payroll: Hide editable holidays field 2017-12-04 10:13:41 +01:00
Yannick Tivisse ee999ce609 [FIX] l10n_be_hr_payroll: Extend default leave days amount to 35 2017-12-04 10:13:41 +01:00
Yannick Tivisse 99c79ef71b [FIX] l10n_be_hr_payroll: Fix typo in string attribute 2017-12-04 10:13:41 +01:00
Géry Debongnie 5faec34a3c [REF] web: update widget to new guidelines
- make delegate/undelegate events private
- remove $el before start
- make replaceElement private
- remove one _ from __render_and_insert... method
- update documentation
- remove make and improve make_descriptive (also, it is private)
- ...
2017-12-04 10:03:00 +01:00
Aaron Bohy 595a405b76 [IMP] web: tests: patch _.debounce and _.throttle
... to allow them to be called several times without having to
wait for the delays.

This was already done for _.throttle, by default for the whole
test suite, and it couldn't be parameterized in individual tests.
This was enough for _.throttle, but the same solution couldn't be
applied for _.debounce, because some tests actually test that some
handlers are correctly debounced.

Those function are now patched in addMockEnvironment, and two
parameters can be set: 'debounce' (default: true) and 'throttle'
(default: false).
2017-12-04 10:01:22 +01:00
keylor2906 61847490f2 [CLA] add keylor2906 to Vauxoo's CLA
Closes #21383
2017-12-04 09:50:36 +01:00
Alexander Olivares 524e631490 [CLA] update Vauxoo's CLA
Add Alexander Olivares

Done at #21385
2017-12-04 09:47:57 +01:00
Maximilien Tantin a9add3b9a8 [FIX] website_sale: translate buttons
Log In and Sign Up was not translatable

Closes #21333
2017-12-04 09:36:27 +01:00
Nicolas Martinelli d6984069c3 [FIX] base: activate currencies
Complement of 4b92f914de

opw-785831
2017-12-04 09:35:29 +01:00
Adrien Dieudonne e15e6fe32e [FIX] web_editor: support of SVG elements in snippets
Before this commit, it was not possible to save a page
containing a snippet with a SVG tag.

To support SVG elements, we need to use 'Element.getAttribute'
and 'Element.setAttribute' as mentionned in the documentation:
https://developer.mozilla.org/en-US/docs/Web/API/Element/className

For more information, see GH-14485
2017-12-04 09:24:35 +01:00
Géry Debongnie d2815c474d [FIX] payment: return widget reference
This file, like many others, does not return a reference to its main
widget, which implies that it cannot be modified/extended.  This may be
fine for Odoo itself, but some other may (and do) need to extend/include
this widget.
2017-12-04 09:18:04 +01:00
William Henrotin b62bab6992 [FIX] hr_expense: missing exception import
In hr_expense.py, a ValidationError exception can be raised in some
cases but it's not imported from odoo.exceptions
2017-12-04 09:10:18 +01:00
Nicolas Martinelli 73f7567627 [FIX] point_of_sale: default fiscal position
- Create 2 FPos (1 & 2)
- Create 3 customers:
  Customer A has no FPos
  Customer B has FPos 1
  Customer C has FPos 2
- Set-up the POS so that FPos 1 is the default FPos (FPos 2 is not
  accepted in the POS)

Issue 1
- Select Customer A

The FPos is set to blank, while one would expect to keep the default
FPos.

Issue 2
- Select Customer B
- Deselect Customer B

The FPos is set to blank, while one would expect to keep the default
FPos (as it was before selecting B).

Issue 3
- Select Customer C

The FPos is set to blank, while one would expect to keep the default
FPos since his FPos is not accepted.

opw-782855
2017-12-04 09:07:34 +01:00
Aaron Bohy 5fd72753c6 [FIX] web(_diagram): set viewType on views
The attibute was correctly set on form, list and kanban views, but
not on the other ones. It wasn't really used until now, so it
wasn't a big deal.
2017-12-04 08:05:46 +01:00
Odoo Translation Bot f34d4d33a0 [I18N] Update translation terms from Transifex 2017-12-03 04:27:19 +01:00
Odoo Translation Bot 60801e5375 [I18N] Update translation terms from Transifex 2017-12-03 00:41:36 +01:00
Yannick Tivisse c6a3f2b3b6 [MERGE] stock_landed_costs: Improve Landed costs usability
Purpose
=======

Landed Cost usability improvement

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

1/ No need to show the check box landed cost on the landed cost type (hide that, by default it consider landed cost type product)
2/ At the time of creating a Landed Cost, the product type should be 'Service' by default
3/ Remove edit & create option from picking selection (shouldn't be able to create a picking from scratch from the landed cost)
4/ Add regular stat button for 'active'/'Inactive' : https://drive.google.com/file/d/0B7X0nDa4oGandEpNR3Q2dmRzTms/view?usp=sharing [OK]
2017-12-01 17:09:46 +01:00
Haresh Shyara 82b1950e65 [IMP] stock_landed_costs: Replace active checkbox by stat button
Purpose
=======

Add regular stat button for 'active'/'Inactive'
2017-12-01 17:07:47 +01:00
Haresh Shyara 047c7e2089 [IMP] stock_landed_costs: Removed create and edit from pickings selection
Purpose
=======

We shouldn't be able to create a picking from scratch from the landed cost
2017-12-01 17:07:47 +01:00
Haresh Shyara 3b1fbe5abc [IMP] stock_landed_costs: Set type=service for new landed cost products
Purpose
=======

At the time of creating a Landed Cost , the product type should be 'Service' by default
2017-12-01 17:07:47 +01:00
Haresh Shyara 7e4a445b9e [IMP] stock_landed_costs: Removed checkbox landed cost on the landed cost type form view
Purpose
=======

No need to show the check box landed cost on the landed cost type(hide that, by default it consider landed cost type product)
2017-12-01 17:07:47 +01:00
Kinjal Mehta f94071a952 [IMP] sale: Display invoices + credit notes from sales team dashboard
Purpose
=======

From the sales dashboards, there is no way to access the credit notes, while we can access the invoices.
Should be possible to access the credit notes too.

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

Sales->Reporting->Sales Channels/More/View/Invoices-> Display all invoice and credit notes from this sales channel
2017-12-01 17:00:28 +01:00
Adrien Dieudonne dbb9338a95 [FIX] web: search_filters: avoid to apply UTC offset for date fields
Due to a previous commit (@d2e1a1de), if a date was selected in
search filter, the time was converted to UTC to the server.
For negative offset, the search was then executed for the day before.

Now, we avoid to convert the searched date to UTC.
We only need to convert datetime fields.
2017-12-01 15:36:33 +01:00
Atchuthan f03437ae00 [FIX] payment: display error message
The error message was not displayed as out of the paragraph block

Closes #21342
2017-12-01 15:33:08 +01:00
Adrian Torres 3d1e23aaba [FIX] *: Reset module states on registry init error
Commit 763d714 introduced cron job locking for databases which had
modules with states set to 'to x', however if an
installation/uninstallation/upgrade fails, the state will stay at 'to
x', and it may stay in that state for an indefinite amount of time,
meaning that cron jobs could stay locked forever.

This commit fixes this in part by adding a cleanup function to loading.py that
will be executed whenever load_modules fails, the function will change
every 'to x' module to their original state, effectively unlocking the
execution of cron jobs.

This however only works to prevent "zombie" transient states for
brand new databases, however for existing databases which already
contain some modules in a zombie state it won't do anything unless
a module is installed/uninstalled/upgraded, which may never happen.

This is where the second part comes in (ir_cron.py), when failing to
execute crons, we check if the failure was due to bad module state
and if an arbitrary amount of time (5 hours as of this commit) has passed
since the last time it was supposed to be executed, if it is the case, it means
that the cron execution failed around 5 * 60 times (1 failure per minute for 5h)
in which case we assume that the crons are stuck because the db
has zombie states and we force a call to reset_module_states.
2017-12-01 14:15:42 +00:00
Yannick Tivisse caa0ac679c [MERGE] project: Smoothen the onboarding
Purpose
=======

Onboarding is still not smooth for new users
2017-12-01 15:02:02 +01:00
Sagar Ahirrao 41f941a7e0 [IMP] project: Improve project quick create modal
1/ Make it smaller
2/ Remove the Create&Edit
3/ Align the text
4/ Open the tasks kanban for this project instead of the project form view
2017-12-01 15:00:25 +01:00