GoodERP
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

826 rindas
46KB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <data>
  4. <!-- 商品的净重管理 -->
  5. <record id="warehouse_goods_form" model="ir.ui.view">
  6. <field name="name">warehouse.goods.form</field>
  7. <field name="model">goods</field>
  8. <field name="inherit_id" ref="goods.goods_form"/>
  9. <field name="arch" type="xml">
  10. <xpath expr="//sheet/group" position="before">
  11. <div class="oe_button_box" name="button_box">
  12. <button name="button_list_move" type="object" class="oe_stat_button" icon="fa-align-center"
  13. invisible="move_line_count == 0" >
  14. <field name="move_line_count" string="库存调拨" widget="statinfo"
  15. invisible="move_line_count == 0"/>
  16. </button>
  17. <button name="button_list_bom" type="object" class="oe_stat_button" icon="fa-align-left"
  18. invisible="bom_count == 0" >
  19. <field name="bom_count" string="物料清单" widget="statinfo"
  20. invisible="bom_count == 0" />
  21. </button>
  22. </div>
  23. </xpath>
  24. <field name="barcode" position="after">
  25. <field name='max_stock_qty'/>
  26. <field name="min_stock_qty"/>
  27. <field name='net_weight' groups="warehouse.manager_net_weight_group"/>
  28. <field name='current_qty'/>
  29. <field name='incoming_ids'>
  30. <list string="即将入库">
  31. <field name="goods_qty" sum="待入库"/>
  32. <field name="uom_id"/>
  33. <field name="plan_date"/>
  34. </list>
  35. </field>
  36. <field name='outgoing_ids'>
  37. <list string="即将出库">
  38. <field name="goods_qty" sum="待出库"/>
  39. <field name="uom_id"/>
  40. <field name="plan_date"/>
  41. </list>
  42. </field>
  43. <field name='available_qty'/>
  44. <field name='max_stock_qty'/>
  45. <field name='net_weight' groups="warehouse.manager_net_weight_group"/>
  46. </field>
  47. <field name="tax_rate" position="after">
  48. <field name="moq"/>
  49. <field name="sell_lead_time"/>
  50. <field name="excess"/>
  51. </field>
  52. <field name="cost" position="after">
  53. <field name="min_stock_qty"/>
  54. </field>
  55. </field>
  56. </record>
  57. <record id="warehouse_goods_list" model="ir.ui.view">
  58. <field name="name">warehouse.goods.list</field>
  59. <field name="model">goods</field>
  60. <field name="inherit_id" ref="goods.goods_list"/>
  61. <field name="arch" type="xml">
  62. <field name="goods_class_id" position="after">
  63. <field name='current_qty'/>
  64. <field name='max_stock_qty'/>
  65. <field name="min_stock_qty"/>
  66. </field>
  67. <list position="attributes">
  68. <attribute name="decoration-danger">current_qty&lt;min_stock_qty</attribute>
  69. <attribute name="decoration-info">(current_qty &gt; max_stock_qty) and (max_stock_qty &gt; 0)</attribute>
  70. </list>
  71. </field>
  72. </record>
  73. <!-- 仓库 -->
  74. <record id='warehouse_list' model='ir.ui.view'>
  75. <field name='name'>warehouse.list</field>
  76. <field name='model'>warehouse</field>
  77. <field name='arch' type='xml'>
  78. <list string='仓库' editable='bottom'>
  79. <field name='code' required='1' optional="show"/>
  80. <field name='name' required='1' optional="show"/>
  81. <field name='address' optional="show"/>
  82. <field name='phone' optional="show"/>
  83. <field name='contact' optional="show"/>
  84. <field name='user_ids' widget="many2many_tags" optional="show" domain="[('share', '=', False)]"/>
  85. <field name='active' column_invisible='1'/>
  86. </list>
  87. </field>
  88. </record>
  89. <!-- 仓库 -->
  90. <record id='warehouse_form' model='ir.ui.view'>
  91. <field name='name'>warehouse.form</field>
  92. <field name='model'>warehouse</field>
  93. <field name='arch' type='xml'>
  94. <form string='仓库' >
  95. <group>
  96. <group>
  97. <field name='code' required='1' />
  98. </group>
  99. <group>
  100. <field name='name' required='1' />
  101. </group>
  102. </group>
  103. </form>
  104. </field>
  105. </record>
  106. <!-- 仓库 -->
  107. <record id="warehouse_search" model="ir.ui.view">
  108. <field name="name">warehouse.search</field>
  109. <field name="model">warehouse</field>
  110. <field name="arch" type="xml">
  111. <search string="仓库">
  112. <field name="name"/>
  113. <field name="code"/>
  114. </search>
  115. </field>
  116. </record>
  117. <!-- 商品的库位设置 -->
  118. <record model="ir.ui.view" id="gooderp_location_list">
  119. <field name="name">库位设置</field>
  120. <field name="model">location</field>
  121. <field name="arch" type="xml">
  122. <list editable='top'>
  123. <field name="name" optional="show"/>
  124. <field name="warehouse_id" optional="show"/>
  125. <field name="goods_id" readonly='1' optional="show"/>
  126. <field name="attribute_id" readonly='1' optional="show"/>
  127. <field name="current_qty" optional="show"/>
  128. <button name="change_location" type="object" string='转存'
  129. invisible="current_qty &lt;= 0.0"/>
  130. </list>
  131. </field>
  132. </record>
  133. <record model="ir.actions.act_window" id="gooderp_location_action">
  134. <field name="name">库位设置</field>
  135. <field name="res_model">location</field>
  136. <field name="view_mode">list</field>
  137. <field name="help" type="html">
  138. <p class="oe_view_nocontent_create">点击创建一个库位</p>
  139. </field>
  140. </record>
  141. <!-- 转移库位 -->
  142. <record model="ir.ui.view" id="change_location_form">
  143. <field name="name">转移库位</field>
  144. <field name="model">change.location</field>
  145. <field name="arch" type="xml">
  146. <form editable='top'>
  147. <sheet>
  148. <group>
  149. <group>
  150. <field name="from_location" readonly='1'/>
  151. <field name="change_qty"/>
  152. </group>
  153. <group>
  154. <field name="to_location"/>
  155. </group>
  156. </group>
  157. <footer>
  158. <button name="confirm_change" string="确认转移" type="object" class="oe_highlight"/>
  159. 或者
  160. <button string="取消" class="oe_link" special="cancel"/>
  161. </footer>
  162. </sheet>
  163. </form>
  164. </field>
  165. </record>
  166. <!-- 库存调拨 -->
  167. <record id='wh_move_line_list' model='ir.ui.view'>
  168. <field name='name'>wh.move.line.list</field>
  169. <field name='model'>wh.move.line</field>
  170. <field name='arch' type='xml'>
  171. <list string='库存调拨' create='0' edit='0' delete="0">
  172. <field name='partner_id' optional="show"/>
  173. <field name='plan_date' optional="show"/>
  174. <field name='date' optional="show"/>
  175. <field name='move_id' string='单据编号' optional="show"/>
  176. <field name='goods_class' optional="show"/>
  177. <field name='goods_id' optional="show"/>
  178. <field name='attribute_id' groups='goods.multi_attrs_groups' optional="show"/>
  179. <field name='lot' groups='goods.batch_groups' optional="show" string="入库批号"/>
  180. <field name='lot_id' groups='goods.batch_groups' optional="show" string="出库批号"/>
  181. <field name='expiration_date' groups='warehouse.group_expiration_date' optional="show"/>
  182. <field name='goods_qty' sum='1' optional="show"/>
  183. <field name='uom_id' optional="show"/>
  184. <field name='goods_uos_qty' sum='1' groups='goods.auxiliary_unit_groups' optional="show"/>
  185. <field name='uos_id' groups='goods.auxiliary_unit_groups' optional="show"/>
  186. <field name='warehouse_id' groups='warehouse.multi_warehouse_groups' optional="show"/>
  187. <field name='warehouse_dest_id' groups='warehouse.multi_warehouse_groups' optional="show"/>
  188. <field name='qty_remaining' optional="hide"/>
  189. <field name='uos_qty_remaining' groups='goods.auxiliary_unit_groups' optional="show"/>
  190. <field name='cost_unit' groups='goods.view_cost_groups' optional="show"/>
  191. <field name='line_net_weight' sum="净重合计" groups="warehouse.manager_net_weight_group" optional="show"/>
  192. <field name='cost' sum='1' groups='goods.view_cost_groups' optional="show"/>
  193. <field name='type' optional="show"/>
  194. <field name='state' optional="show"/>
  195. <field name='note' optional="hide"/>
  196. </list>
  197. </field>
  198. </record>
  199. <record id='wh_move_line_form' model='ir.ui.view'>
  200. <field name='name'>wh.move.line.form</field>
  201. <field name='model'>wh.move.line</field>
  202. <field name='arch' type='xml'>
  203. <form string='库存调拨' create='false' edit='false' delete='false'>
  204. <group>
  205. <group>
  206. <field name='date'/>
  207. <field name='move_id' string='单据编号'/>
  208. <field name='partner_id'/>
  209. <field name='plan_date'/>
  210. <field name='cost_time'/>
  211. </group>
  212. <group>
  213. <field name='state'/>
  214. <field name='warehouse_id'/> <!--报错,把 groups='warehouse.multi_warehouse_groups' 拿掉了-->
  215. <field name='type'/>
  216. <field name='warehouse_dest_id'/> <!--报错,把 groups='warehouse.multi_warehouse_groups' 拿掉了-->
  217. <field name='note'/>
  218. </group>
  219. </group>
  220. <group>
  221. <group>
  222. <field name='goods_id'/>
  223. <field name='attribute_id' groups='goods.multi_attrs_groups'/>
  224. <field name='lot' groups='goods.batch_groups' string="入库批号"/>
  225. <field name='lot_id' groups='goods.batch_groups' string="出库批号"/>
  226. <field name='expiration_date' groups='warehouse.group_expiration_date' />
  227. </group>
  228. <group>
  229. <field name='goods_qty' sum='1'/>
  230. <field name='uom_id' />
  231. <field name='goods_uos_qty' groups='goods.auxiliary_unit_groups'/>
  232. <field name='uos_id' groups='goods.auxiliary_unit_groups'/>
  233. <field name='line_net_weight' groups="warehouse.manager_net_weight_group"/>
  234. </group>
  235. </group>
  236. <group>
  237. <group>
  238. <field name='qty_remaining'/>
  239. <field name='uos_qty_remaining' groups='goods.auxiliary_unit_groups'/>
  240. </group>
  241. <group>
  242. <field name='share_cost' groups='goods.view_cost_groups'/>
  243. <field name='cost' groups='goods.view_cost_groups'/>
  244. </group>
  245. </group>
  246. <group>
  247. <field name="matching_in_ids">
  248. <list>
  249. <field name="out_date" />
  250. <field name="out_name" />
  251. <field name="qty" string="数量"/>
  252. </list>
  253. </field>
  254. <field name="matching_out_ids">
  255. <list>
  256. <field name="in_date" />
  257. <field name="in_name" />
  258. <field name="qty" string="数量"/>
  259. </list>
  260. </field>
  261. </group>
  262. </form>
  263. </field>
  264. </record>
  265. <!-- 库存调拨 -->
  266. <record id='wh_move_line_search' model='ir.ui.view'>
  267. <field name='name'>wh.move.line.search</field>
  268. <field name='model'>wh.move.line</field>
  269. <field name='arch' type='xml'>
  270. <search string='库存调拨'>
  271. <field name='move_id' filter_domain="['|', '|', ('move_id', 'ilike', self),('goods_id', 'ilike', self),('lot', 'ilike', self)]"/>
  272. <field name='goods_id'/>
  273. <field name='lot'/>
  274. <field name='warehouse_id'/>
  275. <field name='warehouse_dest_id'/>
  276. <filter name='draft' string='草稿' domain="[('state', '=', 'draft')]"/>
  277. <filter name='done' string='已完成' domain="[('state', '=', 'done')]"/>
  278. <separator/>
  279. <filter name='out' string='出库' domain="[('type', '=', 'out')]"/>
  280. <filter name='in' string='入库' domain="[('type', '=', 'in')]"/>
  281. <separator/>
  282. <filter string="今日数据" name="today" domain="[('date', '&gt;', (context_today() - datetime.timedelta(days=1)).strftime('%Y-%m-%d'))]"/>
  283. <filter string="本月数据" name="month" domain="[('date','&gt;=', time.strftime('%Y-%m-01')),('date','&lt;', (context_today() + relativedelta(months=1)).strftime('%Y-%m-01') ) ]"/>
  284. <filter string="上月数据" name="month2" domain="[('date','&lt;', time.strftime('%Y-%m-01')),('date','&gt;=', (context_today() - relativedelta(months=1)).strftime('%Y-%m-01') ) ]"/>
  285. <filter string="本年数据" name="year" domain="[('date','&lt;=', time.strftime('%Y-12-31')),('date','&gt;=', time.strftime('%Y-01-01'))]"/>
  286. <group expand="0" string="分组">
  287. <filter name="by_type" string="类型" domain="[]" context="{'group_by':'type'}"/>
  288. <filter name="by_goods" string="商品" domain="[]" context="{'group_by':'goods_id'}"/>
  289. <filter name="by_wh" string="调出仓库" domain="[]" context="{'group_by':'warehouse_id'}"/>
  290. <filter name="by_whd" string="调入仓库" domain="[]" context="{'group_by':'warehouse_dest_id'}"/>
  291. <filter name="by_day" string="单据日期" domain="[]" context="{'group_by':'date:day'}"/>
  292. </group>
  293. </search>
  294. </field>
  295. </record>
  296. <!-- 其他出库单明细 -->
  297. <record id='wh_move_line_out_list' model='ir.ui.view'>
  298. <field name='name'>wh.move.line.out.list</field>
  299. <field name='model'>wh.move.line</field>
  300. <field name='arch' type='xml'>
  301. <list string='库存调拨' editable='bottom' default_order="goods_id">
  302. <field name='state' column_invisible='1'/>
  303. <field name='goods_id' required='1' optional="show"/>
  304. <field name='attribute_id'
  305. domain="[('goods_id', '=', goods_id)]"
  306. required="using_attribute" readonly="not using_attribute"
  307. groups='goods.multi_attrs_groups' optional="show"/>
  308. <field name="warehouse_id" invisible="1"/>
  309. <field name="warehouse_dest_id" invisible="1"/>
  310. <field name='lot' string="批号" readonly="1" force_save="1"/>
  311. <field name='lot_id' string="选择批号"
  312. groups='goods.batch_groups'
  313. readonly="not using_batch" required="using_batch"
  314. context="{'lot': True}"
  315. options="{'no_open': True, 'no_create': True}" optional="show"/>
  316. <field name="location_id"
  317. options="{'no_open':True,'no_create':True}"
  318. groups="warehouse.multi_location_groups"
  319. domain="[('warehouse_id','=',parent.warehouse_id),('goods_id', '=', goods_id)]" optional="show"/>
  320. <field name='goods_uos_qty' sum='1'
  321. groups='goods.auxiliary_unit_groups' optional="show"/>
  322. <field name='uos_id' groups='goods.auxiliary_unit_groups' optional="show"/>
  323. <field name='goods_qty' sum='1'
  324. readonly="force_batch_one" optional="show"/>
  325. <field name='uom_id' required='1' optional="show"/>
  326. <field name='cost_unit' string='出库单位成本' readonly='1' optional="show"/>
  327. <field name='cost' string='出库成本' readonly='1' sum='1' optional="show"/>
  328. <field name='expiration_date'
  329. readonly='1'
  330. groups='warehouse.group_expiration_date' optional="show"/>
  331. <field name='line_net_weight' sum="净重合计" groups="warehouse.manager_net_weight_group" optional="show"/>
  332. <field name='note' string='备注' optional="show"/>
  333. <field name='using_attribute' column_invisible='1'/>
  334. <field name='using_batch' column_invisible='1'/>
  335. <field name='force_batch_one' column_invisible='1'/>
  336. <field name='lot_qty' column_invisible='1'/>
  337. <field name='lot_uos_qty' column_invisible='1'/>
  338. <field name='type' column_invisible='1'/>
  339. <field name="all_lack" optional="hide"/>
  340. <field name="wh_lack" optional="hide"/>
  341. <field name="move_id" optional="hide"/>
  342. <field name="bill_date" optional="hide"/>
  343. <field name="bill_finance_category_id" optional="hide"/>
  344. <field name="id" optional="hide"/>
  345. </list>
  346. </field>
  347. </record>
  348. <!-- 其他入库单明细 -->
  349. <record id='wh_move_line_in_list' model='ir.ui.view'>
  350. <field name='name'>wh.move.line.in.list</field>
  351. <field name='model'>wh.move.line</field>
  352. <field name='arch' type='xml'>
  353. <list string='库存调拨' editable='bottom'>
  354. <field name='goods_id' required='1' optional="show"/>
  355. <field name='attribute_id' domain="[('goods_id', '=', goods_id)]"
  356. required="using_attribute" readonly="not using_attribute"
  357. groups='goods.multi_attrs_groups' optional="show"/>
  358. <field name='lot'
  359. groups='goods.batch_groups'
  360. readonly="not using_batch" required="using_batch" optional="show"/>
  361. <field name='location_id' groups="warehouse.multi_location_groups" options="{'no_open': True, 'no_create': True}" optional="show"/>
  362. <field name='goods_uos_qty' sum='1'
  363. groups='goods.auxiliary_unit_groups' optional="show"/>
  364. <field name='uos_id' groups='goods.auxiliary_unit_groups' optional="show"/>
  365. <field name='goods_qty'
  366. readonly="force_batch_one" sum='1' optional="show"/>
  367. <field name='uom_id' required='1' optional="show"/>
  368. <field name='cost_unit' string='入库单价' groups='goods.view_cost_groups' optional="show"/>
  369. <field name='cost' string='入库金额' sum='1' readonly='1' groups='goods.view_cost_groups' optional="show"/>
  370. <field name='expiration_date' groups='warehouse.group_expiration_date' optional="show"/>
  371. <field name='line_net_weight' sum="净重合计" groups="warehouse.manager_net_weight_group" optional="show"/>
  372. <field name='note' string='备注' optional="show"/>
  373. <field name='using_attribute' column_invisible='1'/>
  374. <field name='using_batch' column_invisible='1'/>
  375. <field name='force_batch_one' column_invisible='1'/>
  376. <field name="move_id" optional="hide"/>
  377. <field name="bill_date" optional="hide"/>
  378. <field name="bill_finance_category_id" optional="hide"/>
  379. </list>
  380. </field>
  381. </record>
  382. <!-- 内部调拨明细 -->
  383. <record id='wh_move_line_internal_list' model='ir.ui.view'>
  384. <field name='name'>wh.move.line.internal.list</field>
  385. <field name='model'>wh.move.line</field>
  386. <field name='arch' type='xml'>
  387. <list string='库存调拨' editable='bottom'>
  388. <field name='state' column_invisible='1'/>
  389. <field name='goods_id' required='1' optional="show"/>
  390. <field name='attribute_id'
  391. domain="[('goods_id', '=', goods_id)]"
  392. required="using_attribute" readonly="not using_attribute"
  393. groups='goods.multi_attrs_groups' optional="show"/>
  394. <field name="warehouse_id" optional="hide"/>
  395. <field name="warehouse_dest_id" optional="hide"/>
  396. <field name='lot_id'
  397. groups='goods.batch_groups'
  398. readonly="not using_batch" required="using_batch"
  399. context="{'lot': True}"
  400. options="{'no_open': True, 'no_create': True}" optional="show"/>
  401. <field name='goods_uos_qty' sum='1'
  402. groups='goods.auxiliary_unit_groups'
  403. optional="show"/>
  404. <field name='uos_id' groups='goods.auxiliary_unit_groups' optional="show"/>
  405. <field name='goods_qty' sum='1'
  406. readonly="force_batch_one" optional="show"/>
  407. <field name='uom_id' required='1' optional="show"/>
  408. <field name='expiration_date' groups='warehouse.group_expiration_date' optional="show"/>
  409. <field name='line_net_weight' sum="净重合计" groups="warehouse.manager_net_weight_group" optional="show"/>
  410. <field name='note' string='备注' optional="show"/>
  411. <field name='using_attribute' column_invisible='1'/>
  412. <field name='using_batch' column_invisible='1'/>
  413. <field name='force_batch_one' column_invisible='1'/>
  414. <field name='lot_qty' column_invisible='1' />
  415. <field name='lot_uos_qty' column_invisible='1'/>
  416. <field name='lot' column_invisible='1'/> <!-- 能否去掉? 不能, lot的值是 onchange 带过来的-->
  417. <field name='type' column_invisible='1'/>
  418. <field name='location_id' domain="[('warehouse_id', '=', parent.warehouse_dest_id)]" options="{'no_open': True, 'no_create': True}" optional="show"/>
  419. <field name="all_lack" optional="hide"/>
  420. <field name="wh_lack" optional="hide"/>
  421. <field name="move_id" optional="hide"/>
  422. <field name="bill_date" optional="hide"/>
  423. <field name="bill_finance_category_id" optional="hide"/>
  424. </list>
  425. </field>
  426. </record>
  427. <!-- 其他出库单 -->
  428. <record id='wh_out_form' model='ir.ui.view'>
  429. <field name='name'>wh.out.form</field>
  430. <field name='model'>wh.out</field>
  431. <field name='arch' type='xml'>
  432. <form string='其他出库单'>
  433. <header>
  434. <button name='approve_order' type='object' string='出库' class='oe_highlight' invisible="state != 'draft'"
  435. groups='warehouse.other_out_picking_groups'/>
  436. <button name='cancel_approved_order' type='object' string='撤销出库' invisible="state != 'done'" />
  437. <button name="action_cancel" invisible="state != 'draft'" string="作废" type="object"/>
  438. <button name="action_batch_split" invisible="state != 'draft'"
  439. string="批量拆分"
  440. groups="goods.batch_groups"
  441. class='oe_highlight' type="object"/>
  442. <field name='state' widget='statusbar' readonly='1' />
  443. </header>
  444. <sheet>
  445. <field name="_barcode_scanned" widget="barcode_handler"/>
  446. <group>
  447. <group>
  448. <field name='partner_id' readonly="state!='draft'"
  449. domain="[('c_category_id', '!=', False)]"
  450. options="{'no_open': True, 'no_create': True}"/>
  451. <field name='date' required='1' readonly="state!='draft'" />
  452. <field name='user_id'
  453. options="{'no_open': True, 'no_create': True}"
  454. readonly="state == 'done'"/>
  455. <field name="auxiliary_id"/>
  456. </group>
  457. <group>
  458. <field name='type' required='1' readonly="state!='draft'" />
  459. <field name='finance_category_id'
  460. options="{'no_open': True, 'no_create': True}"
  461. invisible="type!='others'"
  462. required="type=='others'"
  463. readonly="state == 'done'"/>
  464. <field name='warehouse_id' readonly="state != 'draft'" domain="[('type', '=', 'stock')]"/>
  465. <field name='warehouse_dest_id' readonly="1" force_save="1" placeholder="报废=>目标仓库选择“其他出库”."/>
  466. <field name='voucher_id'/>
  467. </group>
  468. </group>
  469. <notebook>
  470. <page name="lines" string="出库明细">
  471. <field nolabel='1' colspan="2" name='line_out_ids' context="{
  472. 'list_view_ref': 'warehouse.wh_move_line_out_list',
  473. 'lot': True,
  474. 'type': 'out',
  475. 'default_warehouse_id': warehouse_id,
  476. }" readonly="state!='draft'" />
  477. </page>
  478. </notebook>
  479. <group>
  480. <field name='note' nolabel='1' colspan="2" placeholder='备注...' />
  481. </group>
  482. <group>
  483. <field name='qc_result' widget='pdf_viewer'
  484. readonly="state!='draft'"
  485. groups='warehouse.group_qc'
  486. />
  487. </group>
  488. <group col='6'>
  489. <group colspan='2'>
  490. <field name='create_uid' string='制单人' readonly='1' />
  491. <field name='create_date' string='录单时间' readonly='1' />
  492. </group>
  493. <group colspan='2'>
  494. <field name='write_uid' string='最后修改人' readonly='1' />
  495. <field name='write_date' string='最后修改时间' readonly='1' />
  496. </group>
  497. <group colspan='2'>
  498. <field name='approve_uid' readonly='1' />
  499. <field name='approve_date' readonly='1' />
  500. </group>
  501. </group>
  502. </sheet>
  503. <chatter/>
  504. </form>
  505. </field>
  506. </record>
  507. <record id='wh_out_list' model='ir.ui.view'>
  508. <field name='name'>wh.out.list</field>
  509. <field name='model'>wh.out</field>
  510. <field name='arch' type='xml'>
  511. <list string='其他出库单' decoration-info='state == "draft"' decoration-muted= 'state == "cancel"' >
  512. <field name='name' optional="show"/>
  513. <field name='date' optional="show"/>
  514. <field name='type' optional="show"/>
  515. <field name='warehouse_id' optional="show"/>
  516. <field name='details' widget="html" optional="show"/>
  517. <field name='amount_total' optional="show"/>
  518. <field name='finance_category_id' optional="show"/>
  519. <field name="auxiliary_id" optional="show"/>
  520. <field name='note' optional="show"/>
  521. <field name='state' optional="show"/>
  522. </list>
  523. </field>
  524. </record>
  525. <record id='wh_out_search' model='ir.ui.view'>
  526. <field name='name'>wh.out.search</field>
  527. <field name='model'>wh.out</field>
  528. <field name='arch' type='xml'>
  529. <search string='其他出库单'>
  530. <field name='name'/>
  531. <field name='warehouse_id'/>
  532. <field name='partner_id' string='客户' options="{'no_open': True, 'no_create': True}"/>
  533. <field name='out_goods_id'/>
  534. <field name='create_uid' string='制单人'/>
  535. <field name='approve_uid'/>
  536. <field name='amount_total'/>
  537. <field name='state'/>
  538. <filter name='draft' string='草稿' domain="[('state', '=', 'draft')]"/>
  539. <filter name='done' string='已完成' domain="[('state', '=', 'done')]"/>
  540. <filter name='others' string='其他出库' domain="[('type', '=', 'others')]"/>
  541. <filter name='inventory' string='盘亏' domain="[('type', '=', 'inventory')]"/>
  542. <group expand="0" string="分组">
  543. <filter name="by_wh" string="调出仓库" domain="[]" context="{'group_by':'warehouse_id'}"/>
  544. <filter name="by_part" string="客户" domain="[]" context="{'group_by':'partner_id'}"/>
  545. <filter name="by_day" string="单据日期" domain="[]" context="{'group_by':'date:day'}"/>
  546. </group>
  547. </search>
  548. </field>
  549. </record>
  550. <!-- 其他入库单 -->
  551. <record id='wh_in_form' model='ir.ui.view'>
  552. <field name='name'>wh.in.form</field>
  553. <field name='model'>wh.in</field>
  554. <field name='arch' type='xml'>
  555. <form string='其他入库单'>
  556. <header>
  557. <button name='approve_order' type='object' string='入库' class='oe_highlight' invisible="state != 'draft'" />
  558. <button name='cancel_approved_order' type='object' string='撤销入库' invisible="state != 'done'" />
  559. <button name="action_cancel" invisible="state != 'draft'" string="作废" type="object"/>
  560. <field name='state' widget='statusbar' readonly='1' />
  561. </header>
  562. <sheet>
  563. <group>
  564. <group>
  565. <field name='partner_id' readonly="state!='draft'"
  566. domain="[('s_category_id', '!=', False)]"
  567. options="{'no_open': True, 'no_create': True}"/>
  568. <field name='date' required='1' readonly="state!='draft'" />
  569. <field name='user_id'
  570. options="{'no_open': True, 'no_create': True}"
  571. readonly="state == 'done'"/>
  572. <field name="auxiliary_id"/>
  573. <field name='is_init' readonly="state!='draft'"/>
  574. </group>
  575. <group>
  576. <field name='type' required='1' readonly="state!='draft'" />
  577. <field name='finance_category_id'
  578. options="{'no_open': True, 'no_create': True}"
  579. invisible="type!='others'"
  580. required="type=='others'"
  581. readonly="state == 'done'"/>
  582. <field name='warehouse_dest_id' readonly="state != 'draft'" domain="[('type', '=', 'stock')]"/>
  583. <field name='voucher_id'/>
  584. <field name='warehouse_id' readonly='1' force_save="1"/>
  585. </group>
  586. </group>
  587. <notebook>
  588. <page name="lines" string="入库明细">
  589. <field nolabel='1' colspan="2" name='line_in_ids' context="{
  590. 'list_view_ref': 'warehouse.wh_move_line_in_list',
  591. 'type': 'in',
  592. }" readonly="state!='draft'" />
  593. </page>
  594. </notebook>
  595. <group>
  596. <field name='note' nolabel='1' colspan="2" placeholder='备注...' />
  597. </group>
  598. <group>
  599. <field name='qc_result' widget='pdf_viewer'
  600. readonly="state!='draft'"
  601. groups='warehouse.group_qc'
  602. />
  603. </group>
  604. <group col='6'>
  605. <group colspan='2'>
  606. <field name='create_uid' string='制单人' readonly='1' />
  607. <field name='create_date' string='录单时间' readonly='1' />
  608. </group>
  609. <group colspan='2'>
  610. <field name='write_uid' string='最后修改人' readonly='1' />
  611. <field name='write_date' string='最后修改时间' readonly='1' />
  612. </group>
  613. <group colspan='2'>
  614. <field name='approve_uid' readonly='1' />
  615. <field name='approve_date' readonly='1' />
  616. </group>
  617. </group>
  618. </sheet>
  619. <chatter/>
  620. </form>
  621. </field>
  622. </record>
  623. <record id='wh_in_list' model='ir.ui.view'>
  624. <field name='name'>wh.in.list</field>
  625. <field name='model'>wh.in</field>
  626. <field name='arch' type='xml'>
  627. <list string='其他入库单' decoration-info='state == "draft"' decoration-muted= 'state == "cancel"'>
  628. <field name='name' optional="show"/>
  629. <field name='date' optional="show"/>
  630. <field name='warehouse_dest_id' optional="show"/>
  631. <field name='details' widget="html" optional="show"/>
  632. <field name='type' optional="show"/>
  633. <field name='amount_total' optional="show"/>
  634. <field name='finance_category_id' optional="show"/>
  635. <field name="auxiliary_id" optional="show"/>
  636. <field name='note' optional="show"/>
  637. <field name='state' optional="show"/>
  638. </list>
  639. </field>
  640. </record>
  641. <record id='wh_in_search' model='ir.ui.view'>
  642. <field name='name'>wh.in.search</field>
  643. <field name='model'>wh.in</field>
  644. <field name='arch' type='xml'>
  645. <search string='其他入库单'>
  646. <field name='name'/>
  647. <field name='warehouse_dest_id'/>
  648. <field name='partner_id' string='供应商' options="{'no_open': True, 'no_create': True}"/>
  649. <field name='in_goods_id'/>
  650. <field name='create_uid' string='制单人'/>
  651. <field name='approve_uid'/>
  652. <field name='amount_total'/>
  653. <field name='state'/>
  654. <filter name='draft' string='草稿' domain="[('state', '=', 'draft')]"/>
  655. <filter name='done' string='已完成' domain="[('state', '=', 'done')]"/>
  656. <filter name='others' string='其他入库' domain="[('type', '=', 'others')]"/>
  657. <filter name='inventory' string='盘盈' domain="[('type', '=', 'inventory')]"/>
  658. <group expand="0" string="分组">
  659. <filter name="by_whd" string="调入仓库" domain="[]" context="{'group_by':'warehouse_dest_id'}"/>
  660. <filter name="by_part" string="供应商" domain="[]" context="{'group_by':'partner_id'}"/>
  661. <filter name="by_day" string="单据日期" domain="[]" context="{'group_by':'date:day'}"/>
  662. </group>
  663. </search>
  664. </field>
  665. </record>
  666. <!-- 内部调拨 -->
  667. <record id='wh_internal_form' model='ir.ui.view'>
  668. <field name='name'>wh.internal.form</field>
  669. <field name='model'>wh.internal</field>
  670. <field name='arch' type='xml'>
  671. <form string='调拨单'>
  672. <header>
  673. <button name='approve_order' type='object' string='入库' class='oe_highlight' invisible="state != 'draft'"/>
  674. <button name='cancel_approved_order' type='object' string='撤销入库' invisible="state != 'done'"/>
  675. <button name="action_cancel" invisible="state != 'draft'" string="作废" type="object"/>
  676. <field name='state' widget="statusbar" readonly='1' />
  677. </header>
  678. <sheet>
  679. <!-- <div class="oe_right">
  680. <input type='text' placeholder="扫码增加行" class="ge_scan_barcode" autofocus="autofocus"/>
  681. </div> -->
  682. <group>
  683. <group>
  684. <field name='user_id'
  685. options="{'no_open': True, 'no_create': True}"/>
  686. <field name='warehouse_id'/>
  687. </group>
  688. <group>
  689. <field name='date' required='1' readonly="state!='draft'" />
  690. <field name='warehouse_dest_id'/>
  691. </group>
  692. </group>
  693. <notebook>
  694. <page name="lines" string="移库明细">
  695. <field nolabel='1' name='line_out_ids' context="{
  696. 'list_view_ref': 'warehouse.wh_move_line_internal_list',
  697. 'lot': True,
  698. 'type': 'internal',
  699. 'default_warehouse_id': warehouse_id,
  700. }"
  701. readonly="state!='draft'" />
  702. </page>
  703. </notebook>
  704. <group>
  705. <field name='note' nolabel='1' colspan="2" placeholder='备注...' />
  706. </group>
  707. <group>
  708. <field name='qc_result' widget='pdf_viewer'
  709. readonly="state!='draft'"
  710. groups='warehouse.group_qc'
  711. />
  712. </group>
  713. <group col='6'>
  714. <group colspan='2'>
  715. <field name='create_uid' string='制单人' readonly='1' />
  716. <field name='create_date' string='录单时间' readonly='1' />
  717. </group>
  718. <group colspan='2'>
  719. <field name='write_uid' string='最后修改人' readonly='1' />
  720. <field name='write_date' string='最后修改时间' readonly='1' />
  721. </group>
  722. <group colspan='2'>
  723. <field name='approve_uid' readonly='1' />
  724. <field name='approve_date' readonly='1' />
  725. </group>
  726. </group>
  727. </sheet>
  728. <chatter/>
  729. </form>
  730. </field>
  731. </record>
  732. <record id='wh_internal_list' model='ir.ui.view'>
  733. <field name='name'>wh.internal.list</field>
  734. <field name='model'>wh.internal</field>
  735. <field name='arch' type='xml'>
  736. <list string='调拨单' decoration-info='state == "draft"' decoration-muted= 'state == "cancel"' >
  737. <field name='name' optional="show"/>
  738. <field name='date' optional="show"/>
  739. <field name='warehouse_id' optional="show"/>
  740. <field name='warehouse_dest_id' optional="show"/>
  741. <field name='details' widget="html" optional="show"/>
  742. <field name='total_qty' optional="hide"/>
  743. <field name='amount_total' optional="hide"/>
  744. <field name='state' optional="show"/>
  745. <field name='note' optional="hide"/>
  746. </list>
  747. </field>
  748. </record>
  749. <record id='wh_internal_search' model='ir.ui.view'>
  750. <field name='name'>wh.internal.search</field>
  751. <field name='model'>wh.internal</field>
  752. <field name='arch' type='xml'>
  753. <search string='调拨单'>
  754. <field name='name'/>
  755. <field name='warehouse_id'/>
  756. <field name='warehouse_dest_id'/>
  757. <field name='in_goods_id'/>
  758. <field name='total_qty'/>
  759. <field name='amount_total'/>
  760. <field name='create_uid' string='制单人' />
  761. <field name='approve_uid'/>
  762. <field name='state'/>
  763. <filter name='draft' string='草稿' domain="[('state', '=', 'draft')]"/>
  764. <filter name='done' string='已完成' domain="[('state', '=', 'done')]"/>
  765. <group expand="0" string="分组">
  766. <filter name="by_wh" string="调出仓库" domain="[]" context="{'group_by':'warehouse_id'}"/>
  767. <filter name="by_whd" string="调入仓库" domain="[]" context="{'group_by':'warehouse_dest_id'}"/>
  768. <filter name="by_day" string="单据日期" domain="[]" context="{'group_by':'date:day'}"/>
  769. </group>
  770. </search>
  771. </field>
  772. </record>
  773. <record id='wh_move_matching_list' model='ir.ui.view'>
  774. <field name='name'>wh.move.matching.list</field>
  775. <field name='model'>wh.move.matching</field>
  776. <field name='arch' type='xml'>
  777. <list string='匹配记录' create="false" delete="false">
  778. <field name='in_date' optional="show"/>
  779. <field name='in_name' optional="show"/>
  780. <field name='in_partner_id' optional="hide"/>
  781. <field name='warehouse_id' groups='warehouse.multi_warehouse_groups' optional="show"/>
  782. <field name='goods_id' optional="show"/>
  783. <field name='attribute_id' groups='goods.multi_attrs_groups' optional="show"/>
  784. <field name='lot' groups='goods.batch_groups' optional="show"/>
  785. <field name='expiration_date' groups='goods.batch_groups' optional="show"/>
  786. <field name='qty' optional="show"/>
  787. <field name='cost_unit' optional="show"/>
  788. <field name='uos_qty' groups='goods.auxiliary_unit_groups' optional="show"/>
  789. <field name='out_date' optional="show"/>
  790. <field name='out_name' optional="show"/>
  791. <field name='out_partner_id' optional="hide"/>
  792. </list>
  793. </field>
  794. </record>
  795. </data>
  796. </odoo>
上海开阖软件有限公司 沪ICP备12045867号-1