添加功能
This commit is contained in:
@@ -10,9 +10,9 @@
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
'data/purchase_data.xml',
|
||||
'views/inherit_purchase_order_views.xml',
|
||||
# 'views/purchase_low_orders_views.xml',
|
||||
# 'views/purchase_service_orders_views.xml',
|
||||
'views/purchase_fixed_assets_views.xml',
|
||||
'views/purchase_low_orders_views.xml',
|
||||
'views/purchase_service_orders_views.xml',
|
||||
'views/menu.xml',
|
||||
],
|
||||
'installable': True,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from . import inherit_purchase_order
|
||||
from . import purchase_fixed_assets
|
||||
from . import purchase_low_orders
|
||||
from . import purchase_service_orders
|
||||
@@ -1,43 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class PurchaseOrder(models.Model):
|
||||
_name = 'purchase.order'
|
||||
_inherit = ['purchase.order', 'soong.workflow.mixin']
|
||||
_description = '采购订单'
|
||||
|
||||
purchase_code = fields.Char(string="流水号",
|
||||
default=lambda self: self.env['ir.sequence'].next_by_code('purchase_order_sequence_code'))
|
||||
company_id = fields.Many2one('res.company', string="公司", default=lambda self: self.env.company)
|
||||
user_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user)
|
||||
department_id = fields.Many2one(related='user_id.employee_id.department_id', string="部门")
|
||||
date_order = fields.Datetime(string="订单日期")
|
||||
date_planned = fields.Datetime(string="预计到货日期")
|
||||
start_date = fields.Date(string="申请日期", default=fields.Date.today)
|
||||
reason_text = fields.Text(string='申请事由')
|
||||
document_ids = fields.Many2many('ir.attachment', string="附件")
|
||||
urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度',
|
||||
default='normal')
|
||||
active = fields.Boolean('Active', default=True, tracking=True)
|
||||
pay_way = fields.Selection([('onetime', '一次性'), ('installment', '分期')], string='付款方式', default='onetime')
|
||||
# purchase_order_models_ids = fields.One2many('purchase.order.pay.line', 'purchase_id', string="付款详情")
|
||||
work_end = fields.Boolean(string="结束")
|
||||
|
||||
def _get_default_name_title(self):
|
||||
return self._description if self._description else self._name
|
||||
|
||||
name_title = fields.Char(default=_get_default_name_title, string="标题")
|
||||
|
||||
|
||||
# class PurchaseOrderPayLine(models.Model):
|
||||
# _name = "purchase.order.pay.line"
|
||||
# _description = "付款详情"
|
||||
#
|
||||
# purchase_id = fields.Many2one('purchase.order', string="关联采购单")
|
||||
# low_id = fields.Many2one('purchase.low.orders', string="关联低值易耗采购单")
|
||||
# service_id = fields.Many2one('purchase.service.orders', string="关联服务采购单")
|
||||
# payment_stage = fields.Char(string="付款阶段")
|
||||
# amount = fields.Char(string="比例/金额")
|
||||
# payment_date = fields.Date(string="付款日期")
|
||||
# remake = fields.Char(string="条件")
|
||||
@@ -0,0 +1,59 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class PurchaseFixedAssets(models.Model):
|
||||
_name = 'purchase.fixed.assets'
|
||||
_description = '固定资产采购单'
|
||||
_inherit = ['soong.workflow.mixin']
|
||||
|
||||
purchase_code = fields.Char(string="流水号",
|
||||
default=lambda self: self.env['ir.sequence'].next_by_code('purchase_order_sequence_code'))
|
||||
name = fields.Char(string="名称")
|
||||
company_id = fields.Many2one('res.company', string="公司", default=lambda self: self.env.company)
|
||||
user_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user)
|
||||
department_id = fields.Many2one(related='user_id.employee_id.department_id', string="部门")
|
||||
partner_id = fields.Many2one('res.partner', string="供应商")
|
||||
date_order = fields.Datetime(string="订单日期")
|
||||
date_planned = fields.Datetime(string="预计到货日期")
|
||||
start_date = fields.Date(string="申请日期", default=fields.Date.today)
|
||||
reason_text = fields.Text(string='申请事由')
|
||||
document_ids = fields.Many2many('ir.attachment', string="附件")
|
||||
urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度',
|
||||
default='normal')
|
||||
active = fields.Boolean('Active', default=True, tracking=True)
|
||||
pay_way = fields.Selection([('onetime', '一次性'), ('installment', '分期')], string='付款方式', default='onetime')
|
||||
purchase_order_models_ids = fields.One2many('purchase.order.pay.line', 'purchase_id', string="付款详情")
|
||||
fixed_ids = fields.One2many('purchase.fixed.line', 'purchase_id', string="采购明细")
|
||||
work_end = fields.Boolean(string="结束")
|
||||
|
||||
def _get_default_name_title(self):
|
||||
return self._description if self._description else self._name
|
||||
|
||||
name_title = fields.Char(default=_get_default_name_title, string="标题")
|
||||
|
||||
|
||||
class PurchaseOrderPayLine(models.Model):
|
||||
_name = "purchase.order.pay.line"
|
||||
_description = "付款详情"
|
||||
|
||||
purchase_id = fields.Many2one('purchase.fixed.assets', string="关联采购单")
|
||||
low_id = fields.Many2one('purchase.low.orders', string="关联低值易耗采购单")
|
||||
service_id = fields.Many2one('purchase.service.orders', string="关联服务采购单")
|
||||
payment_stage = fields.Char(string="付款阶段")
|
||||
amount = fields.Char(string="比例/金额")
|
||||
payment_date = fields.Date(string="付款日期")
|
||||
remake = fields.Char(string="条件")
|
||||
|
||||
|
||||
class PurchaseFixedLine(models.Model):
|
||||
_name = 'purchase.fixed.line'
|
||||
_description = '固定资产采购单明细'
|
||||
|
||||
purchase_id = fields.Many2one('purchase.fixed.assets', string="关联采购单")
|
||||
name = fields.Char(string="物品名称")
|
||||
brand = fields.Char(string="品牌")
|
||||
specs = fields.Char(string="规格")
|
||||
number = fields.Integer(string="数量")
|
||||
unit = fields.Char(string="单位")
|
||||
price = fields.Float(string="单价")
|
||||
@@ -22,8 +22,8 @@ class PurchaseLowOrders(models.Model):
|
||||
default='normal')
|
||||
work_end = fields.Boolean(string="结束")
|
||||
active = fields.Boolean('Active', default=True, tracking=True)
|
||||
# low_line_ids = fields.One2many('purchase.low.line', 'purchase_id', string="采购明细")
|
||||
# purchase_ids = fields.One2many('purchase.order.pay.line', 'low_id', string="采购单")
|
||||
low_line_ids = fields.One2many('purchase.low.line', 'purchase_id', string="采购明细")
|
||||
purchase_ids = fields.One2many('purchase.order.pay.line', 'low_id', string="采购单")
|
||||
|
||||
def _get_default_name_title(self):
|
||||
return self._description if self._description else self._name
|
||||
@@ -31,17 +31,17 @@ class PurchaseLowOrders(models.Model):
|
||||
name_title = fields.Char(default=_get_default_name_title)
|
||||
|
||||
|
||||
# class PurchaseLowLine(models.Model):
|
||||
# _name = 'purchase.low.line'
|
||||
# _description = '低值易耗采购单明细'
|
||||
#
|
||||
# purchase_id = fields.Many2one('purchase.low.orders', string="关联采购单")
|
||||
# name = fields.Char(string="物品名称")
|
||||
# brand = fields.Char(string="品牌")
|
||||
# specs = fields.Char(string="规格")
|
||||
# number = fields.Integer(string="数量")
|
||||
# unit = fields.Char(string="单位")
|
||||
# price = fields.Float(string="单价")
|
||||
class PurchaseLowLine(models.Model):
|
||||
_name = 'purchase.low.line'
|
||||
_description = '低值易耗采购单明细'
|
||||
|
||||
purchase_id = fields.Many2one('purchase.low.orders', string="关联采购单")
|
||||
name = fields.Char(string="物品名称")
|
||||
brand = fields.Char(string="品牌")
|
||||
specs = fields.Char(string="规格")
|
||||
number = fields.Integer(string="数量")
|
||||
unit = fields.Char(string="单位")
|
||||
price = fields.Float(string="单价")
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -29,8 +29,8 @@ class PurchaseServiceOrders(models.Model):
|
||||
default='normal')
|
||||
work_end = fields.Boolean(string="结束")
|
||||
active = fields.Boolean('Active', default=True, tracking=True)
|
||||
# service_line_ids = fields.One2many('purchase.service.line', 'service_id', string="采购明细")
|
||||
# purchase_ids = fields.One2many('purchase.order.pay.line', 'service_id', string="采购单")
|
||||
service_line_ids = fields.One2many('purchase.service.line', 'service_id', string="采购明细")
|
||||
purchase_ids = fields.One2many('purchase.order.pay.line', 'service_id', string="采购单")
|
||||
|
||||
def _get_default_name_title(self):
|
||||
return self._description if self._description else self._name
|
||||
@@ -38,17 +38,17 @@ class PurchaseServiceOrders(models.Model):
|
||||
name_title = fields.Char(default=_get_default_name_title)
|
||||
|
||||
|
||||
# class PurchaseServiceLine(models.Model):
|
||||
# _name = 'purchase.service.line'
|
||||
# _description = '服务采购单明细'
|
||||
#
|
||||
# service_id = fields.Many2one('purchase.service.orders', string="关联采购单")
|
||||
# name = fields.Char(string="服务项目")
|
||||
# frequency = fields.Char(string='频次')
|
||||
# fee = fields.Float(string="费用")
|
||||
# unit = fields.Char(string="单位")
|
||||
# partyB = fields.Many2one('res.partner', string="供应商")
|
||||
# price = fields.Float(string="单价")
|
||||
class PurchaseServiceLine(models.Model):
|
||||
_name = 'purchase.service.line'
|
||||
_description = '服务采购单明细'
|
||||
|
||||
service_id = fields.Many2one('purchase.service.orders', string="关联采购单")
|
||||
name = fields.Char(string="服务项目")
|
||||
frequency = fields.Char(string='频次')
|
||||
fee = fields.Float(string="费用")
|
||||
unit = fields.Char(string="单位")
|
||||
partyB = fields.Many2one('res.partner', string="供应商")
|
||||
price = fields.Float(string="单价")
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1 +1,8 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_purchase_fixed_assets,purchase_fixed_assets,model_purchase_fixed_assets,,1,1,1,1
|
||||
access_purchase_fixed_line, purchase_fixed_line,model_purchase_fixed_line,,1,1,1,1
|
||||
access_purchase_order_pay_line,purchase_order_pay_line,model_purchase_order_pay_line,,1,1,1,1
|
||||
access_purchase_low_orders, purchase_low_orders,model_purchase_low_orders,,1,1,1,1
|
||||
access_purchase_service_orders, purchase_service_orders,model_purchase_service_orders,,1,1,1,1
|
||||
access_purchase_low_line, purchase_low_line,model_purchase_low_line,,1,1,1,1
|
||||
access_purchase_service_line, purchase_service_line,model_purchase_service_line,,1,1,1,1
|
||||
|
@@ -1,263 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="view_purchase_order_form_inherit" model="ir.ui.view">
|
||||
<field name="name">purchase.order.form.inherit</field>
|
||||
<field name="model">purchase.order</field>
|
||||
<field name="inherit_id" ref="purchase.purchase_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='partner_ref']" position="before">
|
||||
<field name="work_end" invisible="1"/>
|
||||
</xpath>
|
||||
<!-- <form>-->
|
||||
<!-- <sheet>-->
|
||||
<!-- <widget name="web_ribbon" title="普件" bg_color="text-bg-success"-->
|
||||
<!-- invisible="urgency_level != 'normal'"/>-->
|
||||
<!-- <widget name="web_ribbon" title="急件" bg_color="text-bg-warning"-->
|
||||
<!-- invisible="urgency_level != 'urgent'"/>-->
|
||||
<!-- <widget name="web_ribbon" title="特级" bg_color="text-bg-danger"-->
|
||||
<!-- invisible="urgency_level != 'emergency'"/>-->
|
||||
<!-- <group col="3">-->
|
||||
<!-- <group>-->
|
||||
<!-- <field name="purchase_code" string="流水号" readonly="1"/>-->
|
||||
<!-- </group>-->
|
||||
<!-- <group>-->
|
||||
<!-- <field name="urgency_level" readonly="1"/>-->
|
||||
<!-- </group>-->
|
||||
<!-- <group/>-->
|
||||
<!-- </group>-->
|
||||
<!-- <div class="col-12 text-center">-->
|
||||
<!-- <h1>-->
|
||||
<!-- <field name="name_title" readonly="1"/>-->
|
||||
<!-- </h1>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="oe_title">-->
|
||||
<!-- <label for="name"/>-->
|
||||
<!-- <h1>-->
|
||||
<!-- <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)]"/>-->
|
||||
<!-- </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>-->
|
||||
<!-- <page string="产品" name="products">-->
|
||||
<!-- <field name="tax_country_id" invisible="1"/>-->
|
||||
<!-- <field name="order_line" widget="section_and_note_one2many" mode="tree,kanban"-->
|
||||
<!-- context="{'default_state': 'draft'}" readonly="state in ('done', 'cancel')">-->
|
||||
<!-- <tree string="Purchase Order Lines" editable="bottom">-->
|
||||
<!-- <field name="tax_calculation_rounding_method" column_invisible="True"/>-->
|
||||
<!-- <field name="display_type" column_invisible="True"/>-->
|
||||
<!-- <field name="company_id" column_invisible="True"/>-->
|
||||
<!-- <field name="currency_id" column_invisible="True"/>-->
|
||||
<!-- <field name="state" column_invisible="True"/>-->
|
||||
<!-- <field name="product_type" column_invisible="True"/>-->
|
||||
<!-- <field name="product_uom" column_invisible="True" groups="!uom.group_uom"/>-->
|
||||
<!-- <field name="product_uom_category_id" column_invisible="True"/>-->
|
||||
<!-- <field name="invoice_lines" column_invisible="True"/>-->
|
||||
<!-- <field name="sequence" widget="handle"/>-->
|
||||
<!-- <field name="product_id"-->
|
||||
<!-- readonly="state in ('purchase', 'to approve', 'done', 'cancel')"-->
|
||||
<!-- required="not display_type" width="35%"-->
|
||||
<!-- context="{'partner_id':parent.partner_id, 'quantity':product_qty, 'company_id': parent.company_id}"-->
|
||||
<!-- force_save="1" domain="[('purchase_ok', '=', True)]"/>-->
|
||||
<!-- <field name="name" widget="section_and_note_text"/>-->
|
||||
<!-- <field name="date_planned" optional="hide" required="not display_type" force_save="1"/>-->
|
||||
<!-- <field name="analytic_distribution" widget="analytic_distribution" optional="hide"-->
|
||||
<!-- groups="analytic.group_analytic_accounting"-->
|
||||
<!-- options="{'product_field': 'product_id', 'business_domain': 'purchase_order', 'amount_field': 'price_subtotal'}"/>-->
|
||||
<!-- <field name="product_qty"/>-->
|
||||
<!-- <field name="qty_received_manual" column_invisible="True"/>-->
|
||||
<!-- <field name="qty_received_method" column_invisible="True"/>-->
|
||||
<!-- <field name="qty_received" string="Received"-->
|
||||
<!-- column_invisible="parent.state not in ('purchase', 'done')"-->
|
||||
<!-- readonly="qty_received_method != 'manual'" optional="show"/>-->
|
||||
<!-- <field name="qty_invoiced" string="Billed"-->
|
||||
<!-- column_invisible="parent.state not in ('purchase', 'done')" optional="show"/>-->
|
||||
<!-- <field name="product_packaging_qty"-->
|
||||
<!-- invisible="not product_id or not product_packaging_id"-->
|
||||
<!-- groups="product.group_stock_packaging" optional="show"/>-->
|
||||
<!-- <field name="product_packaging_id" invisible="not product_id"-->
|
||||
<!-- context="{'default_product_id': product_id, 'tree_view_ref':'product.product_packaging_tree_view', 'form_view_ref':'product.product_packaging_form_view'}"-->
|
||||
<!-- groups="product.group_stock_packaging" optional="show"/>-->
|
||||
<!-- <field name="price_unit" readonly="qty_invoiced != 0"/>-->
|
||||
<!-- <button name="action_purchase_history" type="object" icon="fa-history"-->
|
||||
<!-- title="Purchase History" invisible="not id"/>-->
|
||||
<!-- <field name="taxes_id" widget="many2many_tags"-->
|
||||
<!-- domain="[('type_tax_use', '=', 'purchase'), ('company_id', 'parent_of', parent.company_id), ('country_id', '=', parent.tax_country_id), ('active', '=', True)]"-->
|
||||
<!-- context="{'default_type_tax_use': 'purchase', 'search_view_ref': 'account.account_tax_view_search'}"-->
|
||||
<!-- options="{'no_create': True}" optional="show"/>-->
|
||||
<!-- <field name="discount" string="折扣%" readonly="qty_invoiced != 0" optional="hide"/>-->
|
||||
<!-- <field name="price_subtotal" string="不含税价"/>-->
|
||||
<!-- <field name="price_total" string="含税"-->
|
||||
<!-- column_invisible="parent.tax_calculation_rounding_method == 'round_globally'"-->
|
||||
<!-- optional="hide"/>-->
|
||||
<!-- </tree>-->
|
||||
<!-- <form string="Purchase Order Line">-->
|
||||
<!-- <field name="tax_calculation_rounding_method" invisible="1"/>-->
|
||||
<!-- <field name="state" invisible="1"/>-->
|
||||
<!-- <field name="display_type" invisible="1"/>-->
|
||||
<!-- <field name="company_id" invisible="1"/>-->
|
||||
<!-- <group invisible="display_type">-->
|
||||
<!-- <group>-->
|
||||
<!-- <field name="product_uom_category_id" invisible="1"/>-->
|
||||
<!-- <field name="product_id" context="{'partner_id': parent.partner_id}"-->
|
||||
<!-- widget="many2one_barcode"-->
|
||||
<!-- domain="[('purchase_ok', '=', True), '|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"-->
|
||||
<!-- readonly="state in ('purchase', 'to approve', 'done', 'cancel')"/>-->
|
||||
<!-- <field name="qty_received_method" invisible="1"/>-->
|
||||
<!-- <field name="qty_received" string="已收"-->
|
||||
<!-- invisible="parent.state not in ('purchase', 'done')"-->
|
||||
<!-- readonly="qty_received_method != 'manual'"/>-->
|
||||
<!-- <field name="qty_invoiced" string="Billed Quantity"-->
|
||||
<!-- invisible="parent.state not in ('purchase', 'done')"/>-->
|
||||
<!-- <field name="product_packaging_qty"-->
|
||||
<!-- invisible="not product_id or not product_packaging_id"-->
|
||||
<!-- groups="product.group_stock_packaging"/>-->
|
||||
<!-- <field name="product_packaging_id" invisible="not product_id"-->
|
||||
<!-- context="{'default_product_id': product_id, 'tree_view_ref':'product.product_packaging_tree_view', 'form_view_ref':'product.product_packaging_form_view'}"-->
|
||||
<!-- groups="product.group_stock_packaging"/>-->
|
||||
<!-- <field name="price_unit"/>-->
|
||||
<!-- <field name="taxes_id" widget="many2many_tags"-->
|
||||
<!-- domain="[('type_tax_use', '=', 'purchase'), ('company_id', 'parent_of', parent.company_id), ('country_id', '=', parent.tax_country_id)]"-->
|
||||
<!-- options="{'no_create': True}"/>-->
|
||||
<!-- </group>-->
|
||||
<!-- <group>-->
|
||||
<!-- <field name="date_planned" widget="date" required="not display_type"/>-->
|
||||
<!-- <field name="analytic_distribution" widget="analytic_distribution"-->
|
||||
<!-- groups="analytic.group_analytic_accounting"-->
|
||||
<!-- options="{'product_field': 'product_id', 'business_domain': 'purchase_order'}"/>-->
|
||||
<!-- </group>-->
|
||||
<!-- <group>-->
|
||||
<!-- <notebook colspan="4">-->
|
||||
<!-- <page string="Notes" name="notes">-->
|
||||
<!-- <field name="name"/>-->
|
||||
<!-- </page>-->
|
||||
<!-- <page string="Invoices and Incoming Shipments"-->
|
||||
<!-- name="invoices_incoming_shiptments">-->
|
||||
<!-- <field name="invoice_lines"/>-->
|
||||
<!-- </page>-->
|
||||
<!-- </notebook>-->
|
||||
<!-- </group>-->
|
||||
<!-- </group>-->
|
||||
<!-- <label for="name" string="Section Name (eg. Products, Services)"-->
|
||||
<!-- invisible="display_type != 'line_section'"/>-->
|
||||
<!-- <label for="name" string="Note" invisible="display_type != 'line_note'"/>-->
|
||||
<!-- <field name="name" nolabel="1" invisible="not display_type"/>-->
|
||||
<!-- </form>-->
|
||||
<!-- <kanban class="o_kanban_mobile">-->
|
||||
<!-- <field name="name"/>-->
|
||||
<!-- <field name="product_id"/>-->
|
||||
<!-- <field name="product_qty"/>-->
|
||||
<!-- <field name="price_subtotal"/>-->
|
||||
<!-- <field name="price_tax"/>-->
|
||||
<!-- <field name="price_total"/>-->
|
||||
<!-- <field name="price_unit"/>-->
|
||||
<!-- <field name="display_type"/>-->
|
||||
<!-- <field name="taxes_id"/>-->
|
||||
<!-- <field name="tax_calculation_rounding_method"/>-->
|
||||
<!-- <templates>-->
|
||||
<!-- <t t-name="kanban-box">-->
|
||||
<!-- <div t-attf-class="oe_kanban_card oe_kanban_global_click {{ record.display_type.raw_value ? 'o_is_' + record.display_type.raw_value : '' }}">-->
|
||||
<!-- <t t-if="!record.display_type.raw_value">-->
|
||||
<!-- <div class="row">-->
|
||||
<!-- <div class="col-8">-->
|
||||
<!-- <strong>-->
|
||||
<!-- <span t-esc="record.product_id.value"/>-->
|
||||
<!-- </strong>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="col-4">-->
|
||||
<!-- <strong>-->
|
||||
<!-- <span>-->
|
||||
<!-- Tax excl.:-->
|
||||
<!-- <t t-esc="record.price_subtotal.value"-->
|
||||
<!-- class="float-end text-end"/>-->
|
||||
<!-- </span>-->
|
||||
<!-- </strong>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="row">-->
|
||||
<!-- <div class="col-8 text-muted">-->
|
||||
<!-- <span>-->
|
||||
<!-- Quantity:-->
|
||||
<!-- <t t-esc="record.product_qty.value"/>-->
|
||||
<!-- <t t-esc="record.product_uom.value" groups="uom.group_uom"/>-->
|
||||
<!-- </span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="col-4"-->
|
||||
<!-- t-if="record.tax_calculation_rounding_method.raw_value === 'round_per_line'">-->
|
||||
<!-- <strong>-->
|
||||
<!-- <span>-->
|
||||
<!-- Tax incl.:-->
|
||||
<!-- <t t-esc="record.price_total.value"/>-->
|
||||
<!-- </span>-->
|
||||
<!-- </strong>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="row">-->
|
||||
<!-- <div class="col-12 text-muted">-->
|
||||
<!-- <span>-->
|
||||
<!-- Unit Price:-->
|
||||
<!-- <t t-esc="record.price_unit.value"/>-->
|
||||
<!-- </span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </t>-->
|
||||
<!-- <div t-elif="record.display_type.raw_value === 'line_section' || record.display_type.raw_value === 'line_note'"-->
|
||||
<!-- class="row">-->
|
||||
<!-- <div class="col-12">-->
|
||||
<!-- <span t-esc="record.name.value"/>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </t>-->
|
||||
<!-- </templates>-->
|
||||
<!-- </kanban>-->
|
||||
<!-- </field>-->
|
||||
<!-- <group>-->
|
||||
<!-- <group>-->
|
||||
<!-- <field colspan="2" name="notes" nolabel="1"-->
|
||||
<!-- placeholder="Define your terms and conditions ..."/>-->
|
||||
<!-- </group>-->
|
||||
<!-- <group class="oe_subtotal_footer">-->
|
||||
<!-- <field name="tax_totals" widget="account-tax-totals-field" nolabel="1" colspan="2"-->
|
||||
<!-- readonly="1"/>-->
|
||||
<!-- </group>-->
|
||||
<!-- </group>-->
|
||||
<!-- <div class="clearfix"/>-->
|
||||
<!-- </page>-->
|
||||
<!-- <page string="付款详情" invisible="pay_way == 'onetime'">-->
|
||||
<!-- <field name="purchase_order_models_ids">-->
|
||||
<!-- <tree editable="bottom">-->
|
||||
<!-- <field name="purchase_id" column_invisible="1"/>-->
|
||||
<!-- <field name="payment_stage"/>-->
|
||||
<!-- <field name="amount"/>-->
|
||||
<!-- <field name="payment_date"/>-->
|
||||
<!-- <field name="remake"/>-->
|
||||
<!-- </tree>-->
|
||||
<!-- </field>-->
|
||||
<!-- </page>-->
|
||||
<!-- </notebook>-->
|
||||
<!-- </sheet>-->
|
||||
<!-- <div class="oe_chatter">-->
|
||||
<!-- <field name="message_follower_ids"/>-->
|
||||
<!-- <field name="activity_ids"/>-->
|
||||
<!-- <field name="message_ids"/>-->
|
||||
<!-- </div>-->
|
||||
<!-- </form>-->
|
||||
<!-- </xpath>-->
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="view_purchase_fixed_assets_tree" model="ir.ui.view">
|
||||
<field name="name">purchase.fixed.assets.tree</field>
|
||||
<field name="model">purchase.fixed.assets</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="固定资产采购单">
|
||||
<field name="name"/>
|
||||
<field name="user_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_purchase_fixed_assets_form" model="ir.ui.view">
|
||||
<field name="name">purchase.fixed.assets.form</field>
|
||||
<field name="model">purchase.fixed.assets</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="固定资产采购单">
|
||||
<sheet>
|
||||
<widget name="web_ribbon" title="普件" bg_color="text-bg-success"
|
||||
invisible="urgency_level != 'normal'"/>
|
||||
<widget name="web_ribbon" title="急件" bg_color="text-bg-warning"
|
||||
invisible="urgency_level != 'urgent'"/>
|
||||
<widget name="web_ribbon" title="特级" bg_color="text-bg-danger"
|
||||
invisible="urgency_level != 'emergency'"/>
|
||||
<group col="3">
|
||||
<group>
|
||||
<field name="purchase_code" string="流水号" readonly="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="urgency_level" readonly="1"/>
|
||||
</group>
|
||||
<group/>
|
||||
</group>
|
||||
<div class="col-12 text-center">
|
||||
<h1>
|
||||
<field name="name_title" readonly="1"/>
|
||||
</h1>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<label for="name"/>
|
||||
<h1>
|
||||
<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)]"/>
|
||||
</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>
|
||||
<page string="采购明细">
|
||||
<field name="fixed_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="purchase_id" column_invisible="1"/>
|
||||
<field name="name"/>
|
||||
<field name="brand"/>
|
||||
<field name="specs"/>
|
||||
<field name="number"/>
|
||||
<field name="unit"/>
|
||||
<field name="price"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="付款详情" invisible="pay_way == 'onetime'">
|
||||
<field name="purchase_order_models_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="purchase_id" column_invisible="1"/>
|
||||
<field name="payment_stage"/>
|
||||
<field name="amount"/>
|
||||
<field name="payment_date"/>
|
||||
<field name="remake"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_purchase_fixed_assets_action" model="ir.actions.act_window">
|
||||
<field name="name">固定资产采购单</field>
|
||||
<field name="res_model">purchase.fixed.assets</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -57,19 +57,6 @@
|
||||
<field name="reason_application"/>
|
||||
<field name="document_ids" widget="preview_many2many"/>
|
||||
</group>
|
||||
<group string="采购明细">
|
||||
<field name="low_line_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="purchase_id" column_invisible="1"/>
|
||||
<field name="name"/>
|
||||
<field name="brand"/>
|
||||
<field name="specs"/>
|
||||
<field name="number"/>
|
||||
<field name="unit"/>
|
||||
<field name="price"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
<group col="2">
|
||||
<group>
|
||||
<field name="pay_way"/>
|
||||
@@ -79,6 +66,19 @@
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="采购明细">
|
||||
<field name="low_line_ids" string=" ">
|
||||
<tree editable="bottom">
|
||||
<field name="purchase_id" column_invisible="1"/>
|
||||
<field name="name"/>
|
||||
<field name="brand"/>
|
||||
<field name="specs"/>
|
||||
<field name="number"/>
|
||||
<field name="unit"/>
|
||||
<field name="price"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="付款明细">
|
||||
<field name="purchase_ids">
|
||||
<tree editable="bottom">
|
||||
@@ -92,11 +92,6 @@
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids"/>
|
||||
<field name="activity_ids"/>
|
||||
<field name="message_ids"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -77,17 +77,6 @@
|
||||
</group>
|
||||
</group>
|
||||
<group string="服务项目">
|
||||
<field name="service_line_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="service_id" column_invisible="1"/>
|
||||
<field name="name"/>
|
||||
<field name="frequency"/>
|
||||
<field name="fee"/>
|
||||
<field name="unit"/>
|
||||
<field name="partyB"/>
|
||||
<field name="price"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
<group col="2">
|
||||
<group>
|
||||
@@ -98,6 +87,19 @@
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="服务项目">
|
||||
<field name="service_line_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="service_id" column_invisible="1"/>
|
||||
<field name="name"/>
|
||||
<field name="frequency"/>
|
||||
<field name="fee"/>
|
||||
<field name="unit"/>
|
||||
<field name="partyB"/>
|
||||
<field name="price"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="付款明细">
|
||||
<field name="purchase_ids">
|
||||
<tree editable="bottom">
|
||||
@@ -111,11 +113,6 @@
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids"/>
|
||||
<field name="activity_ids"/>
|
||||
<field name="message_ids"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -13,21 +13,26 @@
|
||||
parent="purchase_menus_order_root"
|
||||
action="purchase.purchase_rfq"
|
||||
sequence="1"/>
|
||||
<menuitem id="purchase_fixed_assets_root"
|
||||
<menuitem id="purchase_fixe_assets_root"
|
||||
name="采购单"
|
||||
parent="purchase_menus_order_root"
|
||||
action="purchase.purchase_form_action"
|
||||
sequence="5"/>
|
||||
<!-- <menuitem id="purchase_low_orders_root"-->
|
||||
<!-- name="低值易耗品采购单"-->
|
||||
<!-- parent="purchase_menus_order_root"-->
|
||||
<!-- action="yuthon_purchase.view_purchase_low_orders_action"-->
|
||||
<!-- sequence="10"/>-->
|
||||
<!-- <menuitem id="purchase_service_orders_root"-->
|
||||
<!-- name="服务采购单"-->
|
||||
<!-- parent="purchase_menus_order_root"-->
|
||||
<!-- action="yuthon_purchase.view_purchase_service_orders_action"-->
|
||||
<!-- sequence="15"/>-->
|
||||
<menuitem id="purchase_fixed_assets_root"
|
||||
name="固定资产采购单"
|
||||
parent="purchase_menus_order_root"
|
||||
action="yuthon_purchase.view_purchase_fixed_assets_action"
|
||||
sequence="7"/>
|
||||
<menuitem id="purchase_low_orders_root"
|
||||
name="低值易耗品采购单"
|
||||
parent="purchase_menus_order_root"
|
||||
action="yuthon_purchase.view_purchase_low_orders_action"
|
||||
sequence="10"/>
|
||||
<menuitem id="purchase_service_orders_root"
|
||||
name="服务采购单"
|
||||
parent="purchase_menus_order_root"
|
||||
action="yuthon_purchase.view_purchase_service_orders_action"
|
||||
sequence="15"/>
|
||||
<menuitem id="purchase_suppliers_root"
|
||||
name="供应商"
|
||||
parent="purchase_menus_order_root"
|
||||
|
||||
Reference in New Issue
Block a user