Skip to content
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

[ADD] res.partner: Porting partner_street_number module to Odoo 9.0 #207

Merged
merged 3 commits into from Apr 15, 2019
Merged

[ADD] res.partner: Porting partner_street_number module to Odoo 9.0 #207

merged 3 commits into from Apr 15, 2019

Conversation

DarkoNikolovski
Copy link

No description provided.

@moylop260
Copy link

👍

<openerp>
<data>

<template id="assets_backend" name="partner_street_number backend assets" inherit_id="web.assets_backend">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is causing a crash on runbot. Can you double check?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked it once again locally on fresh odoo 9 installation and everything looks fine.

@pedrobaeza pedrobaeza mentioned this pull request Jan 13, 2016
31 tasks
@yvaucher
Copy link
Member

Added it in #184

@rafaelbn
Copy link
Member

rafaelbn commented Jul 1, 2016

Please @DarkoNikolovski could you review this PR?
Runbot fails:

2015-12-24 18:03:45     CRITICAL    server  openerp.service.server:898 preload_registries

Failed to initialize database `3138409-207-9715fc-all`.
Traceback (most recent call last):
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3138409-207-9715fc/openerp/service/server.py", line 885, in preload_registries
    registry = RegistryManager.new(dbname, update_module=update_module)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3138409-207-9715fc/openerp/modules/registry.py", line 385, in new
    openerp.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3138409-207-9715fc/openerp/modules/loading.py", line 337, in load_modules
    loaded_modules, update_module)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3138409-207-9715fc/openerp/modules/loading.py", line 237, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3138409-207-9715fc/openerp/modules/loading.py", line 156, in load_module_graph
    _load_data(cr, module_name, idref, mode, kind='data')
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3138409-207-9715fc/openerp/modules/loading.py", line 98, in _load_data
    tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3138409-207-9715fc/openerp/tools/convert.py", line 852, in convert_file
    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3138409-207-9715fc/openerp/tools/convert.py", line 939, in convert_xml_import
    obj.parse(doc.getroot(), mode=mode)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3138409-207-9715fc/openerp/tools/convert.py", line 802, in parse
    self.parse(rec, mode)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3138409-207-9715fc/openerp/tools/convert.py", line 805, in parse
    self._tags[rec.tag](self.cr, rec, de, mode=mode)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3138409-207-9715fc/openerp/tools/convert.py", line 778, in _tag_template
    return self._tag_record(cr, record, data_node)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3138409-207-9715fc/openerp/tools/convert.py", line 701, in _tag_record
    f_val = self.id_get(cr, f_ref)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3138409-207-9715fc/openerp/tools/convert.py", line 783, in id_get
    res = self.model_id_get(cr, id_str, raise_if_not_found)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3138409-207-9715fc/openerp/tools/convert.py", line 794, in model_id_get
    raise_if_not_found=raise_if_not_found)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3138409-207-9715fc/openerp/api.py", line 238, in wrapper
    return old_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3138409-207-9715fc/openerp/addons/base/ir/ir_model.py", line 960, in xmlid_to_res_model_res_id
    return self.xmlid_lookup(cr, uid, xmlid)[1:3]
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3138409-207-9715fc/openerp/api.py", line 238, in wrapper
    return old_api(self, *args, **kwargs)
  File "<string>", line 2, in xmlid_lookup
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3138409-207-9715fc/openerp/tools/cache.py", line 85, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3138409-207-9715fc/openerp/addons/base/ir/ir_model.py", line 950, in xmlid_lookup
    raise ValueError('External ID not found in the system: %s' % (xmlid))
ParseError: "External ID not found in the system: web.assets_backend" while parsing None:5, near
<data name="partner_street_number backend assets" inherit_id="web.assets_backend">
      <xpath expr="." position="inside">
        <link rel="stylesheet" href="/partner_street_number/static/src/css/field.css"/>
      </xpath>
    </data>

@rafaelbn rafaelbn added this to the 9.0 milestone Jul 1, 2016
@yvaucher
Copy link
Member

yvaucher commented Jul 4, 2016

You might need a dependency on module web to solve the error pointed out by @rafaelbn

@pedrobaeza
Copy link
Member

Please add the dependency as stated, and we will be able to merge this.

@astirpe
Copy link
Member

astirpe commented Mar 15, 2017

Ping @DarkoNikolovski, will you work on this PR next days?

@DarkoNikolovski
Copy link
Author

Yeah, I will add the dependency, no problem. Sorry I have missed previous comments on this PR.

"author": "Therp BV,Odoo Community Association (OCA)",
"website": "https://github.com/oca/partner-contact",
"category": 'Tools',
"depends": [
'base'
],
'web',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is required install web?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The placement of the street name and number fields is now tweaked using CSS instead of using inline style, and the css link is inserted in an assets view from the web module.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@moylop260 please could you finish you review? thanks!

@rafaelbn
Copy link
Member

Rebuilding runbot for testing

@@ -0,0 +1,11 @@
.o_address_street_name {
float: left !important;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

float: left !important;
margin-right: 2% !important;
width: 75% !important;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix indentation in this whole file

margin-right: 0% !important;
width: 25% !important;
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix EOF


.o_address_street_number {
margin-right: 0% !important;
width: 25% !important;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never use !important. Use more explicit selectors instead.

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

odoo

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put only <odoo> tag

position="attributes">
<attribute name="invisible">1</attribute>
</xpath>

<xpath expr="//field[@name='child_ids']" position="attributes">
<attribute name="context">{'default_parent_id': active_id, 'default_street_name': street_name, 'default_street_number': street_number, 'default_street2': street2, 'default_city': city, 'default_state_id': state_id, 'default_zip': zip, 'default_country_id': country_id, 'default_supplier': supplier, 'default_customer': customer, 'default_use_parent_address': True}</attribute>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't remove this

@rafaelbn
Copy link
Member

Hi @DarkoNikolovski , thanks for this contribution. Please is it possible to review comments for merging? Let me know thanks!

Copy link
Member

@rafaelbn rafaelbn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in runbot

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

Successfully merging this pull request may close these issues.

10 participants