GoodERP
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

420 lines
27KB

  1. <?xml version="1.0"?>
  2. <openerp>
  3. <data>
  4. <!-- 采购入库单视图 -->
  5. <record id="buy_receipt_list" model="ir.ui.view">
  6. <field name="name">buy.receipt.list</field>
  7. <field name="model">buy.receipt</field>
  8. <field name="arch" type="xml">
  9. <list string="采购入库单" decoration-info='state == "draft"' decoration-muted= 'state == "cancel"' >
  10. <field name='date' optional="show"/>
  11. <field name='name' optional="show"/>
  12. <field name="order_id" optional="show"/>
  13. <field name="partner_id" optional="show"/>
  14. <field name="user_id" optional="show"/>
  15. <field name='details' widget="html" optional="show"/>
  16. <field name="amount" sum="总金额" groups='buy.group_buy' optional="show"/>
  17. <field name='payment' groups='buy.group_buy' optional="show"/>
  18. <field name='date_due' optional="show"/>
  19. <field name='currency_id'
  20. groups='base.group_multi_currency' optional="show"/>
  21. <field name='state' optional="show"/>
  22. <field name='money_state' optional="show"/>
  23. </list>
  24. </field>
  25. </record>
  26. <record id="buy_receipt_form" model="ir.ui.view">
  27. <field name="name">buy.receipt.form</field>
  28. <field name="model">buy.receipt</field>
  29. <field name="arch" type="xml">
  30. <form string="采购入库单">
  31. <header>
  32. <button string="设为今天" name="set_today" type="object" invisible="state=='done'"/>
  33. <button name='buy_to_return' type='object' invisible="state=='draft'" string='生成退货单' class="oe_highlight"/>
  34. <button name="buy_receipt_done" invisible="state=='done'"
  35. confirm="请确认入库日期是否已修改为实际入库的日期"
  36. groups='warehouse.group_warehouse'
  37. string="入库" type="object" class="oe_highlight"/>
  38. <button name="buy_receipt_draft" invisible="state=='draft'"
  39. groups='warehouse.group_warehouse'
  40. string="撤销" type="object"/>
  41. <field name="state" widget="statusbar" statusbar_visible="draft,done" readonly="1"/>
  42. </header>
  43. <sheet>
  44. <group>
  45. <group>
  46. <field name="partner_id" required='1'
  47. readonly="state!='draft'"
  48. domain="[('s_category_id', '!=', False)]"
  49. context="{'form_view_ref': 'core.supplier_address_form'}"/>
  50. <field name='user_id'
  51. options="{'no_open': True, 'no_create': True}"
  52. readonly="state!='draft'"/>
  53. <field name="date" string="入库日期" required="1" readonly="state!='draft'"/>
  54. <field name="is_return" readonly="1" invisible="1"/>
  55. <field name="warehouse_dest_id" readonly="state!='draft'"/>
  56. <field name="invoice_by_receipt" invisible="1" readonly="state!='draft'"/>
  57. <field name="finance_category_id" invisible="1"/>
  58. <field name='currency_id' readonly='1'
  59. groups='base.group_multi_currency'/>
  60. <field name='currency_rate' required="currency_id"
  61. groups='base.group_multi_currency'
  62. readonly="state!='draft'"/>
  63. </group>
  64. <group>
  65. <field name="ref" readonly="state!='draft'"/>
  66. <field name="date_due" required="1" readonly="state!='draft'"/>
  67. <field name="order_id" readonly="1" />
  68. <field name='invoice_id' readonly='1' groups='base.group_no_one'/>
  69. <field name='voucher_id' groups='base.group_no_one'/>
  70. <field name="money_state" readonly='1' groups='base.group_no_one'/>
  71. <field name="express_type" readonly="state!='draft'"/>
  72. <field name="express_code" readonly="state!='draft'"/>
  73. </group>
  74. </group>
  75. <notebook>
  76. <page name="lines" string="入库单行">
  77. <field name="line_in_ids" readonly="state!='draft'"
  78. context="{
  79. 'type':'in',
  80. }">
  81. <list string="Buy Receipt Lines" default_order="goods_id" editable="bottom">
  82. <field name="goods_id" required='1' domain="[('not_buyable','=',False)]"
  83. context="{'default_partner':parent.partner_id,
  84. 'order_id':parent.order_id,
  85. 'default_is_return':parent.is_return}" optional="show"/>
  86. <field name="attribute_id"
  87. domain="[('goods_id', '=', goods_id)]"
  88. groups='goods.multi_attrs_groups'
  89. required="using_attribute" readonly="not using_attribute" optional="show"/>
  90. <field name='lot' groups='goods.batch_groups'
  91. readonly="not using_batch" required="using_batch" optional="show"/>
  92. <field name='expiration_date' groups='warehouse.group_expiration_date' optional="show"/>
  93. <field name='location_id' groups="warehouse.multi_location_groups"
  94. options="{'no_open': True, 'no_create': True}"
  95. domain="['&amp;',('warehouse_id', '=', parent.warehouse_dest_id),'|',('goods_id', '=', goods_id),('goods_id', '=', False)]" optional="show"/>
  96. <field name="goods_uos_qty" sum="合计辅助数量"
  97. groups="goods.auxiliary_unit_groups" optional="show"/>
  98. <field name='uos_id' groups='goods.auxiliary_unit_groups' optional="show"/>
  99. <field name="goods_qty" sum="合计数量" optional="show"/>
  100. <field name="uom_id" optional="show"/>
  101. <field name="price" groups='goods.view_cost_groups' optional="show"/>
  102. <field name="price_taxed" groups='buy.in_tax_groups' optional="show"/>
  103. <field name="discount_rate" groups='buy.buy_line_discount_groups' optional="show"/>
  104. <field name="discount_amount" groups='buy.buy_line_discount_groups' readonly="0" sum="合计折扣额" optional="show"/>
  105. <field name="amount" string="采购金额" sum="合计金额" groups='goods.view_cost_groups' optional="show"/>
  106. <field name="tax_rate" groups='buy.in_tax_groups' optional="show"/>
  107. <field name="tax_amount" sum="合计税额" groups='buy.in_tax_groups' optional="show"/>
  108. <field name="subtotal" sum="价税合计的合计" groups='buy.in_tax_groups' optional="show"/>
  109. <field name='line_net_weight' sum="净重合计" groups="warehouse.manager_net_weight_group" optional="show"/>
  110. <field name="cost" column_invisible="1" />
  111. <field name="cost_unit" column_invisible="1"/>
  112. <field name="note" optional="show"/>
  113. <field name="share_cost" optional="show"/>
  114. <field name="type" column_invisible="1"/>
  115. <field name='using_attribute' column_invisible='1'/>
  116. <field name='using_batch' column_invisible='1'/>
  117. <field name='force_batch_one' column_invisible='1'/>
  118. <field name='buy_line_id' column_invisible='1'/>
  119. <field name="state" column_invisible="1"/>
  120. </list>
  121. </field>
  122. </page>
  123. <page name="fees" string="采购费用行">
  124. <field name="cost_line_ids" readonly="state!='draft'">
  125. <list string="Cost Lines" editable="bottom">
  126. <field name="partner_id"
  127. domain="[('s_category_id', '!=', False)]"
  128. context="{'form_view_ref': 'core.supplier_address_form'}" optional="show"/>
  129. <field name="category_id" domain="[('type', '=', 'expense')]" optional="show"/>
  130. <field name="amount" optional="show"/>
  131. <field name="tax_rate" groups="buy.in_tax_groups" optional="show"/>
  132. <field name="tax" groups="buy.in_tax_groups" optional="show"/>
  133. <field name="note" optional="show"/>
  134. </list>
  135. </field>
  136. <button name="buy_share_cost" string="分摊" type="object"/>
  137. </page>
  138. </notebook>
  139. <field name="note" placeholder="暂无备注信息" readonly="state!='draft'"/>
  140. <group>
  141. <field name='qc_result' widget='pdf_viewer'
  142. readonly="state!='draft'"
  143. groups='warehouse.group_qc'
  144. />
  145. </group>
  146. <group>
  147. <group>
  148. <field name='delivery_fee'/>
  149. <field name="discount_amount" groups='buy.buy_discount_groups'
  150. string="抹零"/>
  151. <field name="amount" groups='buy.group_buy'/>
  152. </group>
  153. <group>
  154. <field name="payment" readonly="state!='draft'"
  155. invisible="not invoice_by_receipt"
  156. groups='buy.group_buy'
  157. />
  158. <field name="bank_account_id" readonly="state!='draft'"
  159. invisible="not invoice_by_receipt"
  160. groups='buy.group_buy'
  161. />
  162. <field name="money_order_id" invisible="not invoice_by_receipt"
  163. groups='buy.group_buy'
  164. />
  165. </group>
  166. </group>
  167. <group>
  168. <group>
  169. <field name="create_uid" readonly="1" string="制单人"/>
  170. <field name="approve_uid" readonly="1"/>
  171. </group>
  172. <group>
  173. <field name="create_date" readonly="1" string="录单时间"/>
  174. <field name="write_date" readonly="1" string="最后修改时间"/>
  175. </group>
  176. </group>
  177. </sheet>
  178. <chatter/>
  179. </form>
  180. </field>
  181. </record>
  182. <record id="buy_receipt_search" model="ir.ui.view">
  183. <field name="name">buy.receipt.search</field>
  184. <field name="model">buy.receipt</field>
  185. <field name="arch" type="xml">
  186. <search string="采购入库单">
  187. <field name="name"/>
  188. <field name="order_id" />
  189. <field name="partner_id"/>
  190. <field name='in_goods_id'/>
  191. <field name="state"/>
  192. <field name="money_state"/>
  193. <field name="create_uid" string="制单人"/>
  194. <field name="approve_uid"/>
  195. <filter name="draft" string="草稿" domain="[('state','=','draft')]"/>
  196. <filter name="done" string="已完成" domain="[('state','=','done')]"/>
  197. <separator/>
  198. <filter string="今日" name="today" domain="[('date','=', current_date)]"/>
  199. <separator/>
  200. <filter name="not paid" string="未付款" domain="[('money_state','=',u'未付款')]"/>
  201. <filter name="part paid" string="部分付款" domain="[('money_state','=',u'部分付款')]"/>
  202. <filter name="all paid" string="全部付款" domain="[('money_state','=',u'全部付款')]"/>
  203. <group expand="0" string="分组">
  204. <filter name="by_partner" string="供应商" domain="[]" context="{'group_by':'partner_id'}"/>
  205. <filter name="by_date" string="单据日期" domain="[]" context="{'group_by':'date:day'}"/>
  206. <filter name="by_date_due" string="到期日" domain="[]" context="{'group_by':'date_due:day'}"/>
  207. </group>
  208. </search>
  209. </field>
  210. </record>
  211. <record id="buy_receipt_calendar" model="ir.ui.view">
  212. <field name="name">buy.receipt.calendar</field>
  213. <field name="model">buy.receipt</field>
  214. <field name="arch" type="xml">
  215. <calendar color="partner_id" date_start="date_due" string="采购入库单">
  216. <field name="name"/>
  217. <field name="partner_id"/>
  218. </calendar>
  219. </field>
  220. </record>
  221. <!-- 采购退货单视图 -->
  222. <record id="buy_return_list" model="ir.ui.view">
  223. <field name="name">buy.return.list</field>
  224. <field name="model">buy.receipt</field>
  225. <field name="arch" type="xml">
  226. <list string="采购退货单" decoration-info='state == "draft"' decoration-muted= 'state == "cancel"' >
  227. <field name='date' optional="show"/>
  228. <field name='name' optional="show"/>
  229. <field name="order_id" optional="show"/>
  230. <field name="partner_id" optional="show"/>
  231. <field name='details' widget="html" optional="show"/>
  232. <field name="amount" sum="总金额" groups='buy.group_buy' optional="show"/>
  233. <field name='payment' groups='buy.group_buy' optional="show"/>
  234. <field name='date_due' optional="show"/>
  235. <field name="create_uid" string="制单人" optional="show"/>
  236. <field name='currency_id'
  237. groups='base.group_multi_currency' optional="show"/>
  238. <field name='state' optional="show"/>
  239. <field name='return_state' optional="show"/>
  240. </list>
  241. </field>
  242. </record>
  243. <record id="buy_return_form" model="ir.ui.view">
  244. <field name="name">buy.return.form</field>
  245. <field name="model">buy.receipt</field>
  246. <field name="arch" type="xml">
  247. <form string="采购退货单">
  248. <header>
  249. <button name="buy_receipt_done" invisible="state=='done'"
  250. confirm="请确认出库日期是否已修改为实际退货出库的日期"
  251. groups='warehouse.group_warehouse'
  252. string="出库" type="object" class="oe_highlight"/>
  253. <button name="buy_receipt_draft" invisible="state=='draft'"
  254. groups='warehouse.group_warehouse'
  255. string="撤销" type="object"/>
  256. <field name="state" widget="statusbar" statusbar_visible="draft,done" readonly="1"/>
  257. </header>
  258. <sheet>
  259. <group>
  260. <group>
  261. <field name="partner_id" required='1'
  262. readonly="state!='draft'"
  263. domain="[('s_category_id', '!=', False)]"
  264. context="{'form_view_ref': 'core.supplier_address_form'}"/>
  265. <field name='user_id'
  266. options="{'no_open': True, 'no_create': True}"/>
  267. <field name="date" required="1" readonly="state!='draft'"/>
  268. <field name="is_return" readonly="1" invisible="1"/>
  269. <field name="warehouse_id"/>
  270. </group>
  271. <group>
  272. <field name="date_due" required="1" readonly="state!='draft'"/>
  273. <field name="order_id" readonly="1" />
  274. <field name='origin_id' readonly='1'/>
  275. <field name='invoice_id' readonly='1'/>
  276. <field name='voucher_id'/>
  277. <field name="return_state" readonly="1"/>
  278. <field name='currency_id' readonly='1'
  279. groups='base.group_multi_currency'/>
  280. </group>
  281. </group>
  282. <notebook>
  283. <page name="return" string="退货单行">
  284. <field name="line_out_ids" readonly="state!='draft'"
  285. context="{
  286. 'type':'out',
  287. 'default_warehouse_id': warehouse_id,
  288. }">
  289. <list string="Buy Receipt Lines" editable="bottom">
  290. <field name="goods_id" required='1' domain="[('not_buyable','=',False)]"
  291. context="{'default_partner':parent.partner_id,
  292. 'order_id':parent.order_id,
  293. 'default_is_return':parent.is_return}" optional="show"/>
  294. <field name="attribute_id"
  295. domain="[('goods_id', '=', goods_id)]"
  296. groups='goods.multi_attrs_groups'
  297. required="using_attribute"
  298. readonly="not using_attribute" optional="show"/>
  299. <field name="warehouse_id" column_invisible="1"/>
  300. <field name='lot_id' readonly="not using_batch" required="using_batch"
  301. context="{'lot': True}" options="{'no_open': True, 'no_create': True}"
  302. groups='goods.batch_groups' optional="show"/>
  303. <field name="location_id"
  304. groups="warehouse.multi_location_groups"
  305. options="{'no_open': True, 'no_create': True}"
  306. domain="[('warehouse_id','=',parent.warehouse_id),('goods_id', '=', goods_id)]" optional="show"/>
  307. <field name="goods_uos_qty" sum="合计辅助数量"
  308. groups="goods.auxiliary_unit_groups" optional="show"/>
  309. <field name='uos_id' groups='goods.auxiliary_unit_groups' optional="show"/>
  310. <field name="goods_qty" sum="合计数量" optional="show"/>
  311. <field name="uom_id" optional="show"/>
  312. <field name="price" groups='buy.group_buy' optional="show"/>
  313. <field name="price_taxed" groups='buy.in_tax_groups' optional="show"/>
  314. <field name="discount_rate" groups='buy.buy_line_discount_groups' optional="show"/>
  315. <field name="discount_amount" readonly="0" sum="合计折扣额" groups='buy.buy_line_discount_groups' optional="show"/>
  316. <field name="amount" string="采购金额" sum="合计金额" groups='buy.group_buy' optional="show"/>
  317. <field name="tax_rate" groups='buy.in_tax_groups' optional="show"/>
  318. <field name="tax_amount" sum="合计税额" groups='buy.in_tax_groups' optional="show"/>
  319. <field name="subtotal" sum="价税合计的合计" groups='buy.in_tax_groups' optional="show"/>
  320. <field name='expiration_date'
  321. readonly='1'
  322. groups='warehouse.group_expiration_date' optional="show"/>
  323. <field name='line_net_weight' sum="净重合计" groups="warehouse.manager_net_weight_group" optional="show"/>
  324. <field name="note" optional="show"/>
  325. <field name="type" column_invisible="1"/>
  326. <field name='using_attribute' column_invisible='1'/>
  327. <field name='using_batch' column_invisible='1'/>
  328. <field name='lot_qty' column_invisible='1'/>
  329. <field name='lot' column_invisible='1'/>
  330. <field name="state" column_invisible="1"/>
  331. </list>
  332. </field>
  333. </page>
  334. <page name="fees" string="采购费用行">
  335. <field name="cost_line_ids" readonly="state!='draft'">
  336. <list string="Cost Lines" editable="bottom">
  337. <field name="partner_id" domain="[('s_category_id', '!=', False)]" optional="show"/>
  338. <field name="category_id" optional="show"/>
  339. <field name="amount" optional="show"/>
  340. <field name="tax_rate" groups="buy.in_tax_groups" optional="show"/>
  341. <field name="tax" groups="buy.in_tax_groups" optional="show"/>
  342. <field name="note" optional="show"/>
  343. </list>
  344. </field>
  345. </page>
  346. </notebook>
  347. <field name="note" placeholder="暂无备注信息" readonly="state!='draft'"/>
  348. <group>
  349. <field name='qc_result' widget='pdf_viewer'
  350. readonly="state!='draft'"
  351. groups='warehouse.group_qc'
  352. />
  353. </group>
  354. <group>
  355. <group>
  356. <field name="discount_amount" groups='buy.buy_discount_groups'/>
  357. <field name="amount" groups='buy.group_buy'/>
  358. </group>
  359. <group>
  360. <field name="payment" readonly="state!='draft'"
  361. groups='buy.group_buy'
  362. />
  363. <field name="bank_account_id" readonly="state!='draft'"
  364. groups='buy.group_buy'
  365. />
  366. <field name="money_order_id" groups='buy.group_buy'/>
  367. </group>
  368. </group>
  369. <group>
  370. <group>
  371. <field name="create_uid" readonly="1" string="制单人"/>
  372. <field name="approve_uid" readonly="1"/>
  373. </group>
  374. <group>
  375. <field name="create_date" readonly="1" string="录单时间"/>
  376. <field name="write_date" readonly="1" string="最后修改时间"/>
  377. </group>
  378. </group>
  379. </sheet>
  380. <chatter/>
  381. </form>
  382. </field>
  383. </record>
  384. <record id="buy_return_search" model="ir.ui.view">
  385. <field name="name">buy.return.search</field>
  386. <field name="model">buy.receipt</field>
  387. <field name="arch" type="xml">
  388. <search string="采购退货单">
  389. <field name="name"/>
  390. <field name="order_id" />
  391. <field name="partner_id"/>
  392. <field name='out_goods_id'/>
  393. <field name="state"/>
  394. <field name="return_state"/>
  395. <field name="create_uid" string="制单人"/>
  396. <field name="approve_uid"/>
  397. <filter name="draft" string="草稿" domain="[('state','=','draft')]"/>
  398. <filter name="done" string="已完成" domain="[('state','=','done')]"/>
  399. <separator/>
  400. <filter name="not refund" string="未退款" domain="[('return_state','=',u'未退款')]"/>
  401. <filter name="part refund" string="部分退款" domain="[('return_state','=',u'部分退款')]"/>
  402. <filter name="all refund" string="全部退款" domain="[('return_state','=',u'全部退款')]"/>
  403. <group expand="0" string="分组">
  404. <filter name="by_partner" string="供应商" domain="[]" context="{'group_by':'partner_id'}"/>
  405. <filter name="by_date" string="单据日期" domain="[]" context="{'group_by':'date:day'}"/>
  406. <filter name="by_date_due" string="到期日" domain="[]" context="{'group_by':'date_due:day'}"/>
  407. </group>
  408. </search>
  409. </field>
  410. </record>
  411. </data>
  412. </openerp>
上海开阖软件有限公司 沪ICP备12045867号-1