How to Contribute

Thank you for your interest in contributing to AgriOS! This guide explains how to get involved.

Ways to Contribute

Code Contributions

  • Fix bugs reported in GitHub Issues

  • Implement new features from the roadmap

  • Improve existing functionality

  • Add or improve tests

Documentation

  • Fix typos and improve clarity

  • Add missing documentation

  • Translate documentation

  • Create tutorials and guides

Testing and Feedback

  • Report bugs with detailed reproduction steps

  • Suggest features and improvements

  • Test pre-release versions

  • Provide feedback on usability

Community Support

  • Answer questions in GitHub Discussions

  • Help other users troubleshoot issues

  • Share your AgriOS implementation experiences

Contribution Workflow

1. Find or Create an Issue

Before starting work, check GitHub Issues for existing discussions:

  • Look for issues labeled good first issue for newcomers

  • Check help wanted labels for priority items

  • If your idea isn’t listed, open a new issue to discuss it

2. Fork the Repository

# Fork on GitHub, then clone your fork
git clone https://github.com/YOUR-USERNAME/AgriOS.git
cd AgriOS

# Add upstream remote
git remote add upstream https://github.com/advanceinsight/AgriOS.git

3. Create a Branch

# Sync with upstream
git fetch upstream
git checkout main
git merge upstream/main

# Create feature branch
git checkout -b feature/your-feature-name

Branch naming conventions:

  • feature/description - New features

  • fix/description - Bug fixes

  • docs/description - Documentation changes

4. Make Your Changes

Follow these guidelines:

  • Write clear, readable code

  • Follow Odoo coding standards

  • Add tests for new functionality

  • Update documentation as needed

  • Keep commits focused and atomic

5. Test Your Changes

# Run tests for your module
./odoo-bin -i your_module --test-enable -d test_db --stop-after-init

Ensure:

  • All existing tests pass

  • New functionality has test coverage

  • No linting errors

6. Submit a Pull Request

# Push your branch
git push origin feature/your-feature-name

Then on GitHub:

  1. Open a Pull Request against the main branch

  2. Fill in the PR template with: - Description of changes - Related issue numbers - Testing performed

  3. Wait for review feedback

Pull Request Guidelines

Good PRs Are:

  • Focused: One feature or fix per PR

  • Tested: Include tests and confirm they pass

  • Documented: Update relevant documentation

  • Described: Clear explanation of what and why

PR Review Process

  1. Maintainers will review your PR

  2. Address any feedback or requested changes

  3. Once approved, a maintainer will merge your PR

  4. Your contribution will be included in the next release

Coding Standards

Python

Follow Odoo coding guidelines:

  • Use meaningful variable and function names

  • Add docstrings for public methods

  • Use _ prefix for private methods

  • Keep methods focused and reasonably sized

class FarmerGroup(models.Model):
    _name = 'farmer.group'
    _description = 'Farmer Group'

    name = fields.Char(string='Name', required=True)

    def _compute_member_count(self):
        """Compute the number of farmers in this group."""
        for group in self:
            group.member_count = len(group.farmer_ids)

XML Views

  • Use clear, descriptive IDs

  • Follow naming conventions: model_name_view_type

  • Keep views organized and readable

Commits

Write clear commit messages:

[module] Short description (50 chars max)

Longer explanation if needed. Explain what and why,
not how. Reference related issues.

Fixes #123

Examples:

  • [agrios_farmer] Add validation for farmer phone numbers

  • [agrios_trade] Fix calculation of total trade value

  • [docs] Update installation guide for Odoo 18

Getting Help

  • GitHub Discussions: Ask questions and discuss ideas

  • GitHub Issues: Report bugs or request features

  • Documentation: Check this documentation first

Thank you for contributing to AgriOS!