sale_purchase_discount_view.xml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <record id="sale_purchase_discount_search_form_view" model="ir.ui.view">
  5. <field name="name">sale.purchase.discount.search.form</field>
  6. <field name="model">sale.purchase.discount</field>
  7. <field name="arch" type="xml">
  8. <search string="Sale Purchase Discount">
  9. <field name="name"/>
  10. <field name="type"/>
  11. </search>
  12. </field>
  13. </record>
  14. <record id="sale_purchase_discount_form_view" model="ir.ui.view">
  15. <field name="name">sale.purchase.discount.form</field>
  16. <field name="model">sale.purchase.discount</field>
  17. <field name="arch" type="xml">
  18. <form string="Sale Purchase Discount" version="7.0">
  19. <sheet>
  20. <div class="oe_title">
  21. <div class="oe_edit_only">
  22. <label for="name" string="Nombre del descuento"/>
  23. </div>
  24. <h1>
  25. <field name="name"/>
  26. </h1>
  27. </div>
  28. <group>
  29. <field name="value"/>
  30. <field name="type"/>
  31. </group>
  32. </sheet>
  33. </form>
  34. </field>
  35. </record>
  36. <record id="sale_purchase_discount_tree_view" model="ir.ui.view">
  37. <field name="name">sale.purchase.discount.tree</field>
  38. <field name="model">sale.purchase.discount</field>
  39. <field name="arch" type="xml">
  40. <tree string="Sale Purchase Discount">
  41. <field name="name"/>
  42. <field name="value"/>
  43. <field name="type"/>
  44. </tree>
  45. </field>
  46. </record>
  47. <record model="ir.actions.act_window" id="action_sale_purchase_discount">
  48. <field name="name">Sale Purchase Discount</field>
  49. <field name="res_model">sale.purchase.discount</field>
  50. <field name="view_type">form</field>
  51. <field name="view_mode">tree,form</field>
  52. </record>
  53. <menuitem
  54. name="Configurar Descuentos"
  55. id="menu_sale_purchase_discount_parent"
  56. parent="purchase.menu_purchase_config_purchase"/>
  57. <menuitem
  58. name="Descuentos"
  59. id="menu_purchase_discount"
  60. action="action_sale_purchase_discount"
  61. parent="menu_sale_purchase_discount_parent"/>
  62. <!--
  63. PURCHASE ORDER
  64. -->
  65. <record id="purchase_line_discount_form" model="ir.ui.view">
  66. <field name="name">purchase.order.form - Confirm</field>
  67. <field name="model">purchase.order</field>
  68. <field name="inherit_id" ref="purchase.purchase_order_form"/>
  69. <field name="arch" type="xml">
  70. <xpath expr="//tree[@string='Purchase Order Lines']//field[@name='discount']" position="before">
  71. <field name="discount_id" domain="[('type','=','purchase')]"/>
  72. </xpath>
  73. <xpath expr="//tree[@string='Purchase Order Lines']//field[@name='discount']" position="attributes">
  74. <attribute name="invisible">1</attribute>
  75. </xpath>
  76. </field>
  77. </record>
  78. </data>
  79. </openerp>