Commit Graph
127612 Commits
Author SHA1 Message Date
Hiral Bhavsar b7e2d47596 [FIX] web: Make progress bar work with selection fields
Purpose
=======

The progress bar on a kanban column doesn't work with selection fields

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

In kanban view, subgroupCounts of progressbar should work if columns are grouped with a selection field

Currently, progressbar's subgroupCounts only worked if column is grouped by a 'Many2one' field. If column
is grouped by a 'selection' field then its not working.

For example,

If column is grouped by a 'Many2one' field then we've tuple,
     {'state': (2, 'Signatures in Progress')}
So, here for preparing progressBar values for subgroupCounts we'll get
     {Signatures in Progress: {overdue: 0, planned: 0, today: 1}}
But for a selection field, we'll have a string 'sent' i.e a technical value,
     {'state': 'sent'}
So here 'group_by_value' as a 'key' will never be matched as we have 'sent' instead
of 'Signatures in Progress'. We've a technical value instead of its UI value and
dict of subgroupCounts would be based on UI values that's why it'll never find values.

To fix this issue we need to set proper 'group_by_value'.

That's why added one condition for 'selection' field to gets its value of specific
state inside 'read_progress_bar' method.

Related to Task: 1862371
2018-07-26 13:43:22 +02:00
Martin Trigaux f4cb239fa8 [FIX] stock: fix previous fix
Typo in 5c44f205a2

Courtesy of Miquel Raïch, Eficient

Closes #25935
2018-07-26 13:40:38 +02:00
Christophe Simonis 5c3660cf0c [FIX] base_vat_autocomplete: correct typo introduced by previous forward-port 2018-07-26 13:15:44 +02:00
Christophe Simonis 93e689d1c2 [MERGE] forward port branch 11.0 up to 1353abecbe 2018-07-26 12:58:46 +02:00
Christophe Simonis 1353abecbe [MERGE] forward port branch saas-15 up to ee09d11738 2018-07-26 12:40:54 +02:00
Christophe Simonis ee09d11738 [MERGE] forward port branch saas-14 up to b8ab55319b 2018-07-26 12:38:55 +02:00
Christophe Simonis b8ab55319b [FIX] web: avoid traceback in case of failed login 2018-07-26 12:21:44 +02:00
Hetashree Chauhan a4d6bff197 [IMP] sale, pos_sale: merge sale report
In Sales, we want to merge the `All Channels Sale Orders` report with
the `Sales` report in order to avoid having information scattered
accross two different reports.

Related to task #58961
Closes #23324
2018-07-26 11:47:18 +02:00
Kirti Choudhary 0932863bb9 [FIX] account: fix crash on post() action of journal entry
This commits defines a new method 'action_post()' for 'account.move' object to call instead of 'post()' from the account.move form view.
Indeed, additional parameter ‘invoice’ of post() is considered as ‘context’ by webclient when called from button action and it is crashing badly.

TASK ID - 1860817
2018-07-26 11:17:37 +02:00
Kirti Choudhary bbec66b6a0 [FIX] account: fix crash on post() action of journal entry
This commits defines a new method 'action_post()' for 'account.move' object to call instead of 'post()' from the account.move form view.
Indeed, additional parameter ‘invoice’ of post() is considered as ‘context’ by webclient when called from button action and it is crashing badly.

TASK ID - 1860817
2018-07-26 11:09:35 +02:00
Goffin Simon 418e146054 [FIX] sale_timesheet: Leaves manager Access error
When validating a leaves request with a user which is
in group group_hr_holidays_manager(Leaves Manager) and
group_account_invoice (Accounting & Finance Billing), it raised an
access error because the function _validate_leave_request
tried to create an analytic line with a project_id.

Without the rule account_analytic_line_rule_billing_user added by this
commit: https://github.com/odoo/odoo/commit/81218a8, a user which was
in group group_hr_holidays_manager and group_account_invoice had the rights
to validate a leaves request.

opw:1866243
2018-07-26 10:34:06 +02:00
Priyanka Kakadiya c315d9ffc8 [FIX] purchase_stock: correctly set dropshipping settings
Currently settings for purchase stock dropshipping are added by
classname 'app_settings_block'. But there are so many classes with this name
that by default it takes first class. First found application receives this
settings.

This commit fixes that by correctly putting the settings in the purchase
settings.

Related to task: 1858217
Closes PR #25267.
2018-07-26 10:32:06 +02:00
Thibaud Ducasse 8198fb6473 [IMP] doc: add logrotate warning in cmdline doc
Fixes #24542
2018-07-26 10:20:04 +02:00
Nikunj Ladava e167f63dba [FIX] survey: fix group by partner filter
While clicking on the answer in appraisal, it gives traceback because of this
context filter. This commit is related to task ID 1866476 and closes PR #25749.
2018-07-26 09:59:00 +02:00
Can Tecim 5e58ac16c3 [FIX] models.py: onchange in python2 with 2054b59
Without the call to `super`, with at least two level off expected
onchange return data (eg. `invoice_lines.name`) we have an error in
python2, python3 python implementation of OrderedDict and possibly other
python implementation.

So this worked most often (with python3 CPython C implementation of
OrderedDict) by chance.

closes #25960
2018-07-26 09:58:29 +02:00
Adrian Torres a800e7f5ec [FIX] tests: remove duplicate tests
The tests introduced in commit 4265026ee2
are replaced and optimized by the tests introduced in commit
cb4266787b
2018-07-26 07:45:34 +02:00
qdp-odoo d519082137 [FIX] stock: fix module installation
In case there are multiple companies that need to call create_transit_location() at the installation of module, orm was crashing because expecting a singleton when doing self.partner_id or self.id
2018-07-26 02:18:37 +02:00
Laurent Smet c75f3a007c [REF] account,stock,account_intrastat: Intrastat report moved in interprise
This will allow to use the same core for all intrastat reports and benefit from the dynamic financial reports engine.
Incoterms have been move to account, as we want to provide a light intrastat report for people not having the stock app installed

Was task: 35850
Was PR #23805
2018-07-26 02:18:37 +02:00
jpr-odoo ad3e567dc6 [IMP] mail: draft activity feedback popup from the Chatter
Before this commit, when we were writing a feedback on an activity marked as
done, and then clicked somewhere else by mistake, the popup would disappear
and the content was lost.

With this commit, we do not lost what we have written in the feedback popover
in the case above: a temporary draft is made, so that reopening the feedback
popup restores its previous content.

Note that the draft is kept in JS, so it will be lost on new page or page
reload. Also, there is no test, because of `$.popover`. In particular,
animations cannot be disabled with `$.support.transition=false`, and there
is not way to detect when transitions end (delays in test is a very bad idea
for obvious reasons).

Task-ID 1832491
2018-07-25 22:23:26 +02:00
Christophe Simonis 4b9d6387b8 [MERGE] forward port branch saas-15 up to e80a0d4aa9 2018-07-25 18:11:41 +02:00
Yannick Tivisse 58fc4e4409 [IMP] base: Improve partners/employees demo data
- Update all the pictures
- Rename the partners with a name that is easy to say for an English speaker (No more 'Agwoleight')
- Update all the addresses/phone numbers in the american format
- Unify the demo data with the new theme (Wood shop/manufacture,...)
2018-07-25 17:34:06 +02:00
Olivier Colson 691a5818ee [IMP] account: bank setup wizard: explicitly declare the implicit "res_partner_bank_id" field, automatically created by the use of _inherits, to remove a warning in the logs. 2018-07-25 17:10:06 +02:00
xmo-odoo abc1289a4c [ADD] pagebreak to core qweb 2018-07-25 16:53:11 +02:00
Christophe Simonis cd2ccc4110 [FIX] models: correct onchange on one2many fields
The method `convert_to_onchange` on one2many fields [1] makes a `copy()`
of `subnames` before altering it. However during onchange management, we
pass it a `PrefixTree` object that can't be copied. As we knows the
object is empty, directly use a empty dict.

[1] https://github.com/odoo/odoo/blob/e6928a6c976cf0f0f7b7b3280205516ad677b413/odoo/fields.py#L2221

Oversight of 2054b59285
2018-07-25 16:11:39 +02:00
Christophe Simonis e80a0d4aa9 [MERGE] forward port branch saas-14 up to ea53be492e 2018-07-25 16:09:06 +02:00
Martin Trigaux 5c44f205a2 [FIX] stock: proper api.multi
Mixup with f7dcabf (saas-11.1) and a496ca9 (11.0) that was not properly ported
Avoid undefined variable if self is empoty (e.g. when reinstall stock)
2018-07-25 15:57:54 +02:00
Yannick Tivisse 369286d303 [IMP] sale,crm: Notify users on online orders/leads
Purpose
=======

The user is not notified when an online order is placed or when an opportunity is posted on the contact form.

set admin as default follower of sales teams (or any team creator).

The concept of sales channel is confusign to users. When you need to create a channel, it's to manage a team of people -> rename bac kto "Sales Team"

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

crm lead:
---------

- notify admin user when a lead/opport is created by a website visitor or any other user or created from an email sent to the email alias
- admin user should be follower of first sales team by default => Done
- "Opportunity Created" subtype should be selected by default when a user becomes a follower of any salesteam
- Show following fields in the notification:
    - Contact Name:
    - Customer Name:
    - Phone:
    - Email:
    - Message:
    - Sales Channel:
    - Stage: New
    + other current tracked fields in case of update ( expected revenue, score)
- don't show company name, contact name, phone if not set (e.g. if created from email alias)

ecommerce:
----------

- notify admin when an order is placed on the website:
- admin should be follower of website salesteam by default
- order tracked fields in a logical order and add currency to amounts (nice to have but would be cleaner):
    - Customer:
    - Salesperson:
    - Status:
    - Delivery Amount:
    - Untaxed Amount:
    - Total:
- edit notif preferences on the salesteam:
- In notifications sent by email, add a link to edit notif preferences in the salesteam: "Edit your notification preferences"
- redirect to notification preferences of the user in the salesteam

- Other users must easily manage the way they want to be notified about salesteams activities:
- move kanban view out of reporting (it's an operational view, not a reporting one and all the users need to see it)
- CRM: https://drive.google.com/a/odoo.com/file/d/1ZWgU_2uozRvwhe8dtemvEFWP_Rsq-bdn/view?usp=drivesdk
- Sales: https://drive.google.com/a/odoo.com/file/d/1AzmT2-shMXzl6olm2d_u0ZXY4Ov1m4q2/view?usp=drivesdk
- show assignation section out of debug mode, to let users edit following preferences in the sales team
- if no sales channel set for the website (https://drive.google.com/a/odoo.com/file/d/1TbB0FsdFxkTRLq-2Fa480AK9MPbCV9Q3/view?usp=drivesdk), show a specific message asking to set one: "Please set a sales team for the website. Otherwise you can't follow related events."

Miscellaneous:
--------------

- rename Sales channels into the old term "Sales Teams", the concept of sales channel is not understood by most users
2018-07-25 15:45:36 +02:00
lejeune quentin 384647e583 [IMP] all_module : Modify "Sales Channel" by "Sales Teams" 2018-07-25 15:41:31 +02:00
lejeune quentin f3f3af88ab [IMP] website_sale : Active "Sales Team" and "Salesperson" config in website setting without debug mode 2018-07-25 15:41:31 +02:00
lejeune quentin 5e577d206f [IMP] crm : Add link on email for salesman's group 2018-07-25 15:41:30 +02:00
lejeune quentin 06bbd88e9f [IMP] website_crm : In setting add specific message to tell user to set a default sale channel for website 2018-07-25 15:41:30 +02:00
lejeune quentin 050628413c [IMP] crm : Modify position of Sales Channel menu for CRM and Sale 2018-07-25 15:41:30 +02:00
lejeune quentin ec35eca7c6 [IMP] mail : Add possiblities to sequence tracking fields in the chatter
Fields in the chatter can be organized with a business logic.
Here fields for CRM and Website E-commerce have a tracking sequence.
For other fields/module just add "track_sequence=x" on model
2018-07-25 15:41:30 +02:00
lejeune quentin 9c9215fef2 [IMP] crm : Modify followers subtype "lead created" by "opportunity created" and checked by default 2018-07-25 15:41:30 +02:00
lejeune quentin 63af046331 [IMP] crm : Add administrator to be followers by default of sales team "Sales" AND "Website" 2018-07-25 15:41:30 +02:00
Christophe Simonis ea53be492e [MERGE] forward port branch 10.0 up to f1ee633f26 2018-07-25 15:29:29 +02:00
Martin Geubelle 0f03f57034 [FIX] web: look into the DOM for loadCSS
Since rev. odoo/odoo@0dd6a0b loadCSS function in ajax returns a promise
in order to known when the stylesheet is loaded.

It uses a local cache to avoid fetching the file multiple times.
However, the lazy loaded lib could already be in the DOM (in the
test bundle for example). In this case, the file was fetched twice.

In this case, the cache is now filled with a resolved promise.
2018-07-25 15:08:52 +02:00
Alexandre Kühn 81287c0a25 [FIX] mail: post message with emojis x'D (😂)
Before this commit, when posting a message with some emoji sources (e.g. "x'D"),
sometimes it was not transformed into the corresponding unicode representation
(e.g. "😂").

The emojis with this issue have different escaped and unescaped source
representations:

  - (unescaped) "x'D"
  - (escaped) "x'D".

The emoji converter was mistakenly using the escaped representation, instead of
the unescaped one.

Task-ID 1868892
2018-07-25 14:04:23 +02:00
Hiral Bhavsar da7b59045d [IMP] base_import, web: add view switcher and h 'Import' button in mobile
As there are a few chance that someone will import something on a mobile view.
So, we hide the button 'Import' in a mobile view.

For mobile view, we added a view switcher button and it'll display a list of
views buttons. Also set active view's icon as its icon.

Related to Task: 1857696
Co-authored-by: Mohammed Shekha <msh@openerp.com>
2018-07-25 12:48:38 +02:00
Nicolas Lempereur f1ee633f26 [FIX] website_hr_recruitment: frontend creation ok
When creating a job position from the frontend, and we:

- are on the same language that the default website language,
- have the permission to write on ir.ui.view,

we have all conditions to adding branding used to edit a page.

But when creating a position by the frontend, we create a job that will
render this template:

 website_hr_recruitment.default_website_description

When we are in the above said condition, we will create a job position
that erroneously has the branding that should only be displayed on
website and removed when saving an edition.

This caused a lot of problem with the editor that would most often not
be able to edit the content.

In this commit, we use the "rendering_bundle" context key to prevent
branding.

opw-1868879
closes #25963
2018-07-25 12:01:05 +02:00
Olivier Colson 272bcadc92 [IMP] account: setup: opening balances tree view: highight accounts whose opening balance has been set 2018-07-25 11:53:41 +02:00
Martin Trigaux d05378f53c [IMP] base: clean compatibility kw
Revision 6e36cbc243c41 changed the signature of the method in 11.0 for
python 3.7 compatibility.
To avoid breaking calls, introduced as fallback using kwargs.

Remove this ugly hack for v12
2018-07-25 11:22:46 +02:00
Martin Trigaux 7c8c27b9a9 [ADD] web: easy to change noupdate value
It is currently difficult to mark a record as noupdate
Make it doable in one click.

The choice of what should and should not be on noupdate is personal and depends
of the company need and how technical are the users.

Problem raised at #25748
The res.lang records are typically complicated and changing the date format may
break the database. Keeping it in noupdate=0 makes sense for most use but allow
to change it if needed.

Closes #25759
2018-07-25 11:17:51 +02:00
Priyanka Kakadiya 4513ce1844 [FIX] base: Show the full partner form by default
Instead of showing the simplified form view, we should always open the full partner form
by default if nothing is specified.

Coming from: https://github.com/odoo/odoo/commit/f56ad6daf80a15101017dce1145a7ee821d272a3#diff-0e8ff6c715847d514bedc0feb80894deR194

Related to Issue: 1865330
2018-07-25 11:13:08 +02:00
Christophe Simonis a34789c837 [MERGE] forward port branch 9.0 up to 2c5ec48f92 2018-07-25 11:09:30 +02:00
Christophe Simonis 2c5ec48f92 [FIX] http: only del existing attributes
Closes #25652
2018-07-25 11:01:07 +02:00
Lucas Perais (lpe) e6928a6c97 [FIX] project: proper access check on tasks
With the portal user, go on /my/task/1
(obviously provided that this task doesn't belong to portal user)

Before this commit, there is a 500 error

After this commit, the exceptions are handled and throws a 403

OPW 1867795
closes #25951
2018-07-25 09:48:03 +02:00
Lucas Perais (lpe) aa4ccef418 [FIX] account: fix planner extra features 2018-07-25 09:21:26 +02:00
Christophe Simonis 78eff004bf [FIX] im_livechat: enforce empty domain in action 2018-07-24 19:09:32 +02:00
Christophe Simonis ba202dbe63 [MERGE] forward port branch saas-11.2 up to 3c521f6d05 2018-07-24 18:10:32 +02:00