def METHOD_NAME(self):
    if self.product_id.type == "product" and self.is_l10n_ro_record:
        if self.move_id.is_purchase_document():
            purchase = self.purchase_order_id
            if purchase and self.product_id.purchase_method == "receive":
                # Control bills based on received quantities
                if any(
                    [
                        p.l10n_ro_notice or p._is_dropshipped()
                        for p in purchase.picking_ids
                    ]
                ):
                    self = self.with_context(valued_type="invoice_in_notice")
        if self.move_id.is_sale_document():
            sales = self.sale_line_ids
            if sales and self.product_id.invoice_policy == "delivery":
                # Control bills based on received quantities
                sale = self.sale_line_ids[0].order_id
                if any(
                    [
                        p.l10n_ro_notice and not p._is_dropshipped()
                        for p in sale.picking_ids
                    ]
                ):
                    self = self.with_context(valued_type="invoice_out_notice")
    return super(AccountMoveLine, self).METHOD_NAME()