Odoo中文社区可以通过以下三个域名访问:shine-it.net , odoocn.org,odoo.net.cn

原论坛用户的基本信息和发帖这里都予以保留,请注意:原论坛用户无需重新注册新用户,但是您的密码需要重置

开发人员可以登录gitter讨论组: http://gitter.im/odoo-china/Talk, 需要github账号

如果您登录系统碰到问题,请在微信公众号留言:

换货 的实现



  • 客户要求退货后直接生成退回单,在OpenERP7.0上做了简单的开发:

    <record id="ssf_view_stock_return_picking_form" model="ir.ui.view">
                <field name="name">ssf.ssf_view_stock_return_picking_form</field>
                <field name="model">stock.return.picking</field>
                <field name="inherit_id" ref="stock.view_stock_return_picking_form"/>
                <field name="arch" type="xml">
                    <button string="Cancel" position="after">
                        <button name="create_change" string="换货" type="object" class="oe_highlight"/>
                    </button>
                </field>
            </record>

    class stock_return_picking(osv.osv_memory):
        _inherit = 'stock.return.picking'

        def create_change(self, cr, uid, ids, context=None):
            res = self.create_returns(cr, uid, ids, context=context)
            # it is build like this:
            # 'domain': "[('id', 'in', ["+str(new_picking)+"])]",
            new_id = int(eval(res['domain'])[0][2][0])
            ctx = context.copy()
            ctx.update({'active_id':new_id})
            change = self.create_returns(cr, uid, ids, context=ctx)
            return res



  • 客户要求退货后直接生成退回单,在OpenERP7.0上做了简单的开发:

    <record id="ssf_view_stock_return_picking_form" model="ir.ui.view">
                <field name="name">ssf.ssf_view_stock_return_picking_form</field>
                <field name="model">stock.return.picking</field>
                <field name="inherit_id" ref="stock.view_stock_return_picking_form"/>
                <field name="arch" type="xml">
                    <button string="Cancel" position="after">
                        <button name="create_change" string="换货" type="object" class="oe_highlight"/>
                    </button>
                </field>
            </record>

    class stock_return_picking(osv.osv_memory):
        _inherit = 'stock.return.picking'

        def create_change(self, cr, uid, ids, context=None):
            res = self.create_returns(cr, uid, ids, context=context)
            # it is build like this:
            # 'domain': "[('id', 'in', ["+str(new_picking)+"])]",
            new_id = int(eval(res['domain'])[0][2][0])
            ctx = context.copy()
            ctx.update({'active_id':new_id})
            change = self.create_returns(cr, uid, ids, context=ctx)
            return res


登录后回复
 

与 Odoo 中文社区 的连接断开,我们正在尝试重连,请耐心等待