Commit Graph
761 Commits
Author SHA1 Message Date
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
Yannick Tivisse ccdb5cbfc0 Revert "[IMP] base,sales_team: Move res_groups and menuitems to sales_team"
This branch need more testing instead of doing 10 fixes. A lot of issues are occuring
when installing modules in different orders.

This reverts commit fa6e415cdb.
2016-06-06 17:26:30 +02:00
Yannick Tivisse fa6e415cdb [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)

Rename xmlids accordingly. Example: 'base.group_sale_manager' becomes
sales_team.group_sale_manager.
2016-06-06 15:46:52 +02:00
Christophe Simonis 0fbc92e0c4 [MERGE] forward port of branch saas-10 up to 1e86774 2016-05-04 17:09:51 +02:00
Jeremy Kersten 7588ea8d74 [IMP] crm: diplay only employee in m2o user_id/saleman. 2016-05-04 01:30:38 +02:00
Fabien Pinckaers 4b2091e8c9 [FIX] account: demo data invoice line without required name
[IMP] account: d'ont create journal items for invoice lines with quantity 0 (not amount because of tax)
[IMP] crm: usability kanban view and schedule an activity
[FIX] crm: schedule an activity bug when no activity yet
[IMP] website: app for website (not a menu in website admin)
2016-04-20 00:17:17 -07:00
Keyur Gajjar 348fa4f958 [add] CRM: Logged activities stat button on res_partner form
1/ Add a stat button with history of activities (count of activities) on
   the Customer form view
2/ Activity reports: When clicking on the list view, there shouldn't have any
   group by (remove the Salesperson/leads group by)
2016-03-21 11:50:01 +01:00
Dhaval Panchal bb818cad05 [IMP] crm: set filter on customer field
-In crm_lead_to_opportunity_view.xml and crm_lead_view.xml, added domain and context in partner_id field to filter on customer
2016-03-18 12:16:02 +01:00
Christophe Simonis c5a22592df [MERGE] forward port of branch saas-9 up to 4852d60 2016-01-07 18:26:42 +01:00
Christophe Simonis 99b6cd8119 [MERGE] forward port of branch saas-7 up to 2a834c2 2016-01-07 18:19:52 +01:00
Keyur Gajjar ddff754303 [IMP] crm: improved lead to opportunity wizard labels 2016-01-07 16:06:16 +01:00
Martin Trigaux 8b4f052a38 [MERGE] Forwardport of branch saas-6 up to c649bb0df 2016-01-05 18:28:06 +01:00
Denis Ledoux aef8a4d618 [MERGE] forward port of branch 8.0 up to f9f7669 2015-12-21 18:24:22 +01:00
Nicolas Martinelli e04b9d5542 [FIX] crm: same salesperson
When a lead is converted into an opportunity and a new partner is
created, the user_id of the partner is not in line with the user_id of
the opportunity.

opw-659028
2015-12-11 14:02:00 +01:00
Christophe Simonis 82a495eed5 [MERGE] forward port of branch saas-7 up to 4022493 2015-12-10 13:05:58 +01:00
Olivier Dony b25800403e [FIX] crm: saleperson m2o should not be a selection widget
There could be thousands of users so a fixed selection widget
is unusable (no search, fixed length, etc.)
2015-12-07 13:19:10 +01:00
Fabien Pinckaers 60c010d306 [IMP] crm: activities reloaded
Activities in opportunities are now handled through a wizard and not through
the form view anymore. The wizard is called via a Log an activity button. The
wizard allows to log an activity and to schedule the next activity. It
replaces the various <next activities> / Done / Cancel link buttons on the
form view that nobody seemed to inderstand.
2015-11-26 10:48:25 +01:00
Xavier Morel 41f9e7938c [FIX] crm: mark lost wizard
Created a new attribute on the lead instead of updating the lead's "lost
reason" field.
2015-10-02 13:15:37 +02:00
Martin Geubelle 52bbe6c0f4 [FIX] crm: wizard style of close reason buttons 2015-09-17 11:34:22 +02:00
Ronak Baxi 393f136509 [IMP] *: Uniformize all modal footers
The main button has classnames btn btn-primary.
Other buttons have classnames btn btn-default.
No more 'or' between the buttons.
2015-08-19 08:10:45 +02:00
Hitesh Trivedi 30a7ef804a [IMP] crm: usability improvements
Among various small fixes, some changes :
- correct computation of default sales team, located in sales_team with a
small code cleaning. Rely on this method everywhere it is necessary.
- add a configuration option to enable the use of leads in sales team;
otherwise it is hidden
- better display of alias in empty list help;
- add a menu for next activities, that are the opportunities with an action
whose deadline is near assigned to the current user;
- automatic update of aliases configuration on sales team, based on whether
they use leads and/or opportunities;
- add a wizard to log the lost reasong when deactivating a lead or an
opportunity
2015-08-11 10:56:09 +02:00
Fabien Pinckaers dc736426dd [REM] sales_team, crm, various: removed multisalesteam mode and group.
Using several sales team and the new dashboards is now the only
behavior about sales team. The unique sales team mode is therefore
removed, leading to some update in the various addons that hide
the team_id field when not in multi sales team mode.

[DEMO] cleaned demo data (removed marketing sales team because it should
not exist)
2015-07-30 10:19:14 +02:00
Thibault Delavallée 1bccaaf4b5 [REVERT] crm: reverted changes introduced in last commits
that should lie in a feature branch and be reviewed. We try not
to screw the history and the branches, let us continue like
this.

Reverted commits :
189c589d76
11b1eb1ce5
f618df931a
c0ee9de360
a340f0cd2a
c6235581ef
51cc853c61
7a541b0d07
3f6b92e7b5
ecd410a3ee
b6418a116d
2015-07-14 09:49:37 +02:00
Fabien Pinckaers 3f6b92e7b5 [IMP] Won / Loss not anymore depending on stages:
won: probability=100 (on lead)
  loss: probability=0 and not active
Won / Loss Replaced most complex domains (merge leads wizard...) by active=True
[IMP] Code cleaning / removing:
  unused report.crm.*
  merged crm.lead.report and crm.opportunity.report (one report with domains)
[IMP] Cleaned demo data:
  Won / Loss, Put back "New" stage
  Removed "Marketing" sales team
[IMP] Removed Multiple salesteam setting (always multiple salesteam
  Always display the dashboard (multiple salesteam)
  No more option in settings
[FIX] misc fixes (bad domains), type not required
2015-07-13 19:22:59 -07:00
Jay Patel ff2b14d4c3 [IMP][ADD] crm: add the concept of activities, allowing
to define custom light workflows on opportunities.

Activities are linked to mail.message.subtype through inheritance.
This means that the follow mechanism works for activities. When
an activity is done, a message with the matching subtype is posted
on the opportunity.

Activities are internal by default. They are only visible by
employees.

A shortcut in the 'log a note' chatter option allows to post a
note linked to an activity (subtype).
2015-07-08 17:15:22 +02:00
Christophe Simonis a304194936 [MERGE] forward port of branch saas-6 up to 81b5c60 2015-06-25 00:26:31 +02:00
qsm-odoo faa14705ed [FIX][IMP] Template changes
Fix many templates + Add some features the enterprise edition will use
2015-06-18 10:57:35 +02:00
Christophe Simonis 4647778758 [MERGE] forward port of branch 8.0 up to ea59856 2015-06-15 12:28:32 +02:00
Nicolas Lempereur 8ae67f6a54 [FIX] fields: correct sides effect of change to old api
The commit 3269ad8f get back the behaviour of 7.0 (which changed in
october 2014) that when a field is overrided via the old api, attributes
of a previous definition of the field are lost.

This fix corrects the case when this behaviour might have had an effect
so specified attributes overrided don't get lost.

related to opw-639712
2015-06-12 15:09:06 +02:00
Olivier Dony 0bd4545348 [LEGAL] Use global LICENSE/COPYRIGHT files, remove boilerplate text
- Preserved explicit 3rd-party copyright notices
- Explicit boilerplate should not be necessary - copyright law applies
  automatically in all countries thanks to Berne Convention + WTO rules,
  and a reference to the applicable license is clear enough.
2015-06-02 03:16:04 +02:00
Christophe Simonis 5aba579e74 [MERGE] forward port of branch saas-6 up to 42db2db 2015-03-21 15:54:05 +01:00
cod-odoo 32fb2f0940 [IMP] crm: better management of contact / company / customer when going
from a lead to an opportunity.
2015-03-19 12:39:50 +01:00
Olivier Dony e9fe55b3d0 [FIX] crm: convert to opportunity wizard should not have a view switcher
`view_type` actually defaults to 'form', which is what
we want, but `view_mode` defaults to 'tree,form' which
is *not* what we want here
2015-03-13 11:32:33 +01:00
Christophe Simonis 4ccca49d34 [MERGE] forward port of branch 8.0 up to 592f1cd 2015-01-21 12:11:38 +01:00
Denis Ledoux 68f3ed6569 [FIX] crm: convert to opportunity, avoid overwrite user defined action default 2015-01-20 16:37:57 +01:00
Christophe Simonis 18e22be138 [MERGE] forward port of branch 8.0 up to 0aab81c 2015-01-19 17:15:56 +01:00
Christophe Simonis 7b7554c91f [MERGE] forward port of branch saas-3 up to cdb48d3 2015-01-19 12:16:33 +01:00
Goffin Simon 0fd773a486 [IMP] Cleanup and refactoring of exception handling
Unify and refactor exception handling in framework and addons.

The generic `except_osv` is now deprecated, and replaced by more specialized exception subtypes:
 - `UserError` (renamed from Warning, as it conflicts with the built-in `Warning`) raised when a non-technical error occurs during a business operation. It could be a missing information in the data provided by the user, or a misconfiguration.
 - `AccessError`: raised when any operation is denied because the user conducting it does not have the required access rights.
 - `AccessDenied`: raised when an operation that requires authenticated access is attempted via an unauthenticated request.
 - `MissingError`: raised when an operation is attempted on a record that does not exist.
 - `ValidationError`: raised when an operation violates a SQL or Python constraint.
 - All other exceptions are internal errors due to a system problem or bug, and raised untouched to the client-side, which should display a traceback.

All exceptions take a single message argument.

The `test_exceptions` module has been updated to showcase both new and old (deprecated) exceptions.

A great many old `except_osv` had a useless title with "Error!" or "Warning", those have been removed, as this is handled by the client-side widget that displays the messages.

This commit introduces a more consistent policy for logging errors and warnings:
 - All messages that do not require administrator attention should be logged at INFO level or lower. This includes all errors that are notified to the user in a friendly manner, even for access right problems or validation errors during business operations.
 - All messages that indicate a likely misconfiguration or malicious use by the users should be logged at WARNING level, as they typically require administrator attention.
 - All other unhandled internal errors cannot typically be handled by the user and should be logged at ERROR or higher level, as they require immediate administrator attention.
2015-01-16 17:15:18 +01:00
Denis Ledoux 65de6e7f27 [FIX] crm: convert to opp, link to an existing cstomer
When converting a lead to an opportunity, and choosing the option "link to an existing customer", the resulting opp wasn't actually linked to the ccustomer.
2015-01-15 16:09:46 +01:00