添加采购类型字段
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user