Accept Merge Request #1488: (feature/制造功能优化 -> develop)

Merge Request: 添加采购类型字段

Created By: @马广威
Accepted By: @马广威
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1488
This commit is contained in:
马广威
2024-11-06 09:24:43 +08:00
committed by Coding
2 changed files with 7 additions and 0 deletions

View File

@@ -208,6 +208,8 @@ class RePurchaseOrder(models.Model):
compute='_compute_user_id',
store=True)
purchase_type = fields.Selection([('standard', '标准采购'), ('consignment', '委外加工')], string='采购类型', default='standard')
@api.depends('partner_id')
def _compute_user_id(self):
if not self.user_id:

View File

@@ -158,6 +158,11 @@
<attribute name="attrs">{'readonly': [('state', 'in', ['purchase'])]}
</attribute>
</field>
<!-- 添加采购类型字段 -->
<field name="partner_ref" position="after">
<field name="purchase_type" string="采购类型" readonly="1"/>
</field>
</field>
</record>