Skip to Content

Question about PR contribution rules

Hi all,

question - I've been told several times on OCA PR's that any PR should 
satisfy the following rules:

1. It needs to deal with only one module at a time, otherwise it should 
be split up

2. It needs to deal with one change only, otherwise it should be split up

3. It needs to be in one commit (unless there is good reason to have 
several commits, eg multiple authors or separating pre-commit from 
functional changes)

However, I can't find these rules in our contribution guidelines:

https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#review

Can someone point me to where this is written? Or is this not formalized 
and subject to PSC preference?

-Tom


by Tom Blauwendraat - 01:46 - 5 Jan 2026

Follow-Ups

  • Re: Question about PR contribution rules
    Hi, Tom, I think you are trying to make a gold thumb rule out of context of all the things people told you in the PRs.

    There aren't hard-written rules, as this depends on the context and the things you are doing. It may be good to set use cases on the contribution guidelines for those possibilities, but others also said in the past that the contribution guidelines are very long and hard for adding more things...

    In general, common sense should prevail, and more if you want the PR to be accepted. Put it easy to the reviewers! If the changes are a logical set, put it in one PR. Don't mix in a PR a module migration with other improvements, unless they are justified due to the version change. Don't put several unrelated improvements/fixes in the same PR for easing the reviewing/merging. Is this last one mandatory? No, you can pack them in several commits in the same PR, but then, that implies more effort for the reviewers to check it, so less chances to get it merged. What is not allowed (implicitly) is to mix in just one commit several unrelated things.

    And the contrary case: when you are splitting one logical set into several commits because it follows your development flow, committing little changes of several few lines, then you are asked to squash together those commits, as split they make no sense when you are reviewing/blaming the commit history.

    Please specify the links of such specific PRs to put the comments in context, but I have tried to make an overall landscape, and the summary is that... it depends on the context, hehe.

    Regards.

    by Pedro M. Baeza - 02:25 - 5 Jan 2026
  • Re: Question about PR contribution rules
    Hello Tom,


    1. -> I would say it should. This depends on:

        - If both modules should be bumped differently (e.g.: one patch and one minor), they should be split in different PR's.
        - Changes in modules should be grouped per module in PR's commits.

    2. -> It can be done in the same PR if atomic (and/or functional) changes have been grouped in separate commits.

    3. -> This is not mandatory IMHO, as said above, changes are grouped in separate commits (See: https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#commit-message)


    It's not written explicitly as it is linked to general development flows with git apart for the bump flow with ocabot. I would say it is maybe easier to understand for newcomers (the one thing for all) but should not be enforced like that.

    My two cents


    Le lun. 5 janv. 2026 à 13:47, Tom Blauwendraat <notifications@odoo-community.org> a écrit :
    Hi all,
    
    question - I've been told several times on OCA PR's that any PR should 
    satisfy the following rules:
    
    1. It needs to deal with only one module at a time, otherwise it should 
    be split up
    
    2. It needs to deal with one change only, otherwise it should be split up
    
    3. It needs to be in one commit (unless there is good reason to have 
    several commits, eg multiple authors or separating pre-commit from 
    functional changes)
    
    However, I can't find these rules in our contribution guidelines:
    
    https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#review
    
    Can someone point me to where this is written? Or is this not formalized 
    and subject to PSC preference?
    
    -Tom
    
    

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe


    by Denis Roussel. - 02:06 - 5 Jan 2026