[IMP] point of sale: improve filters and labels
Specifications: improve search filters and groupby, reorder filters, update some field labels. This commit is related to task #1878516 and PR #26929 .
This commit is contained in:
committed by
Thibault Delavallée
parent
ac5b32cb75
commit
a645d7d795
@@ -483,7 +483,7 @@ class PosOrder(models.Model):
|
||||
company_id = fields.Many2one('res.company', string='Company', required=True, readonly=True, default=lambda self: self.env.user.company_id)
|
||||
date_order = fields.Datetime(string='Order Date', readonly=True, index=True, default=fields.Datetime.now)
|
||||
user_id = fields.Many2one(
|
||||
comodel_name='res.users', string='Salesman',
|
||||
comodel_name='res.users', string='Salesperson',
|
||||
help="Person who uses the cash register. It can be a reliever, a student or an interim employee.",
|
||||
default=lambda self: self.env.uid,
|
||||
states={'done': [('readonly', True)], 'invoiced': [('readonly', True)]},
|
||||
|
||||
@@ -10,7 +10,7 @@ class PosOrderReport(models.Model):
|
||||
_auto = False
|
||||
_order = 'date desc'
|
||||
|
||||
date = fields.Datetime(string='Date Order', readonly=True)
|
||||
date = fields.Datetime(string='Order Date', readonly=True)
|
||||
order_id = fields.Many2one('pos.order', string='Order', readonly=True)
|
||||
partner_id = fields.Many2one('res.partner', string='Customer', readonly=True)
|
||||
product_id = fields.Many2one('product.product', string='Product', readonly=True)
|
||||
|
||||
@@ -30,12 +30,10 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Point of Sale Analysis">
|
||||
<field name="date"/>
|
||||
<filter string="My Sales" name="my_sales" help="My Sales" domain="[('user_id','=',uid)]"/>
|
||||
<separator/>
|
||||
<filter string="Invoiced" name="invoiced" domain="[('state','=',('invoiced'))]"/>
|
||||
<filter string="Not Invoiced" name="not_invoiced" domain="[('state','=',('paid'))]"/>
|
||||
<separator/>
|
||||
<filter string="Order Date" name="filter_date" date="date" default_period="this_year"/>
|
||||
<separator/>
|
||||
<filter string="My Sales" name="my_sales" help="My Sales" domain="[('user_id','=',uid)]"/>
|
||||
<field name="config_id"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="user_id"/>
|
||||
@@ -43,8 +41,9 @@
|
||||
<field name="product_categ_id"/>
|
||||
<group expand="1" string="Group By">
|
||||
<filter string="Salesperson" name="User" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Product Category" name="product_category" context="{'group_by':'product_categ_id'}"/>
|
||||
<filter string="Point of Sale" name="pos" context="{'group_by':'config_id'}"/>
|
||||
<filter string="Product" name="product" context="{'group_by':'product_id'}"/>
|
||||
<filter string="Product Category" name="product_category" context="{'group_by':'product_categ_id'}"/>
|
||||
<separator/>
|
||||
<filter string="Order Date" name="order_month" context="{'group_by':'date:month'}"/>
|
||||
</group>
|
||||
|
||||
@@ -303,9 +303,10 @@
|
||||
<field name="user_id"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="session_id"/>
|
||||
<field name="config_id"/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Customer" name="customer" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Salesman" name="salesman" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Salesperson" name="salesman" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Session" name="session" domain="[]" context="{'group_by':'session_id'}"/>
|
||||
<filter string="Status" name="status" domain="[]" context="{'group_by':'state'}"/>
|
||||
<filter string="Order Date" name="order_month" domain="[]" context="{'group_by':'date_order'}"/>
|
||||
|
||||
Reference in New Issue
Block a user