Commit Graph
115918 Commits
Author SHA1 Message Date
Martin Trigaux d8e2f6a89d [IMP] purchase: do not make the field required
The value is made by the computed field.
Setting one has no effect (no inverse method).

If you have no value on a purchase order, you end up in the confusing situation
where you can not save a new PO without setting a value to date_planned but,
after saving, the value is reset (no lines).

Do not block the creation of a new purchase order without lines

Fixes #23275
2018-03-09 11:22:57 +01:00
Fabien Meghazi 985bb12488 [FIX] server: support for systemd socket activation in threaded server
This patches fixes the untested and broken draft of inetd and systemd
activation support in the threaded server.

This patch also introduces a change of behaviour in the `_reexec()`
function by keeping the environment when Odoo is respawning during the
following events:

    - SIGHUP signal is received
    - one click install has been triggered
    - code reload needed when using `--dev=reload`
2018-03-09 09:03:58 +01:00
Géry Debongnie b17ba359db [REF] web,*: introduce the concept of AbstractAction
Before this commit, a client action was simply a subclass of Widget.
This is quite simple, but not really enough for the ActionManager. The
ActionManager needs to handle client actions in a different way that
view actions. Sometimes, it needs to check if a method exists before
calling it.

With this commit, we introduce a new abstraction: the AbstractAction
class, which defines a common API for all actions managed by the web
client.

Note that the API proposed in this commit is just the beginning. We will
introduce other methods in the future, to manage the focus, or the
scroll position, for example.
2018-03-08 16:48:54 +01:00
Thibault Delavallée 7ca93cd916 [FIX] test_mail: make some tests independent from other module demo data
There is a test checking message access rights and search results. It
searches for messages created in the test class having a subject like
Test. However this search may return more results than expected. For
example project create messages containing Test. As we want to keep tests
independent let us rename the test data to ensure everything works as
intended.
2018-03-08 13:20:42 +01:00
popod 4337e91d0f [IMP] calendar: fix a typo in variable name
Closes #23501
2018-03-07 09:39:11 +01:00
popod 4aaa7a6dd2 [CLA] popod signs Odoo's CLA
Done at #23501
2018-03-07 09:39:10 +01:00
Swapnesh Shah ff4c49b9d8 [IMP] sale_margin: Use odoo instead of openerp
Closes #23451
2018-03-06 09:52:54 +01:00
Nicolas Lempereur 943a32851a [FIX] account: correct test for changed demo data
In 3807e718 demo data were changed which affected the
bank_statement_reconciliation test which didn't expect a BILL/*/0002
line to be used instead of INV/*/0002 line.
2018-03-05 23:23:40 +01:00
Fabien Pinckaers 1e57db765d [IMP] base: default avatar for admin user 2018-03-05 18:10:16 +01:00
Fabien Pinckaers 6b439c0c60 [IMP] web: Add an Item --> Add a Line in One2manyList (item is weird for some objects-
)
2018-03-05 17:27:40 +01:00
Fabien Pinckaers ac5bace68e [IMP] sale: improved field name Quote Validity 2018-03-05 17:19:19 +01:00
Fabien Pinckaers 4f3364e842 [IMP] sale: terms and conditions placeholder copy
It's weird to have an active form in a placeholder (do this...). Changed
as a regular placeholder + a tip.
2018-03-05 17:16:01 +01:00
Aaron Bohy 24904d406c [FIX] web: Calendar: control panel buttons in mobile
In mobile, we want a special 'Today' button to be displayed on the
bottom right corner of the control panel. Rev. ebe58d92 enforces
this by defining less layout rules on the control panel. However,
those rules apply globally, for all control panels, not only in
Calendar views. So it produces undesired behaviors in other views.

This rev. removes the undesired less rules, and instead appends
the 'Today' button in the pager area, which is in the bottom right
corner.
2018-03-05 13:15:08 +01:00
Nicolas Lempereur a86200597f [FIX] website_sale: update when changing quantity
There is several issue happening when changing quantity:

1) if website_sale_stock is installed, the displayed price is not
   updated when changing quantities.

2) if the "Add to Cart" price is not updated, it erroneously displays
   the price multiplied by the quantity.

3) when prices are updated, it only update attribute_value_ids.

4) when variant are displayed as list view, visually the last list item
   is selected instead of the first, also changing quantity doesn't
   update price as it should be given pricelist.

The first issue is caused by invalid JSON in data-attribute_value_ids
attribute. The code modify the `.data('attribute_value_ids')` thinking
it will be permanent. But if the value was invalid JSON we always parse
it on the fly inside a temporary object so the object is never changed.

The second issue is because originally, the "data-attribute_value_ids"
inside "Add to Cart" was set wrongly (when rendering the view) because
get_attribute_value_ids got the website_price multiplied by quantity.

The third issue was even with website_sale_stock is not installed
`.data('attribute_value_ids')` was only updated for one of the possible
multiple ones in the page.

With this change, we had json.dumps to ensure data-attribute_value_ids
is good JSON, and we correct errors so it is fixed for instance only
updating sources without updating website_sale and website_sale_options
modules.

note: when views are updated, this also solves a bigger issue when
python2 is used (because attribute_value_ids contained u'text' strings.

master equivalent of #23392 without js crutches for xml not updated

opw-1816479
closes #23467
2018-03-05 13:10:11 +01:00
Mehul Patel 3807e71801 [FIX] l10n_generic_coa : define journal_id in the demo data creating vendor bills
The default function commputing the journal_id on invoices uses the context to get the type of the invoice and choose the journal. In regular cases, it works fine, but not with demo data. Hence, we need to explicitly set the journal on them.
2018-03-05 12:54:42 +01:00
Hiral Bhavsar b9389cc944 [IMP] website_sale: no "zoom" pointer on products in edit mode 2018-03-05 12:16:43 +01:00
Hiral Bhavsar f7fd155618 [IMP] web: improve "missing image" icon
The goal is to better see the image can be edited and to have a bigger
image to use in website pages (like a product page).
2018-03-05 12:15:06 +01:00
Hiral Bhavsar 79c9b44fdc [IMP] website: change design of "drag-here" area
Use CSS style with a translated text instead of an image.
2018-03-05 12:14:06 +01:00
Vincent Schippefilt 02eef78bbd [FIX] web : remove useless reload of failed _callButtonAction
Before this fix, when a _callButtonAction failed, it would reload the model.
After this fix we will not reload if a _callButtonAction fails
2018-03-05 09:33:39 +01:00
Fabien Pinckaers 7102362803 [IMP] sale: copywriting - not only the customer can confirm quote 2018-03-02 20:44:06 +01:00
Jeremy Kersten 68e9d5504c [IMP] website: make website.redirect fields required
Before this commit, it was possible to create redirect with empty values.
Now, for new db, that will be required.

Fix usability according to first feedback
   - Redirect / menu should be visible without debug mode
     because user need it when they start their website and
     dont know at the beginning how to enable it (fgi)
   - fa icon in page manager was for blind people
   - missing widget on sequence field
2018-03-02 18:03:01 +01:00
Martin Trigaux 3a0ab670d1 [FIX] sms: bad target
Introduced in previous commit ec00970f
2018-03-02 17:33:25 +01:00
Swapnesh Shah ec00970f12 [IMP] sms: open link in a new window
Instead of current one

Closes #23097
2018-03-02 16:46:16 +01:00
invitu 7d1775fda3 [IMP] product: use montenary label
Format the product price on the product label report to format correctly
the currency

Closes #22999
2018-03-02 16:43:00 +01:00
Ankit Sathvara 6be9fa3967 [IMP] web,hr: Phone widget is always clickable
With this commit, when a phone number is clicked (in readonly),
 - if voip is not installed, it opens an app according to the user
   choice (e.g. skype), and on mobile, it opens the phone app to
   call the number
 - if voip is installed, in desktop, it opens voip, and on mobile,
   it still opens the phone app to call the number, because webRTC
   is not supported.

This commit also makes the employee form view use the phone widget
for the 'Work Phone' and 'Work Mobile' fields.

Task #30369
2018-03-02 15:45:42 +01:00
Géry Debongnie 0ecfd7bf3e [FIX] sale_timesheet: fix a typo
Someone insisted for a refactoring to land in master.  Because of his
stubborness, a mistake was introduced...  Thank you, mister someone... I
hope that you're happy...
2018-03-02 15:00:21 +01:00
Fabien Pinckaers 09a22e3bef [IMP] base: select countries & state based on exact code, (useful for import and fast many2one) 2018-03-02 14:21:36 +01:00
Géry Debongnie e0e3deac41 [REF] sale_timesheet: adapt to new guidelines 2018-03-02 13:30:37 +01:00
Géry Debongnie be3c89d701 [FIX] sale_timesheet: fix crash in project plan
The Project Plan code is quite new, but does some unconventional stuff.
It looks like a form view, but it is actually a client action with a
custom search view.  The problem fixed by this commit is that when we
try to open the project plan from the project kanban view, it crashes.

It was caused by a bad interaction between the dashboard search view and
the action manager.  The dashboard search view trigger a search event,
which bubbles up to the action manager.  Since the project plan is not
loaded yet, the action manager assumed that the search event was for the
kanban view instead of the project plan.

The fix is to prevent the event from bubbling up, since the project
plan already handles the search event anyway.

Note that we also set the title in this commit to a default value, to
make sure that if we reload the client action, its title is set to a
more interesting value than 'Undefined'.

We also added a few tests, which could have prevented this mess.  Now it
should be easy to add more tests whenever needed.
2018-03-02 13:30:36 +01:00
Fabien Pinckaers 611e62ef0f [IMP] base: invite user copy: shorter and less technical message 2018-03-01 21:18:05 +01:00
Fabien Pinckaers 50416bfc1d [IMP] base: improved message when inviting a user. (...set password ir too technical) 2018-03-01 20:25:42 +01:00
Yenthe V.G e81d922ef2 [IMP] account: remove frenglish
Closes #22793
Fixes #22769
2018-03-01 17:23:59 +01:00
Miquel Raïch 4534f6623e [IMP] base: remove dead code
Was fixed at 07510cdb
Code no longer needed

Closes #21322
2018-03-01 17:16:53 +01:00
qdp-odooandMiquel Raïch 8767ecc693 [FIX] account: support of multi-company in reconciliation widget
Make sure that all propositions/created data will be linked to the company of the processed statement line.
+ adapted QUnit tests

Closes PR #23070.

Co-authored-by: Miquel Raïch (Eficent) <miquel.raich@eficent.com>
2018-03-01 15:19:38 +01:00
Stefan Rijnhart 9a2b2f43bb [IMP] stock_account: product_id in standard price update's accounting moves
When updating the cost on products with realtime valuation, the journal
entries do not have their product_id set, whcih make it difficult to
track/filter on them.

Closes #18492
Closes #22281
Task 60955
2018-03-01 14:10:33 +01:00
Nicolas Martinelli 072111191f [FIX] account, account_asset, point_of_sale, stock_landed_costs: decimal places
The decimal precision 'Account' has been removed in v9, and therefore it
should not be used anymore.

opw-1819517
2018-03-01 11:12:03 +01:00
Martin Trigaux 4592567641 Revert "[IMP] product: set no company on demo data"
This reverts commit 861e21c612.

Failing test
While the purpose seems fine, it needs more work
2018-02-28 17:40:12 +01:00
Miquel Raïch 861e21c612 [IMP] product: set no company on demo data
demo products shouldn't have company if they will be used by other companies
Was the company of the administrator

Closes #21220
2018-02-28 17:33:22 +01:00
Thibault Delavallée 768e34756c [REV] hr_timesheet: revert commit 4e9138f8f9.
No purpose, no explanation, incorrect commit message, no review from
technical and functional team, no task, separate features mixed in same
commit, incorrect code.

As /dev/null and its related POs manage timesheet applicationplease ask us
for guidance and review before committing that kind of commits. Many thanks.
2018-02-28 14:29:59 +01:00
Thibault Delavallée 2d82d3a4b9 [REV] hr_timesheet: revert commit bfed0c82e6
No purpose, incorrect commit message, incorrect tag, no review from
functional team, no task.

As /dev/null and its related POs manage timesheet applicationplease ask us
for guidance and review before committing that kind of commits. Many thanks.
2018-02-28 14:29:50 +01:00
Kishan Gajjar bfed0c82e6 [ADD] hr_timesheet: Added employee_id field to form view so that default values passed in context can be set and send to server when save record 2018-02-28 13:30:06 +01:00
Kishan Gajjar 4e9138f8f9 [IMP]hr_timesheet: Only reset task_id if project_id is different thant task_id.project_id
- set employee_id if there is default_employee_id in context
2018-02-28 13:30:06 +01:00
Christophe Matthieu 7922dcbe48 [FIX] web: increase unit test speed
The method removeSrcAttribute is critical, because each changes trigger
this one. this method must be optimized to the maximum to be the fastest.

Before this fix, removeSrcAttribute method search the image and iframe for
all body nodes instead of search only in the inserted nodes, and the method
are very slow.
2018-02-28 11:55:20 +01:00
Christophe Matthieu b9a763ba3c [FIX] web_editor: avoid unnecessary slowdown of the web client
create range method slow down all the web client because the handler who
use this method it's in the module (not in the widget method) and called
for each click and keyup. We need only this handler for the iframe or the
website, used by the rte.
2018-02-28 11:55:20 +01:00
Vandan Shah 74a813542f [IMP] note: Use first stage as default stage_id if is stage_id empty
UI improvement:
If there is no stage then there will be no button(no status bar) but there will be stages but task or note etc.. will not be in any stage then there will be 'undefined' so by click on that ('undefined') user can move to any stages. To avoid this behavior we add a default stage in note.
2018-02-28 11:27:02 +01:00
Vandan Shah 476d125b63 [IMP] web: Status widget dropdown should be displayed on right side in mobile view 2018-02-28 11:27:02 +01:00
Simon Lejeune 79d1529c57 [FIX] stock: tests and inactive locations
`child_of` used to return inactive records, it doesn't anymore
2018-02-28 10:33:44 +01:00
Raphael Collet e724858d50 [REF] models: use parent_path to implement parent_store
This replaces the former modified preorder tree traversal (MPTT) with the
fields `parent_left`/`parent_right`.  Each record is associated to a string
`parent_path`, that represents the path from its root node to itself.  The path
is made of the node ids suffixed with a slash:

              a                 node | id | parent_path
             / \                  a  | 42 | 42/
           ...  b                 b  | 63 | 42/63/
               / \                c  | 84 | 42/63/84/
              c   d               d  | 85 | 42/63/85/

This field provides an efficient implementation for parent_of/child_of queries:
the nodes in the subtree of record are the ones where `parent_path` starts with
the `parent_path` of record.  It is also more efficient to maintain than the
MPTT fields, and less sensitive to concurrent updates, because the value of
`parent_path` does not depend on sibling nodes.
2018-02-28 10:33:44 +01:00
Raphael Collet 80f1ac3599 [REF] never defer parent_store computation
Simplify the implementation of parent_left/parent_right by removing this
optimization.
2018-02-28 10:33:44 +01:00
Raphael Collet af05bf2027 [IMP] test_new_api: tests on parent_store 2018-02-28 10:33:44 +01:00