How to include other model/origin in shipment in (incoming moves)

Hi,

Our warehouse going to implement ASN (Advance Shipping Notice).
I want to use shipment Supplier to get the ASN through Incoming moves.

ASN here is same as purchase_line and after confirm ASN, it will write into stock_move with from_location = supplier type, to_location= input (storage type).

In the move class, i added the _get_origin with new model “goods.in.advice”.
When click on “Shipment Supplier” add (incoming moves), it still cannot select the goods.in.advice model. But it select on origin only from purchase_line. Below I attached the sql from log.
How to add the new model in “incoming_moves”?

SELECT "a"."id" AS "id",                                                                                                                                                 "a"."unit_price" AS "unit_price",
       "a"."currency" AS "currency",
       "a"."quantity" AS "quantity",
       "a"."to_storage_location" AS "to_storage_location",
       "a"."write_date" AS "write_date",
       "a"."effective_date" AS "effective_date",
       "a"."stock_unit" AS "stock_unit",
       "a"."to_location" AS "to_location",
       "a"."state" AS "state",
       "a"."unit_load" AS "unit_load",
       "a"."product" AS "product",
       "a"."create_uid" AS "create_uid",
       "a"."package" AS "package",
       "a"."lot" AS "lot",
       "a"."cost_price" AS "cost_price",
       "a"."uom" AS "uom",
       "a"."write_uid" AS "write_uid",
       "a"."from_location" AS "from_location",
       "a"."company" AS "company",
       "a"."internal_quantity" AS "internal_quantity",
       "a"."create_date" AS "create_date",
       "a"."from_storage_location" AS "from_storage_location",
       "a"."planned_date" AS "planned_date",
       cast(extract(\'EPOCH\' FROM COALESCE("a"."write_date", "a"."create_date")) AS VARCHAR) AS "_timestamp" FROM "stock_move" AS "a" WHERE (((("a"."from_location" = 5) AND ("a"."to_location" = 1) AND ("a"."company" = 1) AND **(((CAST(SUBSTRING("a"."origin" FROM (POSITION(\',\' IN "a"."origin") + 1)) AS  INT4) IN (SELECT "b"."id" AS "id" FROM "purchase_line" AS "b" LEFT JOIN "purchase_purchase" AS "c" ON ("c"."id" = "b"."purchase") WHERE ((("c"."party" = 2)  AND ((("c"."company" = 1))))))) AND ("a"."origin" ILIKE \'purchase.line,%\'))) AND ("a"."shipment" IS NULL) AND ("a"."from_location" = 5) AND ("a"."state" = \'draft\') AND ("a"."to_location" = 1)) OR FALSE)
AND ((("a"."company" = 1))))
ORDER BY "a"."id" DESC
LIMIT 1000

Hi,

Sorry, I am going too deep. It was my wrong understanding.
stock.shipment.in > incoming_moves at purchase module added add_remove condition of supplier.

My understanding is fields.function(onetomany) using “getter” to get value and compare. However, after troubleshooting, it used “searcher” to get condition.

After I inherit the “search_supplier” from purchase/stock.py, the result shown expectedly.

Thank

Best regards