GoodERP
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

154 行
8.1KB

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