跳转至内容
  • 版块
  • 标签
  • 热门
  • 用户
  • 群组
皮肤
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(Flatly)
  • 不使用皮肤
折叠

Odoo 中文社区

F

fanzhang1990

@fanzhang1990
关于
帖子
11
主题
2
群组
0
粉丝
0
关注
0

帖子

最新 最佳 有争议的

  • OpenERP Server Error
    F fanzhang1990

    我想在创建sale_order_line的时候,选择产品后,在discount里面输入数字,price_unit里面就跟着变化。但是每次总是弹出错误
    ProgrammingError: operator does not exist: integer = boolean
    LINE 1: ...d FROM "product_product" WHERE product_product.id IN (false)...
    HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.

    但是关闭这个弹窗后还能实现这个功能。
    以下是是我写的代码。
    def on_change_price_unit(self, cr, uid, ids,price_unit,product,pricelist,qty=0,uom=False,partner_id=False,date_order=False,context=None):
      context = context or {}
      result={}
      price = self.pool.get('product.pricelist').price_get(cr, uid, [pricelist],product,qty or 1.0, partner_id,{'uom': uom or result.get('product_uom'),'date': date_order,})[pricelist]
      result.update({'price_unit':price - price*discount1/100})
      return {'value':result}
    google这个问题,说是数据库问题,请高人指教


  • Xml继承错误
    F fanzhang1990

    我后来把form[@string='Sales Order Lines version=7.0']/直接写成form就行了。我检查了form后面的字符串没错,搞不明白


  • Xml继承错误
    F fanzhang1990

    我想在sale_order_line的form上添加两个字段,但是总报错
    ValidateError    Error occurred while validating the field(s) arch: Invalid XML for View Architecture!

    <openerp>
      3        <data>
      4                <record model="ir.ui.view" id="sale_order_line_add_view">
      5                <field name="name">sale.order.line.add.form</field>
      6                <field name="model">sale.order</field>
      7                <field name="inherit_id" ref="sale.view_order_form"/>
      8                <field name="arch" type="xml">
      9                         
    16                        <xpath expr="/form/sheet/notebook/page[@string='Order Lines']/field[@name='order_line']/form[@string='Sales Order Lines version=7    .0']/group/group/field[@name='price_unit']" position="after">
    17                                <field name="origin_price"/>
    18                                <field name="discount1"/>
    19                        </xpath>
    20
    21                </field>
    22                </record>
    23
    24
    25        </data>
    26 </openerp>



  • OpenERP对象跟数据库数据的联系
    F fanzhang1990

    多谢指导啊


  • 新手常见开发问题总结分享(更新中)
    F fanzhang1990

    多谢指教


  • OpenERP对象跟数据库数据的联系
    F fanzhang1990

    多谢高手指教!还有一个问题 在sale_order_line中
      for this in self.browse(cr,uid,ids,context=context):
            context['pricelist']=this.order_id.pricelist_id.id
              sale_order_line类中有order_id字段,它manytoone 类sale_order,而sale_order类中有字段pricelist_id 
              他是取得pricelist一条记录的id吗?这个.太多了,不太理解,请指教


  • 新手常见开发问题总结分享(更新中)
    F fanzhang1990

    楼主,请指教。context能说得详细点吗。context[]的作用,什么叫上下文信息。context到底是做什么的?


  • OpenERP对象跟数据库数据的联系
    F fanzhang1990

    请教:
    res=dict.fromkeys(ids,False)
      for this in self.browse(cr,uid,ids,context=context):
              res[this.id]=0
      this代表对象,this.id代表一个具体的record?


  • OpenERP对象跟数据库数据的联系
    F fanzhang1990

    那么,for this in self.browse(cr,uid,ids,context=context):


  • 销售订单总折扣模块
    F fanzhang1990

    楼主,我是个新手。请教你一个问题,函数中代码中返回值都是字典,而字段中需要的是其他类型值,像float。这个怎么理解啊


  • 新手常见开发问题总结分享(更新中)
    F fanzhang1990

    楼主,请教你一个问题。对context这个字典理解吗?
    在sale.order.line的中
    for this in self.browse(cr,uid,ids,context=context)
    context['pricelist']=this.order_id.pricelist_id.id  //这句话什么意思

  • 登录

  • 没有帐号? 注册

  • 登录或注册以进行搜索。
  • 第一个帖子
    最后一个帖子
0
  • 版块
  • 标签
  • 热门
  • 用户
  • 群组