You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 lines
6.0 KiB

5 years ago
5 years ago
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="vracoop_view_order_tree" model="ir.ui.view">
  4. <field name="name">vracoop.sale.order.tree</field>
  5. <field name="model">sale.order</field>
  6. <field name="priority">1</field>
  7. <field name="arch" type="xml">
  8. <tree string="Commandes" decoration-bf="message_needaction==True" decoration-muted="state=='cancel'">
  9. <field name="message_needaction" invisible="1"/>
  10. <field name="name" string="Num de commande"/>
  11. <field name="confirmation_date" string="Date de confirmation"/>
  12. <field name="commitment_date" groups="sale.group_sale_order_dates"/>
  13. <field name="expected_date" groups="sale.group_sale_order_dates"/>
  14. <field name="partner_id"/>
  15. <field name="vracoop_point_retrait_id"/>
  16. <field name="day_retrait"/>
  17. <field name="hour_retrait" widget="float_time"/>
  18. <field name="user_id"/>
  19. <field name="amount_total" sum="Total Tax Included" widget="monetary"/>
  20. <field name="currency_id" invisible="1"/>
  21. <field name="invoice_status" invisible="1"/>
  22. <field name="state" invisible="1"/>
  23. </tree>
  24. </field>
  25. </record>
  26. <record id="vracoop_view_sales_order_filter" model="ir.ui.view">
  27. <field name="name">vracoop.sale.order.list.select</field>
  28. <field name="model">sale.order</field>
  29. <field name="priority" eval="15"/>
  30. <field name="arch" type="xml">
  31. <search string="Search Sales Order">
  32. <field name="name" string="Sales Order" filter_domain="['|','|',('name','ilike',self),('client_order_ref','ilike',self),('partner_id','child_of',self)]"/>
  33. <field name="partner_id" operator="child_of"/>
  34. <field name="user_id"/>
  35. <field name="team_id" string="Sales Team"/>
  36. <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
  37. <field name="order_line" string="Product" filter_domain="[('order_line.product_id', 'ilike', self)]"/>
  38. <filter string="Mes commandes" domain="[('user_id','=',uid)]" name="my_sale_orders_filter"/>
  39. <filter string="Commandes confirmées" name="order_confirmed" domain="[('state', 'in', ('sale', 'done'))]"/>
  40. <filter string="Commandes non payées" name="order_unpaid" domain="[('state', '=', 'sent'), ('team_id.team_type', '=', 'website')]"/>
  41. <filter string="Paniers abandonnés" name="order_abandoned" domain="[('is_abandoned_cart', '=', True)]"/>
  42. <separator/>
  43. <filter string="Order Date" name="order_date" date="date_order"/>
  44. <separator/>
  45. <filter string="Depuis le site web" name="from_website" domain="[('team_id.team_type', '=', 'website')]"/>
  46. <filter string="En retrait" name="point_retrait" domain="[('carrier_point_retrait', '=', True)]"/>
  47. <separator/>
  48. <separator/>
  49. <filter string="Mes activités" name="activities_my"
  50. domain="[('activity_ids.user_id', '=', uid)]"/>
  51. <separator/>
  52. <filter string="Activités en retard" name="activities_overdue"
  53. domain="[('activity_ids.date_deadline', '&lt;', context_today().strftime('%Y-%m-%d'))]"
  54. help="Show all records which has next action date is before today"/>
  55. <filter string="Activités du jour" name="activities_today"
  56. domain="[('activity_ids.date_deadline', '=', context_today().strftime('%Y-%m-%d'))]"/>
  57. <filter string="Activités futures" name="activities_upcoming_all"
  58. domain="[('activity_ids.date_deadline', '&gt;', context_today().strftime('%Y-%m-%d'))
  59. ]"/>
  60. <group expand="0" string="Group By">
  61. <filter string="Point retrait" name="order_retrait" domain="[]" context="{'group_by':'vracoop_point_retrait_id'}"/>
  62. <filter string="Date Retrait" name="order_retrait_month" domain="[]" context="{'group_by':'day_retrait'}"/>
  63. </group>
  64. </search>
  65. </field>
  66. </record>
  67. <record id="vracoop_action_orders" model="ir.actions.act_window">
  68. <field name="name">Commandes en retrait</field>
  69. <field name="type">ir.actions.act_window</field>
  70. <field name="res_model">sale.order</field>
  71. <field name="view_type">form</field>
  72. <field name="view_mode">tree,form,activity</field>
  73. <field name="search_view_id" ref="vracoop_view_sales_order_filter"/>
  74. <field name="context">{'show_sale': True, 'search_default_point_retrait': 1}</field>
  75. <field name="domain">[('state', 'not in', ('cancel',))]</field>
  76. <field name="help" type="html">
  77. <p class="o_view_nocontent_smiling_face">
  78. Créer un nouveau bon de commande
  79. </p>
  80. </field>
  81. </record>
  82. <record id="vracoop_sale_order_action_view_order_tree" model="ir.actions.act_window.view">
  83. <field name="sequence" eval="1"/>
  84. <field name="view_mode">tree</field>
  85. <field name="view_id" ref="vracoop_click_and_collect.vracoop_view_order_tree"/>
  86. <field name="act_window_id" ref="vracoop_click_and_collect.vracoop_action_orders"/>
  87. </record>
  88. <menuitem id="vracoop_menu_sale_order"
  89. name="Suivi des retraits"
  90. action="vracoop_action_orders"
  91. parent="vracoop_click_and_collect.menu_retrait"
  92. sequence="20"
  93. groups="sales_team.group_sale_salesman"/>
  94. </odoo>