sale_order.pyOpenERP 7 데이터는 데이터베이스에 저장하지만이 코드의 코드 <pre>'state': 'draft',</pre>를 추가 할 때/
class glimsol_bopas(osv.osv):
_name = 'glimsol.bopas'
_inherit = ['mail.thread', 'ir.needaction_mixin']
_columns = {
'state': fields.selection([
('draft', 'Draft Quotation'),
('sent', 'Quotation Sent'),
('cancel', 'Cancelled'),
('waiting_date', 'Waiting Schedule'),
('progress', 'Sales Order'),
('manual', 'Sale to Invoice'),
('invoice_except', 'Invoice Exception'),
('done', 'Done'),
], 'Status', readonly=True, track_visibility='onchange',
help="Gives the status of the quotation or sales order. \nThe exception status is automatically set when a cancel operation occurs in the processing of a document linked to the sales order. \nThe 'Waiting Schedule' status is set when the invoice is confirmed but waiting for the scheduler to run on the order date.", select=True),
# other fields
}
_defaults = {
'state': 'draft',
# other defaults
}
# methods
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- view definitions -->
<record id="glimsol_bopas_action" model="ir.actions.act_window">
<field name="name">B.O.Pull-out Authorization Slip (BOPAS)</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">glimsol.bopas</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar,graph</field>
<field name="view_id" ref="glimsol_bopas_tree"/>
<!-- <field name="search_view_id" ref="glimsol_bopas_search"/> -->
<field name="context">{}</field>
<field name="domain">[('state','not in',('draft','sent','cancel'))]</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create a B.O.- P.A.S.
</p><p>
B.O.- P.A.S quotation.
</p>
</field>
</record>
<menuitem id="glimsol_bopas_menu" action="glimsol_bopas_action" parent="base.menu_sales" sequence="10" name="B.O.- P.A.S"/>
</data>
</openerp>
데이터가 표시되지 않습니다 트리 뷰 트리 뷰에서 표시를 표시하지 않습니다 이하. 하지만 상태 "상태 인용 줄"의 상태 표시 줄이 파란색으로 배경이되게하려면이 작업을 수행해야합니다.
_defaults = {
'date_order': fields.date.context_today,
'order_policy': 'manual',
'state': 'draft',
'user_id': lambda obj, cr, uid, context: uid,
'name': lambda obj, cr, uid, context: '/',
}
도와주세요!
는
인 기록을보기 때문에 다른 사용자는 ;-) – CZoellner
하하하 사형을 죽 였죠되지 않습니다 : D ..... – weelDaw