Skip to content

Commit 5771e2c

Browse files
committed
[IMP] partner_delivery_zone: pre-commit auto fixes
[MIG] partner_delivery_zone: Migration to 17.0 [MIG] partner_delivery_zone: Migration to 17.0
1 parent 350f540 commit 5771e2c

11 files changed

+43
-12
lines changed

partner_delivery_zone/README.rst

+4
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ Contributors
101101
* Angel Moya Pardo <angel.moya@pesol.es>
102102
* Antonio J Rubio Lorente <antonio.rubio@pesol.es>
103103

104+
* `Puntsistemes <https://www.puntsistemes.com>`_
105+
106+
* Pedro Guirao <pguirao@puntsistemes.es>
107+
104108
Maintainers
105109
~~~~~~~~~~~
106110

partner_delivery_zone/__manifest__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"name": "Partner Delivery Zone",
55
"summary": "This module allows to create partner delivery zones for physical products",
6-
"version": "16.0.1.0.1",
6+
"version": "17.0.1.0.1",
77
"development_status": "Beta",
88
"category": "Delivery",
99
"website": "https://github.com/OCA/delivery-carrier",

partner_delivery_zone/pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
To configure this module, you need to:
2+
3+
1. Go to **Contacts \> Configuration \> Delivery Zones** and create the
4+
required codes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
- [Tecnativa](https://www.tecnativa.com)
2+
- Sergio Teruel
3+
- César A. Sánchez
4+
- Luis Daniel Lafaurie
5+
- [Pesol](https://www.pesol.es)
6+
- Angel Moya Pardo \<<angel.moya@pesol.es>\>
7+
- Antonio J Rubio Lorente \<<antonio.rubio@pesol.es>\>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
This module allows to allocate delivery zones to customers. Information
2+
is shown on sale orders and stock pickings. It also allows to group and
3+
search by delivery zone in partners, sale orders and stock pickings
4+
views.
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- In future versions, the system will be capable of setting delivery
2+
zones based on partner's zip or postal codes.

partner_delivery_zone/readme/USAGE.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
To use this module you need to:
2+
3+
1. Go to Sales \> Orders \> Customers.
4+
2. Choose a customer.
5+
3. Click on 'Edit' button.
6+
4. Go to Sales & Purchase tab.
7+
5. In 'Delivery Zone' field select an option for this partner.
8+
6. Click on 'Save' button to apply changes.
9+
7. Go to Sales \> Orders \> Quotations.
10+
8. Create a quotation. 'Delivery zone' field is automatically filled.
11+
Confirm quotation.
12+
9. Open picking or 'Delivery' info (top right). In 'Additional Info'
13+
tab you can see a 'Delivery Zone' choice has been added.

partner_delivery_zone/tests/test_partner_delivery_zone.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ def test_default_line_discount_value(self):
8787
"type": "form",
8888
"model": "res.partner",
8989
"arch": """
90-
<data>
90+
<odoo>
9191
<field name='child_ids'
9292
context="{'default_name': 'test'}">
9393
</field>
94-
</data>
94+
</odoo>
9595
""",
9696
}
9797
)

partner_delivery_zone/views/sale_order_view.xml

+2-5
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88
<field name="inherit_id" ref="sale.view_order_form" />
99
<field name="arch" type="xml">
1010
<xpath expr="//field[@name='payment_term_id']" position="after">
11-
<field
12-
name="delivery_zone_id"
13-
attrs="{'readonly':[('state','in', ['done', 'cancel'])]}"
14-
/>
11+
<field name="delivery_zone_id" readonly="state in ['done', 'cancel']" />
1512
</xpath>
1613
</field>
1714
</record>
@@ -22,7 +19,7 @@
2219
<xpath expr="//field[@name='company_id']" position="before">
2320
<field
2421
name="delivery_zone_id"
25-
attrs="{'readonly':[('state','in', ['done', 'cancel'])]}"
22+
readonly="state in ['done', 'cancel']"
2623
optional="hidden"
2724
/>
2825
</xpath>

partner_delivery_zone/views/stock_picking_view.xml

+1-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88
<field name="arch" type="xml">
99
<xpath expr="//page[@name='extra']" position="inside">
1010
<group name="delivery_zone">
11-
<field
12-
name="delivery_zone_id"
13-
attrs="{'readonly': [('state', '=', 'done')]}"
14-
/>
11+
<field name="delivery_zone_id" readonly="state == 'done'" />
1512
</group>
1613
</xpath>
1714
</field>

0 commit comments

Comments
 (0)