Skip to content

Commit

Permalink
[MIG] sale_quotation_number: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Roger committed Jul 24, 2024
1 parent 28f3eed commit 26669d7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion sale_quotation_number/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{
"name": "Sale Quotation Numeration",
"summary": "Different sequence for sale quotations",
"version": "16.0.1.0.2",
"version": "17.0.1.0.0",
"category": "Sales Management",
"website": "https://github.com/OCA/sale-workflow",
"author": "Elico Corp, "
Expand Down
5 changes: 4 additions & 1 deletion sale_quotation_number/models/res_company.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ class ResCompany(models.Model):
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"

keep_name_so = fields.Boolean(related="company_id.keep_name_so", readonly=False)
keep_name_so = fields.Boolean(
related="company_id.keep_name_so",
readonly=False,
)
2 changes: 1 addition & 1 deletion sale_quotation_number/tests/test_sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def test_copy_with_origin(self):

def test_error_confirmation_sequence(self):
order = self.sale_order_model.create(
{"partner_id": self.env.ref("base.res_partner_1").id, "state": "done"}
{"partner_id": self.env.ref("base.res_partner_1").id, "state": "sale"}
)
# An exception is forced
sequence_id = self.env["ir.sequence"].search(
Expand Down
13 changes: 5 additions & 8 deletions sale_quotation_number/views/sales_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,14 @@
<field name="inherit_id" ref="sale.res_config_settings_view_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='group_proforma_sales']/../.." position="after">
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="keep_name_so" />
</div>
<div class="o_setting_right_pane">
<label for="keep_name_so" />
<block id="blq_keep_name_so">
<setting id="set_keep_name_so">
<field name="keep_name_so" readonly="0" />
<div class="text-muted">
If this is unchecked, quotations use a different sequence from sale orders
</div>
</div>
</div>
</setting>
</block>
</xpath>
</field>
</record>
Expand Down

0 comments on commit 26669d7

Please sign in to comment.