Purpose
=======
A feature was not done when doing the coupon task because of the lack of time : Coupon should be printed from the system and same can be sent to customer via email(attractive email template).
Specification
=============
Ass the possibility to:
- Print coupon
- Send coupon by email with the printed report in attachment
- Generated coupon by sending to the customers the coupon in attachments
Note: The following bugs were also impacting the e-commerce.
This commit fixes some bugs related to promotion program offering free product:
- Create a promotion program that offers an ipad if you buy 3 of them, so the
fourth is free (reduced in total)
1. Buying 4, getting a free one, removing one, free one remains
- Create a quotation with 3 ipad, save and update promotions, you don't have
a free one, which is 'correct'
- Edit, change the qty to 4 ipad, save, update promotions, you have a free
ipad (reduced from total), still correct
- Edit, change the qty back to 3 ipad, update ptomotions, you still have a
free ipad even if you only bought 3 of them (the way it is designed, the
free ipad should only appears when you order your fourth).
2. Exponential bug: buy a lot of ipad, get a lot of free ipad then set the qty
to a lower amount, you will have a lot more free ipad than you should.
It can even lead to a negative amount (more free ipad than you paid ipad, but
in that case you won't be able to confirm the sale).
- Create a quotation with 100 ipad, you get 31 free ipad (which is incorrect,
see bug 3)
- Edit and change the qty back to 10 ipad and save
- Update promotions, you will have 10 ipad to pay and 10 free ipad resulting
in a null total.
3. Buy X ipad, get Y+Z free instead of Y (lets illustrate with 10)
- Create a quotation with 10 ipad, you get 3 free ipad instead of 2
- Indeed, your first 4 ipad should give you a free one
- Your next 4 ipad should give you a second one (you got 8)
- The last 2 (to reach 10) are not enough to give you a third free ipad
This is because free products are reward lines in the SO (is_reward_line) but
not linked to an applied_coupon_ids
Now, these reward lines will be considered as such and the coupon computing
will return correct results
This closes#1643
Before this commit:
Coupon error on cart would always show "Invalid or Expired coupon code"
instead of a more accurate error (eg: already applied, can't use 2 code..).
Plus it would still show the error on page refresh because of the error being
stored in URL param.
Now:
It will show the exact error and since the error is not stored in URL, it won't
be still displayed on page refresh.
This closes#1601
Purpose
=======
The attribute name isn't required on the <filter> tag. If not set, it can't be selected with a xpath and it can't be overwritten.
A lot of PR are coming from the community just to add a name on a filter because:
- It can't be selected with a xpath.
- It can't be used with `default_search_foo` on an action context.
Specification
=============
Make the atttribute name required
If a promotion program has a start date without a end date, or a end
date without a start date, there was an error of comparing string to
boolean
opw-775236
Purpose
=======
Click on Generate Coupon gives traceback
Steps to reproduce issue :
>> install coupon.
>> total number of customers are more than 40.
>> debugger mode off.
>> now click on generate the coupon.
Specification
=============
Before the new char domain widget, we were forced to couple the domain Char field with a many2many computed field to display the partners.
Now it's not useful, and this is leading to a traceback if the records count is greater than 40.
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.
Purpose
=======
You install CRM but you don't see CRM icon (except in English, as long as sales is not installed) -> confusing
The dashboard with salesteam is not obvious & not useful for simple users: what are those channel boxes about? why don't I see all my activities?, etc.
Specifications
==============
Split CRM & Sales + land in business views straight away
Default Entry Views
~~~~~~~~~~~~~~~~~~~
- New default view for CRM: Pipeline kanban
- New default view for Sales: Quotation list
Dashboards
~~~~~~~~~~
- Move sales teams dashboard to Reporting: Sales Channels.
- Remove the upper part of the sales team dashboard
Menuitems Structure
~~~~~~~~~~~~~~~~~~~
- CRM menu
Pipeline:
- Leads (optional)
- Pipeline (default menu, default filter "My Pipeline")
- Next Activities -> to remove (now there is an icon in top bar for next activities)
- Quotations (If sale_management installed)
Customers
Phone Calls (if voip, if not yet removed because there is a BE task to use next activities instead)
Leads Management:
- Scoring Rules
- Leads Assignation
- Team Assignation
Reporting:
- Leads
- Scoring page views
- Opp. Assignement
- Patnerships
- Pipeline
- Activities
- Phonecalls
- Sales Channels
Configuration:
- Settings
- Sales Channels
- Activity Types
- Leads & Opportunities:
- Lead Tags
- Lost Reasons
- Resellers
- Partner Level
- Partner Activations
- Sales menu:
Orders:
- Quotations
- Orders
- Customers
Invoicing:
- Orders to Invoice
- Orders to Upsell
Catalog:
- Products
- Promotion Programs
- Coupon Programs
Reporting:
- Sales
- Sales Channels
- All channels sales orders
Configuration:
- Settings
- Sales Channels
- Sales Orders:
- Quotation templates
- Payment acquirers
- Delivery Methods
Settings
~~~~~~~~
- Split settings form
- Remove recommended apps section
- Remove Timesheets section
- Remove Inventory Management and move shipping connectors to Shipping section
- Remove Integrations section
- Move Docsaway option to "Quotations & Orders", right after proforma
- Autocomplete and asterix: move to CRM section
- Restructure and rename sections this way:
- Product Catalog
- Pricing
- Quotations & Orders
- Shipping
- Invoicing
- eBay (if installed)
- Remove all the "Save this page and come back here" when checking a box that installs a new module
- restructure a bit the CRM settings, with 3 sections:
Pipeline
- Leads
Contacts
- Phone Validation
- Customer Autocomplete
Integrations
- Google Calendar / Synchronize your calendar with Google Calendar (copy from general settings but don't show message "Save this page and come back here...".
- Asterisk (VOIP)
The default invoicing policy should always be by ordered quantity.
Otherwise, if the user changes the default invoicing policy to
"delivered quantity", coupon won't be applied to the invoice.
opw-749632
Purpose
=======
Currently we are updating the coupon rewards on the fly when creating/modifying/deleting a sales order line.
To avoid multiple searches on res_partners and product to know whether the customer/product is valid on the sale coupon program, we store the applicable customers and products on the program according to the domain defined on it.
This brings 2 issues:
- The customers/products stored on the program are not updated (Was the original spec)
- The checks are numerous and maybe overkill for the given results
Specification
=============
- Don't recompute the reward lines on SO modifications. Add a button to compute the line by hand and make an automatic compute on the SO validation or on the page shop/payment.
- When recomputing the reward lines, make a search on the res_partners and products instead. Now that the action is not triggered so often we can afford to make a search.
- Don't use the fields rule_partners_domain and rule_products_domain. This should be removed in master.
- The field is_public_included is useless now. And we decided to make the coupon available for all the partners if they fit the domain on the program.
Purpose
=======
People doesn't understand that the reward line product is the product that will be used in the discount line, not the product the be rewarded
If they set another product before the program is created, the product they set will be renamed, which is wrong.
Specification
=============
- Don't display the field before it's set
- Make the field readonly on the program form view
Purpose
=======
On a sale coupon program, the allowed partners are the customers by default.
That way, users like the Administrator aren't allowed to use coupon on a fresh database
Specification
=============
Allow all the partners by default and the user restrict the partners as he wishes.
Before this commit:
Coupon Program: Only customers have access to rewards
Promotional Program: Only customers have access to reward and this can be retricted with a domain
After this commit:
Coupon Program: All partners have access to rewards
Promotional Program: All partners have access to reward and this can be retricted with a domain
This is possible that `unlink` is called without any record in self.
In the given case, this is because of
`self.env['sale.order.line'].search([('order_id', 'in', self.ids), ('is_delivery', '=', True)]).unlink()`
in the `undelivery_set` method of the module delivery.
`Unlink` on an empty set is supported, and it should therefore be the case here as well.
This is not because `self.order_id.no_code_promo_program_ids` expects a singleton
for the `self.order_id` part, and this is actually an empty set as `self` is an empty set.
Besides, it makes sense to loop on the lines passed to `self`,
as you could pass several lines, not all having the same
`product_id`, for the above line
`related_program = self.env['sale.coupon.program'].search([('discount_line_product_id', '=', self.product_id.id)])`
opw-746084
Purpose
=======
Improve readability on mobile
Specification
=============
Activate Kanban view on those so it could be displayed by default on mobile instead of view list
List of impacted modules:
- crm_voip: kanban for phonecalls
- website_crm_score: kanban for scoring rules
- pos_loyalty: kanban for loyalty programs
- account_deferred_revenue : kanban for deferred revenues(reuse assets)
- account_deferred_revenue : kanban for deferred revenues(reuse asset types)
- quality: kanban for quality control points
- helpdesk: kanban for all tickets
- quality: kanban for quality alert stages
- mrp_plm : kanban for ECO stages
- print: kanban for print provider
- print: kanban for print orders
- sale_coupon: kanban for coupon program
- sale_coupon: kanban for promotion program(reuse Coupon Program)
- website_crm_score: kanban for Teams Assignation(Reuse the sale channels)
- quality: kanban for quality teams(reuse Quality Dashboard).
- mrp_plm : kanban for ECO Types(reuse PLM Dashboard)
- account_reports_followup: kanban for Follow up level
Purpose
=======
Don't display sales app icon in Odoo homepage when installing ecommerce (only website should be visible)
it's confusing to have sales icon -> where do I manage my sales? In sales or in website? -> in website
Specfication
============
We need one new modules to add Sales menus to the homepage. Currently they come with "sale". So when installing "website_sale", we get them (because sale and account are dependencies of website_sale). We don't want that anymore. Along with that you need to replace modules in Apps menu:
sales menu items must be in the new sale_management module, no longer in sale
- create new app "sale_management"
- Currently 3 app icons when installing ecommerce (Sales, Invoicing, Website) -> too many icons, where to start? -> GOAL: Only 2 icons > Website, Invoicing
- new module to display Sales Icon (like account_accountant): "sale_management"
- move menu items to sale_management
- sale, sale_management: move app description, rewrite the manifest file
- sale, sale_management: move tour from sale > sale_management
- Changes in some dependency module "sale" > "sale_management" modules: event_sale, mrp_repair, pos_sale, report_intrastat, sale_crm, sale_expense, sale_stock, sale_timesheet, website_quote
Menu items to move 'sale' --> 'sale_management'
===============================================
Sales
Quotations
Sales Orders
Invoicing
Orders to invoice
Orders to Upsell
Catalog
Products
Product Variants
Pricelists
Reporting
sales
Configuration
Settings
Products -Attributes, Attribute Values, Internal Categories