Skip to content
  • Categories
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • 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

  • Default (Flatly)
  • No Skin
Collapse

Odoo 中文社区

  1. Home
  2. Categories
  3. Python 开发
  4. 关于动态domain域值,相关提问。

关于动态domain域值,相关提问。

Scheduled Pinned Locked Moved Python 开发
2 Posts 2 Posters 1.6k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    franciewang
    wrote on last edited by
    #1

    现在有一个需求是这样的: 1、首先【库位】这个档案,有一个 “仓库”的字段 2、现在某单据存在“仓库”的字段(store_id),此单据明细 存在 “库位”的字段(goods_place_id) 3、现在要求,更改单据store_id时, 明细中的 goods_place_id 只能选择 【库位】档案中 “仓库”字段 与 store_id相同的 库位。此需求如何实现?

    1 Reply Last reply
    0
    • H Offline
      H Offline
      handen
      wrote on last edited by
      #2

      这个应该是两个两个数据模型吧。可以添加一个关系型数据,例如:many2one,或者many2many这种的来使得两个模型之间有联系,你可以通过def方法来实现。因为不知道你们的项目是什么样子的。你可以试试?

      1 Reply Last reply
      0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Tags
      • Popular
      • Users
      • Groups