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

[16.0][FIX] base_ubl: street3 in UBL generation #904

Closed
wants to merge 1 commit into from

Conversation

jbaudoux
Copy link
Contributor

@jbaudoux jbaudoux commented Jan 15, 2024

In an address, the real street is usually put on the last "street" field. Ensure we get this in StreetName or AdditionalStreetName but not in another element.

Example from https://en.wikipedia.org/wiki/Address

  • name: Ms H Williams
  • street: Finance and Accounting
  • street2: Australia Post
  • street3: 219–241 Cleveland St

Also improve UBL generation in case one of the street field is empty

cc @simahawk @nilshamerlinck

@jbaudoux jbaudoux force-pushed the 16.0-fix-base_ubl-street3 branch 3 times, most recently from a317f31 to c41829a Compare January 15, 2024 17:28
@jbaudoux jbaudoux changed the title [16.0][FIX] base_ubl: street3 export [16.0][FIX] base_ubl: street3 in UBL generation Jan 15, 2024
streetname.text = partner.street
if partner.street2:
streetname.text = partner.street or partner.street2
if partner.street and partner.street2:
addstreetname = etree.SubElement(
address, ns["cbc"] + "AdditionalStreetName"
)
addstreetname.text = partner.street2
if hasattr(partner, "street3") and partner.street3:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if hasattr(partner, "street3") and partner.street3:
# if oca/partner-contact/partner_address_street3 is installed
if hasattr(partner, "street3") and partner.street3:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

comment added

Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label May 26, 2024
In an address, the real street is usually put on the last "street"
field. Ensure we get this in StreetName or AdditionalStreetName but not
in another element.

Example:
 - name: Ms H Williams
 - street: Finance and Accounting
 - street2: Australia Post
 - street3: 219–241 Cleveland St
@jbaudoux jbaudoux force-pushed the 16.0-fix-base_ubl-street3 branch from c41829a to 38d876e Compare May 27, 2024 08:46
@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jun 2, 2024
Copy link

github-actions bot commented Oct 6, 2024

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Oct 6, 2024
@github-actions github-actions bot closed this Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants