I'm designing a custom app in studio with two models, a parent model called x_etsy_shops and a child module called x_etsy_shop_notices, linked through a many2one field on x_etsy_shop_notices, x_studio_etsy_shop.
The aim of this is to create a scheduler that can automatically update the published messages in my etsy shop - so far everything is working, but I have 4 text fields in x_etsy_shop_notices for setting different messages, and I also have matching text fields in x_etsy_shops.
I use the fields in x_esty_shops to store the latest published messages, but now I want to use those values for defaults in x_etsy_shop_notices model. Basically, when I create a new record in x_etsy_shop_notices, I want the defaults to be as follows;
Field in x_etsy_shop_notices | Field from x_etsy_shops |
x_studio_announcement | x_studio_current_announcement |
x_studio_sales_message | x_studio_current_sales_message |
x_studio_digital_sales_message | x_studio_current_digital_sales_message |
x_studio_policies | x_stuido_current_policies |
Based on my resarch online, I think I'm meant to use Context... I've been able to use the context to set static default text successfully, but I'm not sure how to get the value from the parent record for the default.
I'm using Odoo Studio Online running 18.3