Merge branch 'release/release_2.7' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into release/release_2.7

This commit is contained in:
mgw
2025-01-03 15:26:20 +08:00
3 changed files with 42 additions and 3 deletions

View File

@@ -12,7 +12,7 @@
'category': 'sf',
'website': 'https://www.sf.jikimo.com',
'depends': ['sale', 'purchase', 'sf_plan', 'jikimo_message_notify', 'stock', 'sf_quality', 'mrp',
'sf_manufacturing','product','quality'],
'sf_manufacturing', 'product', 'quality'],
'data': [
'data/bussiness_node.xml',
'data/cron_data.xml',
@@ -20,6 +20,7 @@
'security/ir.model.access.csv',
'views/mrp_workorder_views.xml',
'views/purchase_order_view.xml',
'views/stock_picking_view.xml',
],
'test': [
],

View File

@@ -63,8 +63,9 @@ class SFMessageMrpProduction(models.Model):
[('origin', 'in', mrp_production_names), ('state', '=', 'assigned')])
if stock_picking_num >= 1:
url = self.env['ir.config_parameter'].sudo().get_param('web.base.url')
action_id = self.env.ref('stock.action_picking_tree_ready').id
url_with_id = f"{url}/web#view_type=list&action={action_id}"
action_id = self.env.ref('sf_message.action_picking_outsourced_tree_ready').id
menu_id = self.env.ref('stock.menu_stock_root').id
url_with_id = f"{url}/web#view_type=list&action={action_id}&menu_id={menu_id}"
content = content.replace('{{name}}', mrp_production.product_id.name).replace('{{url}}',
url_with_id).replace(
'{{num}}', str(stock_picking_num))

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_picking_internal_search_sf" model="ir.ui.view">
<field name="name">stock.picking.search</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_internal_search"/>
<field name="arch" type="xml">
<xpath expr="//filter[@name='activities_exception']" position="before">
<filter name="outsourced" string="外协出库" domain="[('picking_type_id.name', '=', '外协出库')]"
invisible="1"/>
<separator/>
</xpath>
</field>
</record>
<record id="action_picking_outsourced_tree_ready" model="ir.actions.act_window">
<field name="name">待办</field>
<field name="res_model">stock.picking</field>
<field name="type">ir.actions.act_window</field>
<field name="view_mode">tree,kanban,form,calendar</field>
<field name="domain"></field>
<field name="context">{'search_default_outsourced': 1,'contact_display': 'partner_address',
'search_default_available': 1}
</field>
<field name="search_view_id" ref="stock.view_picking_internal_search"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
没有仓库调拨。 让我们创建一个!
</p>
<p>
移动允许您将产品从一个位置移动到另外一个位置。
</p>
</field>
</record>
</odoo>