Commit Graph
799 Commits
Author SHA1 Message Date
len-odoo f28875b1b7 [FIX] crm: make the force assignation field visible in wizard
Commit: https://github.com/odoo/odoo/commit/83a4374
Introduced a parameter force_assignation to choose to overwrite the salesman
when converting a lead to an opportunity.
However the field had never been made visible in the wizard view.

opw 1859447
2018-06-26 10:39:26 +02:00
Toufik Benjaa 2b771757e2 [FIX] crm: Access rights issues in contact merging
- When merging partners with fields restricted to certain groups which the user doesn't belong, an access error is raised.
  To avoid this, we only merge fields that are accessible by the user. We do so by using the method fields_get() that only returns the fields accessible by the current user.
2018-05-14 17:04:46 +02:00
Martin Trigaux dc7b2dff02 [FIX] crm: partial backport of 78b7996d
It appears there is more partners withotu a create_date than I expected on
legacy databases

opw-1827099
2018-03-15 16:37:02 +01:00
Christophe Simonis 8f1e2044cd [MERGE] forward port branch saas-16 up to 810b6aa760 2017-10-31 16:29:07 +01:00
Géry Debongnie f14aab1827 [FIX] crm: update domain to new views
When evaluating a domain, each x2many in the evaluation context is
actually replaced by a list of ids.  However, previously, it was actually a
list of commands.  The list of ids is much better, since it does not
depends on the exact commands that were generated.
2017-10-27 16:00:16 +02:00
Richard Mathot 1bd7785c52 [FIX] crm: model does not exist anymore 2017-10-10 14:39:50 +02:00
Christophe Simonis 1e17035f71 [MERGE] forward port branch saas-16 up to 268cf9d04a 2017-09-13 19:32:35 +02:00
Christophe Simonis 268cf9d04a [MERGE] forward port branch saas-15 up to 127dea7f66 2017-09-13 18:45:07 +02:00
Christophe Simonis c8194a7647 [MERGE] forward port branch 10.0 up to c8b5c01340 2017-09-13 16:55:42 +02:00
Goffin Simon 94eb69907d [FIX] crm: columns and tables in upper cases
The module studio gives the abality to name columns or tables with
upper cases. So making the SQL case sensitive avoids problems with studio.

opw:770022
2017-09-12 15:37:47 +02:00
Olivier Dony 92e8a342c9 [FIX] P3: crm: dead code removal + simplify
Merge wizard contained dead code with references to an unused lib for
validating emails. Removing everything is easier.

+ remove unnecessary pycompat wrapping for safe use of dict.items()
2017-08-20 23:25:54 +02:00
Xavier Morel 7dd062f835 [FIX] P3: text model types
* remove references to basestring & unicode (use relevant pycompat
  helpers)
* remove some str calls (either entirely or replaced by relevant
  helper, either text or native)
* use better API to avoid unnecessary conversions
* remove some XML declarations in views
2017-08-20 23:25:54 +02:00
Olivier Dony 5d2869cbc8 [MERGE] Forward-port saas-16 up to ba15df47cb 2017-06-01 01:46:13 +02:00
Olivier Dony ba15df47cb [MERGE] Forward-port saas-15 up to 17b847c0f6 2017-06-01 01:10:29 +02:00
Olivier Dony b9e2207267 [MERGE] Forward-port 10.0 up to 7e44444878 2017-06-01 00:15:27 +02:00
Olivier Dony 7e44444878 [MERGE] Forward-port saas-11 up to 156e9d0016 2017-05-31 20:09:51 +02:00
Olivier Dony 156e9d0016 [MERGE] Forward-port 9.0 up to 75e03c0f76 2017-05-31 19:28:20 +02:00
Nicolas Martinelli 2c86366610 [FIX] crm: convert lead to opportunity
- Create a contact
- Create a lead
- Convert lead to opportunity w/ link to existing customer option

Salesperson on the lead to opportunity merge overrides the salesperson
in the contact record.

Link with existing customer should not override salesperson on contact
record. The two fields should be independent of each other unless you
are creating a new contact.

opw-659028
opw-740526
2017-05-18 17:06:42 +02:00
Xavier Morel 822bea14d0 [FIX] P3: htmlentitydefs renamed to html.entities 2017-05-15 12:26:32 +02:00
xmo-odoo fffaf735f5 [FIX] P3: list -> iterable builtins (#16811)
In Python 3:

* various builtins and dict methods were changed to return
  view/iterable objects rather than lists
* and the separate Python 2 view/iterable builtins and methods were
  removed altogether

This is problematic when using these items as list (which the happens
repeatedly in Odoo), but more viciously when iterating *multiple times*
over them (which also happens, which I've messed up multiple times while
writing this, and which is a pain to debug even when you've just created
the issue).

Convert all code using these to semantics-matching cross-version
helper functions to get the LCD behaviour between P2 and P3, and
forbid the builtins via lint.

issue #8530
2017-05-10 09:39:55 +02:00
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
2017-04-28 09:06:53 +02:00
Christophe Simonis 64b7d4e8a8 [MERGE] forward port branch 10.0 up to 3f6e573c67 2017-04-24 12:53:34 +02:00
Christophe Simonis 814c550913 [MERGE] forward port branch saas-11 up to a0ff1f2ad8 2017-04-21 14:34:11 +02:00
Christophe Simonis 6c4389df41 [MERGE] forward port branch 10.0 up to 6804085b8c 2017-01-23 14:33:53 +01:00
Raphael Collet 3649b7f359 [FIX] base: access rights of ir.model and ir.model.fields
This partially reverts commits 5d746d0ac6 and
73de86c768.

The tightening of access rights was too strong: regular users need to be able
to read models and fields (to create an email templace, for instance.)

[FIX] ir_values: in `get_actions`, exclude field `code`
2017-01-17 16:15:26 +01:00
Jeremy Kersten 4b102523b5 [FIX] crm: search_count don't support limit
Bug migration new api
2017-01-11 11:12:47 +01:00
Denis Vermylen (dve) eed8a34686 [IMP] crm_*, sale_*: sales channel dashboard
Functional
        ==========

Sales teams become sales channels. Their dashboard cards now include a graph
displaying customizable data for managers (comparable to those in accounting).

By default, you now have the following sales channels (non-demo):

      Direct Sales      (with installation of crm or sale)

  Sales Channel type: Sales
  Works same as before, what's changed is:
    - their cards display one big button directing to the start of their
      workflow
    - the links on the right-hand side have been reworked, and are only
      displayed when there is at least one item requiring attention.
    - 'More' tab remains unchanged.

      Website           (with installation of website_sale)

  Sales Channel type: Website
  Differences lies in the links displayed in the dashboard card:
    - it displays abandoned carts, awaiting payments and payments to capture
  Default Channel linked to all sales made from the eCommerce.

      Point of Sale     (with installation of sale and point_of_sale
                                              -> auto-installs pos_sale)

  Sales Channel type: Point of Sale
  Linked to pos.configs and their pos.sessions and pos.orders.
    - only links to their linked pos.config dashboard and open sessions
    - can't use opportunities, lead or invoicing and can only display
      pos.order data in the graph.
  Default Channel linked to the default pos.config.

        Technical
        =========

- Add a channel type: sales, pos, website that have different actions/settings
- Add a graphs to the kanban cards in the sales/crm dashboard, configurable in
  the form view in the new dashboard page.
- Rename sales teams to sales channels, rename and add default and demo sales
  channels
- Change dashboard links depending on the channel type and add a related
  computed fields on crm.team
- Rename strings and improve channel form view.
- Leads are now checked by default once activated for 'sales' type channels
- Disable checking "leads" without using "opportunities".
- Hide invoicing and invoicing target depending on channel type.
- Move currency_id to sales_team
2017-01-03 19:04:34 +01:00
Raphael Collet 73de86c768 [IMP] base: tighten ir.model.fields access rights 2017-01-03 16:52:49 +01:00
Ravi Gadhia 87e457158e [IMP] crm, website_crm: replace support of activities
crm.lead model now supports activities. Filters have been added to ease
their management. Mail activities replace the old crm.activity model. All code
related to crm.activity is then removed, including views and custom widget.
Standard activities feature is now used widely in Odoo addons and replace
those custom activities.

A small update is required in website_crm_partner_assign. Now the portal user
can only update or create its own activities aka assigned to him. If he has
an activity assigned to him it is displayed in the opportunity website view.
If not editing the opportunity will create a new activity assigned to him.
2016-12-21 10:58:49 +01:00
jpr-odoo 9e26d875db [IMP] *: uniformize modals buttons: remove 'oe_link' class and 'or' between buttons 2016-11-09 15:27:01 +01:00
dut-odoo 42226de46e [IMP] crm: show lost opportunities to merge with existing opportunities 2016-11-08 11:15:27 +01:00
Christophe Simonis f4fc3985b6 [MERGE] forward port branch saas-12 up to 10cde43 2016-09-16 11:03:50 +02:00
Christophe Simonis f2e2bbd7e5 [FIX] crm: avoid browsing recordsets 2016-09-14 19:47:59 +02:00
Christophe Simonis 1a77d9d02a [MERGE] forward port branch saas-12 up to 476cb5a0 2016-09-03 23:57:57 +02:00
Raphael Collet 0783318f97 [FIX] adapt logger names 2016-09-02 17:28:13 +02:00
Simon Lejeune a13c15fd44 [FIX] crm: merge partner wizard, traceback on close
In the merge partner wizard, there's a button in the footer which
trigger the method `action_close`. This method is decorated by
an api.multi and begins with an ensure_one() and if you click
on close directly after opening the wizard, self.ensure_one
fails.

The thing is, `action_close` only return an ir.action.act_window_close
action and there's a special attribue you can set in the form
view button to make it return an ir.action.act_window_close directly.
If we use this technique, then there's no traceback anymore. So this
is the fix.
2016-09-02 15:31:40 +02:00
keyur gajjar 198a0b8ff6 [IMP] crm: Set lost reason when marking several leads as lost
=======
PURPOSE
=======

In list view, when handling in mass the opportunities and mark it as lost, it
should be possible to set the lost reason.

The reason would be the same for all the selected opportunities.

=============
SPECIFICATION
=============

On clicking of 'Mark as Lost', ask user the lost reason through wizard. and then
set that lost reason to all the opportunities selected.
2016-08-22 08:57:28 +02:00
Thibault Delavallée c8a313d51e [IMP] various: use odoo for imports instead of openerp and update class names 2016-08-10 15:48:07 +02:00
Jérome Maes bcff661bc6 [FIX] crm : avoid UnboundLocalError in crm log activity wizard 2016-07-04 17:28:07 +02:00
Xavier Morel 3e2e1d6b90 [IMP] crm : various code cleaning
- try to make better use of recordsets (and recordset APIs)
- remove pointless decorators
- remove redundant ensure_one
- make 'stage_find' a private method returning a recordset
- etc ...
2016-07-04 17:28:06 +02:00
Jérome Maes f5afa1e2f7 [REF] crm : rename method in base_merge_partner wizard for better understanding 2016-07-04 17:28:05 +02:00
Jérome Maes 58bd6a848f [IMP] crm : change return values of merge_opportunity method
Since new API works with record, convert the return values from ids
into recordset.
2016-07-04 17:28:05 +02:00
Jérome Maes 1414b3e56e [REF] crm : some code improvements
- remove backward compatibility method `case_mark_won` and `case_mark_lost`
- change signature of `find_stage` method, by setting team_id optional, since
we can get if from `self.team_id`
- remove unused methods in crm_lead.py
- remove unsed code in base_merge_partner.py
- remove unused method in res_partner.py
2016-07-04 17:28:05 +02:00
Ravi Gohil aa44700dcc [MIG] crm : migration to new API
Also adapt code in crm_partner_assign according to migration of crm.lead
2016-07-04 17:28:04 +02:00
Jérome Maes 768486634a [MOV] crm : regroup views/action/menus definition
- regroup view definitions per models (almost 1 file per big model)
- remove isolated crm_report.xml
- moved content of crm/crm_lead_menu.xml to crm/views/crm_lead_views.xml
- moved content of crm/sales_team_dashboard.xml to crm/views/crm_team_views.xml
2016-07-04 17:28:04 +02:00
Jérome Maes 5dae5e602e [FIX] crm : base_merge_partner undeclared variable 2016-07-04 17:28:04 +02:00
Jérome Maes fa7fdc525a [MOV] crm : reoganize module directory and files 2016-07-04 17:28:03 +02:00
Yannick Tivisse 70c1de4244 [CRM] crm: activities improvements
When you change the activity on the Schedule activity wizard, keep the scheduled date

Rename a string on dashboard
2016-06-30 14:36:07 +02:00
Fabien Pinckaers 025dcfcd68 [ADD] crm: onboarding tour
Also add a simplified form view to create opportunities
2016-06-16 14:59:41 +02:00
Yannick Tivisse 9e57185449 [IMP] base,sales_team: Move res_groups and menuitems to sales_team
Purpose:
Having the res_group defined in base and sales_team auto installed
with mail doens't make sense.

- Move the empty res_config class and the related view from
  base_setup to sales_team (base_setup only contains the 'General Settings'
  model and views
- Move the 'sale' related content from product to sale module (Access rights,
  menuitems,...)
- Set sales_team at autoinstall False. The module is installed when needed by
  crm or sale for example
- Set sales_team as a dependency of voip. (Access rights defined for configuration
  purpose)
- Set sales_team ad a dependency of subscription (Access rights issue too)

[FIX] account: move some ir.model.access to sale module
[FIX] payment: Move some ir.rule to website_sale
[FIX] stock: move some ir.model.access rule to sale_stock
[FIX] project: Move some ir.model.access rules to crm_project_issue
[FIX] mrp: Move some ir.model.access rules to sale_mrp
[FIX] calendar: move some ir.model.access rules to crm

Rename xmlids accordingly. Example: 'base.group_sale_manager' becomes
sales_team.group_sale_manager.

[ADD] sales_team: See own documents => See only his sales team
Moved the "User: Own Leads Only", "User: All Leads" and "Manager" groups from sale and crm
into sales_team module. Add the record rules so that user can see only his Own Sales Team
if "See Own Leads" is sales right and can see all sales teams if he is having sales rights
of "See All Leads" or manager.
2016-06-09 16:05:25 +02:00