@@ -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)
|
||||
@@ -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="单价")
|
||||
|
||||
@@ -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="单价")
|
||||
|
||||
|
||||
|
||||
@@ -48,20 +48,25 @@
|
||||
<field name="name" string="标题"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group string="审批信息">
|
||||
<field name="work_end" invisible="1"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="user_id"/>
|
||||
<field name="partner_id" domain="[('company_id', '=', company_id)]" required="1"/>
|
||||
<group string="审批信息" col="2">
|
||||
<group>
|
||||
<field name="work_end" invisible="1"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="user_id"/>
|
||||
<field name="partner_id" domain="[('company_id', '=', company_id), ('user_ids', '=', False)]" required="1"/>
|
||||
<field name="date_order"/>
|
||||
<field name="pay_way"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="date_order"/>
|
||||
<field name="date_planned"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="start_date"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<field name="date_order"/>
|
||||
<field name="date_planned"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="start_date"/>
|
||||
<field name="reason_text"/>
|
||||
<field name="pay_way"/>
|
||||
<field name="document_ids" widget="preview_many2many"/>
|
||||
</group>
|
||||
<notebook>
|
||||
@@ -70,11 +75,14 @@
|
||||
<tree editable="bottom">
|
||||
<field name="purchase_id" column_invisible="1"/>
|
||||
<field name="product_id"/>
|
||||
<field name="name"/>
|
||||
<field name="brand"/>
|
||||
<field name="specs"/>
|
||||
<field name="product_packaging_id"/>
|
||||
<field name="number"/>
|
||||
<field name="unit_id"/>
|
||||
<field name="price"/>
|
||||
<field name="taxes_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<tree string="低值易耗采购单">
|
||||
<field name="name"/>
|
||||
<field name="user_id"/>
|
||||
<field name="partyB"/>
|
||||
<field name="party_id"/>
|
||||
<field name="reason_application"/>
|
||||
<field name="pay_way"/>
|
||||
<field name="total"/>
|
||||
@@ -43,24 +43,24 @@
|
||||
<field name="name_title" readonly="1"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group string="申请事项">
|
||||
<field name="name"/>
|
||||
<field name="user_id"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="work_end" invisible="1"/>
|
||||
<field name="partyB" required="1" domain="[('company_id', '=', company_id)]"/>
|
||||
<field name="reason_application"/>
|
||||
<field name="date_application"/>
|
||||
<field name="document_ids" widget="preview_many2many"/>
|
||||
</group>
|
||||
<group col="2">
|
||||
<group string="申请事项" col="2">
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="user_id"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="work_end" invisible="1"/>
|
||||
<field name="party_id" required="1" domain="[('company_id', '=', company_id), ('user_ids', '=', False)]"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="date_application"/>
|
||||
<field name="pay_way"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="total"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<field name="reason_application"/>
|
||||
<field name="document_ids" widget="preview_many2many"/>
|
||||
<field name="total"/>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="采购明细">
|
||||
@@ -68,11 +68,14 @@
|
||||
<tree editable="bottom">
|
||||
<field name="purchase_id" column_invisible="1"/>
|
||||
<field name="product_id"/>
|
||||
<field name="name"/>
|
||||
<field name="brand"/>
|
||||
<field name="specs"/>
|
||||
<field name="number"/>
|
||||
<field name="product_packaging_id"/>
|
||||
<field name="unit_id"/>
|
||||
<field name="price"/>
|
||||
<field name="taxes_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
|
||||
@@ -46,11 +46,11 @@
|
||||
<group string="申请事项">
|
||||
<field name="name"/>
|
||||
<field name="user_id"/>
|
||||
<field name="party_id" required="1" domain="[('company_id', '=', company_id), ('user_ids', '=', False)]"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="work_end" invisible="1"/>
|
||||
<field name="service_content"/>
|
||||
<field name="partyB" required="1" domain="[('company_id', '=', company_id)]"/>
|
||||
<field name="date_application"/>
|
||||
<label for="service_start_date"/>
|
||||
<div class="d-inline-flex w-100">
|
||||
@@ -87,13 +87,16 @@
|
||||
<page string="服务项目">
|
||||
<field name="service_line_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="service_id" column_invisible="1"/>
|
||||
<field name="product_id"/>
|
||||
<field name="frequency"/>
|
||||
<field name="fee"/>
|
||||
<field name="unit_id"/>
|
||||
<field name="partyB"/>
|
||||
<field name="price"/>
|
||||
<field name="service_id" column_invisible="1"/>
|
||||
<field name="product_id"/>
|
||||
<field name="name"/>
|
||||
<field name="frequency"/>
|
||||
<field name="fee"/>
|
||||
<field name="product_packaging_id"/>
|
||||
<field name="unit_id"/>
|
||||
<field name="party_id"/>
|
||||
<field name="price"/>
|
||||
<field name="taxes_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
|
||||
Reference in New Issue
Block a user