Odoo 10 - 将记录添加到现有记录集中

Odoo 10 - Add a record to an existing recordset

我有:

myset = self.env['sale.order'].search(......)

并且:

sale_order_foo_record = self.env['sale.order'].create(....)

如何将 sale_order_foo_record 添加到 myset

你可以这样做:

myset = self.env['sale.order'].search(...)
sale_order_foo_record = self.env['sale.order'].create(...)
myset |= sale_order_foo_record

或者:

myset = self.env['sale.order'].search(...)
myset |= self.env['sale.order'].create(...)

或者:

myset = self.env['sale.order'].search(...) + self.env['sale.order'].create(...)