profile
viewpoint
Eduardo Magdalena emagdalenaC2i Change 2 improve www.c2i.es Soy ingeniero mecánico, hice un Máster en Dirección de Empresas TIC en la Escuela de Negocios NovacaixaGalicia y soy un apasionado por las nuevas tecnologías

Change2improve/C2i_3Dconnexion_On 1

Configuration files for the 3Dconnexion CADMouse and SpacePilot Pro

Change2improve/account-analytic 0

Odoo Account Analytic Related Addons

Change2improve/account-closing 0

Odoo Accountant closing tools

Change2improve/account-consolidation 0

Odoo Account Consolidation Addons

Change2improve/account-financial-reporting 0

Financial reports for Odoo

Change2improve/account-financial-tools 0

Odoo Accountant Financial Tools and Utils

Change2improve/account-fiscal-rule 0

Odoo Taxes & Fiscal Rules Management

Change2improve/account-invoice-reporting 0

Odoo Invoicing reports

issue openedOCA/hr

V13: can not search by hr field when using One2many with "res.users"

Hello, I define a field :

user_id = fields.Many2one('res.users', string='Assigned to', index=True, tracking=True)

and has a from view include:

  <group>
      <field name="active" invisible="1"/>
      <field name="user_id" string="Order Manager" attrs="{'readonly':[('active','=',False)]}"/>
      <field name="partner_id" string="Customer" invisible="True"/>
  </group>

filter with hr field department_id in this view, and I can see the browse sent this request:

{"jsonrpc":"2.0","method":"call","params":
{"model":"res.users",
"domain":[["department_id","ilike","IT"]],"fields":["name","login","lang","login_date","state","company_id"],
"limit":80,"sort":"",
"context":{"lang":"en_US","tz":"Hongkong","uid":2,"allowed_company_ids":[6],"bin_size":true}},"id":393650401}

then get response with no records. The code in hr module, file res_users

    employee_id = fields.Many2one('hr.employee', string="Company employee",
        compute='_compute_company_employee', search='_search_company_employee', store=False)
# some code ignore
    department_id = fields.Many2one(related='employee_id.department_id', readonly=False, related_sudo=False)

The problem is how can I get user(user_id) in form view use hr field filtering?

created time in 2 minutes

PR opened OCA/rma

[14.0][ADD] repair_comment_template: new module to allow to define comment templates in repair orders

Proposed changes

I've created a new module repair_comment_template to allow to use of comments in the repair orders. I've checked if all unit tests are still running.

Types of changes

  • [ ] Bugfix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Migration Update

Checklist

  • [x] I have read the CONTRIBUTING doc
  • [x] I have signed the CLA
  • [x] Lint and unit tests pass locally with my changes
  • [x] I have added tests that prove my fix is effective or that my feature works
  • [x] I have updated the necessary documentation
+831 -0

0 comment

17 changed files

pr created time in an hour

PR opened odoo/odoo

[IMP] mrp_workorder: Update WO readiness behaviour
  • The work order state changes based on the availability of the components
  • So if all BOM components are available the state of the first WO is set to ready
  • The color of ready in the WO tree editable view will stay blue as long as done reserves the green color
  • If one or multiple components are not available, the state of the first WO is set to waiting
  • The color of waiting in the WO tree editable view is set to orange
  • By default To launch takes workorder_ready_count so it counts only ready WOs
  • The user can always process the WO without restrictions even if the WO state is waiting

Task ID: 2426773

+8 -4

0 comment

2 changed files

pr created time in 2 hours

PR closed odoo/odoo

[IMP] mrp_workorder: Update WO readiness behaviour
  • The work order state changes based on the availability of the components
  • So if all BOM components are available the state of the first WO is set to ready
  • The color of ready in the WO tree editable view will stay blue as long as done reserves the green color
  • If one or multiple components are not available, the state of the first WO is set to waiting
  • The color of waiting in the WO tree editable view is set to orange
  • By default To launch takes workorder_ready_count so it counts only ready WOs
  • The user can always process the WO without restrictions even if the WO state is waiting

Task ID: 2426773

+8 -4

1 comment

2 changed files

nouraellm

pr closed time in 2 hours

PR opened OCA/rma

[14.0][ADD] repair_line_forecast_qty: new module to show qty in stock in repair lines.

Proposed changes

I've created a new module repair_line_forecast_qty that shows qty in stock in repair lines.

Types of changes

  • [ ] Bugfix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Migration Update

Checklist

  • [x] I have read the CONTRIBUTING doc
  • [x] I have signed the CLA
  • [x] Lint and unit tests pass locally with my changes
  • [x] I have added tests that prove my fix is effective or that my feature works
  • [x] I have updated the necessary documentation
+742 -0

0 comment

12 changed files

pr created time in 2 hours

pull request commentOCA/product-attribute

[12.0][FIX] product_pricelist_supplierinfo: Convert price to UOM on the Sale

Hi @JulioSerna This is the PR for the issue with the difference between supplierinfo uom and sale line uom, could you review it? please :smile:

CarmenMiranda

comment created time in 2 hours

PR opened OCA/product-attribute

[12.0][FIX] product_pricelist_supplierinfo: Convert price to UOM on the Sale

If we have a product with a supplier with a UOM "A" but the product is sold with a UOM "B" the price we are getting is the same no matter the UOM. For example: Product with the price 1200 per Dozen and we sell a 1 unit we are getting the price of 1200 for that unit when we should be obtaining 100.

With these changes, we are converting the price to the UOM that is being used on the sale or the default on the product. Also, a test was added to prove the previous behaviour.

+43 -0

0 comment

2 changed files

pr created time in 2 hours

delete branch onshape-public/configurator-example

delete branch : dependabot/maven/com.fasterxml.jackson.core-jackson-databind-2.10.0.pr1

delete time in 3 hours

PR closed onshape-public/configurator-example

Bump jackson-databind from 2.9.10.3 to 2.10.0.pr1 dependencies java

Bumps jackson-databind from 2.9.10.3 to 2.10.0.pr1. <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/FasterXML/jackson/commits">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+1 -1

1 comment

1 changed file

dependabot[bot]

pr closed time in 3 hours

pull request commentonshape-public/configurator-example

Bump jackson-databind from 2.9.10.3 to 2.10.0.pr1

Superseded by #26.

dependabot[bot]

comment created time in 3 hours

PR opened onshape-public/configurator-example

Bump jackson-databind from 2.9.10.3 to 2.9.10.7

Bumps jackson-databind from 2.9.10.3 to 2.9.10.7. <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/FasterXML/jackson/commits">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+1 -1

0 comment

1 changed file

pr created time in 3 hours

pull request commentOCA/delivery-carrier

[ADD] Add new module delivery_postlogistics

Are we not missing this specific method rate_shipment method which was implemented in 12.0 https://github.com/OCA/delivery-carrier/blob/e518473604ec38eb416420fe0fb38227960b0f5d/delivery_carrier_label_postlogistics/models/delivery.py#L203

Hi @TDu, thanks for reviewing, you are right, added back

phuctranerp

comment created time in 3 hours

PR opened odoo/odoo

[IMP] mrp_workorder: Update WO readiness behaviour
  • The work order state changes based on the availability of the components
  • So if all BOM components are available the state of the first WO is set to ready
  • The color of ready in the WO tree editable view will stay blue as long as done reserves the green color
  • If one or multiple components are not available, the state of the first WO is set to waiting
  • The color of waiting in the WO tree editable view is set to orange
  • By default To launch takes workorder_ready_count so it counts only ready WOs
  • The user can always process the WO without restrictions even if the WO state is waiting

Task ID: 2426773

+8 -4

0 comment

2 changed files

pr created time in 3 hours

push eventodoo/documentation-user

Odoo Translation Bot

commit sha 3cdb81c3c42600be8543bb7a5d268341a5b68c5c

[I18N] Update translation terms from Transifex

view details

Valentino

commit sha 665e651d9d5a414181bbd1dac370802404337e30

[IMP] localization: add "webinars" section to Argentina and Colombia The change is due to a request to add webinars we had per localization to improve the visibility of this as a tool both for customers and Odooers. Why at the beginning? This is because is the first thing you see when accessing the documentation. This is a minor change.

view details

push time in 3 hours

PR closed odoo/documentation-user

[ADD] Minor change - Webinars on top l10n_ar content improvement

l10n_ar (Argentina):

The change is due to a request to add webinars we had per localization to improve the visibility of this as a tool both for customers and Odooers. Why at the beginning? This is because is the first thing you see when accessing the documentation.

This is a minor change.

+7 -0

1 comment

1 changed file

vbe-odoo

pr closed time in 3 hours

pull request commentodoo/documentation-user

[ADD] Minor change - Webinars on top l10n_ar

handled in #835

vbe-odoo

comment created time in 3 hours

pull request commentodoo/documentation-user

[ADD] Minor change - Webinars on top l10n_co

closes #833
closes #834 closes #836

vbe-odoo

comment created time in 3 hours

push eventodoo/documentation-user

Valentino

commit sha f8e01226d49380c3788e82b581fdbbf4b9a528d2

[IMP] localization: add "webinars" section to Chile The change is due to a request to add webinars we had per localization to improve the visibility of this as a tool both for customers and Odooers. Why at the beginning? This is because is the first thing you see when accessing the documentation. This is a minor change.

view details

push time in 3 hours

push eventOCA/OCB

Daniel Reis

commit sha aa7749b6ae3629831b9878e0eb22b6b2a8036425

[FIX] sale_timesheet: Timesheet based invoicing does not work for subtasks Steps to reproduce: 1. Enable Project Subtasks 2. On the "Office Design" Project, select a Task and create a subtask for it 3. Go to the Project Overview and Create Sales Order 4. Enter timesheets: 11 hours for the parent task, and 10 hours for the subtask 5. On the created Sales Order check the invoiced time Current behavior: The 11 hours form the parent task are shown as delivered in the Sales Order, but the 10 hours from the subtask are not. Expected behavior: Both the parent ans subtask time should be shown as delivered, so that it can be invoices. Closes #63930 opw:2426098 closes odoo/odoo#64791 Signed-off-by: Simon Goffin (sig) <sig@openerp.com>

view details

Nicolas Lempereur

commit sha 5e25f60dcc75ce9528c49bff8294bc8be96636fa

[FIX] website_event_questions: don't duplicate answers The answers are currently added to question from the event_type_id on create. This caused that if you duplicated an event, the answers would be duplicated since we go through create a second time. opw-2425120 closes #64795 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>

view details

OCA Git Bot

commit sha 0f71d22332c754217ec0a7dd733efec5bcf4349a

Merge remote-tracking branch 'odoo/12.0' into 12.0

view details

push time in 3 hours

push eventOCA/OCB

Raphael Collet

commit sha 824a6515a528cd2b682c3d3504c0d27ed9427cdb

[FIX] core: exists() with string ids The call model.browse('xxx').exists() should not return the record. Instead, it should fail as the string 'xxx' is not a valid ID. closes odoo/odoo#64765 Signed-off-by: Raphael Collet (rco) <rco@openerp.com>

view details

Nicolas Lempereur

commit sha cfb5e6e82a773fee0342d5e0417bae4efeb7f0bb

[FIX] website_event_questions: don't duplicate answers The answers are currently added to question from the event_type_id on create. This caused that if you duplicated an event, the answers would be duplicated since we go through create a second time. opw-2425120 closes #64782 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>

view details

oco-odoo

commit sha 224b4211e26b07171a89a8e60962b7a08f83bbab

[IMP] l10n_ch: remove old, now useless, setting This setting was introduced with the original implementation of the Swiss QR codes, when they were not yet legally supported. They are now, so we don't use it anymore. closes odoo/odoo#64809 Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>

view details

OCA Git Bot

commit sha 3acb265a81b78e5e61893d0f6c5d357c68b64391

Merge remote-tracking branch 'odoo/13.0' into 13.0

view details

push time in 3 hours

push eventOCA/OCB

Wolfgang Taferner

commit sha 0f36bbd257ba5e8e03462f675d81fdbdece1893a

[FIX] account/purchase: onchange on purchase create bill does not work closes odoo/odoo#64502 X-original-commit: 48120a587c70d7b50c21791bba902c4d77bb8c79 Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>

view details

Andrea Grazioso (agr-odoo)

commit sha 6d01aa356281badea0dc0271f2520f30ebbefe4c

[FIX] stock: add partner info in return svl Have a product category Inventory Valuation Automatic Create a SO and deliver the product in such category Create return and validate In Journal Entry the accounting move related to return will not have partner id opw-2421393 closes odoo/odoo#64759 X-original-commit: 1d4460bcc80e31e9198b19502951d68b447a136a Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>

view details

Goffin Simon

commit sha 90c286e168b62876214119d69257d0aa5c120bc2

[FIX] l10n_ch: Traceback when installing module Function _is_l10n_ch_postal expects a singleton closes odoo/odoo#64776 Signed-off-by: Josse Colpaert <jco@openerp.com>

view details

Arnold Moyaux

commit sha a3ab5c3a73243e6f4d5662ee27765439ba9b5363

[FIX] stock: lots ids disapear after onchange. Use case to reproduce: - Go to MO form produce at least 2 units of a product with a component tracked by serial number. - Edit the producing quantity to 1.0 - Save - Edit the producing quantity to 2.0 The move lines are removed. It happens because the lot_ids field is empty and thus the setter remove the existing stock.move.line. It's empty because the compute try to do a match on existing id. However the stock.move in the onchange could have a new virtual id. fine tuning of commit 8dfee8cb2d60942641b73eaa6489b02aa378c5ac closes odoo/odoo#64747 Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>

view details

Andrea Grazioso (agr-odoo)

commit sha 655597e9a3637abbaeffddcc78663e8733070db4

[FIX] account: allow to skip account constraint To fully allow f4e67d8ae174d7e2ee75a1de1083b31a6ff2af8b we need also to disable to check on account when the constraint field has been used to set the account on the journal opw-2394959 closes odoo/odoo#64667 Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>

view details

Pierre Paridans

commit sha 036fc78103e3d8875a5a54c797e1ba0670d02272

[FIX] web: Dialog widget should always call on_{attach|detach}_callback Before this commit, the `on_attach_callback` and `on_detach_callback` callbacks are not called all the time on the `Dialog` widget when it's attached/detached to the DOM. Relying on those callbacks could result in unpredictable behaviours. To be more precise, the `on_attach_callback` isn't executed on a regular Dialog#open() call. But Dialog spawned by the ActionManager will execute it. This difference prevents from properly binding those callbacks later on through an extend or include of the Dialog widget as we have no way to know if they have already been called or not (e.g. which can result in calling them twice). This commit normalize this situation by ensuring that the `on_attach_callback` and `on_detach_callback` callbacks are properly called by the Dialog widget and allows any extension of this widget to rely on them. Therefore the ActionManager is adapted accordingly. opw-2438534 closes odoo/odoo#64780 Related: odoo/enterprise#15849 Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>

view details

Aaron Bohy

commit sha 3655efc990d4792453304938d555122f4f5d3c88

[FIX] web: update owl to last version This commit updates owl from v1.2.1 to v1.2.3 See [1], [2] for the list of changes. [1] https://github.com/odoo/owl/commit/71f545058bc9cdc326003bf8573cef1bb4c903d4 [2] https://github.com/odoo/owl/commit/490cf180794cdc100e33e792f6d12172d42bf981 closes odoo/odoo#64516 Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>

view details

Raphael Collet

commit sha a4d7e01e2a27e90060ffd19dffbad3cead5d608b

[FIX] core: exists() with string ids The call model.browse('xxx').exists() should not return the record. Instead, it should fail as the string 'xxx' is not a valid ID. closes odoo/odoo#64779 X-original-commit: 824a6515a528cd2b682c3d3504c0d27ed9427cdb Signed-off-by: Raphael Collet (rco) <rco@openerp.com>

view details

Tiffany Chang (tic)

commit sha 8bfa9efd989f4123b021c47f13cfe324eeb14013

[FIX] mrp: make done unbuild form readonly Some added readonly attributes in the unbuild form view were overriding the `states={'done': [('readonly', True)]}` attributes in the models' fields. So we add the readonly when state='done' to the view as well. Note that same issue exists in saas-12.3 and 13.0, but only for 2 of the 4 fields fixed in this commit (i.e. it probably isn't a big deal for these older versions.) Discovered during task: 2033341 closes odoo/odoo#63537 Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>

view details

nie

commit sha 604c07edcd4da8cf2a663d06ba91f137eb74691b

[FIX] website: an erroneous Google font makes website not editable Steps: - Go to "Website" > "Go to Website" - Click Edit in the top right corner - Click Options - Select "Add a Google Font" in the Font Family field - Insert an erroneous Google Font link (e.g. https://fonts.google.com/specimen/Robotoj ) - Save & Reload - Click Edit again Bug: The Edit button is not responding anymore Explanation: We try to `@import` the link in multiple files. For example, here: https://github.com/odoo/odoo/blob/70eb39b0cf30c1acf9a7116e109874b60e27aa2c/addons/website/static/src/scss/website.scss#L10 An erroneous font family results in an error 400 from the Google Fonts server. This prevents parts of the JS to load and makes it impossible to enter the edition mode. `EditPageMenu` handles the behavior when clicking on the Edit button. This menu depends on `website.compiled_assets_wysiwyg` as seen here: https://github.com/odoo/odoo/blob/b02a99bec709b5a6dc4dabb6cb81435dadc24e7e/addons/website/static/src/js/menu/edit.js#L10-L14 Since there is an error generating the file, the Promise fails but the error is not handled: https://github.com/odoo/odoo/blob/70eb39b0cf30c1acf9a7116e109874b60e27aa2c/addons/web/static/src/js/core/ajax.js#L164-L168 This commit prevents CSS loading errors from silently failing. The crash screen will only show up if the user is logged in and has edition rights. This commit also prevents the user from posting the form if the font is not accessible. At the moment, querying an unknown Google font from a script will result in a CORS error. A valid one will pass just fine. In case Google changes the behavior of these queries and allows the 400 to be sent, the fix also checks if the query returned an `ok` status code. opw:2439073 closes odoo/odoo#64695 Signed-off-by: backspac <backspac@users.noreply.github.com>

view details

Andrea Grazioso (agr-odoo)

commit sha 6532c6ba7acb2de53fc839d5a7c5d8b200716565

[FIX] sale,sale_coupon: do not invoice only promotion lines Create a promotion auto applied with 0 minimum amount on any product in catalog. Have a DEMO product invoiced on delivery Create a sale order with DEMO, apply the promotion. Confirm. Click on 'Create Invoice'. The invoice will only contain the promotion because the line for DEMO is to be invoiced only after delivery, while by default the promotion product has the invoice policy 'on order' This commit will: * avoid highlight the button 'create invoice' if the only invoiceable lines are promotion lines as well as raising an error if the invoice is created in the same scenario * refuse to invoice only promotion lines from a SO. * adds a test to cover the case opw-2414630 closes odoo/odoo#64721 X-original-commit: a3afb98b9a90b28454284528871dd805da9a95b1 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>

view details

Sébastien Theys

commit sha 0e9fb00f7863593fa63a3adf2593fb48dfb168b1

[FIX] mail: more consistent async handling of scroll feature task-2333535 task-2388676 closes odoo/odoo#64505 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>

view details

Sébastien Theys

commit sha 785fdb6cea6ee7d9a1a4e4c6a44403a275a67763

[FIX] mail: prevent composer cursor from randomly changing position task-2388600 closes odoo/odoo#62446 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>

view details

push time in 3 hours

PR opened odoo/odoo

[FIX] l10n_ar, l10n_latam_invoice_document: Move Argentinian constraint from base module to localization module

Description of the issue/feature this PR addresses:

Error in the constraint when other localizations use l10n_latam_invoice_document module.

Current behavior before PR:

This Argentinean constraint is interfering in other localizations

Desired behavior after PR is merged:

This constraint will not will not interfere in other localizations

-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

+14 -2

0 comment

2 changed files

pr created time in 4 hours

Pull request review commentOCA/OpenUpgrade

[13.0][DEL] Remove coverage

 jobs:           MODULES_NEW=base,$(sed -n '/^+========/,$p'  odoo/openupgrade/doc/source/modules120-130.rst | grep "Done\|Partial\|Nothing" | grep -v "theme_" | sed -r -n 's/((^\| *\|new\| *)|^\|)([0-9a-z_]*) *\|.*$/\3/g p' | sed '/^\s*$/d' | paste -d, -s)           psql $DB -c "update ir_module_module set state='uninstalled' where name not in ('$(echo $MODULES_OLD | sed -e "s/,/','/g")')"           echo Testing modules $MODULES_NEW-          OPENUPGRADE_TESTS=1 coverage run $ODOO --database=$DB --update=$MODULES_NEW --db_host=$DB_HOST --db_port=$DB_PORT --db_port=$DB_PORT --db_password=$DB_PASSWORD --db_user=$DB_USERNAME --stop-after-init-      - name: Ending-        env:-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}-        run: coveralls+          OPENUPGRADE_TESTS=1 $ODOO --database=$DB --update=$MODULES_NEW --db_host=$DB_HOST --db_port=$DB_PORT --db_port=$DB_PORT --db_password=$DB_PASSWORD --db_user=$DB_USERNAME --stop-after-init

There's two times db port, although it was the before, but good moment to amend it.

StefanRijnhart

comment created time in 4 hours

Pull request review commentOCA/product-attribute

[12.0][FIX] product_dimension : compatibility with product_logistics_uom's volume_uom_id

   class Product(models.Model):-    _inherit = 'product.product'+    _inherit = "product.product" -    @api.onchange(-        'product_length', 'product_height', 'product_width', 'dimensional_uom_id')-    def onchange_calculate_volume(self):-        self.volume = self.env['product.template']._calc_volume(-            self.product_length, self.product_height,-            self.product_width, self.dimensional_uom_id)+    product_length = fields.Float("length")+    product_height = fields.Float("height")+    product_width = fields.Float("width")+    dimensional_uom_id = fields.Many2one(+        "uom.uom",+        "Dimensional UoM",+        domain=lambda self: self._get_dimension_uom_domain(),+        help="UoM for length, height, width",+        default=lambda self: self.env.ref("uom.product_uom_meter"),+    )      @api.model     def _get_dimension_uom_domain(self):-        return [-            ('category_id', '=', self.env.ref('uom.uom_categ_length').id)-        ]+        return [("category_id", "=", self.env.ref("uom.uom_categ_length").id)] -    product_length = fields.Float('length')-    product_height = fields.Float('height')-    product_width = fields.Float('width')-    dimensional_uom_id = fields.Many2one(-        'uom.uom',-        'Dimensional UoM',-        domain=lambda self: self._get_dimension_uom_domain(),-        help='UoM for length, height, width',-        default=lambda self: self.env.ref('uom.product_uom_meter'),+    @api.onchange(+        "product_length",+        "product_height",+        "product_width",+        "dimensional_uom_id",+        "volume_uom_id",+    )+    def onchange_calculate_volume(self):+        self.volume = self.env["product.template"]._calc_volume(+            self.product_length,+            self.product_height,+            self.product_width,+            self.dimensional_uom_id,+            self.volume_uom_id,         )   class ProductTemplate(models.Model):-    _inherit = 'product.template'+    _inherit = "product.template" -    @api.model-    def _calc_volume(self, product_length, product_height, product_width, uom_id):-        volume = 0-        if product_length and product_height and product_width and uom_id:-            length_m = self.convert_to_meters(product_length, uom_id)-            height_m = self.convert_to_meters(product_height, uom_id)-            width_m = self.convert_to_meters(product_width, uom_id)-            volume = length_m * height_m * width_m+    def _convert_to_meters(self, measure, dimensional_uom):+        uom_meters = self.env.ref("uom.product_uom_meter") -        return volume+        return dimensional_uom._compute_quantity(+            qty=measure, to_unit=uom_meters, round=False,+        ) -    @api.onchange(-        'product_length', 'product_height', 'product_width', 'dimensional_uom_id')-    def onchange_calculate_volume(self):-        self.volume = self._calc_volume(-            self.product_length, self.product_height, self.product_width,-            self.dimensional_uom_id)+    @api.model+    def _calc_volume(+        self, product_length, product_height, product_width, uom_id, volume_uom_id+    ):+        uom_litre = self.env.ref("uom.product_uom_litre")+        volume_litre = 0 -    def convert_to_meters(self, measure, dimensional_uom):-        uom_meters = self.env.ref('uom.product_uom_meter')+        if product_length and product_height and product_width and uom_id:+            length_m = self._convert_to_meters(product_length, uom_id)+            height_m = self._convert_to_meters(product_height, uom_id)+            width_m = self._convert_to_meters(product_width, uom_id)+            volume_litre = (length_m * height_m * width_m) * 1000 -        return dimensional_uom._compute_quantity(-            qty=measure,-            to_unit=uom_meters,-            round=False,+        return uom_litre._compute_quantity(+            qty=volume_litre, to_unit=volume_uom_id, round=False,

Hi @hparfr ! Thanks for the review ! In fact I used litres because it's the easiest UoM I found registered in native uom module datas : https://github.com/odoo/odoo/blob/12.0/addons/uom/data/uom_data.xml#L90

In your suggestion I didn't catch where does your uom_m³ comes from...

clementmbr

comment created time in 4 hours

PR opened OCA/OpenUpgrade

[DEL] Remove coverage

Upload currently fails with

Could not submit coverage: 422 Client Error:
Unprocessable Entity for url: https://coveralls.io/api/v1/jobs

Even though coverage data is gathered successfully in the correct format.

Having coverage on the migration scripts hardly makes any sense, as it only displays which code does not run during the migration.

-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

+1 -6

0 comment

1 changed file

pr created time in 4 hours

more