GoodERP
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

140 lignes
7.3KB

  1. <?xml version="1.0"?>
  2. <odoo>
  3. <data>
  4. <!--其他收入/支出list-->
  5. <record id="other_money_order_list" model="ir.ui.view">
  6. <field name="name">other.money.order.list</field>
  7. <field name="model">other.money.order</field>
  8. <field name="arch" type="xml">
  9. <list string="其他收支单" decoration-info='state == "draft"' decoration-muted= 'state == "cancel"' >
  10. <field name="name" optional="show"/>
  11. <field name="date" optional="show"/>
  12. <field name="partner_id" optional="show"/>
  13. <field name="details" widget="html" optional="show"/>
  14. <field name="total_amount" optional="show"/>
  15. <field name="state" optional="show"/>
  16. <field name="note" optional="show"/>
  17. <field name="is_init" invisible="1" optional="show"/>
  18. </list>
  19. </field>
  20. </record>
  21. <!--其他收入/支出form-->
  22. <record id="other_money_order_form" model="ir.ui.view">
  23. <field name="name">other.money.order.form</field>
  24. <field name="model">other.money.order</field>
  25. <field name="arch" type="xml">
  26. <form string="其他收支单">
  27. <header>
  28. <button name="other_money_done" invisible="state!='draft'" string="确认" type="object" class="oe_highlight"/>
  29. <button name="other_money_draft" invisible="state!='done'" string="撤销确认" type="object"/>
  30. <button name="action_cancel" invisible="state!='draft'" string="作废" type="object"/>
  31. <!-- <button name="print_other_money_order" invisible="state!='done'" string="打印" type="object" class="oe_highlight"/> -->
  32. <field name="state" widget="statusbar"/>
  33. </header>
  34. <sheet>
  35. <div class="oe_title">
  36. <h1>
  37. <field name="name" class="oe_inline" readonly="1"/>
  38. </h1>
  39. </div>
  40. <group>
  41. <group>
  42. <field name='type' invisible='1' readonly="state!='draft'"/>
  43. <field name="partner_id" readonly="ref or state!='draft'"
  44. options="{'no_open': True, 'no_create': True}"/>
  45. <field name="receiver"
  46. invisible="type!='other_pay'"
  47. readonly="ref or state!='draft'"/>
  48. <field name="bank_name" invisible="type!='other_pay'"
  49. readonly="ref or state!='draft'"/>
  50. <field name="bank_num" invisible="type!='other_pay'"
  51. readonly="ref or state!='draft'"/>
  52. </group>
  53. <group>
  54. <field name="date" readonly="ref or state!='draft'"/>
  55. <field name="ref" readonly="1"/>
  56. <field name="voucher_id"/>
  57. </group>
  58. </group>
  59. <field name="line_ids" context="{'order_type': type}" readonly="ref or state!='draft'">
  60. <list string="其他收支单明细" editable="bottom">
  61. <field name="service" groups="core.service_groups" optional="show"/>
  62. <field name="category_id" required="1" domain="[('type', '=', parent.type)]" optional="show"/>
  63. <field name="account_id" optional="show"/>
  64. <field name="auxiliary_id" optional="show"/>
  65. <field name="amount" sum="合计" optional="show"/>
  66. <field name="tax_rate" groups="money.tax_groups" optional="show"/>
  67. <field name="tax_amount" groups="money.tax_groups" sum="合计" optional="show"/>
  68. <field name="tax_included_amount" groups="money.tax_groups" sum="合计" optional="show"/>
  69. <field name="note" optional="show"/>
  70. </list>
  71. </field>
  72. <group>
  73. <group>
  74. <field name="bank_id" readonly="ref or state!='draft'"/>
  75. </group>
  76. <group>
  77. <field name="total_amount"/>
  78. </group>
  79. </group>
  80. <field name="note" placeholder="备注"/>
  81. </sheet>
  82. <chatter/>
  83. </form>
  84. </field>
  85. </record>
  86. <!--其他收入/支出单 search 视图-->
  87. <record id="other_money_order_search" model="ir.ui.view">
  88. <field name="name">other.money.order.search</field>
  89. <field name="model">other.money.order</field>
  90. <field name="arch" type="xml">
  91. <search string="其他收入/支出单 ">
  92. <field name="name"/>
  93. <field name="partner_id"/>
  94. <field name="total_amount"/>
  95. <field name="state"/>
  96. <filter name="draft" string="草稿" domain="[('state','=','draft')]"/>
  97. <filter name="done" string="已确认" domain="[('state','=','done')]"/>
  98. <filter name="by_partner" string="往来单位" domain="[]" context="{'group_by':'partner_id'}"/>
  99. <filter name="by_day" string="单据日期" domain="[]" context="{'group_by':'date:day'}"/>
  100. </search>
  101. </field>
  102. </record>
  103. <!-- 其他收入单 action -->
  104. <record id="other_money_receipt_action" model="ir.actions.act_window">
  105. <field name="name">其他收入单</field>
  106. <field name="type">ir.actions.act_window</field>
  107. <field name="res_model">other.money.order</field>
  108. <field name="view_mode">list,form</field>
  109. <field name='context'>{'type':'other_get'}</field>
  110. <field name="domain">[('type','=','other_get')]</field>
  111. <field name="help" type="html">
  112. <p class="oe_view_nocontent_create">
  113. 点击创建其他收入单
  114. </p>
  115. </field>
  116. </record>
  117. <!-- 其他支出单 action -->
  118. <record id="other_money_payment_action" model="ir.actions.act_window">
  119. <field name="name">其他支出单</field>
  120. <field name="type">ir.actions.act_window</field>
  121. <field name="res_model">other.money.order</field>
  122. <field name="view_mode">list,form</field>
  123. <field name='context'>{'type':'other_pay'}</field>
  124. <field name="domain">[('type','=','other_pay')]</field>
  125. <field name="help" type="html">
  126. <p class="oe_view_nocontent_create">
  127. 点击创建其他支出单
  128. </p>
  129. </field>
  130. </record>
  131. <!-- 其他收入单menu、其他支出单menu -->
  132. <menuitem id="menu_other_money_receipt_action" action="other_money_receipt_action" parent="menu_money_manage" groups='money.other_get_pay_groups' sequence="5"/>
  133. <menuitem id="menu_other_money_payment_action" action="other_money_payment_action" parent="menu_money_manage" groups='money.other_get_pay_groups' sequence="6"/>
  134. </data>
  135. </odoo>
上海开阖软件有限公司 沪ICP备12045867号-1