Skip to content

Commit

Permalink
[MIG] sale_brand: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JasminSForgeFlow committed May 20, 2024
1 parent f29acd8 commit 9639ab9
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 23 deletions.
5 changes: 2 additions & 3 deletions sale_brand/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ To use this module, you need to:
1. Go to Sales > Quotations
2. Select or create a quotation
3. Enter the information and the brand
4. Print the PDF report. It includes the information of the brand.
5. Confirm the quotation and generate an invoice
6. Print the PDF report. It includes the information of the brand.
4. Confirm the quotation and generate an invoice, invoice will have
brand details from sale order

Bug Tracker
===========
Expand Down
2 changes: 1 addition & 1 deletion sale_brand/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "Sale Brand",
"summary": "Send branded sales orders",
"version": "16.0.1.0.1",
"version": "17.0.1.0.0",
"category": "Sales Management",
"website": "https://github.com/OCA/brand",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
Expand Down
9 changes: 1 addition & 8 deletions sale_brand/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,7 @@ class SaleOrder(models.Model):
_name = "sale.order"
_inherit = ["sale.order", "res.brand.mixin"]

brand_id = fields.Many2one(
states={
"sent": [("readonly", True)],
"sale": [("readonly", True)],
"done": [("readonly", True)],
"cancel": [("readonly", True)],
}
)
brand_id = fields.Many2one()

def _prepare_invoice(self):
invoice_vals = {}
Expand Down
4 changes: 1 addition & 3 deletions sale_brand/readme/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@ To use this module, you need to:
1. Go to Sales \> Quotations
2. Select or create a quotation
3. Enter the information and the brand
4. Print the PDF report. It includes the information of the brand.
5. Confirm the quotation and generate an invoice
6. Print the PDF report. It includes the information of the brand.
4. Confirm the quotation and generate an invoice, invoice will have brand details from sale order
5 changes: 2 additions & 3 deletions sale_brand/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,8 @@ <h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
<li>Go to Sales &gt; Quotations</li>
<li>Select or create a quotation</li>
<li>Enter the information and the brand</li>
<li>Print the PDF report. It includes the information of the brand.</li>
<li>Confirm the quotation and generate an invoice</li>
<li>Print the PDF report. It includes the information of the brand.</li>
<li>Confirm the quotation and generate an invoice, invoice will have
brand details from sale order</li>
</ol>
</div>
<div class="section" id="bug-tracker">
Expand Down
2 changes: 1 addition & 1 deletion sale_brand/tests/test_sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class TestSaleOrder(TransactionCase):
def setUp(self):
super(TestSaleOrder, self).setUp()
super().setUp()
self.sale = self.env.ref("sale.sale_order_1")
self.sale.company_id.brand_use_level = "required"
self.sale.brand_id = self.env["res.brand"].create({"name": "brand"})
Expand Down
5 changes: 1 addition & 4 deletions sale_brand/views/sale_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
<field name="inherit_id" ref="sale.view_order_form" />
<field name="arch" type="xml">
<field name="partner_id" position="after">
<field
name="brand_id"
attrs="{'readonly': [('state', '!=', 'draft')]}"
/>
<field name="brand_id" readonly="state != 'draft'" />
</field>
</field>
</record>
Expand Down

0 comments on commit 9639ab9

Please sign in to comment.