Skip to content

[5167][ADD] purchase_exception #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 12.0
Choose a base branch
from

Conversation

nobuQuartile
Copy link

@yostashiro
Copy link
Member

@AungKoKoLin1997 Do you know why CI didn't fail?

@AungKoKoLin1997
Copy link
Contributor

Do you know why CI didn't fail?

In odoo12, I don't see there is datetime usage for preparing cron.

def _prepare_cron(self):
self.ensure_one()
return {
'name': _('Refresh Materialized View %s') % self.view_name,
'user_id': SUPERUSER_ID,
'model_id': self.env['ir.model'].search([
('model', '=', self._name)], limit=1).id,
'state': 'code',
'code': 'model._refresh_materialized_view_cron(%s)' % self.ids,
'numbercall': -1,
}

@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 5167-add-purchase_exception branch from 38b2bf8 to c0ddee2 Compare February 28, 2025 06:50
@nobuQuartile
Copy link
Author

I have finished the behaviour test in the test env.

@AungKoKoLin1997
Copy link
Contributor

This is my understanding regarding CI was not failed.
OCA CI automatically installs missing dependencies during the CI process.
It starts by setting PIP_INDEX_URL in the Dockerfile to https://wheelhouse.odoo-community.org/oca-simple-and-pypi,
which tells pip to fetch packages from OCA’s private repository instead of PyPI. However, this does not install anything automatically.
https://github.com/OCA/oca-ci/blob/2ab8a838d2e871e6db37903540849fbd9d4949f5/Dockerfile#L154

To determine required dependencies, OCA CI uses pyproject-dependencies, which extracts direct dependencies of installable addons from pyproject.toml and setup.py inside the setup/ directory
The extracted dependencies are written to test-requirements.txt, which includes both Odoo addons and external Python packages.
https://github.com/OCA/oca-ci/blob/2ab8a838d2e871e6db37903540849fbd9d4949f5/bin/oca_install_addons__deps_and_addons_path#L14-L28

481979455_3981973938732746_4553883635530899181_n

Next, OCA CI installs the dependencies using pip install -r test-requirements.txt. Since PIP_INDEX_URL is set, pip fetches missing addons (like odoo12-addon-base-exception, which corresponds to base_exception) from OCA’s package repository (wheelhouse.odoo-community.org). This ensures that CI does not fail due to missing dependencies, even if they are not present in the repository.

@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 5167-add-purchase_exception branch from f242ee8 to e2c315c Compare March 5, 2025 04:25
@AungKoKoLin1997
Copy link
Contributor

AungKoKoLin1997 commented Mar 5, 2025

The CI are included necessary modules.
Screenshot 2025-03-05 at 11 38 30

Screenshot 2025-03-05 at 11 39 57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants