<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Trishan Fernando</title>
    <description>The latest articles on DEV Community by Trishan Fernando (@trishan_fernando).</description>
    <link>https://dev.to/trishan_fernando</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2854350%2F6cbae785-e541-47b5-a51a-a284ca8fbe7d.jpg</url>
      <title>DEV Community: Trishan Fernando</title>
      <link>https://dev.to/trishan_fernando</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/trishan_fernando"/>
    <language>en</language>
    <item>
      <title>GitPulse: GitHub Trending Tool</title>
      <dc:creator>Trishan Fernando</dc:creator>
      <pubDate>Tue, 23 Dec 2025 11:41:13 +0000</pubDate>
      <link>https://dev.to/trishan_fernando/gitpulse-github-trending-tool-2183</link>
      <guid>https://dev.to/trishan_fernando/gitpulse-github-trending-tool-2183</guid>
      <description>&lt;p&gt;Learning-by-Building &lt;/p&gt;

&lt;p&gt;Focus Built a GitHub “Trending” CLI in Python — not to solve a big problem, but to learn how real CLI tools feel, ship, and scale.&lt;/p&gt;

&lt;p&gt;Read More in Medium...&lt;br&gt;
&lt;a href="https://trishan-fernando.medium.com/gitpulse-github-trending-tool-8ab2c4257da3" rel="noopener noreferrer"&gt;Medium Link&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>github</category>
      <category>restapi</category>
      <category>cli</category>
    </item>
    <item>
      <title>Comet Browser : Perplexity’s Thinking Browser</title>
      <dc:creator>Trishan Fernando</dc:creator>
      <pubDate>Wed, 08 Oct 2025 15:48:30 +0000</pubDate>
      <link>https://dev.to/trishan_fernando/comet-1co5</link>
      <guid>https://dev.to/trishan_fernando/comet-1co5</guid>
      <description>&lt;p&gt;We’ve all been living in browsers for years now — Chrome, Edge, Safari… they all kinda feel the same. Open tabs, search things, maybe add a couple of extensions, repeat. Useful? Sure. Fun? Not so much.&lt;/p&gt;

&lt;p&gt;And then Comet from Perplexity. And honestly, it doesn’t just feel like another browser — it feels like a new class. It’s as if having an AI buddy floating right amidst your browsing life.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://pplx.ai/trishan-fernando" rel="noopener noreferrer"&gt;Get Early Access &amp;amp; Download Comet&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Comet is not available for free it needs the 200$ Perplexity Subscription with an invitation. But you can get it through partners for free if you are a university Student.&lt;/p&gt;

&lt;p&gt;Get Early Access With Your University Email.Use your University email to Verify that you are a student&lt;/p&gt;

&lt;p&gt;&lt;a href="https://pplx.ai/trishan-fernando" rel="noopener noreferrer"&gt;Get Early Access &amp;amp; Download Comet&lt;br&gt;
&lt;/a&gt;&lt;br&gt;
What’s the excitement about?&lt;/p&gt;

&lt;p&gt;Comet isn’t all about “opening sites faster.” It’s about doing things with your browser instead of just staring at it.&lt;/p&gt;

&lt;p&gt;Got 10 tabs open doing research? Tell Comet to summarize them into one neat note.&lt;/p&gt;

&lt;p&gt;Shopping for a laptop? Have it search deals on websites and show you the top &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx06qzc3vdn8ncqtynxaz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx06qzc3vdn8ncqtynxaz.png" alt=" " width="800" height="526"&gt;&lt;/a&gt;choices.&lt;/p&gt;

&lt;p&gt;Writing an email? Cross out a couple of pages and voila — it writes something that even sounds logical.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3h17433bpx6rc0nof3zu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3h17433bpx6rc0nof3zu.png" alt=" " width="800" height="526"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Doing a project? Keep your tabs + notes + AI summaries all bundled up in a neat space you can return to.&lt;/p&gt;

&lt;p&gt;It is like the distinction between you driving a vehicle and having a vehicle that helps you drive, monitors your schedule, and maybe even helps you save money on fuel in the bargain.&lt;/p&gt;

&lt;p&gt;What people are saying&lt;/p&gt;

&lt;p&gt;I’ve been skimming through Reddit, X, and LinkedIn, and the vibe is clear: folks are hyped. People call it “futuristic,” “the only browser that actually boosts productivity,” and “perfect for research.” Students, writers, and even devs juggling docs love that it cuts down tab chaos.&lt;/p&gt;

&lt;p&gt;Of course, there’s a catch — some grumblings that it’s invite-only for certain plans, and pricing debates. Totally fair. But that’s what you get when you’re not building another browser, you’re trying to rethink how we browse period.&lt;/p&gt;

&lt;p&gt;One heads-up though ???&lt;/p&gt;

&lt;p&gt;AI browsers are new territory. Security researchers raise the alarms for dangers like nefarious sites trying to trick the AI into making bad decisions (autofilling data, risky clicks, etc.). So yeah — Comet does have a future vibe to it, but maybe don’t fling your banking login data at it just yet.&lt;/p&gt;

&lt;p&gt;Why I think this matters&lt;/p&gt;

&lt;p&gt;Comet is the first browser I’ve used that truly seems to be built for the way we actually work in 2025: multitasking, info overload, constant context-switching. Instead of just allowing us to have more tabs, it processes them.&lt;/p&gt;

&lt;p&gt;And for real? Once you get a taste of it, browsing with a “regular” browser again feels… kinda like using a Nokia brick phone once you’ve had a smartphone.&lt;/p&gt;

&lt;p&gt;And Comet is only given access to their partners only and this need to pay 200$(Perplexity Pro) If you are an university student , you can get the early access from the below invitation link for 100% Free.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://pplx.ai/trishan-fernando" rel="noopener noreferrer"&gt;Get Early Access to download Comet&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Stay Tuned with me to more updated Stuff in technology !&lt;/p&gt;

</description>
      <category>ai</category>
      <category>learning</category>
      <category>webdev</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Adding Field Attributes to multiple fields at once in Odoo</title>
      <dc:creator>Trishan Fernando</dc:creator>
      <pubDate>Wed, 02 Apr 2025 18:54:19 +0000</pubDate>
      <link>https://dev.to/trishan_fernando/adding-field-attributes-to-multiple-fields-at-once-in-odoo-h0l</link>
      <guid>https://dev.to/trishan_fernando/adding-field-attributes-to-multiple-fields-at-once-in-odoo-h0l</guid>
      <description>&lt;p&gt;When developing in Odoo, you might encounter situations where you need to add the same attribute to multiple fields. For instance, imagine you have a model with 20–30 fields and later decide to enable tracking on all of them. Adding the tracking attribute manually to each field definition would be time-consuming and potentially error-prone.&lt;/p&gt;

&lt;p&gt;This article explores how to leverage Odoo’s fields_get() method to identify fields and modify their attributes programmatically, saving significant development time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understanding fields_get()&lt;/strong&gt;&lt;br&gt;
Odoo provides a built-in method called fields_get() that returns all fields and their attributes for a specific model. This method has two optional arguments: field name and field attributes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fztavmi6sse3bwnj8t7mv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fztavmi6sse3bwnj8t7mv.png" alt="Definition of the function" width="800" height="334"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example Usage&lt;/strong&gt;&lt;br&gt;
Here’s a simple example of how to use fields_get() to view all fields and their attributes in a model:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxl3f6g3073erb46jdphd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxl3f6g3073erb46jdphd.png" alt="Example usage code snippet" width="800" height="307"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When executed, this function will output something like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fda3hz4744hol041j6aou.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fda3hz4744hol041j6aou.png" alt="example output" width="800" height="488"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Practical Use Case:&lt;/strong&gt; Adding Tracking to Multiple Fields&lt;br&gt;
Let’s look at a practical scenario where this approach is particularly useful. Imagine you’ve created a model with numerous fields, and after development, you decide that all fields should be tracked for audit purposes. Instead of modifying each field definition individually, you can use the following function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def add_attribute(self):
    model_obj = self.env['your.model.name']
    fields = model_obj.fields_get()
    print(type(fields))

    for field_name, field_attrs in fields.items():

        # Get the field object from the model's _fields dictionary
        field_obj = model_obj._fields.get(field_name)

        if field_obj:

            # Check if tracking attribute is not already set or is False
            if not getattr(field_obj, 'tracking', False):

                # Skip fields that cannot be tracked
                if field_obj.type == 'one2many' or (field_obj.compute and not field_obj.store):
                    print(f"Field {field_name} cannot be tracked (one2many or computed non-stored).")
                    continue

                # Set tracking attribute to True
                field_obj.tracking = True
                print(f"Field {field_name} is now tracked.")
            else:
                print(f"Field {field_name} is already tracked.")
        else:
            print(f"Field {field_name} not found in model.")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This function iterates through all fields in the specified model and sets the tracking attribute to True for eligible fields. It also includes validation to skip fields that cannot be tracked (like one2many fields or computed non-stored fields).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Beyond Tracking: Additional Applications&lt;/strong&gt;&lt;br&gt;
While our example focuses on adding tracking, this technique can be applied to modify any field attribute programmatically. Some other potential uses include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Adding specific groups to field access rights&lt;/li&gt;
&lt;li&gt;Modifying string attributes for internationalization&lt;/li&gt;
&lt;li&gt;Changing widget attributes for better UI display&lt;/li&gt;
&lt;li&gt;Setting default values across multiple fields&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Important Considerations&lt;/strong&gt;&lt;br&gt;
When using this approach, keep these points in mind:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Environment Impact:&lt;/strong&gt; This modification happens at runtime and may not persist after server restart unless you’re modifying the actual field definitions in the Python code.&lt;br&gt;
&lt;strong&gt;Production Caution:&lt;/strong&gt; Be careful when applying this in production environments, as modifying field attributes can have system-wide effects.&lt;br&gt;
&lt;strong&gt;Performance:&lt;/strong&gt; For very large models, iterating through all fields could impact performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
This approach provides an alternative method for modifying field attributes in Odoo models with multiple fields. While direct field definition remains the standard practice for most development scenarios, understanding how to programmatically modify attributes can be useful in specific situations where bulk changes are needed.&lt;/p&gt;

&lt;p&gt;The technique leverages Odoo’s built-in functionality to access field definitions, offering a way to make consistent changes across many fields without manual intervention.&lt;/p&gt;

&lt;p&gt;Stay Tuned !&lt;/p&gt;

</description>
      <category>odoo</category>
      <category>python</category>
    </item>
    <item>
      <title>OWL JS 01 — Why Odoo Created OWL: A Framework Built for Modularity</title>
      <dc:creator>Trishan Fernando</dc:creator>
      <pubDate>Mon, 31 Mar 2025 20:25:56 +0000</pubDate>
      <link>https://dev.to/trishan_fernando/owl-js-01-why-odoo-created-owl-a-framework-built-for-modularity-3n99</link>
      <guid>https://dev.to/trishan_fernando/owl-js-01-why-odoo-created-owl-a-framework-built-for-modularity-3n99</guid>
      <description>&lt;p&gt;In the JavaScript ecosystem filled with established frameworks like React and Vue, Odoo's decision to create their own framework—OWL (Odoo Web Library)—might seem counterintuitive. After all, why reinvent the wheel? This article explores the key reasons behind this strategic choice and highlights what makes OWL uniquely suited for Odoo's specific needs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Core Challenge: Extreme Modularity&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At the heart of Odoo's decision lies one fundamental characteristic: &lt;strong&gt;Odoo is extremely modular&lt;/strong&gt;. This means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Core components don't know beforehand what files will be loaded or executed&lt;/li&gt;
&lt;li&gt;The UI state is determined entirely at runtime&lt;/li&gt;
&lt;li&gt;Standard build toolchains aren't viable&lt;/li&gt;
&lt;li&gt;Odoo isn't just an application with a UI; it's an application that generates a dynamic UI&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This modularity creates unique requirements that most established frameworks aren't designed to address.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Considerations Behind Creating OWL&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Technical Independence&lt;/strong&gt;&lt;br&gt;
Odoo needed to maintain control over their technology stack without depending on decisions made by large companies like Facebook (React) or Google. If these companies changed their licensing or technical direction, it could create significant problems for Odoo's specialized needs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Class Components&lt;/strong&gt;&lt;br&gt;
While modern frameworks are moving away from class components toward functional approaches, Odoo specifically benefits from class-based architecture:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Inheritance provides an effective way to share code between generic components&lt;/li&gt;
&lt;li&gt;Each class method serves as an extension point for addons&lt;/li&gt;
&lt;li&gt;Components can be monkey-patched to add behavior from outside&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. JIT Template Compilation&lt;/strong&gt;&lt;br&gt;
Odoo's dynamic nature requires just-in-time compilation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Templates are stored as XML in a database and customized via XPaths&lt;/li&gt;
&lt;li&gt;Templates need to be fetched and compiled at the last possible moment&lt;/li&gt;
&lt;li&gt;The system must be able to generate and compile templates at runtime&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. Minimal Tooling Requirements&lt;/strong&gt;&lt;br&gt;
OWL is designed to work with minimal mandatory tooling:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Templates are compiled by the browser using built-in XML parsers&lt;/li&gt;
&lt;li&gt;Components can be written with template strings&lt;/li&gt;
&lt;li&gt;The framework can be integrated with a simple &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag&lt;/li&gt;
&lt;li&gt;No complex build pipeline is required on production servers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;5. XML-Based Templates&lt;/strong&gt;&lt;br&gt;
Odoo stores templates as XML documents, allowing for powerful customization through XPaths. This feature is central to Odoo's modularity but isn't well-supported by other frameworks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Simplified Developer Experience&lt;/strong&gt;&lt;br&gt;
OWL prioritizes straightforward APIs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Uses familiar class-based components&lt;/li&gt;
&lt;li&gt;Features an explicit reactivity system&lt;/li&gt;
&lt;li&gt;Implements clear scoping rules&lt;/li&gt;
&lt;li&gt;Avoids unnecessary complexity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;7. Optional Reactivity and Concurrency&lt;/strong&gt;&lt;br&gt;
OWL offers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A reactive system that can be optionally disabled when not needed&lt;/li&gt;
&lt;li&gt;A powerful yet simple concurrent mode for managing asynchronous state changes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Creating OWL wasn't a decision Odoo made lightly. While established frameworks excel in their designed contexts, Odoo's unique requirements demanded something different. OWL represents a framework built specifically for extreme modularity, just-in-time compilation, and developer accessibility—making it the right tool for Odoo's specialized ecosystem.&lt;/p&gt;

&lt;p&gt;Stay Tuned for more articles...&lt;/p&gt;

</description>
      <category>odoo</category>
      <category>owl</category>
      <category>odooddevelopment</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
