summaryrefslogtreecommitdiff
path: root/addons/website_crm_partner_assign/controllers/main.py
AgeCommit message (Collapse)Author
2020-09-01[REM] portal, *: remove archive_groups dead codeVictor Feyens
PURPOSE Clean code and be and more performance oriented. SPECIFICATIONS Various portal pages hold references to archive_groups. It was a summary of customer documents for portal, containing a count of all documents split by model. Currently its computation is not used. Indeed archive_groups is displayed only in 'my_details' page that does not hold any document-based reference or code call. Other calls to archive_groups are dead code as the result is not used. Since 13.0 it is even not computed on standard pages to speedup their load (as it was not used). It is not used anymore and its computation and references can be removed safely, especially with v14 in mind for which we want to remove dead code to maintain. Followup of odoo/odoo#55228 LINKS Task ID-2329081 PR odoo/odoo#55800 PR #12368 Related: odoo/enterprise#12368 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-17[IMP] portal,*: /my counter asyncJeremy Kersten
Before this commit, the time to compute all counters was making the rendering of the portal page slow. Now the count is done in rpc after the loading of the page. Now you can decide which part you want to show on the portal, and only compute for these one. It is not because you have purchase installed for your internal process, that it means that your supplier use your portal and it avoid the computation for all end users. We parallelize the counters in arbitrary 3 rpcs. closes odoo/odoo#55999 Related: odoo/enterprise#12456 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-08-14[REF] crm: update revenue fields namesPatrick Hoste
PURPOSE Link field name with their content. SPECIFICATIONS This commit changes the field name "expected_revenue" into "prorated_revenue" and the field name "planned_revenue" into "expected_revenue". Indeed content of those fields evolved since their first naming. Their content is not what the field name indicates. Better rename those fields to understand code flow inside CRM. LINKS Task ID-2283052 odoo/odoo#54194 odoo/enterprise#12423 odoo/upgrade#1463
2020-08-03[IMP] *: disable unused archive_groups feature in portalVictor Feyens
The archive groups feature allows the user to have fast access to records of a given month, under its details information. But since the details section isn't shown anymore on portal sub-pages, the feature is computed for nothing on (most) pages. Removing this computation avoids a read_group call on portal subpages (multiple potential queries). This commit disables the feature until a total removal in master. my_details is only truthy on the /my/account portal page, where no archive_groups is given anyway (and the value is set to True only in the rendered tempate itself). X-original-commit: 40c57fafdd5651a522891ab68affe38933ea5202
2020-08-03[IMP] portal,*: do not compute record counts for portal subpages.Victor Feyens
The record counts are only useful for the badges displayed in /my & /my/home. By avoiding those counts on subpages, we gain a lot of useless queries, improving the loading speed of those sub-pages. X-original-commit: 79c8384f1bcbcdede030e187008319a70c664571
2020-06-26[FIX] website_crm_partner_assign: filtering if no countryNicolas Martinelli
1. Install the demo data 2. Activate GeoIP and set your IP in Belgium [1] 3. As a non-connected user, go to '/partners' => No result found: expected since we want to filter the partners available in the user's country 4. Click on 'All Countries' => All partners are displayed 5. Click on 'Platinum' or search for 'azure' => No result found The last step is not expected, it should filter partners from the 'All Countries' list. It occurs because the 'All Countries' filter is not kept when chosing a Level or searching. We use `keep_query` for the level filtering and set the `country_all` `input` field for searching. [1] IP can be set manually in https://github.com/odoo/odoo/blob/bbb45e3412a5653d78aacc92903e95d1353ed60a/addons/http_routing/geoipresolver.py#L42 opw-2277343 closes odoo/odoo#53761 X-original-commit: ece98773a18cf0f83a3d2e44397e7e08a3a538a9 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-30[IMP] website_crm_partner_assign : Reorder partner levels by sequencexO-Tx
This commit attempts to add the option to order partner levels by sequence. In this commit, the following changes have been made : 1- Add a handle widget to the sequence field to reorder partner levels (in view_partner_grade_tree). 2- Update default order field in "res.partner.grade" to order records by sequance. 3- Update partners order in 'website_crm_partner_assign' controller to keep the same order in website. Task ID 2241632 closes odoo/odoo#49882 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-02-04[FIX] *: deprecated access to url_ utilities through werkzeug rootXavier Morel
In 0.15 accessing werkzeug.urls functions directly through werkzeug is deprecated, the shortcut will be removed in the eventual werkzeug 1.0. Fix existing uses of these shortcuts. Also cleanup some imports when they're not far from a werkzeug* import being altered.
2019-07-12[MERGE] Forward port of saas-12.3 to saas-12.4 up to 87fc1554d6a1823Martin Trigaux
closes odoo/odoo#34820 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-01[FIX] website_crm_partner_assign: fix sitemap partner no countryRomain Derie
Same fix as dee3b87ae4b Avoid sitemap to crash if a `res.partner` has no country. Fixes #32636 closes odoo/odoo#34494 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-06-11[IMP-REM] crm, * : remove stage based probability and add won_stage bool ↵David Beguin
field on crm.stage This commit prepares the next Predictive Lead Scoring (aka PLS) ones. With the new PLS implementation, stage based probablility is not relevant anymore as the probability will be computed based on multiple criteria following the Naive Bayes probabilist theorem. To determine if the stage is a won stage, a new 'won_stage' boolean field replaces the old probability field that is now removed. won_stage = True is equivalent to stage.probability = 100. Task ID : 1925439 PR #33589
2019-02-19[FIX] website_crm_partner_assign: stage breadcrumb in orderNicolas Lempereur
If the stage breadcrumb on the portal view is too long, it could get on two lines but since they are righ-aligned in inversed order, the second line (or more) will be the first stages. With this fix, the breadcrumbs are left-aligned so on two line the second line are the last breadcrumbs. Also there was possibly a different order than backend since the order is on "sequence, name, id" in backend but was just "sequence" here. opw-1934497 closes #31237
2018-08-27[MERGE] forward port branch saas-11.4 up to a5187cef107Christophe Simonis
2018-08-24[FIX] website_crm_partner_assign: display partner ordered by sequenceToufik Benjaa
- Fix for e2310eec6035c3aa981c72304cb4d8d16eab5e9a
2018-08-23[FIX] website_crm_partner_assign: display partner ordered by sequenceToufik Benjaa
2018-08-13[IMP] website: res_config_setting make most key website specificJeremy Kersten
google analytics, google map api key, ... can be set by website Remove useless duplicated label Co-authored-by: Derie Romain <rde@odoo.com> Co-authored-by: Kersten Jérémy <jke@odoo.com>
2017-11-29[FIX] website_crm_score: don't display new opp for ungraded partner.Jeremy Kersten
Button to create new opp are reserved to graded partner. Employees will use backend crm, and classis portal user cannot create lead for them. + fix 403 when create an opp because no access on crm activities. This opw fixes #21222
2017-09-27[IMP] website*: clean sitemap + add method to declare sitemap function.Jeremy Kersten
Don't add useless routes or route that will return 404. Improve generate function from ModelConverter to have a better management of query_string. Now we have an helper sitemap_qs2dom that will analyse the current route and check if query string is plausible and if yes, generate a domain, when the query_string don't seems to match the route, we return a Falsy domain. Before this commit, if qs was /product/ipad, enumerate_page check for each modelconverter of the route a name ilike '/product/ipad'. Now we check all routes that contains product and one converter that match ipad or routes that contains ipad and one converter that match product. This commit a new way to declare the sitemap for a route. def sitemap_xx(env, rule, query_string): yield {'loc': '/my_url'} @http.route(..., sitemap=sitemap_xx) In this case, only the loc returned by this function will be in the sitemap for all rules. You can pass sitempa=False, if you don't want that route are into the sitemap
2017-08-24[MERGE] forward port branch saas-17 up to 877e7098719Christophe Simonis
2017-08-20[FIX] P3: remove pycompat.{keys,items,values} helpersOlivier Dony
Now that we're closer to switching to P3 for good, these helpers have outlived their usefulness, and mostly add noise. All remaining dict.iter*() or dict.view*() must be converted to the normal keys(), values() or items() calls. Whenever the result is likely to be used for more than the scope of a loop, or when the dict needs to be modified during iteration, the calls must be wrapped in a ``list()``, to protect the new P3 semantics. Those cases are very exceptional. Also removed some dead code or improved the API to remove unnecessary conversions.
2017-08-08[MOV] website_portal, portal: move customer portal to portal moduleThibault Delavallée
This commit moves the whole customer portal to the portal module. It now completely uses portal and http_routing features and is not dependent on website anymore. An override of web controller is added in portal in order to redirect portal users to /my instead of /web. That way once having the customer portal installed all share users are correctly redirected to their account. All modules defining customer portal templates and controllers are updated accordingly.
2017-08-08[MOV] website, http_routing: move (un)slug support to http_routingThibault Delavallée
Slug and unslug API is now available in http_routing. Indeed there is no link to any website or any reason to not support slufigied URLs when website is not installed. A new unslug_url method is added as a tool coming from an embedded method from website. Doing it allows to have all slug related methods defined at the same point. Support of slug and unslug in qweb rendering is also moved directly in http_routing version of ir_ui_view instead of website inheritance. This is done in order to keep things coherent. Some code from website about ModelConverter is also moved. Indeed both versions of ir_http uses some kind of placeholder to store the uid when converting urls to python. This commit unifies it by using the website one directly in base to simplify the override. This commit also updates all module importing slug. Enterprise modules will have to be updated, see related commit.
2017-05-10[FIX] P3: list -> iterable builtins (#16811)xmo-odoo
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-03-23[IMP] website_portal: hide menu when no documents availablefwi-odoo
This commit impact website_portal, website_portal_sale, website_project, website_project_issue, and website_crm_partner_assign. The idea is to hide menu items and dashboard entry in customer portal when there no document available. Only Sales Orders and Opportunities are always displayed to avoid empty dashboard. Also, resequence menu items to be more consistent and to prepare to insert more items in the future.
2017-02-01[FIX] website_crm_partner_assign: fix filter domainJeremy Kersten
Before this commit, lost was always empty because we didn't look for unactive record. All is replaced by Active (All without lost) ...
2017-02-01[FIX] website_crm_Partner_assign: avoid open lead in opp form and vice-versaJeremy Kersten
2016-12-21[IMP] crm, website_crm: replace support of activitiesRavi Gadhia
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-11-21[FIX] website_crm_partner_assign: remove deprecated codeJeremy Kersten
Add 2 fields stored to allow make all in one search and not postprocess the list of partners.
2016-11-09[IMP] website_*: generic filter and sort mecanism for portal documentsVipul Bhatt
website portal now provide mecanism to sort and filter the paginated document on the portal pages. All portal module now use this mecanism, like they do for 'archive document' and 'pager'. A generic template was added in website_portal. To use it, renaming variables in method controller was required to make it as generic as possible. Some style cleaning was also done to make portal pages consistent.
2016-09-14[MERGE] forward port branch saas-12 up to 13765b5Christophe Simonis
2016-09-14[FIX] website_(portal_sale|crm_partner_assign): accept kw on account controllerDamien Bouvy
Avoids a crash when trying to view /my/home in debug mode.
2016-09-13[FIX] website_crm_partner_assign: fix portal lead/issue to use ↵Jeremy Kersten
commercial_partner_id Before this commit, only partner really assigned to the lead AND with a grade was able to see their leads. Now we check that the top level partner (commercial_partner_id) has a grade, and show all the leads under this commercial_partner_id. Try to get the same behaviour that previous portal backend. opw-688359
2016-09-12[FIX] website_crm_partner_assign: do not browse a recordsetMartin Trigaux
search returns a recordset, not ids In previous code `country.id` retuns the record, not the id.
2016-09-03[MERGE] forward port branch saas-12 up to 476cb5a0Christophe Simonis
2016-09-02[MERGE] forward port branch saas-11 up to bde7f88Christophe Simonis
2016-09-02[FIX] all: remove external ids fakely from baseMartin Trigaux
Several modules defines records with the external ID `base.foo_bar` while it is created inside this module (typically menus and groups). While there is no technical reasons to do so but this may introduce issues: - these records will not be deleted during uninstall - if a language is loaded before the installation of the module, it won't be translated The uninstallation will only remove the records with an external id linked to this module (these would only be removed when removing base). Installing a language before the module will drop the translations not linked to an existing external id (as it can not be resolved). This commit correct all the external ids tagged as from base or other incorrect modules.
2016-08-29[FIX] website_crm_partner_assign: remove print statementRaphael Collet
2016-08-29[FIX] website, website_{*}: Google Maps API KeyNicolas Martinelli
Partial backport of c82b65c8552a2ddccb9ac9990366c03199ff9d29 opw-686510
2016-08-25[IMP] website, website_{*}: Google Maps API KeyNicolas Martinelli
As of June 22 2016, the use of API key is required to access the following: - Google Maps JavaScript API - Google Static Maps API - Google Street View Image API https://developers.google.com/maps/pricing-and-plans/standard-plan-2016-update For domains accessing the API before June 22, it will still work without an API key. Since Google advises to use the API key, we hide the Maps if no API key is defined.
2016-08-04[REF] website_*: remove `render` method on websiteJérome Maes
Since saas-3, website controllers use `request.website.render` to render the template of a web page. This was kept for retro compatibility. It's time to stop using deprecated stuff. Same for `_render` method on website. 'json' route don't use `request.render` since `JsonRequest` has no `render` method.
2016-08-03[REF] web, *: change deprecated import openerp.addons.web.http to odoo.httpfwi-odoo
We also remove the mock in web as there is no need for it anymore.
2016-07-27[IMP] website_crm_partner_assign: add license in pythonfwi-odoo
2016-07-05[MIG] website_crm_partner_assign: Code migration to new apirgo-odoo
2016-07-01[ADD] website_crm_partner_assign: added frontend view for 'Leads' and ↵Vipul Bhatt
'Opportunities' - Added 'Leads' and 'Opportunities' in menu and dashboard in 'My Account' - Added list views with filters and sorting features and detailed views
2016-02-15[FIX] website_crm_partner_assign: return 404 if not partners foundJeremy Kersten
SEO : Avoid to have Soft 404
2016-02-01[FIX] website_crm_partner_assign: order by grade, display_name (alphabetical)Jeremy Kersten
2015-03-16[FIX] website_crm_partner_assign: only display website_published grades.Jeremy Kersten
Typo in condition, result was the opposite of the expected behavior.
2015-01-20[IMP][REF] website_crm_partner_assign: add published mixing on grade model.David Monjoie
Also cleaned grade form view and its inheritance. Now the website displays partners related to all grades (website publisher) or only published grades (other people). A publish button has been added in the website for grades, to have the same behavior as for other website documents.
2014-11-26[FIX] website_reseller: Navigation Broken for Partner List on Website issue#3522Christophe Matthieu
2014-07-10[MERGE] forward port of branch saas-5 up to 73d39a0Christophe Simonis