diff --git a/yuthon_purchase/models/purchase_fixed_assets.py b/yuthon_purchase/models/purchase_fixed_assets.py
index 776f55b3c..d9fa2b1b7 100644
--- a/yuthon_purchase/models/purchase_fixed_assets.py
+++ b/yuthon_purchase/models/purchase_fixed_assets.py
@@ -49,6 +49,9 @@ class PurchaseFixedAssets(models.Model):
'order_id': purchase_order.id,
'product_id': fixed_line.product_id.id,
'product_qty': fixed_line.number,
+ 'name': fixed_line.name,
+ 'product_packaging_id': fixed_line.product_packaging_id.id,
+ 'taxes_id': fixed_line.taxes_id,
}))
if order_lines:
purchase_order.order_line = order_lines
@@ -76,5 +79,8 @@ class PurchaseFixedLine(models.Model):
brand = fields.Char(string="品牌")
specs = fields.Char(string="规格")
number = fields.Integer(string="数量")
+ name = fields.Text(string="描述")
+ product_packaging_id = fields.Many2one('product.packaging', string="包装")
+ taxes_id = fields.Many2one('account.tax', string='税项')
unit_id = fields.Many2one(related='product_id.uom_id', string="单位")
price = fields.Float(related='product_id.standard_price', string="单价", stroe=True)
\ No newline at end of file
diff --git a/yuthon_purchase/models/purchase_low_orders.py b/yuthon_purchase/models/purchase_low_orders.py
index fa3ae651b..5083f56f8 100644
--- a/yuthon_purchase/models/purchase_low_orders.py
+++ b/yuthon_purchase/models/purchase_low_orders.py
@@ -15,7 +15,7 @@ class PurchaseLowOrders(models.Model):
company_id = fields.Many2one('res.company', string='公司', index=True, default=lambda self: self.env.company)
reason_application = fields.Text(string="申请事由")
department_id = fields.Many2one(related='user_id.employee_id.department_id', string="申请部门")
- partyB = fields.Many2one('res.partner', string="乙方")
+ party_id = fields.Many2one('res.partner', string="乙方")
document_ids = fields.Many2many('ir.attachment', string="附件")
pay_way = fields.Selection([('staging', '分期'), ('full', '一次性')], string='付款方式', default='full')
total = fields.Float(string="合计")
@@ -38,7 +38,7 @@ class PurchaseLowOrders(models.Model):
datetime.min.time().replace(hour=0)
)
purchase_order = self.env['purchase.order'].create({
- 'partner_id': rec.partyB.id,
+ 'partner_id': rec.party_id.id,
'date_order': date_with_time,
'company_id': rec.company_id.id,
'user_id': rec.user_id.id,
@@ -53,6 +53,9 @@ class PurchaseLowOrders(models.Model):
'product_qty': low_line.number,
'product_uom': low_line.unit_id.id,
'price_unit': low_line.price,
+ 'name': low_line.name,
+ 'product_packaging_id': low_line.product_packaging_id.id,
+ 'taxes_id': low_line.taxes_id,
}))
if order_lines:
purchase_order.order_line = order_lines
@@ -67,6 +70,9 @@ class PurchaseLowLine(models.Model):
product_id = fields.Many2one('product.product', string="物品名称")
brand = fields.Char(string="品牌")
specs = fields.Char(string="规格")
+ name = fields.Text(string="描述")
+ product_packaging_id = fields.Many2one('product.packaging', string="包装")
+ taxes_id = fields.Many2one('account.tax', string='税项')
number = fields.Integer(string="数量")
unit_id = fields.Many2one(related='product_id.uom_id', string="单位")
price = fields.Float(related='product_id.standard_price', string="单价")
diff --git a/yuthon_purchase/models/purchase_service_orders.py b/yuthon_purchase/models/purchase_service_orders.py
index f3cbd2444..3f106a151 100644
--- a/yuthon_purchase/models/purchase_service_orders.py
+++ b/yuthon_purchase/models/purchase_service_orders.py
@@ -19,7 +19,7 @@ class PurchaseServiceOrders(models.Model):
service_end_date = fields.Date(string="服务结束日期")
service_year = fields.Char(string="服务年限")
department_id = fields.Many2one(related='user_id.employee_id.department_id', string="申请部门")
- partyB = fields.Many2one('res.partner', string="乙方")
+ party_id = fields.Many2one('res.partner', string="乙方")
license_id = fields.Many2one('ir.attachment', string='营业执照')
aptitude_id = fields.Many2one('ir.attachment', string='资质')
contract_id = fields.Many2one('ir.attachment', string='合同')
@@ -46,7 +46,7 @@ class PurchaseServiceOrders(models.Model):
datetime.min.time().replace(hour=0)
)
purchase_order = self.env['purchase.order'].create({
- 'partner_id': rec.partyB.id,
+ 'partner_id': rec.party_id.id,
'date_order': date_with_time,
'company_id': rec.company_id.id,
'user_id': rec.user_id.id,
@@ -58,6 +58,9 @@ class PurchaseServiceOrders(models.Model):
order_lines.append((0, 0, {
'order_id': purchase_order.id,
'product_id': service_line.product_id.id,
+ 'name': service_line.name,
+ 'product_packaging_id': service_line.product_packaging_id.id,
+ 'taxes_id': service_line.taxes_id,
}))
if order_lines:
purchase_order.order_line = order_lines
@@ -71,8 +74,11 @@ class PurchaseServiceLine(models.Model):
product_id = fields.Many2one('product.product', string="服务项目")
frequency = fields.Char(string='频次')
fee = fields.Float(string="费用")
+ name = fields.Text(string="描述")
+ product_packaging_id = fields.Many2one('product.packaging', string="包装")
+ taxes_id = fields.Many2one('account.tax', string='税项')
unit_id = fields.Many2one(related='product_id.uom_id', string="单位")
- partyB = fields.Many2one('res.partner', string="供应商")
+ party_id = fields.Many2one('res.partner', string="供应商")
price = fields.Float(related='product_id.standard_price', string="单价")
diff --git a/yuthon_purchase/views/purchase_fixed_assets_views.xml b/yuthon_purchase/views/purchase_fixed_assets_views.xml
index 52acaba8e..17bc02ab7 100644
--- a/yuthon_purchase/views/purchase_fixed_assets_views.xml
+++ b/yuthon_purchase/views/purchase_fixed_assets_views.xml
@@ -48,20 +48,25 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
@@ -70,11 +75,14 @@
+
+
+
diff --git a/yuthon_purchase/views/purchase_low_orders_views.xml b/yuthon_purchase/views/purchase_low_orders_views.xml
index 91d2acc6e..39ae926b3 100644
--- a/yuthon_purchase/views/purchase_low_orders_views.xml
+++ b/yuthon_purchase/views/purchase_low_orders_views.xml
@@ -7,7 +7,7 @@
-
+
@@ -43,24 +43,24 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
@@ -68,11 +68,14 @@
+
+
+
diff --git a/yuthon_purchase/views/purchase_service_orders_views.xml b/yuthon_purchase/views/purchase_service_orders_views.xml
index 6c814b8d9..f5b7683ed 100644
--- a/yuthon_purchase/views/purchase_service_orders_views.xml
+++ b/yuthon_purchase/views/purchase_service_orders_views.xml
@@ -46,11 +46,11 @@
+
-
@@ -87,13 +87,16 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+